Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4fissionEvent Class Reference

#include <G4fissionEvent.hh>

Public Member Functions

 G4fissionEvent (G4int isotope, G4double time, G4double nubar, G4double eng)
 
 ~G4fissionEvent ()
 
G4int getNeutronNu ()
 
G4int getPhotonNu ()
 
G4double getNeutronEnergy (G4int index)
 
G4double getNeutronVelocity (G4int index)
 
G4double getNeutronDircosu (G4int index)
 
G4double getNeutronDircosv (G4int index)
 
G4double getNeutronDircosw (G4int index)
 
G4double getPhotonEnergy (G4int index)
 
G4double getPhotonVelocity (G4int index)
 
G4double getPhotonDircosu (G4int index)
 
G4double getPhotonDircosv (G4int index)
 
G4double getPhotonDircosw (G4int index)
 
G4double getNeutronAge (G4int index)
 
G4double getPhotonAge (G4int index)
 

Static Public Member Functions

static void setDelayOption (G4int delay)
 
static void setCorrelationOption (G4int correlation)
 
static void setNudistOption (G4int nudist)
 
static void setCf252Option (G4int ndist, G4int neng)
 
static void setRNGf (float(*funcptr)(void))
 
static void setRNGd (G4double(*funcptr)(void))
 

Detailed Description

Definition at line 62 of file G4fissionEvent.hh.

Constructor & Destructor Documentation

◆ G4fissionEvent()

G4fissionEvent::G4fissionEvent ( G4int isotope,
G4double time,
G4double nubar,
G4double eng )

Definition at line 65 of file G4fissionEvent.cc.

67 :neutronNu(0), neutronEnergies(0), neutronVelocities(0), neutronDircosu(0),
68 neutronDircosv(), neutronDircosw(), neutronAges(0),
69 photonNu(0), photonEnergies(0), photonVelocities(0), photonDircosu(0),
70 photonDircosv(0), photonDircosw(0), photonAges(0)
71{
72 /*
73 * Constructs a fission event with neutronNu neutrons and photonNu
74 * photons.
75 */
76 G4int i;
77
78 if (nubar == -1.) {
79 /* spontaneous fission */
80 neutronNu = G4SmpSpNuDistData(isotope, Cf252ndistoption);
81 photonNu = G4SmpSpNugDistData(isotope);
82 } else {
83 /* induced fission */
84 if (nudistoption == 0 || nudistoption == 1) {
85 switch (isotope) {
86 case 92235:
87 neutronNu = G4SmpNuDistDataU235(eng,nudistoption);
88 break;
89 case 92238:
90 neutronNu = G4SmpNuDistDataU238(eng);
91 break;
92 case 94239:
93 neutronNu = G4SmpNuDistDataPu239(eng);
94 break;
95 default:
96 neutronNu = (G4int) G4SmpTerrell(nubar);
97 break;
98 }
99 } else if (nudistoption == 2) {
100 switch (isotope) {
101 case 92232:
102 case 92234:
103 case 92236:
104 case 92238:
105 neutronNu = G4SmpNuDistDataU232_234_236_238(nubar);
106 break;
107 case 92233:
108 case 92235:
109 neutronNu = (G4int) G4SmpNuDistDataU233_235(nubar);
110 break;
111 case 94239:
112 case 94241:
113 neutronNu = G4SmpNuDistDataPu239_241(nubar);
114 break;
115 default:
116 neutronNu = (G4int) G4SmpTerrell(nubar);
117 break;
118 }
119 } else if (nudistoption == 3) {
120 switch (isotope) {
121 case 92232:
122 case 92234:
123 case 92236:
124 case 92238:
125 neutronNu = G4SmpNuDistDataU232_234_236_238_MC(nubar);
126 break;
127 case 92233:
128 case 92235:
129 neutronNu = (G4int) G4SmpNuDistDataU233_235_MC(nubar);
130 break;
131 case 94239:
132 case 94241:
133 neutronNu = G4SmpNuDistDataPu239_241_MC(nubar);
134 break;
135 default:
136 neutronNu = (G4int) G4SmpTerrell(nubar);
137 break;
138 }
139 }
140 photonNu = G4SmpNugDist(isotope, nubar);
141 }
142 if (neutronNu > 0) {
143 neutronEnergies = new G4double[ neutronNu ];
144 neutronVelocities = new G4double[ neutronNu ];
145 neutronDircosu = new G4double[ neutronNu ];
146 neutronDircosv = new G4double[ neutronNu ];
147 neutronDircosw = new G4double[ neutronNu ];
148 neutronAges = new G4double[neutronNu];
149 for (i=0; i<neutronNu; i++) {
150 if (isotope == 98252) neutronEnergies[i] = G4SmpNEngCf252(Cf252nengoption);
151 else neutronEnergies[i] = G4SmpWatt(eng, isotope);
152 neutronVelocities[i] = G4SmpNVel(
153 neutronEnergies[i],
154 &(neutronDircosu[i]),
155 &(neutronDircosv[i]),
156 &(neutronDircosw[i])
157 );
158 neutronAges[i] = time;
159 }
160 }
161 if (photonNu > 0) {
162 photonEnergies = new G4double[photonNu];
163 photonVelocities = new G4double[photonNu];
164 photonDircosu = new G4double[photonNu];
165 photonDircosv = new G4double[photonNu];
166 photonDircosw = new G4double[photonNu];
167 photonAges = new G4double[photonNu];
168 for (i=0; i<photonNu; i++) {
169 photonEnergies[i] = G4SmpGEng();
170 photonVelocities[i] = G4SmpPVel(
171 photonEnergies[i],
172 &(photonDircosu[i]),
173 &(photonDircosv[i]),
174 &(photonDircosw[i])
175 );
176 photonAges[i] = time;
177 }
178 }
179}
double G4double
Definition G4Types.hh:83
int G4int
Definition G4Types.hh:85

