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

#include <G4AblaEvaporation.hh>

+ Inheritance diagram for G4AblaEvaporation:

Public Member Functions

 G4AblaEvaporation ()
 
 ~G4AblaEvaporation ()
 
G4FragmentVectorBreakItUp (const G4Fragment &theNucleus)
 
void setVerboseLevel (const G4int verbose)
 
- Public Member Functions inherited from G4VEvaporation
 G4VEvaporation ()
 
virtual ~G4VEvaporation ()
 
virtual G4FragmentVectorBreakItUp (const G4Fragment &theNucleus)=0
 
virtual void Initialise ()
 
virtual void SetPhotonEvaporation (G4VEvaporationChannel *ptr)
 
G4VEvaporationChannelGetPhotonEvaporation ()
 
void SetOPTxs (G4int opt)
 
void UseSICB (G4bool use)
 

Additional Inherited Members

- Protected Attributes inherited from G4VEvaporation
G4VEvaporationChannelthePhotonEvaporation
 
G4int OPTxs
 
G4bool useSICB
 

Detailed Description

Geant4 interface to the ABLA evaporation code.

Definition at line 48 of file G4AblaEvaporation.hh.

Constructor & Destructor Documentation

◆ G4AblaEvaporation()

G4AblaEvaporation::G4AblaEvaporation ( )

Constructor.

Definition at line 55 of file G4AblaEvaporation.cc.

55 {
56 verboseLevel=0;
57 hazard = new G4Hazard();
58 // set initial values:
59 // First random seed:
60 // (Premiere graine)
61 // hazard->ial = 38035;
62 hazard->ial = 979678188;
63 // other seeds:
64 hazard->igraine[0] = 3997;
65 hazard->igraine[1] = 15573;
66 hazard->igraine[2] = 9971;
67 hazard->igraine[3] = 9821;
68 hazard->igraine[4] = 99233;
69 hazard->igraine[5] = 11167;
70 hazard->igraine[6] = 12399;
71 hazard->igraine[7] = 11321;
72 hazard->igraine[8] = 9825;
73 hazard->igraine[9] = 2587;
74 hazard->igraine[10] = 1775;
75 hazard->igraine[11] = 56799;
76 hazard->igraine[12] = 1156;
77 // hazard->igraine[13] = 11207;
78 hazard->igraine[13] = 38957;
79 hazard->igraine[14] = 35779;
80 hazard->igraine[15] = 10055;
81 hazard->igraine[16] = 76533;
82 hazard->igraine[17] = 33759;
83 hazard->igraine[18] = 13227;
84}

◆ ~G4AblaEvaporation()

G4AblaEvaporation::~G4AblaEvaporation ( )

Destructor.

Definition at line 90 of file G4AblaEvaporation.cc.

90 {
91}

Member Function Documentation

◆ BreakItUp()

G4FragmentVector * G4AblaEvaporation::BreakItUp ( const G4Fragment theNucleus)
virtual

The method for calling

Implements G4VEvaporation.

Definition at line 110 of file G4AblaEvaporation.cc.

