Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
G4ParticleHPPhotonDist.hh
이 파일의 문서화 페이지로 가기
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  // Hadronic Process: Very Low Energy Neutron X-Sections
28  // original by H.P. Wellisch, TRIUMF, 14-Feb-97
29 //
30 // 070606 fix for Valgrind error by T. Koi
31 // 070612 fix memory leaking by T. Koi
32 // 070615 fix memory leaking by T. Koi
33 // 080625 fix memory leaking by T. Koi
34 //
35 // P. Arce, June-2014 Conversion neutron_hp to particle_hp
36 //
37 #ifndef G4ParticleHPPhotonDist_h
38 #define G4ParticleHPPhotonDist_h 1
39 #include "globals.hh"
40 #include <fstream>
41 #include "G4ios.hh"
42 #include "globals.hh"
43 #include "G4ParticleHPVector.hh"
45 #include "G4ParticleHPAngularP.hh"
46 #include "G4ParticleHPPartial.hh"
50 #include "G4ReactionProduct.hh"
51 #include "G4Gamma.hh"
53 #include "G4Cache.hh"
54 
56 {
57 public:
58 
60  : repFlag( 0 )
61  , targetMass( 0.0 )
62  , nDiscrete( 0 )
63  , isoFlag( 0 )
64  , tabulationType( 0 )
65  , nDiscrete2( 0 )
66  , nIso( 0 )
67  , nPartials( 0 )
69  , nGammaEnergies( 0 )
70  , theBaseEnergy( 0.0 )
71  {
72 
73  disType = 0;
74  energy = 0;
75  theYield = 0;
76  thePartialXsec = 0;
77  isPrimary = 0;
78  theShells = 0;
79  theGammas = 0;
80  nNeu = 0;
81  theLegendre = 0;
82  theAngular = 0;
83  distribution = 0;
84  probs = 0;
85  partials = 0;
86  //actualMult = 0;
87  actualMult.Put( NULL );
88 
89  theLevelEnergies = 0;
92 
93  }
94 
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::istream & aDataFile);
137 
138  void InitAngular(std::istream & aDataFile);
139 
140  void InitEnergies(std::istream & aDataFile);
141 
142  void InitPartials(std::istream & aDataFile);
143 
145 
146  inline G4double GetTargetMass() {return targetMass;}
147 
148  inline G4bool NeedsCascade() {return repFlag==2;}
149 
151 
152 private:
153 
154  G4int repFlag; //representation as multiplicities or transition probability arrays.
156 
157  G4int nDiscrete; //number of discrete photons
158  G4int * disType; // discrete, or continuum photons
159  G4double * energy; // photon energies
160  G4ParticleHPVector * theYield; // multiplicity as a function of neutron energy.
164 
165  G4int isoFlag; // isotropic or not?
175 
176  G4int * distribution; // not used for the moment.
178  G4ParticleHPVector * probs; // probabilities for the partial distributions.
179  G4ParticleHPPartial ** partials; // the partials, parallel to the above
180 
181  //G4int * actualMult;
183 
184  // for transition prob arrays start
191  // for transition prob arrays end
192 
193  G4ParticleHPFastLegendre theLegend; // fast look-up for leg-integrals
195 };
196 
197 #endif
G4ParticleHPPartial ** partials
G4ParticleHPFastLegendre theLegend
G4ParticleHPInterpolator theInt
G4ParticleHPAngularP ** theAngular
G4ParticleHPLegendreTable ** theLegendre
double G4double
Definition: G4Types.hh:76
bool G4bool
Definition: G4Types.hh:79
G4ParticleHPVector * theYield
G4bool InitMean(std::istream &aDataFile)
std::vector< G4ReactionProduct * > G4ReactionProductVector
void Put(const value_type &val) const
Definition: G4Cache.hh:318
G4ReactionProductVector * GetPhotons(G4double anEnergy)
int G4int
Definition: G4Types.hh:78
void InitPartials(std::istream &aDataFile)
void InitAngular(std::istream &aDataFile)
G4ParticleHPVector * thePartialXsec
G4InterpolationManager theLegendreManager
G4Cache< std::vector< G4int > * > actualMult
void InitEnergies(std::istream &aDataFile)