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

INCL++ intra-nuclear cascade. More...

#include <G4INCLXXInterface.hh>

+ Inheritance diagram for G4INCLXXInterface:

Public Member Functions

 G4INCLXXInterface (G4VPreCompoundModel *const aPreCompound=0)
 
 ~G4INCLXXInterface ()
 
G4bool operator== (G4INCLXXInterface &right)
 
G4bool operator!= (G4INCLXXInterface &right)
 
G4ReactionProductVectorPropagate (G4KineticTrackVector *theSecondaries, G4V3DNucleus *theNucleus)
 
G4HadFinalStateApplyYourself (const G4HadProjectile &aTrack, G4Nucleus &theNucleus)
 
void DeleteModel ()
 
virtual void ModelDescription (std::ostream &outFile) const
 
G4String const & GetDeExcitationModelName () const
 
void SetDeExcitation (G4VPreCompoundModel *ptr)
 
- Public Member Functions inherited from G4VIntraNuclearTransportModel
 G4VIntraNuclearTransportModel (const G4String &mName="CascadeModel", G4VPreCompoundModel *ptr=nullptr)
 
virtual ~G4VIntraNuclearTransportModel ()
 
virtual G4ReactionProductVectorPropagateNuclNucl (G4KineticTrackVector *theSecondaries, G4V3DNucleus *theNucleus, G4V3DNucleus *theProjectileNucleus)
 
void SetDeExcitation (G4VPreCompoundModel *ptr)
 
void Set3DNucleus (G4V3DNucleus *const value)
 
void SetPrimaryProjectile (const G4HadProjectile &aPrimary)
 
const G4StringGetModelName () const
 
virtual void PropagateModelDescription (std::ostream &outFile) const
 
 G4VIntraNuclearTransportModel (const G4VIntraNuclearTransportModel &right)=delete
 
const G4VIntraNuclearTransportModeloperator= (const G4VIntraNuclearTransportModel &right)=delete
 
G4bool operator== (const G4VIntraNuclearTransportModel &right) const =delete
 
G4bool operator!= (const G4VIntraNuclearTransportModel &right) const =delete
 
- Public Member Functions inherited from G4HadronicInteraction
 G4HadronicInteraction (const G4String &modelName="HadronicModel")
 
virtual ~G4HadronicInteraction ()
 
virtual G4double SampleInvariantT (const G4ParticleDefinition *p, G4double plab, G4int Z, G4int A)
 
virtual G4bool IsApplicable (const G4HadProjectile &aTrack, G4Nucleus &targetNucleus)
 
G4double GetMinEnergy () const
 
G4double GetMinEnergy (const G4Material *aMaterial, const G4Element *anElement) const
 
void SetMinEnergy (G4double anEnergy)
 
void SetMinEnergy (G4double anEnergy, const G4Element *anElement)
 
void SetMinEnergy (G4double anEnergy, const G4Material *aMaterial)
 
G4double GetMaxEnergy () const
 
G4double GetMaxEnergy (const G4Material *aMaterial, const G4Element *anElement) const
 
void SetMaxEnergy (const G4double anEnergy)
 
void SetMaxEnergy (G4double anEnergy, const G4Element *anElement)
 
void SetMaxEnergy (G4double anEnergy, const G4Material *aMaterial)
 
G4int GetVerboseLevel () const
 
void SetVerboseLevel (G4int value)
 
const G4StringGetModelName () const
 
void DeActivateFor (const G4Material *aMaterial)
 
void ActivateFor (const G4Material *aMaterial)
 
void DeActivateFor (const G4Element *anElement)
 
void ActivateFor (const G4Element *anElement)
 
G4bool IsBlocked (const G4Material *aMaterial) const
 
G4bool IsBlocked (const G4Element *anElement) const
 
void SetRecoilEnergyThreshold (G4double val)
 
G4double GetRecoilEnergyThreshold () const
 
virtual const std::pair< G4double, G4doubleGetFatalEnergyCheckLevels () const
 
virtual std::pair< G4double, G4doubleGetEnergyMomentumCheckLevels () const
 
void SetEnergyMomentumCheckLevels (G4double relativeLevel, G4double absoluteLevel)
 
virtual void BuildPhysicsTable (const G4ParticleDefinition &)
 
virtual void InitialiseModel ()
 
 G4HadronicInteraction (const G4HadronicInteraction &right)=delete
 
const G4HadronicInteractionoperator= (const G4HadronicInteraction &right)=delete
 
G4bool operator== (const G4HadronicInteraction &right) const =delete
 
G4bool operator!= (const G4HadronicInteraction &right) const =delete
 

Additional Inherited Members

- Protected Member Functions inherited from G4VIntraNuclearTransportModel
G4V3DNucleusGet3DNucleus () const
 
G4VPreCompoundModelGetDeExcitation () const
 
const G4HadProjectileGetPrimaryProjectile () const
 
- Protected Member Functions inherited from G4HadronicInteraction
void SetModelName (const G4String &nam)
 
G4bool IsBlocked () const
 