110 {
111
112
113 G4VarNtp *varntp = new G4VarNtp();
114 G4Volant *volant = new G4Volant();
115
116 G4Abla *abla = new G4Abla(hazard, volant, varntp);
117 G4cout <<"Initializing evaporation..." << G4endl;
118 abla->initEvapora();
119 G4cout <<"Initialization complete!" << G4endl;
120
121 G4double nucleusA = theNucleus.GetA();
122 G4double nucleusZ = theNucleus.GetZ();
123 G4double nucleusMass = G4NucleiProperties::GetAtomicMass(nucleusA, nucleusZ);
124 G4double excitationEnergy = theNucleus.GetExcitationEnergy();
125 G4double angularMomentum = 0.0; // Don't know how to get this quantity... From Geant4???
126
127 G4LorentzVector tmp = theNucleus.GetMomentum();
128
129 G4ThreeVector momentum = tmp.vect();
130
131 G4double recoilEnergy = tmp.e();
132 G4double momX = momentum.x();
133 G4double momY = momentum.y();
134 G4double momZ = momentum.z();
135 // G4double energy = tmp.e();
136 G4double exitationE = theNucleus.GetExcitationEnergy() * MeV;
137
138 varntp->ntrack = -1;
139 varntp->massini = theNucleus.GetA();
140 varntp->mzini = theNucleus.GetZ();
141
142 std::vector<G4DynamicParticle*> cascadeParticles;
143 G4FragmentVector * theResult = new G4FragmentVector;
144 if (theNucleus.GetExcitationEnergy() <= 0.0) { // Check that Excitation Energy > 0
145 theResult->push_back(new G4Fragment(theNucleus));
146 return theResult;
147 }
148
149 // G4double mTar = G4NucleiProperties::GetAtomicMass(A, Z); // Mass of the target nucleus
150 varntp->exini = exitationE;
151
152 G4int particleI, n = 0;
153
154 // Print diagnostic messages. 0 = silent, 1 and 2 = verbose
155 // verboseLevel = 3;
156
157 // Increase the event number:
158 eventNumber++;
159
160 G4DynamicParticle *cascadeParticle = 0;
161 // G4ParticleDefinition *aParticleDefinition = 0;
162
163 // Map Geant4 particle types to corresponding INCL4 types.
164 enum bulletParticleType {nucleus = 0, proton = 1, neutron = 2, pionPlus = 3, pionZero = 4,
165 pionMinus = 5, deuteron = 6, triton = 7, he3 = 8, he4 = 9};
166
167 // Check wheter the input is acceptable. This will contain more tests in the future.
168
169// void breakItUp(G4double nucleusA, G4double nucleusZ, G4double nucleusMass, G4double excitationEnergy,
170// G4double angularMomentum, G4double recoilEnergy, G4double momX, G4double momY, G4double momZ)
171 G4cout <<"Calling the actual ABLA model..." << G4endl;
172 G4cout <<"Excitation energy: " << excitationEnergy << G4endl;
173 abla->breakItUp(nucleusA, nucleusZ, nucleusMass, excitationEnergy, angularMomentum, recoilEnergy, momX, momY, momZ,
174 eventNumber);
175 G4cout <<"Done." << G4endl;
176
177 if(verboseLevel > 0) {
178 // Diagnostic output
179 G4cout <<"G4AblaEvaporation: Target A: " << nucleusA << G4endl;
180 G4cout <<"G4AblaEvaporation: Target Z: " << nucleusZ << G4endl;
181
182 for(particleI = 0; particleI < varntp->ntrack; particleI++) {
183 G4cout << n << " ";
184 G4cout << varntp->massini << " " << varntp->mzini << " ";
185 G4cout << varntp->exini << " " << varntp->mulncasc << " " << varntp->mulnevap << " " << varntp->mulntot << " ";
186 G4cout << varntp->bimpact << " " << varntp->jremn << " " << varntp->kfis << " " << varntp->estfis << " ";
187 G4cout << varntp->izfis << " " << varntp->iafis << " " << varntp->ntrack << " " << varntp->itypcasc[particleI] << " ";
188 G4cout << varntp->avv[particleI] << " " << varntp->zvv[particleI] << " " << varntp->enerj[particleI] << " ";
189 G4cout << varntp->plab[particleI] << " " << varntp->tetlab[particleI] << " " << varntp->philab[particleI] << G4endl;
190 }
191 }
192
193 // Loop through the INCL4+ABLA output.
194 G4double momx, momy, momz; // Momentum components of the outcoming particles.
195 G4double eKin;
196 G4cout <<"varntp->ntrack = " << varntp->ntrack << G4endl;
197 for(particleI = 0; particleI < varntp->ntrack; particleI++) {
198 // Get energy/momentum and construct momentum vector:
199 // In INCL4 coordinates!
200 momx = varntp->plab[particleI]*std::cos(varntp->tetlab[particleI]*CLHEP::pi/180.0)*std::sin(varntp->philab[particleI]*CLHEP::pi/180.0)*MeV;
201 momy = varntp->plab[particleI]*std::sin(varntp->tetlab[particleI]*CLHEP::pi/180.0)*std::sin(varntp->philab[particleI]*CLHEP::pi/180.0)*MeV;
202 momz = varntp->plab[particleI]*std::cos(varntp->tetlab[particleI]*CLHEP::pi/180.0)*MeV;
203
204 eKin = varntp->enerj[particleI] * MeV;
205
206 if(verboseLevel > 1) {
207 // G4cout <<"Momentum direction: (x ,y,z)";
208 // G4cout << "(" << momx <<"," << momy << "," << momz << ")" << G4endl;
209 }
210
211 // This vector tells the direction of the particle.
212 G4ThreeVector momDirection(momx, momy, momz);
213 momDirection = momDirection.unit();
214
215 // Identify the particle/nucleus:
216 G4int particleIdentified = 0;
217
218 // Proton
219 if((varntp->avv[particleI] == 1) && (varntp->zvv[particleI] == 1)) {
220 cascadeParticle =
221 new G4DynamicParticle(G4Proton::ProtonDefinition(), momDirection, eKin);
222 particleIdentified++;
223 }
224
225 // Neutron
226 if((varntp->avv[particleI] == 1) && (varntp->zvv[particleI] == 0)) {
227 cascadeParticle =
228 new G4DynamicParticle(G4Neutron::NeutronDefinition(), momDirection, eKin);
229 particleIdentified++;
230 }
231
232 // PionPlus
233 if((varntp->avv[particleI] == -1) && (varntp->zvv[particleI] == 1)) {
234 cascadeParticle =
235 new G4DynamicParticle(G4PionPlus::PionPlusDefinition(), momDirection, eKin);
236 particleIdentified++;
237 }
238
239 // PionZero
240 if((varntp->avv[particleI] == -1) && (varntp->zvv[particleI] == 0)) {
241 cascadeParticle =
242 new G4DynamicParticle(G4PionZero::PionZeroDefinition(), momDirection, eKin);
243 particleIdentified++;
244 }
245
246 // PionMinus
247 if((varntp->avv[particleI] == -1) && (varntp->zvv[particleI] == -1)) {
248 cascadeParticle =
249 new G4DynamicParticle(G4PionMinus::PionMinusDefinition(), momDirection, eKin);
250 particleIdentified++;
251 }
252
253 // Nuclei fragment
254 if((varntp->avv[particleI] > 1) && (varntp->zvv[particleI] >= 1)) {
255 G4ParticleDefinition * aIonDef = 0;
256 G4ParticleTable *theTableOfParticles = G4ParticleTable::GetParticleTable();
257
258 G4int A = G4int(varntp->avv[particleI]);
259 G4int Z = G4int(varntp->zvv[particleI]);
260 aIonDef = theTableOfParticles->FindIon(Z, A, 0, Z);
261
262 cascadeParticle =
263 new G4DynamicParticle(aIonDef, momDirection, eKin);
264 particleIdentified++;
265 }
266
267 // Check that the particle was identified properly.
268 if(particleIdentified == 1) {
269 // Put data into G4HadFinalState:
270 cascadeParticle->Set4Momentum(cascadeParticle->Get4Momentum());
271 cascadeParticles.push_back(cascadeParticle);
272 // theResult.AddSecondary(cascadeParticle);
273 }
274 // Particle identification failed. Checking why...
275 else {
276 // Particle was identified as more than one particle type.
277 if(particleIdentified > 1) {
278 G4cout <<"G4InclCascadeInterface: One outcoming particle was identified as";
279 G4cout <<"more than one particle type. This is probably due to a bug in the interface." << G4endl;
280 G4cout <<"Particle A:" << varntp->avv[particleI] << "Z: " << varntp->zvv[particleI] << G4endl;
281 G4cout << "(particleIdentified =" << particleIdentified << ")" << G4endl;
282 }
283 }
284 }
285
286 // End of conversion
287
288 // Clean up: Clean up the number of generated particles in the
289 // common block VARNTP_ for the processing of the next event.
290 varntp->ntrack = 0;
291 // End of cleanup.
292
293// Free allocated memory
294 delete varntp;
295 delete abla;
296
297 fillResult(cascadeParticles, theResult);
298 return theResult;
299}
@ neutron
std::vector< G4Fragment * > G4FragmentVector
Definition: G4Fragment.hh:65
double G4double
Definition: G4Types.hh:64
int G4int
Definition: G4Types.hh:66
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT std::ostream G4cout
double z() const
double x() const
double y() const
Hep3Vector vect() const
Definition: G4Abla.hh:42
G4LorentzVector Get4Momentum() const
void Set4Momentum(const G4LorentzVector &momentum)
G4double GetExcitationEnergy() const
Definition: G4Fragment.hh:235
const G4LorentzVector & GetMomentum() const
Definition: G4Fragment.hh:251
G4double GetZ() const
Definition: G4Fragment.hh:278
G4double GetA() const
Definition: G4Fragment.hh:283
static G4Neutron * NeutronDefinition()
Definition: G4Neutron.cc:99
G4ParticleDefinition * FindIon(G4int atomicNumber, G4int atomicMass, G4double excitationEnergy)
static G4ParticleTable * GetParticleTable()
static G4PionMinus * PionMinusDefinition()
Definition: G4PionMinus.cc:93
static G4PionPlus * PionPlusDefinition()
Definition: G4PionPlus.cc:93
static G4PionZero * PionZeroDefinition()
Definition: G4PionZero.cc:99
static G4Proton * ProtonDefinition()
Definition: G4Proton.cc:88

◆ setVerboseLevel()

void G4AblaEvaporation::setVerboseLevel ( const G4int  verbose)

Definition at line 106 of file G4AblaEvaporation.cc.

106 {
107 verboseLevel = verbose;
108}

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