source: trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPPhotonDist.hh@ 1199

Last change on this file since 1199 was 1196, checked in by garnier, 16 years ago

update CVS release candidate geant4.9.3.01

File size: 6.0 KB
Line 
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26//
27// $Id: G4NeutronHPPhotonDist.hh,v 1.17 2008/06/26 02:40:23 tkoi Exp $
28// GEANT4 tag $Name: geant4-09-03-cand-01 $
29//
30 // Hadronic Process: Very Low Energy Neutron X-Sections
31 // original by H.P. Wellisch, TRIUMF, 14-Feb-97
32//
33// 070606 fix for Valgrind error by T. Koi
34// 070612 fix memory leaking by T. Koi
35// 070615 fix memory leaking by T. Koi
36// 080625 fix memory leaking by T. Koi
37//
38
39#ifndef G4NeutronHPPhotonDist_h
40#define G4NeutronHPPhotonDist_h 1
41#include "globals.hh"
42#include <fstream>
43#include "G4ios.hh"
44#include "globals.hh"
45#include "G4NeutronHPVector.hh"
46#include "G4NeutronHPLegendreTable.hh"
47#include "G4NeutronHPAngularP.hh"
48#include "G4NeutronHPPartial.hh"
49#include "G4NeutronHPFastLegendre.hh"
50#include "G4NeutronHPInterpolator.hh"
51#include "G4ReactionProductVector.hh"
52#include "G4ReactionProduct.hh"
53#include "G4Gamma.hh"
54#include "G4InterpolationManager.hh"
55
56class G4NeutronHPPhotonDist
57{
58public:
59
60 G4NeutronHPPhotonDist()
61 : repFlag( 0 )
62 , targetMass( 0.0 )
63 , nDiscrete( 0 )
64 , isoFlag( 0 )
65 , tabulationType( 0 )
66 , nDiscrete2( 0 )
67 , nIso( 0 )
68 , nPartials( 0 )
69 , theInternalConversionFlag( 0 )
70 , nGammaEnergies( 0 )
71 , theBaseEnergy( 0.0 )
72 {
73
74 disType = 0;
75 energy = 0;
76 theYield = 0;
77 thePartialXsec = 0;
78 isPrimary = 0;
79 theShells = 0;
80 theGammas = 0;
81 nNeu = 0;
82 theLegendre = 0;
83 theAngular = 0;
84 distribution = 0;
85 probs = 0;
86 partials = 0;
87 actualMult = 0;
88
89 theLevelEnergies = 0;
90 theTransitionProbabilities = 0;
91 thePhotonTransitionFraction = 0;
92
93 }
94
95 ~G4NeutronHPPhotonDist()
96 {
97 delete [] disType;
98 delete [] energy;
99 delete [] theYield;
100 delete [] thePartialXsec;
101 delete [] isPrimary;
102 delete [] theShells;
103 delete [] theGammas;
104 delete [] nNeu;
105 delete [] theAngular;
106 delete [] distribution;
107 delete [] probs;
108
109 if ( theLegendre != NULL )
110 {
111 for ( G4int i = 0 ; i < (nDiscrete2-nIso) ; i++ )
112 if ( theLegendre[i] != NULL ) delete[] theLegendre[i];
113
114 delete [] theLegendre;
115 }
116
117 if ( partials != 0 )
118 {
119 for ( G4int i = 0 ; i < nPartials ; i++ )
120 { delete partials[i]; }
121
122 delete [] partials;
123 }
124
125 delete [] actualMult;
126
127 // delete theLevelEnergies;
128 // delete theTransitionProbabilities;
129 // delete thePhotonTransitionFraction;
130// TKDB
131 delete [] theLevelEnergies;
132 delete [] theTransitionProbabilities;
133 delete [] thePhotonTransitionFraction;
134 }
135
136 G4bool InitMean(std::ifstream & aDataFile);
137
138 void InitAngular(std::ifstream & aDataFile);
139
140 void InitEnergies(std::ifstream & aDataFile);
141
142 void InitPartials(std::ifstream & aDataFile);
143
144 G4ReactionProductVector * GetPhotons(G4double anEnergy);
145
146 inline G4double GetTargetMass() {return targetMass;}
147
148 inline G4bool NeedsCascade() {return repFlag==2;}
149
150 inline G4double GetLevelEnergy() {return theBaseEnergy;}
151
152private:
153
154 G4int repFlag; //representation as multiplicities or transition probability arrays.
155 G4double targetMass;
156
157 G4int nDiscrete; //number of discrete photons
158 G4int * disType; // discrete, or continuum photons
159 G4double * energy; // photon energies
160 G4NeutronHPVector * theYield; // multiplicity as a function of neutron energy.
161 G4NeutronHPVector theTotalXsec;
162 G4NeutronHPVector * thePartialXsec;
163 G4int * isPrimary;
164
165 G4int isoFlag; // isotropic or not?
166 G4int tabulationType;
167 G4int nDiscrete2;
168 G4int nIso;
169 G4double * theShells;
170 G4double * theGammas;
171 G4int * nNeu;
172 G4InterpolationManager theLegendreManager;
173 G4NeutronHPLegendreTable ** theLegendre;
174 G4NeutronHPAngularP ** theAngular;
175
176 G4int * distribution; // not used for the moment.
177 G4int nPartials;
178 G4NeutronHPVector * probs; // probabilities for the partial distributions.
179 G4NeutronHPPartial ** partials; // the partials, parallel to the above
180
181 G4int * actualMult;
182
183 // for transition prob arrays start
184 G4int theInternalConversionFlag;
185 G4int nGammaEnergies;
186 G4double theBaseEnergy;
187 G4double * theLevelEnergies;
188 G4double * theTransitionProbabilities;
189 G4double * thePhotonTransitionFraction;
190 // for transition prob arrays end
191
192 G4NeutronHPFastLegendre theLegend; // fast look-up for leg-integrals
193 G4NeutronHPInterpolator theInt; // interpolation
194};
195
196#endif
Note: See TracBrowser for help on using the repository browser.