void Block ()
 
- Protected Attributes inherited from G4VIntraNuclearTransportModel
G4String theTransportModelName
 
G4V3DNucleusthe3DNucleus
 
G4VPreCompoundModeltheDeExcitation
 
const G4HadProjectilethePrimaryProjectile
 
- Protected Attributes inherited from G4HadronicInteraction
G4HadFinalState theParticleChange
 
G4int verboseLevel
 
G4double theMinEnergy
 
G4double theMaxEnergy
 
G4bool isBlocked
 

Detailed Description

INCL++ intra-nuclear cascade.

Interface for INCL++. This interface handles basic hadron bullet particles (protons, neutrons, pions), as well as light ions.

Example usage in case of protons:

inclModel -> SetMinEnergy(0.0 * MeV); // Set the energy limits
inclModel -> SetMaxEnergy(3.0 * GeV);
G4HadronInelasticProcess* protonInelasticProcess = new G4HadronInelasticProcess( "protonInelastic", G4Proton::Definition() );
G4VCrossSectionDataSet* protonInelasticCrossSection = new G4BGGNucleonInelasticXS( G4Proton::Proton() );
protonInelasticProcess -> RegisterMe(inclModel);
protonInelasticProcess -> AddDataSet(protonInelasticCrossSection);
particle = G4Proton::Proton();
processManager = particle -> GetProcessManager();
processManager -> AddDiscreteProcess(protonInelasticProcess);
void SetMinEnergy(G4double anEnergy)
void SetMaxEnergy(const G4double anEnergy)
INCL++ intra-nuclear cascade.
G4INCLXXInterface(G4VPreCompoundModel *const aPreCompound=0)
static G4Proton * Definition()
Definition G4Proton.cc:45
static G4Proton * Proton()
Definition G4Proton.cc:90

The same setup procedure is needed for neutron, pion and generic-ion inelastic processes as well.

Definition at line 103 of file G4INCLXXInterface.hh.

Constructor & Destructor Documentation

◆ G4INCLXXInterface()

G4INCLXXInterface::G4INCLXXInterface ( G4VPreCompoundModel *const aPreCompound = 0)

Definition at line 70 of file G4INCLXXInterface.cc.

70 :
72 theINCLModel(NULL),
73 thePreCompoundModel(aPreCompound),
74 theInterfaceStore(G4INCLXXInterfaceStore::GetInstance()),
75 theTally(NULL),
76 complainedAboutBackupModel(false),
77 complainedAboutPreCompound(false),
78 theIonTable(G4IonTable::GetIonTable()),
79 theINCLXXLevelDensity(NULL),
80 theINCLXXFissionProbability(NULL),
81 secID(-1)
82{
83 if(!thePreCompoundModel) {
86 thePreCompoundModel = static_cast<G4VPreCompoundModel*>(p);
87 if(!thePreCompoundModel) { thePreCompoundModel = new G4PreCompoundModel; }
88 }
89
90 // Use the environment variable G4INCLXX_NO_DE_EXCITATION to disable de-excitation
91 if(std::getenv("G4INCLXX_NO_DE_EXCITATION")) {
92 G4String message = "de-excitation is completely disabled!";
93 theInterfaceStore->EmitWarning(message);
95 } else {
98 theDeExcitation = static_cast<G4VPreCompoundModel*>(p);
100
101 // set the fission parameters for G4ExcitationHandler
102 G4VEvaporationChannel * const theFissionChannel =
104 G4CompetitiveFission * const theFissionChannelCast = dynamic_cast<G4CompetitiveFission *>(theFissionChannel);
105 if(theFissionChannelCast) {
106 theINCLXXLevelDensity = new G4FissionLevelDensityParameterINCLXX;
107 theFissionChannelCast->SetLevelDensityParameter(theINCLXXLevelDensity);
108 theINCLXXFissionProbability = new G4FissionProbability;
109 theINCLXXFissionProbability->SetFissionLevelDensityParameter(theINCLXXLevelDensity);
110 theFissionChannelCast->SetEmissionStrategy(theINCLXXFissionProbability);
111 theInterfaceStore->EmitBigWarning("INCL++/G4ExcitationHandler uses its own level-density parameter for fission");
112 } else {
113 theInterfaceStore->EmitBigWarning("INCL++/G4ExcitationHandler could not use its own level-density parameter for fission");
114 }
115 }
116
117 // use the envvar G4INCLXX_DUMP_REMNANT to dump information about the
118 // remnants on stdout
119 if(std::getenv("G4INCLXX_DUMP_REMNANT"))
120 dumpRemnantInfo = true;
121 else
122 dumpRemnantInfo = false;
123
124 theBackupModel = new G4BinaryLightIonReaction;
125 theBackupModelNucleon = new G4BinaryCascade;
126 secID = G4PhysicsModelCatalog::GetModelID( "model_INCLXXCascade" );
127}
void SetEmissionStrategy(G4VEmissionProbability *aFissionProb)
void SetLevelDensityParameter(G4VLevelDensityParameter *aLevelDensity)
G4VEvaporation * GetEvaporation()
Revised level-density parameter for fission after INCL++.
void SetFissionLevelDensityParameter(G4VLevelDensityParameter *aLevelDensity)
G4HadronicInteraction * FindModel(const G4String &name)
static G4HadronicInteractionRegistry * Instance()
void EmitWarning(const G4String &message)
Emit a warning to G4cout.
static G4INCLXXInterfaceStore * GetInstance()
Get the singleton instance.
void EmitBigWarning(const G4String &message) const
Emit a BIG warning to G4cout.
static G4IonTable * GetIonTable()
static G4int GetModelID(const G4int modelIndex)
G4VEvaporationChannel * GetFissionChannel() const
G4VIntraNuclearTransportModel(const G4String &mName="CascadeModel", G4VPreCompoundModel *ptr=nullptr)
G4ExcitationHandler * GetExcitationHandler() const