◆ ~G4fissionEvent()

G4fissionEvent::~G4fissionEvent ( )

Definition at line 181 of file G4fissionEvent.cc.

181 {
182 if (neutronNu > 0) {
183 delete [] neutronEnergies;
184 delete [] neutronVelocities;
185 delete [] neutronDircosu;
186 delete [] neutronDircosv;
187 delete [] neutronDircosw;
188 delete [] neutronAges;
189 }
190
191 if (photonNu > 0) {
192 delete [] photonEnergies;
193 delete [] photonVelocities;
194 delete [] photonDircosu;
195 delete [] photonDircosv;
196 delete [] photonDircosw;
197 delete [] photonAges;
198 }
199}

Member Function Documentation

◆ getNeutronAge()

G4double G4fissionEvent::getNeutronAge ( G4int index)
inline

Definition at line 139 of file G4fissionEvent.hh.

139 {
140 if (index >= 0 && index < neutronNu) return neutronAges[index];
141 else return -1;
142 }

◆ getNeutronDircosu()

G4double G4fissionEvent::getNeutronDircosu ( G4int index)
inline

Definition at line 107 of file G4fissionEvent.hh.

107 {
108 if (index >= 0 && index < neutronNu) return neutronDircosu[index];
109 else return -1;
110 }

Referenced by G4FissionLibrary::ApplyYourself(), and G4SFDecay::DecayIt().

◆ getNeutronDircosv()

G4double G4fissionEvent::getNeutronDircosv ( G4int index)
inline

Definition at line 111 of file G4fissionEvent.hh.

111 {
112 if (index >= 0 && index < neutronNu) return neutronDircosv[index];
113 else return -1;
114 }

Referenced by G4FissionLibrary::ApplyYourself(), and G4SFDecay::DecayIt().

◆ getNeutronDircosw()

G4double G4fissionEvent::getNeutronDircosw ( G4int index)
inline

Definition at line 115 of file G4fissionEvent.hh.

115 {
116 if (index >= 0 && index < neutronNu) return neutronDircosw[index];
117 else return -1;
118 }

Referenced by G4FissionLibrary::ApplyYourself(), and G4SFDecay::DecayIt().

◆ getNeutronEnergy()

G4double G4fissionEvent::getNeutronEnergy ( G4int index)
inline

Definition at line 99 of file G4fissionEvent.hh.

99 {
100 if (index >= 0 && index < neutronNu) return neutronEnergies[index];
101 else return -1;
102 }

Referenced by G4FissionLibrary::ApplyYourself(), and G4SFDecay::DecayIt().

◆ getNeutronNu()

G4int G4fissionEvent::getNeutronNu ( )
inline

Definition at line 93 of file G4fissionEvent.hh.

