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

Last change on this file since 830 was 819, checked in by garnier, 17 years ago

import all except CVS

File size: 5.8 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.16 2007/06/22 09:23:47 gcosmo Exp $
28// GEANT4 tag $Name: $
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//
37
38#ifndef G4NeutronHPPhotonDist_h
39#define G4NeutronHPPhotonDist_h 1
40#include "globals.hh"
41#include <fstream>
42#include "G4ios.hh"
43#include "globals.hh"
44#include "G4NeutronHPVector.hh"
45#include "G4NeutronHPLegendreTable.hh"
46#include "G4NeutronHPAngularP.hh"
47#include "G4NeutronHPPartial.hh"
48#include "G4NeutronHPFastLegendre.hh"
49#include "G4NeutronHPInterpolator.hh"
50#include "G4ReactionProductVector.hh"
51#include "G4ReactionProduct.hh"
52#include "G4Gamma.hh"
53#include "G4InterpolationManager.hh"
54
55class G4NeutronHPPhotonDist
56{
57public:
58
59 G4NeutronHPPhotonDist()
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 )
68 , theInternalConversionFlag( 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
88 theLevelEnergies = 0;
89 theTransitionProbabilities = 0;
90 thePhotonTransitionFraction = 0;
91
92 }
93
94 ~G4NeutronHPPhotonDist()
95 {
96 delete [] disType;
97 delete [] energy;
98 delete [] theYield;
99 delete [] thePartialXsec;
100 delete [] isPrimary;
101 delete [] theShells;
102 delete [] theGammas;
103 delete [] nNeu;
104 delete [] theLegendre;
105 delete [] theAngular;
106 delete [] distribution;
107 delete [] probs;
108
109// TKDB
110 if ( partials != 0 )
111 {
112 for ( G4int i = 0 ; i < nPartials ; i++ )
113 { delete partials[ i ]; }
114
115 delete [] partials;
116 }
117 // delete [] partials;
118
119 delete [] actualMult;
120
121 // delete theLevelEnergies;
122 // delete theTransitionProbabilities;
123 // delete thePhotonTransitionFraction;
124// TKDB
125 delete [] theLevelEnergies;
126 delete [] theTransitionProbabilities;
127 delete [] thePhotonTransitionFraction;
128 }
129
130 G4bool InitMean(std::ifstream & aDataFile);
131
132 void InitAngular(std::ifstream & aDataFile);
133
134 void InitEnergies(std::ifstream & aDataFile);
135
136 void InitPartials(std::ifstream & aDataFile);
137
138 G4ReactionProductVector * GetPhotons(G4double anEnergy);
139
140 inline G4double GetTargetMass() {return targetMass;}
141
142 inline G4bool NeedsCascade() {return repFlag==2;}
143
144 inline G4double GetLevelEnergy() {return theBaseEnergy;}
145
146private:
147
148 G4int repFlag; //representation as multiplicities or transition probability arrays.
149 G4double targetMass;
150
151 G4int nDiscrete; //number of discrete photons
152 G4int * disType; // discrete, or continuum photons
153 G4double * energy; // photon energies
154 G4NeutronHPVector * theYield; // multiplicity as a function of neutron energy.
155 G4NeutronHPVector theTotalXsec;
156 G4NeutronHPVector * thePartialXsec;
157 G4int * isPrimary;
158
159 G4int isoFlag; // isotropic or not?
160 G4int tabulationType;
161 G4int nDiscrete2;
162 G4int nIso;
163 G4double * theShells;
164 G4double * theGammas;
165 G4int * nNeu;
166 G4InterpolationManager theLegendreManager;
167 G4NeutronHPLegendreTable ** theLegendre;
168 G4NeutronHPAngularP ** theAngular;
169
170 G4int * distribution; // not used for the moment.
171 G4int nPartials;
172 G4NeutronHPVector * probs; // probabilities for the partial distributions.
173 G4NeutronHPPartial ** partials; // the partials, parallel to the above
174
175 G4int * actualMult;
176
177 // for transition prob arrays start
178 G4int theInternalConversionFlag;
179 G4int nGammaEnergies;
180 G4double theBaseEnergy;
181 G4double * theLevelEnergies;
182 G4double * theTransitionProbabilities;
183 G4double * thePhotonTransitionFraction;
184 // for transition prob arrays end
185
186 G4NeutronHPFastLegendre theLegend; // fast look-up for leg-integrals
187 G4NeutronHPInterpolator theInt; // interpolation
188};
189
190#endif
Note: See TracBrowser for help on using the repository browser.