◆ ~G4INCLXXInterface()

G4INCLXXInterface::~G4INCLXXInterface ( )

Definition at line 129 of file G4INCLXXInterface.cc.

130{
131 delete theINCLXXLevelDensity;
132 delete theINCLXXFissionProbability;
133}

Member Function Documentation

◆ ApplyYourself()

G4HadFinalState * G4INCLXXInterface::ApplyYourself ( const G4HadProjectile & aTrack,
G4Nucleus & theNucleus )
virtual

Main method to apply the INCL physics model.

Parameters
aTrackthe projectile particle
theNucleustarget nucleus
Returns
the output of the INCL physics model

Reimplemented from G4HadronicInteraction.

Definition at line 176 of file G4INCLXXInterface.cc.

177{
178 G4ParticleDefinition const * const trackDefinition = aTrack.GetDefinition();
179 const G4bool isIonTrack = trackDefinition->GetParticleType()==G4GenericIon::GenericIon()->GetParticleType();
180 const G4int trackA = trackDefinition->GetAtomicMass();
181 const G4int trackZ = (G4int) trackDefinition->GetPDGCharge();
182 const G4int trackL = trackDefinition->GetNumberOfLambdasInHypernucleus();
183 const G4int nucleusA = theNucleus.GetA_asInt();
184 const G4int nucleusZ = theNucleus.GetZ_asInt();
185
186 // For reactions induced by weird projectiles (e.g. He2), bail out
187 if((isIonTrack && ((trackZ<=0 && trackL==0) || trackA<=trackZ)) ||
188 (nucleusA>1 && (nucleusZ<=0 || nucleusA<=nucleusZ))) {
189 theResult.Clear();
190 theResult.SetStatusChange(isAlive);
191 theResult.SetEnergyChange(aTrack.GetKineticEnergy());
192 theResult.SetMomentumChange(aTrack.Get4Momentum().vect().unit());
193 return &theResult;
194 }
195
196 // For reactions on nucleons, use the backup model (without complaining),
197 // except for anti_proton projectile (in this case, INCLXX is used).
198 if(trackA<=1 && nucleusA<=1 && (trackZ>=0 || trackA==0)) {
199 return theBackupModelNucleon->ApplyYourself(aTrack, theNucleus);
200 }
201
202 // For systems heavier than theMaxProjMassINCL, use another model (typically
203 // BIC)
204 const G4int theMaxProjMassINCL = theInterfaceStore->GetMaxProjMassINCL();
205 if(trackA > theMaxProjMassINCL && nucleusA > theMaxProjMassINCL) {
206 if(!complainedAboutBackupModel) {
207 complainedAboutBackupModel = true;
208 std::stringstream ss;
209 ss << "INCL++ refuses to handle reactions between nuclei with A>"
210 << theMaxProjMassINCL
211 << ". A backup model ("
212 << theBackupModel->GetModelName()
213 << ") will be used instead.";
214 theInterfaceStore->EmitBigWarning(ss.str());
215 }
216 return theBackupModel->ApplyYourself(aTrack, theNucleus);
217 }
218
219 // For energies lower than cascadeMinEnergyPerNucleon, use PreCompound
220 const G4double cascadeMinEnergyPerNucleon = theInterfaceStore->GetCascadeMinEnergyPerNucleon();
221 const G4double trackKinE = aTrack.GetKineticEnergy();
222 if((trackDefinition==G4Neutron::NeutronDefinition() || trackDefinition==G4Proton::ProtonDefinition())
223 && trackKinE < cascadeMinEnergyPerNucleon) {
224 if(!complainedAboutPreCompound) {
225 complainedAboutPreCompound = true;
226 std::stringstream ss;
227 ss << "INCL++ refuses to handle nucleon-induced reactions below "
228 << cascadeMinEnergyPerNucleon / MeV
229 << " MeV. A PreCoumpound model ("
230 << thePreCompoundModel->GetModelName()
231 << ") will be used instead.";
232 theInterfaceStore->EmitBigWarning(ss.str());
233 }
234 return thePreCompoundModel->ApplyYourself(aTrack, theNucleus);
235 }
236
237 // Calculate the total four-momentum in the entrance channel
238 const G4double theNucleusMass = theIonTable->GetIonMass(nucleusZ, nucleusA);
239 const G4double theTrackMass = trackDefinition->GetPDGMass();
240 const G4double theTrackEnergy = trackKinE + theTrackMass;
241 const G4double theTrackMomentumAbs2 = theTrackEnergy*theTrackEnergy - theTrackMass*theTrackMass;
242 const G4double theTrackMomentumAbs = ((theTrackMomentumAbs2>0.0) ? std::sqrt(theTrackMomentumAbs2) : 0.0);
243 const G4ThreeVector theTrackMomentum = aTrack.Get4Momentum().getV().unit() * theTrackMomentumAbs;
244
245 G4LorentzVector goodTrack4Momentum(theTrackMomentum, theTrackEnergy);
246 G4LorentzVector fourMomentumIn;
247 fourMomentumIn.setE(theTrackEnergy + theNucleusMass);
248 fourMomentumIn.setVect(theTrackMomentum);
249
250 // Check if inverse kinematics should be used
251 const G4bool inverseKinematics = AccurateProjectile(aTrack, theNucleus);
252
253 // If we are running in inverse kinematics, redefine aTrack and theNucleus
254 G4LorentzRotation *toInverseKinematics = NULL;
255 G4LorentzRotation *toDirectKinematics = NULL;
256 G4HadProjectile const *aProjectileTrack = &aTrack;
257 G4Nucleus *theTargetNucleus = &theNucleus;
258 if(inverseKinematics) {
259 G4ParticleDefinition *oldTargetDef = theIonTable->GetIon(nucleusZ, nucleusA, 0);
260 const G4ParticleDefinition *oldProjectileDef = trackDefinition;
261
262 if(oldProjectileDef != 0 && oldTargetDef != 0) {
263 const G4int newTargetA = oldProjectileDef->GetAtomicMass();
264 const G4int newTargetZ = oldProjectileDef->GetAtomicNumber();
265 const G4int newTargetL = oldProjectileDef->GetNumberOfLambdasInHypernucleus();
266 if(newTargetA > 0 && newTargetZ > 0) {
267 // This should give us the same energy per nucleon
268 theTargetNucleus = new G4Nucleus(newTargetA, newTargetZ, newTargetL);
269 toInverseKinematics = new G4LorentzRotation(goodTrack4Momentum.boostVector());
270 G4LorentzVector theProjectile4Momentum(0.0, 0.0, 0.0, theNucleusMass);
271 G4DynamicParticle swappedProjectileParticle(oldTargetDef, (*toInverseKinematics) * theProjectile4Momentum);
272 aProjectileTrack = new G4HadProjectile(swappedProjectileParticle);
273 } else {
274 G4String message = "badly defined target after swapping. Falling back to normal (non-swapped) mode.";
275 theInterfaceStore->EmitWarning(message);
276 toInverseKinematics = new G4LorentzRotation;
277 }
278 } else {
279 G4String message = "oldProjectileDef or oldTargetDef was null";
280 theInterfaceStore->EmitWarning(message);
281 toInverseKinematics = new G4LorentzRotation;
282 }
283 }
284
285 // INCL assumes the projectile particle is going in the direction of
286 // the Z-axis. Here we construct proper rotation to convert the
287 // momentum vectors of the outcoming particles to the original
288 // coordinate system.
289 G4LorentzVector projectileMomentum = aProjectileTrack->Get4Momentum();
290
291 // INCL++ assumes that the projectile is going in the direction of
292 // the z-axis. In principle, if the coordinate system used by G4
293 // hadronic framework is defined differently we need a rotation to
294 // transform the INCL++ reaction products to the appropriate
295 // frame. Please note that it isn't necessary to apply this
296 // transform to the projectile because when creating the INCL++
297 // projectile particle; \see{toINCLKineticEnergy} needs to use only the
298 // projectile energy (direction is simply assumed to be along z-axis).
300 toZ.rotateZ(-projectileMomentum.phi());
301 toZ.rotateY(-projectileMomentum.theta());
302 G4RotationMatrix toLabFrame3 = toZ.inverse();
303 G4LorentzRotation toLabFrame(toLabFrame3);
304 // However, it turns out that the projectile given to us by G4
305 // hadronic framework is already going in the direction of the
306 // z-axis so this rotation is actually unnecessary. Both toZ and
307 // toLabFrame turn out to be unit matrices as can be seen by
308 // uncommenting the folowing two lines:
309 // G4cout <<"toZ = " << toZ << G4endl;
310 // G4cout <<"toLabFrame = " << toLabFrame << G4endl;
311
312 theResult.Clear(); // Make sure the output data structure is clean.
313 theResult.SetStatusChange(stopAndKill);
314
315 std::list<G4Fragment> remnants;
316
317 const G4int maxTries = 200;
318 G4int nTries = 0;
319 // INCL can generate transparent events. However, this is meaningful
320 // only in the standalone code. In Geant4 we must "force" INCL to
321 // produce a valid cascade.
322 G4bool eventIsOK = false;
323 do {
324 const G4INCL::ParticleSpecies theSpecies = toINCLParticleSpecies(*aProjectileTrack);
325 const G4double kineticEnergy = toINCLKineticEnergy(*aProjectileTrack);
326
327 // The INCL model will be created at the first use
329
330 const G4INCL::EventInfo eventInfo = theINCLModel->processEvent(theSpecies, kineticEnergy,
331 theTargetNucleus->GetA_asInt(),
332 theTargetNucleus->GetZ_asInt(),
333 -theTargetNucleus->GetL()); // Strangeness has opposite sign
334 // eventIsOK = !eventInfo.transparent && nTries < maxTries; // of the number of Lambdas
335 eventIsOK = !eventInfo.transparent;
336 if(eventIsOK) {
337
338 // If the collision was run in inverse kinematics, prepare to boost back
339 // all the reaction products
340 if(inverseKinematics) {
341 toDirectKinematics = new G4LorentzRotation(toInverseKinematics->inverse());
342 }
343
344 G4LorentzVector fourMomentumOut;
345
346 for(G4int i = 0; i < eventInfo.nParticles; ++i) {
347 G4int A = eventInfo.A[i];
348 G4int Z = eventInfo.Z[i];
349 G4int S = eventInfo.S[i]; // Strangeness
350 G4int PDGCode = eventInfo.PDGCode[i];
351 G4double kinE = eventInfo.EKin[i];
352 G4double px = eventInfo.px[i];
353 G4double py = eventInfo.py[i];
354 G4double pz = eventInfo.pz[i];
355 G4DynamicParticle *p = toG4Particle(A, Z, S, PDGCode, kinE, px, py, pz);
356 if(p != 0) {
357 G4LorentzVector momentum = p->Get4Momentum();
358
359 // Apply the toLabFrame rotation
360 momentum *= toLabFrame;
361 // Apply the inverse-kinematics boost
362 if(inverseKinematics) {
363 momentum *= *toDirectKinematics;
364 momentum.setVect(-momentum.vect());
365 }
366
367 // Set the four-momentum of the reaction products
368 p->Set4Momentum(momentum);
369 fourMomentumOut += momentum;
370
371 // Propagate the particle's parent resonance information
372 G4HadSecondary secondary(p, 1.0, secID);
373 G4ParticleDefinition* parentResonanceDef = nullptr;
374 if ( eventInfo.parentResonancePDGCode[i] != 0 ) {
375 parentResonanceDef = G4ParticleTable::GetParticleTable()->FindParticle(eventInfo.parentResonancePDGCode[i]);
376 }
377 secondary.SetParentResonanceDef(parentResonanceDef);
378 secondary.SetParentResonanceID(eventInfo.parentResonanceID[i]);
379
380 theResult.AddSecondary(secondary);
381
382 } else {
383 G4String message = "the model produced a particle that couldn't be converted to Geant4 particle.";
384 theInterfaceStore->EmitWarning(message);
385 }
386 }
387
388 for(G4int i = 0; i < eventInfo.nRemnants; ++i) {
389 const G4int A = eventInfo.ARem[i];
390 const G4int Z = eventInfo.ZRem[i];
391 const G4int S = eventInfo.SRem[i];
392 // Check that the remnant is a physical bound state: if not, resample the collision.
393 if(( Z == 0 && S == 0 && A > 1 ) || // No bound states for nn, nnn, nnnn, ...
394 ( Z == 0 && S != 0 && A < 4 ) || // No bound states for nl, ll, nnl, nll, lll
395 ( Z != 0 && S != 0 && A == Z + std::abs(S) )) { // No bound states for pl, ppl, pll, ...
396 std::stringstream ss;
397 ss << "unphysical residual fragment : Z=" << Z << " S=" << S << " A=" << A
398 << " skipping it and resampling the collision";
399 theInterfaceStore->EmitWarning(ss.str());
400 eventIsOK = false;
401 continue;
402 }
403 const G4double kinE = eventInfo.EKinRem[i];
404 const G4double px = eventInfo.pxRem[i];
405 const G4double py = eventInfo.pyRem[i];
406 const G4double pz = eventInfo.pzRem[i];
407 G4ThreeVector spin(
408 eventInfo.jxRem[i]*hbar_Planck,
409 eventInfo.jyRem[i]*hbar_Planck,
410 eventInfo.jzRem[i]*hbar_Planck
411 );
412 const G4double excitationE = eventInfo.EStarRem[i];
413 G4double nuclearMass = excitationE;
414 if ( S == 0 ) {
415 nuclearMass += G4NucleiProperties::GetNuclearMass(A, Z);
416 } else {
417 // Assumed that the opposite of the strangeness of the remnant gives the number of Lambdas inside it
418 nuclearMass += G4HyperNucleiProperties::GetNuclearMass(A, Z, std::abs(S));
419 }
420 const G4double scaling = remnant4MomentumScaling(nuclearMass, kinE, px, py, pz);
421 G4LorentzVector fourMomentum(scaling * px, scaling * py, scaling * pz,
422 nuclearMass + kinE);
423 if(std::abs(scaling - 1.0) > 0.01) {
424 std::stringstream ss;
425 ss << "momentum scaling = " << scaling
426 << "\n Lorentz vector = " << fourMomentum
427 << ")\n A = " << A << ", Z = " << Z << ", S = " << S
428 << "\n E* = " << excitationE << ", nuclearMass = " << nuclearMass
429 << "\n remnant i=" << i << ", nRemnants=" << eventInfo.nRemnants
430 << "\n Reaction was: " << aTrack.GetKineticEnergy()/MeV
431 << "-MeV " << trackDefinition->GetParticleName() << " + "
432 << theIonTable->GetIonName(theNucleus.GetZ_asInt(), theNucleus.GetA_asInt(), 0)
433 << ", in " << (inverseKinematics ? "inverse" : "direct") << " kinematics.";
434 theInterfaceStore->EmitWarning(ss.str());
435 }
436
437 // Apply the toLabFrame rotation
438 fourMomentum *= toLabFrame;
439 spin *= toLabFrame3;
440 // Apply the inverse-kinematics boost
441 if(inverseKinematics) {
442 fourMomentum *= *toDirectKinematics;
443 fourMomentum.setVect(-fourMomentum.vect());
444 }
445
446 fourMomentumOut += fourMomentum;
447 G4Fragment remnant(A, Z, std::abs(S), fourMomentum); // Assumed that -strangeness gives the number of Lambdas
448 remnant.SetAngularMomentum(spin);
449 remnant.SetCreatorModelID(secID);
450 if(dumpRemnantInfo) {
451 G4cerr << "G4INCLXX_DUMP_REMNANT: " << remnant << " spin: " << spin << G4endl;
452 }
453 remnants.push_back(remnant);
454 }
455
456 // Give up is the event is not ok (e.g. unphysical residual)
457 if(!eventIsOK) {
458 const G4int nSecondaries = (G4int)theResult.GetNumberOfSecondaries();
459 for(G4int j=0; j<nSecondaries; ++j) delete theResult.GetSecondary(j)->GetParticle();
460 theResult.Clear();
461 theResult.SetStatusChange(stopAndKill);
462 remnants.clear();
463 } else {
464 // Check four-momentum conservation
465 const G4LorentzVector violation4Momentum = fourMomentumOut - fourMomentumIn;
466 const G4double energyViolation = std::abs(violation4Momentum.e());
467 const G4double momentumViolation = violation4Momentum.rho();
468 if(energyViolation > G4INCLXXInterfaceStore::GetInstance()->GetConservationTolerance()) {
469 std::stringstream ss;
470 ss << "energy conservation violated by " << energyViolation/MeV << " MeV in "
471 << aTrack.GetKineticEnergy()/MeV << "-MeV " << trackDefinition->GetParticleName()
472 << " + " << theIonTable->GetIonName(theNucleus.GetZ_asInt(), theNucleus.GetA_asInt(), 0)
473 << " inelastic reaction, in " << (inverseKinematics ? "inverse" : "direct") << " kinematics. Will resample.";
474 theInterfaceStore->EmitWarning(ss.str());
475 eventIsOK = false;
476 const G4int nSecondaries = (G4int)theResult.GetNumberOfSecondaries();
477 for(G4int j=0; j<nSecondaries; ++j) delete theResult.GetSecondary(j)->GetParticle();
478 theResult.Clear();
479 theResult.SetStatusChange(stopAndKill);
480 remnants.clear();
481 } else if(momentumViolation > G4INCLXXInterfaceStore::GetInstance()->GetConservationTolerance()) {
482 std::stringstream ss;
483 ss << "momentum conservation violated by " << momentumViolation/MeV << " MeV in "
484 << aTrack.GetKineticEnergy()/MeV << "-MeV " << trackDefinition->GetParticleName()
485 << " + " << theIonTable->GetIonName(theNucleus.GetZ_asInt(), theNucleus.GetA_asInt(), 0)
486 << " inelastic reaction, in " << (inverseKinematics ? "inverse" : "direct") << " kinematics. Will resample.";
487 theInterfaceStore->EmitWarning(ss.str());
488 eventIsOK = false;
489 const G4int nSecondaries = (G4int)theResult.GetNumberOfSecondaries();
490 for(G4int j=0; j<nSecondaries; ++j) delete theResult.GetSecondary(j)->GetParticle();
491 theResult.Clear();
492 theResult.SetStatusChange(stopAndKill);
493 remnants.clear();
494 }
495 }
496 }
497 nTries++;
498 } while(!eventIsOK && nTries < maxTries); /* Loop checking, 10.07.2015, D.Mancusi */
499
500 // Clean up the objects that we created for the inverse kinematics
501 if(inverseKinematics) {
502 delete aProjectileTrack;
503 delete theTargetNucleus;
504 delete toInverseKinematics;
505 delete toDirectKinematics;
506 }
507
508 if(!eventIsOK) {
509 std::stringstream ss;
510 ss << "maximum number of tries exceeded for the proposed "
511 << aTrack.GetKineticEnergy()/MeV << "-MeV " << trackDefinition->GetParticleName()
512 << " + " << theIonTable->GetIonName(nucleusZ, nucleusA, 0)
513 << " inelastic reaction, in " << (inverseKinematics ? "inverse" : "direct") << " kinematics.";
514 theInterfaceStore->EmitWarning(ss.str());
515 theResult.SetStatusChange(isAlive);
516 theResult.SetEnergyChange(aTrack.GetKineticEnergy());
517 theResult.SetMomentumChange(aTrack.Get4Momentum().vect().unit());
518 return &theResult;
519 }
520
521 // De-excitation:
522
523 if(theDeExcitation != 0) {
524 for(std::list<G4Fragment>::iterator i = remnants.begin();
525 i != remnants.end(); ++i) {
526 G4ReactionProductVector *deExcitationResult = theDeExcitation->DeExcite((*i));
527
528 for(G4ReactionProductVector::iterator fragment = deExcitationResult->begin();
529 fragment != deExcitationResult->end(); ++fragment) {
530 const G4ParticleDefinition *def = (*fragment)->GetDefinition();
531 if(def != 0) {
532 G4DynamicParticle *theFragment = new G4DynamicParticle(def, (*fragment)->GetMomentum());
533 theResult.AddSecondary(theFragment, (*fragment)->GetCreatorModelID());
534 }
535 }
536
537 for(G4ReactionProductVector::iterator fragment = deExcitationResult->begin();
538 fragment != deExcitationResult->end(); ++fragment) {
539 delete (*fragment);
540 }
541 deExcitationResult->clear();
542 delete deExcitationResult;
543 }
544 }
545
546 remnants.clear();
547
548 if((theTally = theInterfaceStore->GetTally()))
549 theTally->Tally(aTrack, theNucleus, theResult);
550
551 return &theResult;
552}
G4double S(G4double temp)
@ isAlive
@ stopAndKill
CLHEP::HepLorentzRotation G4LorentzRotation
std::vector< G4ReactionProduct * > G4ReactionProductVector
double G4double
Definition G4Types.hh:83
bool G4bool
Definition G4Types.hh:86
int G4int
Definition G4Types.hh:85
const G4double A[17]
G4GLOB_DLL std::ostream G4cerr
#define G4endl
Definition G4ios.hh:67
Hep3Vector unit() const
HepLorentzRotation inverse() const
double theta() const
Hep3Vector vect() const
void setVect(const Hep3Vector &)
HepRotation inverse() const
HepRotation & rotateZ(double delta)
Definition Rotation.cc:87
HepRotation & rotateY(double delta)
Definition Rotation.cc:74
G4LorentzVector Get4Momentum() const
void Set4Momentum(const G4LorentzVector &momentum)
static G4GenericIon * GenericIon()
void SetStatusChange(G4HadFinalStateStatus aS)
void AddSecondary(G4DynamicParticle *aP, G4int mod=-1)
std::size_t GetNumberOfSecondaries() const
void SetEnergyChange(G4double anEnergy)
G4HadSecondary * GetSecondary(size_t i)
void SetMomentumChange(const G4ThreeVector &aV)
const G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
const G4LorentzVector & Get4Momentum() const
G4DynamicParticle * GetParticle()
virtual G4HadFinalState * ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus)
const G4String & GetModelName() const
static G4double GetNuclearMass(G4int A, G4int Z, G4int L)
G4int GetMaxProjMassINCL() const
Getter for theMaxProjMassINCL.
G4INCL::INCL * GetINCLModel()
Get the cached INCL model engine.
G4double GetCascadeMinEnergyPerNucleon() const
Getter for cascadeMinEnergyPerNucleon.
G4INCLXXVInterfaceTally * GetTally() const
Getter for the interface tally.
virtual void Tally(G4HadProjectile const &aTrack, G4Nucleus const &theNucleus, G4HadFinalState const &result)=0
const EventInfo & processEvent()
G4ParticleDefinition * GetIon(G4int Z, G4int A, G4int lvl=0)
G4String GetIonName(G4int Z, G4int A, G4int lvl=0) const
G4double GetIonMass(G4int Z, G4int A, G4int nL=0, G4int lvl=0) const
static G4Neutron * NeutronDefinition()
Definition G4Neutron.cc:96
static G4double GetNuclearMass(const G4double A, const G4double Z)
G4int GetA_asInt() const
Definition G4Nucleus.hh:99
G4int GetZ_asInt() const
Definition G4Nucleus.hh:105
G4int GetL() const
Definition G4Nucleus.hh:108
G4int GetAtomicNumber() const
const G4String & GetParticleType() const
G4int GetAtomicMass() const
G4int GetNumberOfLambdasInHypernucleus() const
const G4String & GetParticleName() const
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
static G4ParticleTable * GetParticleTable()
static G4Proton * ProtonDefinition()
Definition G4Proton.cc:85
virtual G4ReactionProductVector * DeExcite(G4Fragment &aFragment)=0
Short_t S[maxSizeParticles]
Particle strangeness number.
Int_t parentResonancePDGCode[maxSizeParticles]
Particle's parent resonance PDG code.
Short_t nRemnants
Number of remnants.
Bool_t transparent
True if the event is transparent.
Short_t A[maxSizeParticles]
Particle mass number.
Float_t EKinRem[maxSizeRemnants]
Remnant kinetic energy [MeV].
Int_t parentResonanceID[maxSizeParticles]
Particle's parent resonance unique ID identifier.
Float_t jzRem[maxSizeRemnants]
Remnant angular momentum, z component [ ].
Float_t EStarRem[maxSizeRemnants]
Remnant excitation energy [MeV].
Short_t Z[maxSizeParticles]
Particle charge number.
Float_t EKin[maxSizeParticles]
Particle kinetic energy [MeV].
Short_t nParticles
Number of particles in the final state.
Float_t jxRem[maxSizeRemnants]
Remnant angular momentum, x component [ ].
Float_t px[maxSizeParticles]
Particle momentum, x component [MeV/c].
Short_t SRem[maxSizeRemnants]
Remnant strangeness number.
Float_t pxRem[maxSizeRemnants]
Remnant momentum, x component [MeV/c].
Float_t pyRem[maxSizeRemnants]
Remnant momentum, y component [MeV/c].
Float_t pzRem[maxSizeRemnants]
Remnant momentum, z component [MeV/c].
Float_t pz[maxSizeParticles]
Particle momentum, z component [MeV/c].
Int_t PDGCode[maxSizeParticles]
PDG numbering of the particles.
Float_t jyRem[maxSizeRemnants]
Remnant angular momentum, y component [ ].
Float_t py[maxSizeParticles]
Particle momentum, y component [MeV/c].
Short_t ARem[maxSizeRemnants]
Remnant mass number.
Short_t ZRem[maxSizeRemnants]
Remnant charge number.