93 {
94 return neutronNu;
95 }

Referenced by G4SFDecay::DecayIt().

◆ getNeutronVelocity()

G4double G4fissionEvent::getNeutronVelocity ( G4int index)
inline

Definition at line 103 of file G4fissionEvent.hh.

103 {
104 if (index >= 0 && index < neutronNu) return neutronVelocities[index];
105 else return -1;
106 }

◆ getPhotonAge()

G4double G4fissionEvent::getPhotonAge ( G4int index)
inline

Definition at line 143 of file G4fissionEvent.hh.

143 {
144 if (index >= 0 && index < photonNu) return photonAges[index];
145 else return -1;
146 }

◆ getPhotonDircosu()

G4double G4fissionEvent::getPhotonDircosu ( G4int index)
inline

Definition at line 127 of file G4fissionEvent.hh.

127 {
128 if (index >= 0 && index < photonNu) return photonDircosu[index];
129 else return -1;
130 }

Referenced by G4FissionLibrary::ApplyYourself(), and G4SFDecay::DecayIt().

◆ getPhotonDircosv()

G4double G4fissionEvent::getPhotonDircosv ( G4int index)
inline

Definition at line 131 of file G4fissionEvent.hh.

131 {
132 if (index >= 0 && index < photonNu) return photonDircosv[index];
133 else return -1;
134 }

Referenced by G4FissionLibrary::ApplyYourself(), and G4SFDecay::DecayIt().

◆ getPhotonDircosw()

G4double G4fissionEvent::getPhotonDircosw ( G4int index)
inline

Definition at line 135 of file G4fissionEvent.hh.

135 {
136 if (index >= 0 && index < photonNu) return photonDircosw[index];
137 else return -1;
138 }

Referenced by G4FissionLibrary::ApplyYourself(), and G4SFDecay::DecayIt().

◆ getPhotonEnergy()

G4double G4fissionEvent::getPhotonEnergy ( G4int index)
inline

Definition at line 119 of file G4fissionEvent.hh.

119 {
120 if (index >= 0 && index < photonNu) return photonEnergies[index];
121 else return -1;
122 }

Referenced by G4FissionLibrary::ApplyYourself(), and G4SFDecay::DecayIt().

◆ getPhotonNu()

G4int G4fissionEvent::getPhotonNu ( )
inline

Definition at line 96 of file G4fissionEvent.hh.

96 {
97 return photonNu;
98 }

Referenced by G4SFDecay::DecayIt().

◆ getPhotonVelocity()

G4double G4fissionEvent::getPhotonVelocity ( G4int index)
inline

Definition at line 123 of file G4fissionEvent.hh.

123 {
124 if (index >= 0 && index < photonNu) return photonVelocities[index];
125 else return -1;
126 }

◆ setCf252Option()

static void G4fissionEvent::setCf252Option ( G4int ndist,
G4int neng )
inlinestatic

Definition at line 156 of file G4fissionEvent.hh.

156 {
157 Cf252ndistoption = ndist;
158 Cf252nengoption = neng;
159 };

◆ setCorrelationOption()

static void G4fissionEvent::setCorrelationOption ( G4int correlation)
inlinestatic

Definition at line 150 of file G4fissionEvent.hh.

150 {
151 correlationoption = correlation;
152 };

◆ setDelayOption()

static void G4fissionEvent::setDelayOption ( G4int delay)
inlinestatic

Definition at line 147 of file G4fissionEvent.hh.

147 {
148 delayoption = delay;
149 };

◆ setNudistOption()

static void G4fissionEvent::setNudistOption ( G4int nudist)
inlinestatic

Definition at line 153 of file G4fissionEvent.hh.

153 {
154 nudistoption = nudist;
155 };

◆ setRNGd()

static void G4fissionEvent::setRNGd ( G4double(* funcptr )(void))
inlinestatic

Definition at line 164 of file G4fissionEvent.hh.

164 {
165 rngdptr = funcptr;
166 }

Referenced by setrngd_().

◆ setRNGf()

static void G4fissionEvent::setRNGf ( float(* funcptr )(void))
inlinestatic

Definition at line 160 of file G4fissionEvent.hh.

160 {
161 rngfptr = funcptr;
162 rngdptr = rngf2d;
163 }

Referenced by setrngf_().


The documentation for this class was generated from the following files: