Geant4-11
G4ParticleHPInelasticCompFS.cc
Go to the documentation of this file.
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// particle_hp -- source file
27// J.P. Wellisch, Nov-1996
28// A prototype of the low energy neutron transport model.
29//
30// 070523 bug fix for G4FPE_DEBUG on by A. Howard ( and T. Koi)
31// 070606 bug fix and migrate to enable to Partial cases by T. Koi
32// 080603 bug fix for Hadron Hyper News #932 by T. Koi
33// 080612 bug fix contribution from Benoit Pirard and Laurent Desorgher (Univ. Bern) #4,6
34// 080717 bug fix of calculation of residual momentum by T. Koi
35// 080801 protect negative available energy by T. Koi
36// introduce theNDLDataA,Z which has A and Z of NDL data by T. Koi
37// 081024 G4NucleiPropertiesTable:: to G4NucleiProperties::
38// 090514 Fix bug in IC electron emission case
39// Contribution from Chao Zhang (Chao.Zhang@usd.edu) and Dongming Mei(Dongming.Mei@usd.edu)
40// 100406 "nothingWasKnownOnHadron=1" then sample mu isotropic in CM
41// add two_body_reaction
42// 100909 add safty
43// 101111 add safty for _nat_ data case in Binary reaction, but break conservation
44// 110430 add Reaction Q value and break up flag (MF3::QI and LR)
45//
46// P. Arce, June-2014 Conversion neutron_hp to particle_hp
47//
50#include "G4Nucleus.hh"
51#include "G4NucleiProperties.hh"
52#include "G4He3.hh"
53#include "G4Alpha.hh"
54#include "G4Electron.hh"
56#include "G4IonTable.hh"
57#include "G4Pow.hh"
58#include "G4SystemOfUnits.hh"
59
60#include "G4NRESP71M03.hh" // nresp71_m03.hh and nresp71_m02.hh are alike. The only difference between m02 and m03 is in the total carbon cross section that is properly included in the latter. These data are not used in nresp71_m0*.hh.
61
62// June-2019 - E. Mendoza - re-build "two_body_reaction", to be used by incident charged particles (now isotropic emission in the CMS). Also restrict nresp use below 20 MeV (for future developments). Add photon emission when no data available.
63
65{
66 // char the[100] = {""};
67 // std::ostrstream ost(the, 100, std::ios::out);
68 // ost <<gammaPath<<"z"<<ZR<<".a"<<AR;
69 // G4String * aName = new G4String(the);
70 // std::ifstream from(*aName, std::ios::in);
71
72 std::ostringstream ost;
73 ost <<gammaPath<<"z"<<ZR<<".a"<<AR;
74 G4String aName = ost.str();
75 std::ifstream from(aName, std::ios::in);
76
77 if(!from) return; // no data found for this isotope
78 // std::ifstream theGammaData(*aName, std::ios::in);
79 std::ifstream theGammaData(aName, std::ios::in);
80
81 theGammas.Init(theGammaData);
82 // delete aName;
83
84}
85
87{
88 gammaPath = "/Inelastic/Gammas/"; //only in neutron data base
89 if(!std::getenv("G4NEUTRONHPDATA"))
90 throw G4HadronicException(__FILE__, __LINE__, "Please setenv G4NEUTRONHPDATA to point to the neutron cross-section files where Inelastic/Gammas data is found.");
91 G4String tBase = std::getenv("G4NEUTRONHPDATA");
92 gammaPath = tBase+gammaPath;
93 G4String tString = dirName;
94 G4bool dbool;
95 G4ParticleHPDataUsed aFile = theNames.GetName(static_cast<G4int>(A), static_cast<G4int>(Z), M, tString, aFSType, dbool);
96 G4String filename = aFile.GetName();
97#ifdef G4PHPDEBUG
98 if( std::getenv("G4ParticleHPDebug") ) G4cout << " G4ParticleHPInelasticCompFS::Init FILE " << filename << G4endl;
99#endif
100
101 SetAZMs( A, Z, M, aFile );
102 //theBaseA = aFile.GetA();
103 //theBaseZ = aFile.GetZ();
104 //theNDLDataA = (int)aFile.GetA();
105 //theNDLDataZ = aFile.GetZ();
106 //if(!dbool || ( Z<2.5 && ( std::abs(theBaseZ - Z)>0.0001 || std::abs(theBaseA - A)>0.0001)))
107 if ( !dbool || ( Z<2.5 && ( std::abs(theNDLDataZ - Z)>0.0001 || std::abs(theNDLDataA - A)>0.0001)) )
108 {
109#ifdef G4PHPDEBUG
110 if(std::getenv("G4ParticleHPDebug_NamesLogging")) G4cout << "Skipped = "<< filename <<" "<<A<<" "<<Z<<G4endl;
111#endif
112 hasAnyData = false;
113 hasFSData = false;
114 hasXsec = false;
115 return;
116 }
117 // theBaseA = A;
118 // theBaseZ = G4int(Z+.5);
119//std::ifstream theData(filename, std::ios::in);
120 std::istringstream theData(std::ios::in);
122 if(!theData) //"!" is a operator of ios
123 {
124 hasAnyData = false;
125 hasFSData = false;
126 hasXsec = false;
127 // theData.close();
128 return;
129 }
130 // here we go
131 G4int infoType, dataType, dummy;
132 G4int sfType, it;
133 hasFSData = false;
134 while (theData >> infoType) // Loop checking, 11.05.2015, T. Koi
135 {
136 hasFSData = true;
137 theData >> dataType;
138 theData >> sfType >> dummy;
139 it = 50;
140 if(sfType>=600||(sfType<100&&sfType>=50)) it = sfType%50;
141 if(dataType==3)
142 {
143 //theData >> dummy >> dummy;
144 //TK110430
145 // QI and LR introudced since G4NDL3.15
146 G4double dqi;
147 G4int ilr;
148 theData >> dqi >> ilr;
149
150 QI[ it ] = dqi*CLHEP::eV;
151 LR[ it ] = ilr;
153 G4int total;
154 theData >> total;
155 theXsection[it]->Init(theData, total, CLHEP::eV);
156 //std::cout << theXsection[it]->GetXsec(1*MeV) << std::endl;
157 }
158 else if(dataType==4)
159 {
161 theAngularDistribution[it]->Init(theData);
162 }
163 else if(dataType==5)
164 {
166 theEnergyDistribution[it]->Init(theData);
167 }
168 else if(dataType==6)
169 {
171 // G4cout << this << " CompFS theEnergyAngData " << it << theEnergyAngData[it] << G4endl; //GDEB
172 theEnergyAngData[it]->Init(theData);
173 }
174 else if(dataType==12)
175 {
177 theFinalStatePhotons[it]->InitMean(theData);
178 }
179 else if(dataType==13)
180 {
183 }
184 else if(dataType==14)
185 {
186 theFinalStatePhotons[it]->InitAngular(theData);
187 }
188 else if(dataType==15)
189 {
191 }
192 else
193 {
194 throw G4HadronicException(__FILE__, __LINE__, "Data-type unknown to G4ParticleHPInelasticCompFS");
195 }
196 }
197 // theData.close();
198}
199
201{
202
203// it = 0 has without Photon
204 G4double running[50];
205 running[0] = 0;
206 unsigned int i;
207 for(i=0; i<50; i++)
208 {
209 if(i!=0) running[i]=running[i-1];
210 if(theXsection[i] != 0)
211 {
212 running[i] += std::max(0., theXsection[i]->GetXsec(eKinetic));
213 }
214 }
215 G4double random = G4UniformRand();
216 G4double sum = running[49];
217 G4int it = 50;
218 if(0!=sum)
219 {
220 G4int i0;
221 for(i0=0; i0<50; i0++)
222 {
223 it = i0;
224 // G4cout << " SelectExitChannel " << it << " " << random << " " << running[i0]/sum << " " << running[i0] << G4endl; //GDEB
225 if(random < running[i0]/sum) break;
226 }
227 }
228//debug: it = 1;
229// G4cout << " SelectExitChannel " << it << " " << sum << G4endl; //GDEB
230 return it;
231}
232
233
234// n,p,d,t,he3,a
236 G4ParticleDefinition* aDefinition)
237{
238
239// prepare neutron
240 if ( theResult.Get() == NULL ) theResult.Put( new G4HadFinalState );
241 theResult.Get()->Clear();
242 G4double eKinetic = theTrack.GetKineticEnergy();
243 const G4HadProjectile *hadProjectile = &theTrack;
244 G4ReactionProduct incidReactionProduct( const_cast<G4ParticleDefinition *>(hadProjectile->GetDefinition()) ); // incidReactionProduct
245 incidReactionProduct.SetMomentum( hadProjectile->Get4Momentum().vect() );
246 incidReactionProduct.SetKineticEnergy( eKinetic );
247
248// prepare target
249 G4int i;
250 for(i=0; i<50; i++)
251 { if(theXsection[i] != 0) { break; } }
252
253 G4double targetMass=0;
254 G4double eps = 0.0001;
255 targetMass = G4NucleiProperties::GetNuclearMass(static_cast<G4int>(theBaseA+eps), static_cast<G4int>(theBaseZ+eps));
256#ifdef G4PHPDEBUG
257 if( std::getenv("G4ParticleHPDebug")) G4cout <<this <<" G4ParticleHPInelasticCompFS::CompositeApply A " <<theBaseA <<" Z " <<theBaseZ <<" incident " <<hadProjectile->GetDefinition()->GetParticleName() <<G4endl;
258#endif
259// if(theEnergyAngData[i]!=0)
260// targetMass = theEnergyAngData[i]->GetTargetMass();
261// else if(theAngularDistribution[i]!=0)
262// targetMass = theAngularDistribution[i]->GetTargetMass();
263// else if(theFinalStatePhotons[50]!=0)
264// targetMass = theFinalStatePhotons[50]->GetTargetMass();
265 G4ReactionProduct theTarget;
266 G4Nucleus aNucleus;
267 //G4ThreeVector neuVelo = (1./hadProjectile->GetDefinition()->GetPDGMass())*incidReactionProduct.GetMomentum();
268 //theTarget = aNucleus.GetBiasedThermalNucleus( targetMass/hadProjectile->GetDefinition()->GetPDGMass() , neuVelo, theTrack.GetMaterial()->GetTemperature());
269 //G4Nucleus::GetBiasedThermalNucleus requests normalization of mass and velocity in neutron mass
270 G4ThreeVector neuVelo = ( 1./G4Neutron::Neutron()->GetPDGMass() )*incidReactionProduct.GetMomentum();
271 theTarget = aNucleus.GetBiasedThermalNucleus( targetMass/G4Neutron::Neutron()->GetPDGMass()
272 , neuVelo, theTrack.GetMaterial()->GetTemperature() );
273
275
276// prepare the residual mass
277 G4double residualMass=0;
278 G4double residualZ = theBaseZ + theProjectile->GetPDGCharge() - aDefinition->GetPDGCharge();
279 G4double residualA = theBaseA + theProjectile->GetBaryonNumber() - aDefinition->GetBaryonNumber();
280 residualMass = G4NucleiProperties::GetNuclearMass(static_cast<G4int>(residualA+eps), static_cast<G4int>(residualZ+eps));
281
282// prepare energy in target rest frame
283 G4ReactionProduct boosted;
284 boosted.Lorentz(incidReactionProduct, theTarget);
285 eKinetic = boosted.GetKineticEnergy();
286// G4double momentumInCMS = boosted.GetTotalMomentum();
287
288// select exit channel for composite FS class.
289 G4int it = SelectExitChannel( eKinetic );
290
291 //E. Mendoza (2018) -- to use JENDL/AN-2005
294 it=50;
295 }
296 }
297
298 // set target and neutron in the relevant exit channel
299 InitDistributionInitialState(incidReactionProduct, theTarget, it);
300
301 //---------------------------------------------------------------------//
302 //Hook for NRESP71MODEL
303 if ( G4ParticleHPManager::GetInstance()->GetUseNRESP71Model() && eKinetic<20*MeV) {
304 if ( (G4int)(theBaseZ+0.1) == 6 ) // If the reaction is with Carbon...
305 {
307 if ( use_nresp71_model( aDefinition , it , theTarget , boosted ) ) return;
308 }
309 }
310 }
311 //---------------------------------------------------------------------//
312
313 G4ReactionProductVector * thePhotons = 0;
314 G4ReactionProductVector * theParticles = 0;
315 G4ReactionProduct aHadron;
316 aHadron.SetDefinition(aDefinition); // what if only cross-sections exist ==> Na 23 11 @@@@
317 G4double availableEnergy = incidReactionProduct.GetKineticEnergy() + incidReactionProduct.GetMass() - aHadron.GetMass() +
318 (targetMass - residualMass);
319//080730c
320 if ( availableEnergy < 0 )
321 {
322 //G4cout << "080730c Adjust availavleEnergy " << G4endl;
323 availableEnergy = 0;
324 }
325 G4int nothingWasKnownOnHadron = 0;
326 G4int dummy;
327 G4double eGamm = 0;
328 G4int iLevel=it-1;
329
330// TK without photon has it = 0
331 if( 50 == it )
332 {
333
334// TK Excitation level is not determined
335 iLevel=-1;
336 aHadron.SetKineticEnergy(availableEnergy*residualMass/
337 (aHadron.GetMass()+residualMass));
338
339 //aHadron.SetMomentum(incidReactionProduct.GetMomentum()*(1./incidReactionProduct.GetTotalMomentum())*
340 // std::sqrt(aHadron.GetTotalEnergy()*aHadron.GetTotalEnergy()-
341 // aHadron.GetMass()*aHadron.GetMass()));
342
343 //TK add safty 100909
344 G4double p2 = ( aHadron.GetTotalEnergy()*aHadron.GetTotalEnergy() - aHadron.GetMass()*aHadron.GetMass() );
345 G4double p = 0.0;
346 if ( p2 > 0.0 ) p = std::sqrt( p );
347
348 aHadron.SetMomentum(incidReactionProduct.GetMomentum()*(1./incidReactionProduct.GetTotalMomentum())*p );
349
350 }
351 else
352 {
353 while ( iLevel!=-1 && theGammas.GetLevel(iLevel) == 0 ) { iLevel--; } // Loop checking, 11.05.2015, T. Koi
354 }
355
356
357 if ( theAngularDistribution[it] != 0 ) // MF4
358 {
359 if(theEnergyDistribution[it]!=0) // MF5
360 {
361 //************************************************************
362 /*
363 aHadron.SetKineticEnergy(theEnergyDistribution[it]->Sample(eKinetic, dummy));
364 G4double eSecN = aHadron.GetKineticEnergy();
365 */
366 //************************************************************
367 //EMendoza --> maximum allowable energy should be taken into account.
368 G4double dqi = 0.0;
369 if ( QI[it] < 0 || 849 < QI[it] ) dqi = QI[it]; //For backword compatibility QI introduced since G4NDL3.15
370 G4double MaxEne=eKinetic+dqi;
371 G4double eSecN=0.;
372
373 G4int icounter=0;
374 G4int icounter_max=1024;
375 do {
376 icounter++;
377 if ( icounter > icounter_max ) {
378 G4cout << "Loop-counter exceeded the threshold value at " << __LINE__ << "th line of " << __FILE__ << "." << G4endl;
379 break;
380 }
381 eSecN=theEnergyDistribution[it]->Sample(eKinetic, dummy);
382 }while(eSecN>MaxEne); // Loop checking, 11.05.2015, T. Koi
383 aHadron.SetKineticEnergy(eSecN);
384 //************************************************************
385 eGamm = eKinetic-eSecN;
386 for(iLevel=theGammas.GetNumberOfLevels()-1; iLevel>=0; iLevel--)
387 {
388 if(theGammas.GetLevelEnergy(iLevel)<eGamm) break;
389 }
390 G4double random = 2*G4UniformRand();
391 iLevel+=G4int(random);
392 if(iLevel>theGammas.GetNumberOfLevels()-1)iLevel = theGammas.GetNumberOfLevels()-1;
393 }
394 else
395 {
396 G4double eExcitation = 0;
397 if(iLevel>=0) eExcitation = theGammas.GetLevel(iLevel)->GetLevelEnergy();
398 while (eKinetic-eExcitation < 0 && iLevel>0) // Loop checking, 11.05.2015, T. Koi
399 {
400 iLevel--;
401 eExcitation = theGammas.GetLevel(iLevel)->GetLevelEnergy();
402 }
403 //110610TK BEGIN
404 //Use QI value for calculating excitation energy of residual.
405 G4bool useQI=false;
406 G4double dqi = QI[it];
407 if (dqi < 0 || 849 < dqi) useQI = true; // Former libraries do not have values in this range
408
409 if (useQI) {
410 // QI introudced since G4NDL3.15
411 // G4double QM=(incidReactionProduct.GetMass()+targetMass)-(aHadron.GetMass()+residualMass);
412 // eExcitation = QM-QI[it];
413 // eExcitation = QI[0] - QI[it]; // Bug fix #1838
414 // if(eExcitation < 20*CLHEP::keV) eExcitation = 0;
415
416 eExcitation = std::max(0.,QI[0] - QI[it]); // Bug fix 2333
417
418 // Re-evluate iLevel based on this eExcitation
419 iLevel = 0;
420 G4bool find = false;
421 G4int imaxEx = 0;
422 G4double level_tolerance = 1.0*CLHEP::keV;
423
424 while( theGammas.GetLevel(iLevel+1) != 0 ) { // Loop checking, 11.05.2015, T. Koi
425 G4double maxEx = 0.0;
426 if (maxEx < theGammas.GetLevel(iLevel)->GetLevelEnergy() ) {
427 maxEx = theGammas.GetLevel(iLevel)->GetLevelEnergy();
428 imaxEx = iLevel;
429 }
430
431 // Fix bug 1789 DHW - first if-branch added because gamma data come from ENSDF
432 // and do not necessarily match the excitations used in ENDF-B.VII
433 // Compromise solution: use 1 keV tolerance suggested by T. Koi
434 if (std::abs(eExcitation - theGammas.GetLevel(iLevel)->GetLevelEnergy() ) < level_tolerance) {
435 find = true;
436 break;
437
438 } else if (eExcitation < theGammas.GetLevel(iLevel)->GetLevelEnergy() ) {
439 find = true;
440 iLevel--;
441 // very small eExcitation, iLevel becomes -1, this is protected below
442 if (theTrack.GetDefinition() == aDefinition) { // this line added as part of fix #1838
443 if (iLevel == -1) iLevel = 0;
444 }
445 break;
446 }
447 iLevel++;
448 }
449
450 // If proper level cannot be found, use the maximum level
451 if (!find) iLevel = imaxEx;
452 }
453
454 if(std::getenv("G4ParticleHPDebug") && eKinetic-eExcitation < 0)
455 {
456 throw G4HadronicException(__FILE__, __LINE__, "SEVERE: InelasticCompFS: Consistency of data not good enough, please file report");
457 }
458 if(eKinetic-eExcitation < 0) eExcitation = 0;
459 if(iLevel!= -1) aHadron.SetKineticEnergy(eKinetic - eExcitation);
460
461 }
463
464 if( theFinalStatePhotons[it] == 0 )
465 {
466 //G4cout << "110610 USE Gamma Level" << G4endl;
467// TK comment Most n,n* eneter to this
468 thePhotons = theGammas.GetDecayGammas(iLevel);
469 eGamm -= theGammas.GetLevelEnergy(iLevel);
470 if(eGamm>0) // @ ok for now, but really needs an efficient way of correllated sampling @
471 {
472 G4ReactionProduct * theRestEnergy = new G4ReactionProduct;
473 theRestEnergy->SetDefinition(G4Gamma::Gamma());
474 theRestEnergy->SetKineticEnergy(eGamm);
475 G4double costh = 2.*G4UniformRand()-1.;
477 theRestEnergy->SetMomentum(eGamm*std::sin(std::acos(costh))*std::cos(phi),
478 eGamm*std::sin(std::acos(costh))*std::sin(phi),
479 eGamm*costh);
480 if(thePhotons == 0) { thePhotons = new G4ReactionProductVector; }
481 thePhotons->push_back(theRestEnergy);
482 }
483 }
484 }
485 else if(theEnergyAngData[it] != 0) // MF6
486 {
487
488 theParticles = theEnergyAngData[it]->Sample(eKinetic);
489
490 //141017 Fix BEGIN
491 //Adjust A and Z in the case of miss much between selected data and target nucleus
492 if ( theParticles != NULL ) {
493 G4int sumA = 0;
494 G4int sumZ = 0;
495 G4int maxA = 0;
496 G4int jAtMaxA = 0;
497 for ( G4int j = 0 ; j != (G4int)theParticles->size() ; j++ ) {
498 if ( theParticles->at(j)->GetDefinition()->GetBaryonNumber() > maxA ) {
499 maxA = theParticles->at(j)->GetDefinition()->GetBaryonNumber();
500 jAtMaxA = j;
501 }
502 sumA += theParticles->at(j)->GetDefinition()->GetBaryonNumber();
503 sumZ += G4int( theParticles->at(j)->GetDefinition()->GetPDGCharge() + eps );
504 }
505 G4int dA = (G4int)theBaseA + hadProjectile->GetDefinition()->GetBaryonNumber() - sumA;
506 G4int dZ = (G4int)theBaseZ + G4int( hadProjectile->GetDefinition()->GetPDGCharge() + eps ) - sumZ;
507 if ( dA < 0 || dZ < 0 ) {
508 G4int newA = theParticles->at(jAtMaxA)->GetDefinition()->GetBaryonNumber() + dA ;
509 G4int newZ = G4int( theParticles->at(jAtMaxA)->GetDefinition()->GetPDGCharge() + eps ) + dZ;
510 G4ParticleDefinition* pd = G4IonTable::GetIonTable()->GetIon ( newZ , newA );
511 theParticles->at( jAtMaxA )->SetDefinition( pd );
512 }
513 }
514 //141017 Fix END
515
516 }
517 else
518 {
519 // @@@ what to do, if we have photon data, but no info on the hadron itself
520 nothingWasKnownOnHadron = 1;
521 }
522
523 //G4cout << "theFinalStatePhotons it " << it << G4endl;
524 //G4cout << "theFinalStatePhotons[it] " << theFinalStatePhotons[it] << G4endl;
525 //G4cout << "theFinalStatePhotons it " << it << G4endl;
526 //G4cout << "theFinalStatePhotons[it] " << theFinalStatePhotons[it] << G4endl;
527 //G4cout << "thePhotons " << thePhotons << G4endl;
528
529 if ( theFinalStatePhotons[it] != 0 )
530 {
531 // the photon distributions are in the Nucleus rest frame.
532 // TK residual rest frame
533 G4ReactionProduct boosted_tmp;
534 boosted_tmp.Lorentz(incidReactionProduct, theTarget);
535 G4double anEnergy = boosted_tmp.GetKineticEnergy();
536 thePhotons = theFinalStatePhotons[it]->GetPhotons(anEnergy);
537 G4double aBaseEnergy = theFinalStatePhotons[it]->GetLevelEnergy();
538 G4double testEnergy = 0;
539 if(thePhotons!=0 && thePhotons->size()!=0)
540 { aBaseEnergy-=thePhotons->operator[](0)->GetTotalEnergy(); }
541 if(theFinalStatePhotons[it]->NeedsCascade())
542 {
543 while(aBaseEnergy>0.01*CLHEP::keV) // Loop checking, 11.05.2015, T. Koi
544 {
545 // cascade down the levels
546 G4bool foundMatchingLevel = false;
547 G4int closest = 2;
548 G4double deltaEold = -1;
549 for(G4int j=1; j<it; j++)
550 {
551 if(theFinalStatePhotons[j]!=0)
552 {
553 testEnergy = theFinalStatePhotons[j]->GetLevelEnergy();
554 }
555 else
556 {
557 testEnergy = 0;
558 }
559 G4double deltaE = std::abs(testEnergy-aBaseEnergy);
560 if(deltaE<0.1*CLHEP::keV)
561 {
562 G4ReactionProductVector * theNext =
563 theFinalStatePhotons[j]->GetPhotons(anEnergy);
564 if ( thePhotons != NULL ) thePhotons->push_back(theNext->operator[](0));
565 aBaseEnergy = testEnergy-theNext->operator[](0)->GetTotalEnergy();
566 delete theNext;
567 foundMatchingLevel = true;
568 break; // ===>
569 }
570 if(theFinalStatePhotons[j]!=0 && ( deltaE<deltaEold||deltaEold<0.) )
571 {
572 closest = j;
573 deltaEold = deltaE;
574 }
575 } // <=== the break goes here.
576 if(!foundMatchingLevel)
577 {
578 G4ReactionProductVector * theNext =
579 theFinalStatePhotons[closest]->GetPhotons(anEnergy);
580 if ( thePhotons != NULL ) thePhotons->push_back(theNext->operator[](0));
581 aBaseEnergy = aBaseEnergy-theNext->operator[](0)->GetTotalEnergy();
582 delete theNext;
583 }
584 }
585 }
586 }
587 unsigned int i0;
588 if(thePhotons!=0)
589 {
590 for(i0=0; i0<thePhotons->size(); i0++)
591 {
592 // back to lab
593 thePhotons->operator[](i0)->Lorentz(*(thePhotons->operator[](i0)), -1.*theTarget);
594 }
595 }
596 //G4cout << "nothingWasKnownOnHadron " << nothingWasKnownOnHadron << G4endl;
597 if (nothingWasKnownOnHadron)
598 {
599// In this case, hadron should be isotropic in CM
600// Next 12 lines are Emilio's replacement
601 // G4double QM=(incidReactionProduct.GetMass()+targetMass)-(aHadron.GetMass()+residualMass);
602 // G4double eExcitation = QM-QI[it];
603 // G4double eExcitation = QI[0] - QI[it]; // Fix of bug #1838
604 // if(eExcitation<20*CLHEP::keV){eExcitation=0;}
605
606 G4double eExcitation = std::max(0.,QI[0] - QI[it]); // Fix of bug #2333
607
608 two_body_reaction(&incidReactionProduct,&theTarget,&aHadron,eExcitation);
609 if(thePhotons==0 && eExcitation>0){
610 for(iLevel=theGammas.GetNumberOfLevels()-1; iLevel>=0; iLevel--)
611 {
612 if(theGammas.GetLevelEnergy(iLevel)<eExcitation+5*keV) break; // 5 keV tolerance
613 }
614 thePhotons = theGammas.GetDecayGammas(iLevel);
615 }
616 }
617// Emilio's replacement done
618/*
619// This code replaced by Emilio (previous 12 lines)
620// mu and p should be correlated
621//
622 //isotropic distribution in CM
623 G4double mu = 1.0 - 2.*G4UniformRand();
624
625 // Need momenta in target rest frame
626 G4LorentzVector target_in_LAB ( theTarget.GetMomentum() , theTarget.GetTotalEnergy() );
627 G4ThreeVector boostToTargetRest = -target_in_LAB.boostVector();
628 G4LorentzVector proj_in_LAB = hadProjectile->Get4Momentum();
629
630 G4DynamicParticle* proj = new G4DynamicParticle(theProjectile, proj_in_LAB.boost(boostToTargetRest) );
631// G4DynamicParticle* targ =
632// new G4DynamicParticle(G4IonTable::GetIonTable()->GetIon((G4int)theBaseZ, (G4int)theBaseA, totalPhotonEnergy), G4ThreeVector(0) );
633// Fix bug 2166 (A. Zontikov): replace above two lines with next three lines
634 G4double excitationEnergy = theFinalStatePhotons[it] ? theFinalStatePhotons[it]->GetLevelEnergy() : 0.0;
635 G4DynamicParticle* targ =
636 new G4DynamicParticle(G4IonTable::GetIonTable()->GetIon((G4int)theBaseZ, (G4int)theBaseA, excitationEnergy), G4ThreeVector(0) );
637 G4DynamicParticle* hadron =
638 new G4DynamicParticle(aHadron.GetDefinition(), G4ThreeVector(0) ); // Will fill in the momentum
639
640 two_body_reaction ( proj , targ , hadron , mu );
641
642 G4LorentzVector hadron_in_trag_rest = hadron->Get4Momentum();
643 G4LorentzVector hadron_in_LAB = hadron_in_trag_rest.boost ( -boostToTargetRest );
644 aHadron.SetMomentum( hadron_in_LAB.v() );
645 aHadron.SetKineticEnergy ( hadron_in_LAB.e() - hadron_in_LAB.m() );
646
647 delete proj;
648 delete targ;
649 delete hadron;
650
651 }
652*/
653
654// fill the result
655// Beware - the recoil is not necessarily in the particles...
656// Can be calculated from momentum conservation?
657// The idea is that the particles ar emitted forst, and the gammas only once the
658// recoil is on the residual; assumption is that gammas do not contribute to
659// the recoil.
660// This needs more design @@@
661
662 G4int nSecondaries = 2; // the hadron and the recoil
663 G4bool needsSeparateRecoil = false;
664 G4int totalBaryonNumber = 0;
665 G4int totalCharge = 0;
666 G4ThreeVector totalMomentum(0);
667 if(theParticles != 0)
668 {
669 nSecondaries = theParticles->size();
670 const G4ParticleDefinition * aDef;
671 unsigned int ii0;
672 for(ii0=0; ii0<theParticles->size(); ii0++)
673 {
674 aDef = theParticles->operator[](ii0)->GetDefinition();
675 totalBaryonNumber+=aDef->GetBaryonNumber();
676 totalCharge+=G4int(aDef->GetPDGCharge()+eps);
677 totalMomentum += theParticles->operator[](ii0)->GetMomentum();
678 }
679 if(totalBaryonNumber!=G4int(theBaseA+eps+hadProjectile->GetDefinition()->GetBaryonNumber()))
680 {
681 needsSeparateRecoil = true;
682 nSecondaries++;
683 residualA = G4int(theBaseA+eps+hadProjectile->GetDefinition()->GetBaryonNumber()
684 -totalBaryonNumber);
685 residualZ = G4int(theBaseZ+eps+hadProjectile->GetDefinition()->GetPDGCharge()
686 -totalCharge);
687 }
688 }
689
690 G4int nPhotons = 0;
691 if(thePhotons!=0) { nPhotons = thePhotons->size(); }
692 nSecondaries += nPhotons;
693
694 G4DynamicParticle * theSec;
695
696 if( theParticles==0 )
697 {
698 theSec = new G4DynamicParticle;
699 theSec->SetDefinition(aHadron.GetDefinition());
700 theSec->SetMomentum(aHadron.GetMomentum());
701 theResult.Get()->AddSecondary(theSec, secID);
702#ifdef G4PHPDEBUG
703 if( std::getenv("G4ParticleHPDebug")) G4cout << this << " G4ParticleHPInelasticCompFS::BaseApply add secondary1 " << theSec->GetParticleDefinition()->GetParticleName() << " E= " << theSec->GetKineticEnergy() << " NSECO " << theResult.Get()->GetNumberOfSecondaries() << G4endl;
704#endif
705
706 aHadron.Lorentz(aHadron, theTarget);
707 G4ReactionProduct theResidual;
709 ->GetIon(static_cast<G4int>(residualZ), static_cast<G4int>(residualA), 0));
710 theResidual.SetKineticEnergy(aHadron.GetKineticEnergy()*aHadron.GetMass()/theResidual.GetMass());
711
712 //080612TK contribution from Benoit Pirard and Laurent Desorgher (Univ. Bern) #6
713 //theResidual.SetMomentum(-1.*aHadron.GetMomentum());
714 G4ThreeVector incidentNeutronMomentum = incidReactionProduct.GetMomentum();
715 theResidual.SetMomentum(incidentNeutronMomentum - aHadron.GetMomentum());
716
717 theResidual.Lorentz(theResidual, -1.*theTarget);
718 G4ThreeVector totalPhotonMomentum(0,0,0);
719 if(thePhotons!=0)
720 {
721 for(i=0; i<nPhotons; i++)
722 {
723 totalPhotonMomentum += thePhotons->operator[](i)->GetMomentum();
724 }
725 }
726 theSec = new G4DynamicParticle;
727 theSec->SetDefinition(theResidual.GetDefinition());
728 theSec->SetMomentum(theResidual.GetMomentum()-totalPhotonMomentum);
729 theResult.Get()->AddSecondary(theSec, secID);
730#ifdef G4PHPDEBUG
731 if( std::getenv("G4ParticleHPDebug")) G4cout << this << " G4ParticleHPInelasticCompFS::BaseApply add secondary2 " << theSec->GetParticleDefinition()->GetParticleName() << " E= " << theSec->GetKineticEnergy() << " NSECO " << theResult.Get()->GetNumberOfSecondaries() << G4endl;
732#endif
733 }
734 else
735 {
736 for(i0=0; i0<theParticles->size(); i0++)
737 {
738 theSec = new G4DynamicParticle;
739 theSec->SetDefinition(theParticles->operator[](i0)->GetDefinition());
740 theSec->SetMomentum(theParticles->operator[](i0)->GetMomentum());
741 theResult.Get()->AddSecondary(theSec, secID);
742#ifdef G4PHPDEBUG
743 if( std::getenv("G4ParticleHPDebug")) G4cout << this << " G4ParticleHPInelasticCompFS::BaseApply add secondary3 " << theSec->GetParticleDefinition()->GetParticleName() << " E= " << theSec->GetKineticEnergy() << " NSECO " << theResult.Get()->GetNumberOfSecondaries() << G4endl;
744#endif
745 delete theParticles->operator[](i0);
746 }
747 delete theParticles;
748 if(needsSeparateRecoil && residualZ!=0)
749 {
750 G4ReactionProduct theResidual;
752 ->GetIon(static_cast<G4int>(residualZ), static_cast<G4int>(residualA), 0));
753 G4double resiualKineticEnergy = theResidual.GetMass()*theResidual.GetMass();
754 resiualKineticEnergy += totalMomentum*totalMomentum;
755 resiualKineticEnergy = std::sqrt(resiualKineticEnergy) - theResidual.GetMass();
756// cout << "Kinetic energy of the residual = "<<resiualKineticEnergy<<endl;
757 theResidual.SetKineticEnergy(resiualKineticEnergy);
758
759 //080612TK contribution from Benoit Pirard and Laurent Desorgher (Univ. Bern) #4
760 //theResidual.SetMomentum(-1.*totalMomentum);
761 //G4ThreeVector incidentNeutronMomentum = incidReactionProduct.GetMomentum();
762 //theResidual.SetMomentum(incidentNeutronMomentum - aHadron.GetMomentum());
763//080717 TK Comment still do NOT include photon's mometum which produce by thePhotons
764 theResidual.SetMomentum( incidReactionProduct.GetMomentum() + theTarget.GetMomentum() - totalMomentum );
765
766 theSec = new G4DynamicParticle;
767 theSec->SetDefinition(theResidual.GetDefinition());
768 theSec->SetMomentum(theResidual.GetMomentum());
769 theResult.Get()->AddSecondary(theSec, secID);
770#ifdef G4PHPDEBUG
771 if( std::getenv("G4ParticleHPDebug")) G4cout << this << " G4ParticleHPInelasticCompFS::BaseApply add secondary4 " << theSec->GetParticleDefinition()->GetParticleName() << " E= " << theSec->GetKineticEnergy() << " NSECO " << theResult.Get()->GetNumberOfSecondaries() << G4endl;
772#endif
773
774 }
775 }
776 if(thePhotons!=0)
777 {
778 for(i=0; i<nPhotons; i++)
779 {
780 theSec = new G4DynamicParticle;
781 //Bug reported Chao Zhang (Chao.Zhang@usd.edu), Dongming Mei(Dongming.Mei@usd.edu) Feb. 25, 2009
782 //theSec->SetDefinition(G4Gamma::Gamma());
783 theSec->SetDefinition( thePhotons->operator[](i)->GetDefinition() );
784 //But never cause real effect at least with G4NDL3.13 TK
785 theSec->SetMomentum(thePhotons->operator[](i)->GetMomentum());
786 theResult.Get()->AddSecondary(theSec, secID);
787#ifdef G4PHPDEBUG
788 if( std::getenv("G4ParticleHPDebug")) G4cout << this << " G4ParticleHPInelasticCompFS::BaseApply add secondary5 " << theSec->GetParticleDefinition()->GetParticleName() << " E= " << theSec->GetKineticEnergy() << " NSECO " << theResult.Get()->GetNumberOfSecondaries() << G4endl;
789#endif
790
791 delete thePhotons->operator[](i);
792 }
793// some garbage collection
794 delete thePhotons;
795 }
796
797//080721
799 G4LorentzVector targ_4p_lab ( theTarget.GetMomentum() , std::sqrt( targ_pd->GetPDGMass()*targ_pd->GetPDGMass() + theTarget.GetMomentum().mag2() ) );
800 G4LorentzVector proj_4p_lab = theTrack.Get4Momentum();
801 G4LorentzVector init_4p_lab = proj_4p_lab + targ_4p_lab;
802 adjust_final_state ( init_4p_lab );
803
804// clean up the primary neutron
806}
807
808
809
810//Re-implemented by E. Mendoza (2019). Isotropic emission in the CMS:
811// proj: projectile in target-rest-frame (input)
812// targ: target in target-rest-frame (input)
813// product: secondary particle in target-rest-frame (output)
814// resExcitationEnergy: excitation energy of the residual nucleus
815
817 G4ReactionProduct* targ,
818 G4ReactionProduct* product,
819 G4double resExcitationEnergy)
820{
821 //CMS system:
822 G4ReactionProduct theCMS= *proj+ *targ;
823
824 //Residual definition:
825 G4int resZ=(G4int)(proj->GetDefinition()->GetPDGCharge()+targ->GetDefinition()->GetPDGCharge()-product->GetDefinition()->GetPDGCharge()+0.1);
827 G4ReactionProduct theResidual;
828 theResidual.SetDefinition(G4IonTable::GetIonTable()->GetIon(resZ,resA,0.0));
829
830 //CMS system:
831 G4ReactionProduct theCMSproj;
832 G4ReactionProduct theCMStarg;
833 theCMSproj.Lorentz(*proj,theCMS);
834 theCMStarg.Lorentz(*targ,theCMS);
835 //final Momentum in the CMS:
836 G4double totE=std::sqrt(theCMSproj.GetMass()*theCMSproj.GetMass()+theCMSproj.GetTotalMomentum()*theCMSproj.GetTotalMomentum())+std::sqrt(theCMStarg.GetMass()*theCMStarg.GetMass()+theCMStarg.GetTotalMomentum()*theCMStarg.GetTotalMomentum());
837 G4double prodmass=product->GetMass();
838 G4double resmass=theResidual.GetMass()+resExcitationEnergy;
839 G4double fmomsquared=1./4./totE/totE*(totE*totE-(prodmass-resmass)*(prodmass-resmass))*(totE*totE-(prodmass+resmass)*(prodmass+resmass));
840 G4double fmom=0;
841 if(fmomsquared>0){
842 fmom=std::sqrt(fmomsquared);
843 }
844
845 //random (isotropic direction):
846 G4double cosTh = 2.*G4UniformRand()-1.;
848 G4double theta = std::acos(cosTh);
849 G4double sinth = std::sin(theta);
850 product->SetMomentum(fmom*sinth*std::cos(phi),fmom*sinth*std::sin(phi),fmom*cosTh); //CMS
851 product->SetTotalEnergy(std::sqrt(prodmass*prodmass+fmom*fmom)); //CMS
852 //Back to the LAB system:
853 product->Lorentz(*product,-1.*theCMS);
854
855}
856
857
859{
860 if ( aDefinition == G4Neutron::Definition() ) // If the outgoing particle is a neutron...
861 {
862 // LR: flag LR in ENDF. It indicates whether there is breakup of the residual nucleus or not.
863 // it: exit channel (index of the carbon excited state)
864
865 //if ( (G4int)(theBaseZ+0.1) == 6 ) G4cout << "LR[" << it << "] = " << LR[it] << G4endl;
866
867 // Added by A. R. GarcĂ­a (CIEMAT) to include the physics of C(N,N'3A) reactions from NRESP71.
868
869 if ( LR[it] > 0 ) // If there is breakup of the residual nucleus LR(flag LR in ENDF)>0 (i.e. Z=6 MT=52-91 (it=MT-50)).
870 {
871 // Defining carbon as the target in the reference frame at rest.
872 G4ReactionProduct theCarbon(theTarget);
873
874 theCarbon.SetMomentum(G4ThreeVector());
875 theCarbon.SetKineticEnergy(0.);
876
877 // Creating four reaction products.
878 G4ReactionProduct theProds[4];
879
880 // Applying C(N,N'3A) reaction mechanisms in the target rest frame.
881 if ( it == 41 )
882 {
883 // QI=QM=-7.275 MeV for C-0(N,N')C-C(3A) in ENDF/B-VII.1. This is not the value of the QI of the first step according to the model. So we don't take it. Instead, we set the one we have calculated: QI=(mn+m12C)-(ma+m9Be+Ex9Be)=-8.130 MeV.
884 nresp71_model.ApplyMechanismI_NBeA2A(boosted, theCarbon, theProds, -8.130/*QI[it]*/); // N+C --> A[0]+9BE* | 9BE* --> N[1]+8BE | 8BE --> 2*A[2,3].
885 //printf("- QI=%f\n", QI[it]);
886 }
887 else
888 {
889 nresp71_model.ApplyMechanismII_ACN2A(boosted, theCarbon, theProds, QI[it]); // N+C --> N'[0]+C* | C* --> A[1]+8BE | 8BE --> 2*A[2,3].
890 }
891
892 //printf("it=%d qi=%f \n", it, QI[it]);
893
894 // Returning to the reference frame where the target was in motion.
895 for ( G4int j=0; j<4; j++ )
896 {
897 theProds[j].Lorentz(theProds[j], -1.*theTarget);
898 theResult.Get()->AddSecondary(new G4DynamicParticle(theProds[j].GetDefinition(), theProds[j].GetMomentum()), secID);
899 }
900
901 /*G4double EN0 = theNeutron.GetKineticEnergy();
902 G4double EN1 = theProds[0].GetKineticEnergy();
903
904 G4double EA1 = theProds[1].GetKineticEnergy();
905 G4double EA2 = theProds[2].GetKineticEnergy();
906 G4double EA3 = theProds[3].GetKineticEnergy();
907
908 printf("Q=%f\n", EN1+EA1+EA2+EA3-EN0);*/
909
910 // Killing the primary neutron.
912
913 return true;
914 }
915 }
916 else if ( aDefinition == G4Alpha::Definition() ) // If the outgoing particle is an alpha, ...
917 {
918 // Added by A. R. GarcĂ­a (CIEMAT) to include the physics of C(N,A)9BE reactions from NRESP71.
919
920 if ( LR[it] == 0 ) // If Z=6, an alpha particle is emitted and there is no breakup of the residual nucleus LR(flag LR in ENDF)==0.
921 {
922 // Defining carbon as the target in the reference frame at rest.
923 G4ReactionProduct theCarbon(theTarget);
924
925 theCarbon.SetMomentum(G4ThreeVector());
926 theCarbon.SetKineticEnergy(0.);
927
928 // Creating four reaction products.
929 G4ReactionProduct theProds[2];
930
931 // Applying C(N,A)9BE reaction mechanism.
932 nresp71_model.ApplyMechanismABE(boosted, theCarbon, theProds); // N+C --> A[0]+9BE[1].
933
934 //G4DynamicParticle *theSec;
935 for ( G4int j=0; j<2; j++ )
936 {
937 // Returning to the system of reference where the target was in motion.
938 theProds[j].Lorentz(theProds[j], -1.*theTarget);
939 theResult.Get()->AddSecondary(new G4DynamicParticle(theProds[j].GetDefinition(), theProds[j].GetMomentum()), secID);
940 }
941
942 // Killing the primary neutron.
944
945 return true;
946 }
947 else
948 {
949 G4Exception("G4ParticleHPInelasticCompFS::CompositeApply()", "G4ParticleInelasticCompFS.cc", FatalException, "Alpha production with LR!=0.");
950 }
951 }
952
953 return false;
954}
static const G4double eps
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:35
static const G4int maxA
@ stopAndKill
#define M(row, col)
std::vector< G4ReactionProduct * > G4ReactionProductVector
static constexpr double keV
Definition: G4SIunits.hh:202
static constexpr double MeV
Definition: G4SIunits.hh:200
CLHEP::Hep3Vector G4ThreeVector
double G4double
Definition: G4Types.hh:83
bool G4bool
Definition: G4Types.hh:86
int G4int
Definition: G4Types.hh:85
const G4int Z[17]
const G4double A[17]
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
#define G4UniformRand()
Definition: Randomize.hh:52
double mag2() const
Hep3Vector vect() const
static G4Alpha * Definition()
Definition: G4Alpha.cc:48
value_type & Get() const
Definition: G4Cache.hh:315
void Put(const value_type &val) const
Definition: G4Cache.hh:321
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)
const G4ParticleDefinition * GetParticleDefinition() const
G4double GetKineticEnergy() const
void SetMomentum(const G4ThreeVector &momentum)
static G4Gamma * Gamma()
Definition: G4Gamma.cc:85
void SetStatusChange(G4HadFinalStateStatus aS)
void AddSecondary(G4DynamicParticle *aP, G4int mod=-1)
std::size_t GetNumberOfSecondaries() const
const G4Material * GetMaterial() const
const G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
const G4LorentzVector & Get4Momentum() const
G4ParticleDefinition * GetIon(G4int Z, G4int A, G4int lvl=0)
Definition: G4IonTable.cc:522
static G4IonTable * GetIonTable()
Definition: G4IonTable.cc:170
G4double GetTemperature() const
Definition: G4Material.hh:178
G4int ApplyMechanismABE(G4ReactionProduct &neut, G4ReactionProduct &carb, G4ReactionProduct *theProds)
G4int ApplyMechanismI_NBeA2A(G4ReactionProduct &neut, G4ReactionProduct &carb, G4ReactionProduct *theProds, const G4double QI)
G4int ApplyMechanismII_ACN2A(G4ReactionProduct &neut, G4ReactionProduct &carb, G4ReactionProduct *theProds, const G4double QI)
static G4Neutron * Neutron()
Definition: G4Neutron.cc:103
static G4Neutron * Definition()
Definition: G4Neutron.cc:53
static G4double GetNuclearMass(const G4double A, const G4double Z)
G4ReactionProduct GetBiasedThermalNucleus(G4double aMass, G4ThreeVector aVelocity, G4double temp=-1) const
Definition: G4Nucleus.cc:118
G4double GetPDGCharge() const
const G4String & GetParticleName() const
void Init(std::istream &aDataFile)
void SampleAndUpdate(G4ReactionProduct &anIncidentParticle)
G4ParticleHPLevel * GetLevel(G4int i)
G4ReactionProductVector * GetDecayGammas(G4int aLevel)
G4double GetLevelEnergy(G4int aLevel)
void Init(std::istream &aDataFile)
void Init(std::istream &aDataFile)
G4ReactionProductVector * Sample(G4double anEnergy)
G4double Sample(G4double anEnergy, G4int &it)
void SetAZMs(G4double anA, G4double aZ, G4int aM, G4ParticleHPDataUsed used)
G4ParticleDefinition * theProjectile
G4Cache< G4HadFinalState * > theResult
void adjust_final_state(G4LorentzVector)
void InitDistributionInitialState(G4ReactionProduct &anIncidentPart, G4ReactionProduct &aTarget, G4int it)
G4int SelectExitChannel(G4double eKinetic)
void CompositeApply(const G4HadProjectile &theTrack, G4ParticleDefinition *aHadron)
G4ParticleHPAngular * theAngularDistribution[51]
void InitGammas(G4double AR, G4double ZR)
void Init(G4double A, G4double Z, G4int M, G4String &dirName, G4String &aSFType, G4ParticleDefinition *)
G4ParticleHPEnergyDistribution * theEnergyDistribution[51]
G4ParticleHPEnAngCorrelation * theEnergyAngData[51]
virtual G4ParticleHPVector * GetXsec()
G4ParticleHPPhotonDist * theFinalStatePhotons[51]
void two_body_reaction(G4ReactionProduct *proj, G4ReactionProduct *targ, G4ReactionProduct *product, G4double resExcitationEnergy)
G4bool use_nresp71_model(const G4ParticleDefinition *aDefinition, const G4int it, const G4ReactionProduct &theTarget, G4ReactionProduct &boosted)
static G4ParticleHPManager * GetInstance()
void GetDataStream(G4String, std::istringstream &iss)
G4ParticleHPDataUsed GetName(G4int A, G4int Z, G4String base, G4String rest, G4bool &active)
void InitEnergies(std::istream &aDataFile)
G4ReactionProductVector * GetPhotons(G4double anEnergy)
void InitAngular(std::istream &aDataFile)
void InitPartials(std::istream &aDataFile, G4ParticleHPVector *theXsec=0)
G4bool InitMean(std::istream &aDataFile)
void Init(std::istream &aDataFile, G4int total, G4double ux=1., G4double uy=1.)
void SetMomentum(const G4double x, const G4double y, const G4double z)
void SetTotalEnergy(const G4double en)
G4double GetTotalMomentum() const
G4double GetKineticEnergy() const
const G4ParticleDefinition * GetDefinition() const
G4double GetTotalEnergy() const
G4ThreeVector GetMomentum() const
void Lorentz(const G4ReactionProduct &p1, const G4ReactionProduct &p2)
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)
void SetKineticEnergy(const G4double en)
G4double GetMass() const
static constexpr double keV
static constexpr double twopi
Definition: SystemOfUnits.h:56
static constexpr double eV
G4double total(Particle const *const p1, Particle const *const p2)
T max(const T t1, const T t2)
brief Return the largest of the two arguments