◆ DeleteModel()

void G4INCLXXInterface::DeleteModel ( )
inline

Definition at line 128 of file G4INCLXXInterface.hh.

128 {
129 delete theINCLModel;
130 theINCLModel = NULL;
131 }

◆ GetDeExcitationModelName()

G4String const & G4INCLXXInterface::GetDeExcitationModelName ( ) const

Definition at line 678 of file G4INCLXXInterface.cc.

678 {
680}

◆ ModelDescription()

void G4INCLXXInterface::ModelDescription ( std::ostream & outFile) const
virtual

Reimplemented from G4VIntraNuclearTransportModel.

Definition at line 663 of file G4INCLXXInterface.cc.

663 {
664 outFile
665 << "The Liège Intranuclear Cascade (INCL++) is a model for reactions induced\n"
666 << "by nucleons, pions and light ion on any nucleus. The reaction is\n"
667 << "described as an avalanche of binary nucleon-nucleon collisions, which can\n"
668 << "lead to the emission of energetic particles and to the formation of an\n"
669 << "excited thermalised nucleus (remnant). The de-excitation of the remnant is\n"
670 << "outside the scope of INCL++ and is typically described by another model.\n\n"
671 << "INCL++ has been reasonably well tested for nucleon (~50 MeV to ~15 GeV),\n"
672 << "pion (idem) and light-ion projectiles (up to A=18, ~10A MeV to 1A GeV).\n"
673 << "Most tests involved target nuclei close to the stability valley, with\n"
674 << "numbers between 4 and 250.\n\n"
675 << "Reference: D. Mancusi et al., Phys. Rev. C90 (2014) 054602\n\n";
676}

◆ operator!=()

G4bool G4INCLXXInterface::operator!= ( G4INCLXXInterface & right)
inline

Definition at line 112 of file G4INCLXXInterface.hh.

112 {
113 return (this != &right);
114 }

◆ operator==()

G4bool G4INCLXXInterface::operator== ( G4INCLXXInterface & right)
inline

Definition at line 108 of file G4INCLXXInterface.hh.

108 {
109 return (this == &right);
110 }

◆ Propagate()

G4ReactionProductVector * G4INCLXXInterface::Propagate ( G4KineticTrackVector * theSecondaries,
G4V3DNucleus * theNucleus )
virtual

Implements G4VIntraNuclearTransportModel.

Definition at line 554 of file G4INCLXXInterface.cc.

554 {
555 return 0;
556}

◆ SetDeExcitation()

void G4VIntraNuclearTransportModel::SetDeExcitation ( G4VPreCompoundModel * ptr)
inline

Definition at line 81 of file G4VIntraNuclearTransportModel.hh.

136{
137 // previous pre-compound model will be deleted at the end of job
138 theDeExcitation = value;
139}

Referenced by G4INCLXXInterfaceStore::UseAblaDeExcitation().


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