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

#include <G4GeneratorPrecompoundInterface.hh>

+ Inheritance diagram for G4GeneratorPrecompoundInterface:

Public Member Functions

 G4GeneratorPrecompoundInterface (G4VPreCompoundModel *p=0)
 
virtual ~G4GeneratorPrecompoundInterface ()
 
virtual G4HadFinalStateApplyYourself (const G4HadProjectile &aTrack, G4Nucleus &targetNucleus)
 
virtual G4ReactionProductVectorPropagate (G4KineticTrackVector *theSecondaries, G4V3DNucleus *theNucleus)
 
virtual G4ReactionProductVectorPropagateNuclNucl (G4KineticTrackVector *theSecondaries, G4V3DNucleus *theNucleus, G4V3DNucleus *theProjectileNucleus)
 
void SetCaptureThreshold (G4double)
 
void SetDeltaM (G4double)
 
void SetDeltaR (G4double)
 
void MakeCoalescence (G4KineticTrackVector *theSecondaries)
 
virtual void PropagateModelDescription (std::ostream &) const
 
- Public Member Functions inherited from G4VIntraNuclearTransportModel
 G4VIntraNuclearTransportModel (const G4String &mName="CascadeModel", G4VPreCompoundModel *ptr=nullptr)
 
virtual ~G4VIntraNuclearTransportModel ()
 
void SetDeExcitation (G4VPreCompoundModel *ptr)
 
void Set3DNucleus (G4V3DNucleus *const value)
 
void SetPrimaryProjectile (const G4HadProjectile &aPrimary)
 
const G4StringGetModelName () const
 
virtual void ModelDescription (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

Definition at line 59 of file G4GeneratorPrecompoundInterface.hh.

Constructor & Destructor Documentation

◆ G4GeneratorPrecompoundInterface()

G4GeneratorPrecompoundInterface::G4GeneratorPrecompoundInterface ( G4VPreCompoundModel * p = 0)

Definition at line 100 of file G4GeneratorPrecompoundInterface.cc.

101 : CaptureThreshold(70*MeV), DeltaM(5.0*MeV), DeltaR(0.0), secID(-1)
102{
103 proton = G4Proton::Proton();
104 neutron = G4Neutron::Neutron();
105 lambda = G4Lambda::Lambda();
106
107 deuteron=G4Deuteron::Deuteron();
108 triton =G4Triton::Triton();
109 He3 =G4He3::He3();
110 He4 =G4Alpha::Alpha();
111
112 ANTIproton=G4AntiProton::AntiProton();
113 ANTIneutron=G4AntiNeutron::AntiNeutron();
114
115 ANTIdeuteron=G4AntiDeuteron::AntiDeuteron();
116 ANTItriton =G4AntiTriton::AntiTriton();
117 ANTIHe3 =G4AntiHe3::AntiHe3();
118 ANTIHe4 =G4AntiAlpha::AntiAlpha();
119
120 if(preModel) { SetDeExcitation(preModel); }
121 else {
124 G4VPreCompoundModel* pre = static_cast<G4VPreCompoundModel*>(hadi);
125 if(!pre) { pre = new G4PreCompoundModel(); }
126 SetDeExcitation(pre);
127 }
128
129 secID = G4PhysicsModelCatalog::GetModelID("model_PRECO");
130}
static G4Alpha * Alpha()
Definition G4Alpha.cc:83
static G4AntiAlpha * AntiAlpha()
static G4AntiDeuteron * AntiDeuteron()
static G4AntiHe3 * AntiHe3()
Definition G4AntiHe3.cc:90
static G4AntiNeutron * AntiNeutron()
static G4AntiProton * AntiProton()
static G4AntiTriton * AntiTriton()
static G4Deuteron * Deuteron()
Definition G4Deuteron.cc:90
G4HadronicInteraction * FindModel(const G4String &name)
static G4HadronicInteractionRegistry * Instance()
static G4He3 * He3()
Definition G4He3.cc:90
static G4Lambda * Lambda()
Definition G4Lambda.cc:105
static G4Neutron * Neutron()
Definition G4Neutron.cc:101
static G4int GetModelID(const G4int modelIndex)
static G4Proton * Proton()
Definition G4Proton.cc:90
static G4Triton * Triton()
Definition G4Triton.cc:90
void SetDeExcitation(G4VPreCompoundModel *ptr)

◆ ~G4GeneratorPrecompoundInterface()

G4GeneratorPrecompoundInterface::~G4GeneratorPrecompoundInterface ( )
virtual

Definition at line 132 of file G4GeneratorPrecompoundInterface.cc.

133{
134}

Member Function Documentation

◆ ApplyYourself()

G4HadFinalState * G4GeneratorPrecompoundInterface::ApplyYourself ( const G4HadProjectile & aTrack,
G4Nucleus & targetNucleus )
virtual

Reimplemented from G4HadronicInteraction.

Definition at line 355 of file G4GeneratorPrecompoundInterface.cc.

357{
358 G4cout << "G4GeneratorPrecompoundInterface: ApplyYourself interface called stand-allone."
359 << G4endl;
360 G4cout << "This class is only a mediator between generator and precompound"<<G4endl;
361 G4cout << "Please remove from your physics list."<<G4endl;
362 throw G4HadronicException(__FILE__, __LINE__, "SEVERE: G4GeneratorPrecompoundInterface model interface called stand-allone.");
363 return new G4HadFinalState;
364}
#define G4endl
Definition G4ios.hh:67
G4GLOB_DLL std::ostream G4cout

◆ MakeCoalescence()

void G4GeneratorPrecompoundInterface::MakeCoalescence ( G4KineticTrackVector * theSecondaries)

Definition at line 797 of file G4GeneratorPrecompoundInterface.cc.

797 {
798 // This method replaces pairs of proton-neutron - in the case of nuclei - or
799 // antiproton-antineutron - in the case of anti-nuclei - which are close in
800 // momentum, with, respectively, deuterons and anti-deuterons.
801 // Note that in the case of hypernuclei or anti-hypernuclei, lambdas or anti-lambdas
802 // are not considered for coalescence because hyper-deuteron or anti-hyper-deuteron
803 // are assumed not to exist.
804
805 if (!tracks) return;
806
807 G4double MassCut = deuteron->GetPDGMass() + DeltaM; // In MeV
808
809 for ( std::size_t i = 0; i < tracks->size(); ++i ) { // search for protons
810
811 G4KineticTrack* trackP = (*tracks)[i];
812 if ( ! trackP ) continue;
813 if (trackP->GetDefinition() != proton) continue;
814
815 G4LorentzVector Prot4Mom = trackP->Get4Momentum();
816 G4LorentzVector ProtSPposition = G4LorentzVector(trackP->GetPosition(), trackP->GetFormationTime());
817
818 for ( std::size_t j = 0; j < tracks->size(); ++j ) { // search for neutron
819
820 G4KineticTrack* trackN = (*tracks)[j];
821 if (! trackN ) continue;
822 if (trackN->GetDefinition() != neutron) continue;
823
824 G4LorentzVector Neut4Mom = trackN->Get4Momentum();
825 G4LorentzVector NeutSPposition = G4LorentzVector( trackN->GetPosition(), trackN->GetFormationTime()*hbarc/fermi);
826 G4double EffMass = (Prot4Mom + Neut4Mom).mag();
827
828 if ( EffMass <= MassCut ) { // && (EffDistance <= SpaceCut)) { // Create deuteron
829 G4KineticTrack* aDeuteron =
830 new G4KineticTrack( deuteron,
831 (trackP->GetFormationTime() + trackN->GetFormationTime())/2.0,
832 (trackP->GetPosition() + trackN->GetPosition() )/2.0,
833 ( Prot4Mom + Neut4Mom ));
834 aDeuteron->SetCreatorModelID(secID);
835 tracks->push_back(aDeuteron);
836 delete trackP; delete trackN;
837 (*tracks)[i] = nullptr; (*tracks)[j] = nullptr;
838 break;
839 }
840 }
841 }
842
843 // Find and remove null pointers created by decays above
844 for ( G4int jj = (G4int)tracks->size()-1; jj >= 0; --jj ) {
845 if ( ! (*tracks)[jj] ) tracks->erase(tracks->begin()+jj);
846 }
847}
CLHEP::HepLorentzVector G4LorentzVector
double G4double
Definition G4Types.hh:83
int G4int
Definition G4Types.hh:85
G4double GetFormationTime() const
void SetCreatorModelID(G4int id)
const G4ThreeVector & GetPosition() const
const G4ParticleDefinition * GetDefinition() const
const G4LorentzVector & Get4Momentum() const

Referenced by PropagateNuclNucl().

◆ Propagate()

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

Implements G4VIntraNuclearTransportModel.

Definition at line 136 of file G4GeneratorPrecompoundInterface.cc.

138{
139 #ifdef debugPrecoInt
140 G4cout<<G4endl<<"G4GeneratorPrecompoundInterface::Propagate"<<G4endl;
141 G4cout<<"Target A and Z "<<theNucleus->GetMassNumber()<<" "<<theNucleus->GetCharge()<<G4endl;
142 G4cout<<"Directly produced particles number "<<theSecondaries->size()<<G4endl;
143 #endif
144
146
147 // decay the strong resonances
148 G4DecayKineticTracks decay(theSecondaries);
149 #ifdef debugPrecoInt
150 G4cout<<"Final stable particles number "<<theSecondaries->size()<<G4endl;
151 #endif
152
153 // prepare the fragment (it is assumed that target nuclei are never hypernuclei)
154 G4int anA=theNucleus->GetMassNumber();
155 G4int aZ=theNucleus->GetCharge();
156// G4double TargetNucleusMass = G4NucleiProperties::GetNuclearMass(anA, aZ);
157
158 G4int numberOfEx = 0;
159 G4int numberOfCh = 0;
160 G4int numberOfHoles = 0;
161
162 G4double R = theNucleus->GetNuclearRadius();
163
164 G4LorentzVector captured4Momentum(0.,0.,0.,0.);
165 G4LorentzVector Residual4Momentum(0.,0.,0.,0.); // TargetNucleusMass is not need at the moment
166 G4LorentzVector Secondary4Momentum(0.,0.,0.,0.);
167
168 // loop over secondaries
169 G4KineticTrackVector::iterator iter;
170 for(iter=theSecondaries->begin(); iter !=theSecondaries->end(); ++iter)
171 {
172 const G4ParticleDefinition* part = (*iter)->GetDefinition();
173 G4double e = (*iter)->Get4Momentum().e();
174 G4double mass = (*iter)->Get4Momentum().mag();
175 G4ThreeVector mom = (*iter)->Get4Momentum().vect();
176 if((part != proton && part != neutron) ||
177 ((*iter)->GetPosition().mag() > R)) {
178 G4ReactionProduct * theNew = new G4ReactionProduct(part);
179 theNew->SetMomentum(mom);
180 theNew->SetTotalEnergy(e);
181 theNew->SetCreatorModelID((*iter)->GetCreatorModelID());
182 theNew->SetParentResonanceDef((*iter)->GetParentResonanceDef());
183 theNew->SetParentResonanceID((*iter)->GetParentResonanceID());
184 theTotalResult->push_back(theNew);
185 Secondary4Momentum += (*iter)->Get4Momentum();
186 #ifdef debugPrecoInt
187 G4cout<<"Secondary 4Mom "<<part->GetParticleName()<<" "<<(*iter)->Get4Momentum()<<" "
188 <<(*iter)->Get4Momentum().mag()<<G4endl;
189 #endif
190 } else {
191 if( e-mass > -CaptureThreshold*G4Log( G4UniformRand()) ) {
192 G4ReactionProduct * theNew = new G4ReactionProduct(part);
193 theNew->SetMomentum(mom);
194 theNew->SetTotalEnergy(e);
195 theNew->SetCreatorModelID((*iter)->GetCreatorModelID());
196 theNew->SetParentResonanceDef((*iter)->GetParentResonanceDef());
197 theNew->SetParentResonanceID((*iter)->GetParentResonanceID());
198 theTotalResult->push_back(theNew);
199 Secondary4Momentum += (*iter)->Get4Momentum();
200 #ifdef debugPrecoInt
201 G4cout<<"Secondary 4Mom "<<part->GetParticleName()<<" "<<(*iter)->Get4Momentum()<<" "
202 <<(*iter)->Get4Momentum().mag()<<G4endl;
203 #endif
204 } else {
205 // within the nucleus, neutron or proton
206 // now calculate A, Z of the fragment, momentum, number of exciton states
207 ++anA;
208 ++numberOfEx;
209 G4int Z = G4int(part->GetPDGCharge()/eplus + 0.1);
210 aZ += Z;
211 numberOfCh += Z;
212 captured4Momentum += (*iter)->Get4Momentum();
213 #ifdef debugPrecoInt
214 G4cout<<"Captured 4Mom "<<part->GetParticleName()<<(*iter)->Get4Momentum()<<G4endl;
215 #endif
216 }
217 }
218 delete (*iter);
219 }
220 delete theSecondaries;
221
222 // loop over wounded nucleus
223 G4Nucleon * theCurrentNucleon =
224 theNucleus->StartLoop() ? theNucleus->GetNextNucleon() : 0;
225 while(theCurrentNucleon) /* Loop checking, 31.08.2015, G.Folger */
226 {
227 if(theCurrentNucleon->AreYouHit()) {
228 ++numberOfHoles;
229 ++numberOfEx;
230 --anA;
231 aZ -= G4int(theCurrentNucleon->GetDefinition()->GetPDGCharge()/eplus + 0.1);
232
233 Residual4Momentum -= theCurrentNucleon->Get4Momentum();
234 }
235 theCurrentNucleon = theNucleus->GetNextNucleon();
236 }
237
238 #ifdef debugPrecoInt
239 G4cout<<G4endl;
240 G4cout<<"Secondary 4Mom "<<Secondary4Momentum<<G4endl;
241 G4cout<<"Captured 4Mom "<<captured4Momentum<<G4endl;
242 G4cout<<"Sec + Captured "<<Secondary4Momentum+captured4Momentum<<G4endl;
243 G4cout<<"Residual4Mom "<<Residual4Momentum<<G4endl;
244 G4cout<<"Sum 4 momenta "
245 <<Secondary4Momentum + captured4Momentum + Residual4Momentum <<G4endl;
246 #endif
247
248 // Check that we use QGS model; loop over wounded nucleus
249 G4bool QGSM(false);
250 theCurrentNucleon = theNucleus->StartLoop() ? theNucleus->GetNextNucleon() : 0;
251 while(theCurrentNucleon) /* Loop checking, 31.08.2015, G.Folger */
252 {
253 if(theCurrentNucleon->AreYouHit())
254 {
255 if(theCurrentNucleon->Get4Momentum().mag() <
256 theCurrentNucleon->GetDefinition()->GetPDGMass()) QGSM=true;
257 }
258 theCurrentNucleon = theNucleus->GetNextNucleon();
259 }
260
261 #ifdef debugPrecoInt
262 if(!QGSM){
263 G4cout<<G4endl;
264 G4cout<<"Residual A and Z "<<anA<<" "<<aZ<<G4endl;
265 G4cout<<"Residual 4Mom "<<Residual4Momentum<<G4endl;
266 if(numberOfEx == 0)
267 {G4cout<<"Residual 4Mom = 0 means that there were not wounded and captured nucleons"<<G4endl;}
268 }
269 #endif
270
271 if(anA == 0) return theTotalResult;
272
273 G4LorentzVector exciton4Momentum(0.,0.,0.,0.);
274 if(anA >= aZ)
275 {
276 if(!QGSM)
277 { // FTF model was used
279
280// G4LorentzVector exciton4Momentum = Residual4Momentum + captured4Momentum;
281 exciton4Momentum = Residual4Momentum + captured4Momentum;
282//exciton4Momentum.setE(std::sqrt(exciton4Momentum.vect().mag2()+sqr(fMass)));
283 G4double ActualMass = exciton4Momentum.mag();
284 if(ActualMass <= fMass ) {
285 exciton4Momentum.setE(std::sqrt(exciton4Momentum.vect().mag2()+sqr(fMass)));
286 }
287
288 #ifdef debugPrecoInt
289 G4double exEnergy = 0.0;
290 if(ActualMass <= fMass ) {exEnergy = 0.;}
291 else {exEnergy = ActualMass - fMass;}
292 G4cout<<"Ground state residual Mass "<<fMass<<" E* "<<exEnergy<<G4endl;
293 #endif
294 }
295 else
296 { // QGS model was used
297 G4double InitialTargetMass =
298 G4NucleiProperties::GetNuclearMass(theNucleus->GetMassNumber(), theNucleus->GetCharge());
299
300 exciton4Momentum =
301 GetPrimaryProjectile()->Get4Momentum() + G4LorentzVector(0.,0.,0.,InitialTargetMass)
302 -Secondary4Momentum;
303
305 G4double ActualMass = exciton4Momentum.mag();
306
307 #ifdef debugPrecoInt
308 G4cout<<G4endl;
309 G4cout<<"Residual A and Z "<<anA<<" "<<aZ<<G4endl;
310 G4cout<<"Residual4Momentum "<<exciton4Momentum<<G4endl;
311 G4cout<<"ResidualMass, GroundStateMass and E* "<<ActualMass<<" "<<fMass<<" "
312 <<ActualMass - fMass<<G4endl;
313 #endif
314
315 if(ActualMass - fMass < 0.)
316 {
317 G4double ResE = std::sqrt(exciton4Momentum.vect().mag2() + sqr(fMass+10*MeV));
318 exciton4Momentum.setE(ResE);
319 #ifdef debugPrecoInt
320 G4cout<<"ActualMass - fMass < 0. "<<ActualMass<<" "<<fMass<<" "<<ActualMass - fMass<<G4endl;
321 #endif
322 }
323 }
324
325 // Need to de-excite the remnant nucleus only if excitation energy > 0.
326 G4Fragment anInitialState(anA, aZ, exciton4Momentum);
327 anInitialState.SetNumberOfParticles(numberOfEx-numberOfHoles);
328 anInitialState.SetNumberOfCharged(numberOfCh);
329 anInitialState.SetNumberOfHoles(numberOfHoles);
330 anInitialState.SetCreatorModelID(secID);
331
332 G4ReactionProductVector * aPrecoResult =
333 theDeExcitation->DeExcite(anInitialState);
334 // fill pre-compound part into the result, and return
335 #ifdef debugPrecoInt
336 G4cout<<"Target fragment number "<<aPrecoResult->size()<<G4endl;
337 #endif
338 for(unsigned int ll=0; ll<aPrecoResult->size(); ++ll)
339 {
340 theTotalResult->push_back(aPrecoResult->operator[](ll));
341 #ifdef debugPrecoInt
342 G4cout<<"Fragment "<<ll<<" "
343 <<aPrecoResult->operator[](ll)->GetDefinition()->GetParticleName()<<" "
344 <<aPrecoResult->operator[](ll)->GetMomentum()<<" "
345 <<aPrecoResult->operator[](ll)->GetTotalEnergy()<<" "
346 <<aPrecoResult->operator[](ll)->GetDefinition()->GetPDGMass()<<G4endl;
347 #endif
348 }
349 delete aPrecoResult;
350 }
351
352 return theTotalResult;
353}
G4double G4Log(G4double x)
Definition G4Log.hh:227
std::vector< G4ReactionProduct * > G4ReactionProductVector
bool G4bool
Definition G4Types.hh:86
#define G4UniformRand()
Definition Randomize.hh:52
const G4LorentzVector & Get4Momentum() const
static G4double GetNuclearMass(const G4double A, const G4double Z)
G4bool AreYouHit() const
Definition G4Nucleon.hh:98
virtual const G4LorentzVector & Get4Momentum() const
Definition G4Nucleon.hh:72
virtual const G4ParticleDefinition * GetDefinition() const
Definition G4Nucleon.hh:86
const G4String & GetParticleName() const
void SetMomentum(const G4double x, const G4double y, const G4double z)
void SetTotalEnergy(const G4double en)
void SetParentResonanceDef(const G4ParticleDefinition *parentDef)
void SetCreatorModelID(const G4int mod)
void SetParentResonanceID(const G4int parentID)
virtual G4Nucleon * GetNextNucleon()=0
virtual G4int GetCharge()=0
virtual G4bool StartLoop()=0
virtual G4double GetNuclearRadius()=0
virtual G4int GetMassNumber()=0
const G4HadProjectile * GetPrimaryProjectile() const
virtual G4ReactionProductVector * DeExcite(G4Fragment &aFragment)=0
ParticleList decay(Cluster *const c)
Carries out a cluster decay.
T sqr(const T &x)
Definition templates.hh:128

◆ PropagateModelDescription()

void G4GeneratorPrecompoundInterface::PropagateModelDescription ( std::ostream & outFile) const
virtual

Reimplemented from G4VIntraNuclearTransportModel.

Definition at line 365 of file G4GeneratorPrecompoundInterface.cc.

366{
367 outFile << "G4GeneratorPrecompoundInterface interfaces a high\n"
368 << "energy model through the wounded nucleus to precompound de-excitation.\n"
369 << "Low energy protons and neutron present among secondaries produced by \n"
370 << "the high energy generator and within the nucleus are captured. The wounded\n"
371 << "nucleus and the captured particles form an excited nuclear fragment. This\n"
372 << "fragment is passed to the Geant4 pre-compound model for de-excitation.\n"
373 << "Nuclear de-excitation:\n";
374 // preco
375
376}

◆ PropagateNuclNucl()

G4ReactionProductVector * G4GeneratorPrecompoundInterface::PropagateNuclNucl ( G4KineticTrackVector * theSecondaries,
G4V3DNucleus * theNucleus,
G4V3DNucleus * theProjectileNucleus )
virtual

Reimplemented from G4VIntraNuclearTransportModel.

Definition at line 379 of file G4GeneratorPrecompoundInterface.cc.

382{
383#ifdef debugPrecoInt
384 G4cout<<G4endl<<"G4GeneratorPrecompoundInterface::PropagateNuclNucl "<<G4endl;
385 G4cout<<"Projectile A and Z (and numberOfLambdas) "<<theProjectileNucleus->GetMassNumber()<<" "
386 <<theProjectileNucleus->GetCharge()<<" ("
387 <<theProjectileNucleus->GetNumberOfLambdas()<<")"<<G4endl;
388 G4cout<<"Target A and Z "<<theNucleus->GetMassNumber()<<" "
389 <<theNucleus->GetCharge()<<" ("
390 <<theNucleus->GetNumberOfLambdas()<<")"<<G4endl;
391 G4cout<<"Directly produced particles number "<<theSecondaries->size()<<G4endl;
392 G4cout<<"Projectile 4Mom and mass "<<GetPrimaryProjectile()->Get4Momentum()<<" "
394#endif
395
396 // prepare the target residual (assumed to be never a hypernucleus)
397 G4int anA=theNucleus->GetMassNumber();
398 G4int aZ=theNucleus->GetCharge();
399 //G4int aL=theNucleus->GetNumberOfLambdas(); // Should be 0
400 G4int numberOfEx = 0;
401 G4int numberOfCh = 0;
402 G4int numberOfHoles = 0;
403 G4double exEnergy = 0.0;
404 G4double R = theNucleus->GetNuclearRadius();
405 G4LorentzVector Target4Momentum(0.,0.,0.,0.);
406
407 // loop over the wounded target nucleus
408 G4Nucleon * theCurrentNucleon =
409 theNucleus->StartLoop() ? theNucleus->GetNextNucleon() : 0;
410 while(theCurrentNucleon) /* Loop checking, 31.08.2015, G.Folger */
411 {
412 if(theCurrentNucleon->AreYouHit()) {
413 ++numberOfHoles;
414 ++numberOfEx;
415 --anA;
416 aZ -= G4int(theCurrentNucleon->GetDefinition()->GetPDGCharge()/
417 eplus + 0.1);
418 exEnergy += theCurrentNucleon->GetBindingEnergy();
419 Target4Momentum -=theCurrentNucleon->Get4Momentum();
420 }
421 theCurrentNucleon = theNucleus->GetNextNucleon();
422 }
423
424#ifdef debugPrecoInt
425 G4cout<<"Residual Target A Z (numberOfLambdas) E* 4mom "<<anA<<" "<<aZ<<" (0"//<<aL
426 <<") "<<exEnergy<<" "<<Target4Momentum<<G4endl;
427#endif
428
429 // prepare the projectile residual - which can be a hypernucleus or anti-hypernucleus
430
431 G4bool ProjectileIsAntiNucleus=
433
435
436 G4int anAb=theProjectileNucleus->GetMassNumber();
437 G4int aZb=theProjectileNucleus->GetCharge();
438 G4int aLb=theProjectileNucleus->GetNumberOfLambdas(); // Non negative number of (anti-)lambdas in (anti-)nucleus
439 G4int numberOfExB = 0;
440 G4int numberOfChB = 0;
441 G4int numberOfHolesB = 0;
442 G4double exEnergyB = 0.0;
443 G4double Rb = theProjectileNucleus->GetNuclearRadius();
444 G4LorentzVector Projectile4Momentum(0.,0.,0.,0.);
445
446 // loop over the wounded projectile nucleus or anti-nucleus
447 theCurrentNucleon =
448 theProjectileNucleus->StartLoop() ? theProjectileNucleus->GetNextNucleon() : 0;
449 while(theCurrentNucleon) /* Loop checking, 31.08.2015, G.Folger */
450 {
451 if(theCurrentNucleon->AreYouHit()) {
452 ++numberOfHolesB;
453 ++numberOfExB;
454 --anAb;
455 if(!ProjectileIsAntiNucleus) {
456 aZb -= G4int(theCurrentNucleon->GetDefinition()->GetPDGCharge()/
457 eplus + 0.1);
458 if (theCurrentNucleon->GetParticleType()==G4Lambda::Definition()) --aLb;
459 } else {
460 aZb += G4int(theCurrentNucleon->GetDefinition()->GetPDGCharge()/
461 eplus - 0.1);
462 if (theCurrentNucleon->GetParticleType()==G4AntiLambda::Definition()) --aLb;
463 }
464 exEnergyB += theCurrentNucleon->GetBindingEnergy();
465 Projectile4Momentum -=theCurrentNucleon->Get4Momentum();
466 }
467 theCurrentNucleon = theProjectileNucleus->GetNextNucleon();
468 }
469
470 G4bool ExistTargetRemnant = G4double (numberOfHoles) <
471 0.3* G4double (numberOfHoles + anA);
472 G4bool ExistProjectileRemnant= G4double (numberOfHolesB) <
473 0.3*G4double (numberOfHolesB + anAb);
474
475#ifdef debugPrecoInt
476 G4cout<<"Projectile residual A Z (numberOfLambdas) E* 4mom "<<anAb<<" "<<aZb<<" ("<<aLb
477 <<") "<<exEnergyB<<" "<<Projectile4Momentum<<G4endl;
478 G4cout<<" ExistTargetRemnant ExistProjectileRemnant "
479 <<ExistTargetRemnant<<" "<< ExistProjectileRemnant<<G4endl;
480#endif
481 //-----------------------------------------------------------------------------
482 // decay the strong resonances
484 G4DecayKineticTracks decay(theSecondaries);
485
486 MakeCoalescence(theSecondaries);
487
488 #ifdef debugPrecoInt
489 G4cout<<"Secondary stable particles number "<<theSecondaries->size()<<G4endl;
490 #endif
491
492#ifdef debugPrecoInt
493 G4LorentzVector secondary4Momemtum(0,0,0,0);
494 G4int SecondrNum(0);
495#endif
496
497 // Loop over secondaries.
498 // We are assuming that only protons and neutrons - for nuclei -
499 // and only antiprotons and antineutrons - for antinuclei - can be absorbed,
500 // not instead lambdas (or hyperons more generally) - for nuclei - or anti-lambdas
501 // (or anti-hyperons more generally) - for antinuclei. This is a simplification,
502 // to be eventually reviewed later on, in particular when generic hypernuclei and
503 // anti-hypernuclei are introduced, instead of the few light hypernuclei and
504 // anti-hypernuclei which currently exist in Geant4.
505 G4KineticTrackVector::iterator iter;
506 for(iter=theSecondaries->begin(); iter !=theSecondaries->end(); ++iter)
507 {
508 const G4ParticleDefinition* part = (*iter)->GetDefinition();
509 G4LorentzVector aTrack4Momentum=(*iter)->Get4Momentum();
510
511 if( part != proton && part != neutron &&
512 (part != ANTIproton && ProjectileIsAntiNucleus) &&
513 (part != ANTIneutron && ProjectileIsAntiNucleus) )
514 {
515 G4ReactionProduct * theNew = new G4ReactionProduct(part);
516 theNew->SetMomentum(aTrack4Momentum.vect());
517 theNew->SetTotalEnergy(aTrack4Momentum.e());
518 theNew->SetCreatorModelID((*iter)->GetCreatorModelID());
519 theNew->SetParentResonanceDef((*iter)->GetParentResonanceDef());
520 theNew->SetParentResonanceID((*iter)->GetParentResonanceID());
521 theTotalResult->push_back(theNew);
522#ifdef debugPrecoInt
523 SecondrNum++;
524 secondary4Momemtum += (*iter)->Get4Momentum();
525 G4cout<<"Secondary "<<SecondrNum<<" "
526 <<theNew->GetDefinition()->GetParticleName()<<" "
527 <<theNew->GetMomentum()<<" "<<theNew->GetTotalEnergy()<<G4endl;
528
529#endif
530 delete (*iter);
531 continue;
532 }
533
534 G4bool CanBeCapturedByTarget = false;
535 if( part == proton || part == neutron)
536 {
537 CanBeCapturedByTarget = ExistTargetRemnant &&
538 (-CaptureThreshold*G4Log( G4UniformRand()) >
539 (aTrack4Momentum + Target4Momentum).mag() -
540 aTrack4Momentum.mag() - Target4Momentum.mag()) &&
541 ((*iter)->GetPosition().mag() < R);
542 }
543 // ---------------------------
544 G4LorentzVector Position((*iter)->GetPosition(), (*iter)->GetFormationTime());
545 Position.boost(bst);
546
547 G4bool CanBeCapturedByProjectile = false;
548
549 if( !ProjectileIsAntiNucleus &&
550 ( part == proton || part == neutron))
551 {
552 CanBeCapturedByProjectile = ExistProjectileRemnant &&
553 (-CaptureThreshold*G4Log( G4UniformRand()) >
554 (aTrack4Momentum + Projectile4Momentum).mag() -
555 aTrack4Momentum.mag() - Projectile4Momentum.mag()) &&
556 (Position.vect().mag() < Rb);
557 }
558
559 if( ProjectileIsAntiNucleus &&
560 ( part == ANTIproton || part == ANTIneutron))
561 {
562 CanBeCapturedByProjectile = ExistProjectileRemnant &&
563 (-CaptureThreshold*G4Log( G4UniformRand()) >
564 (aTrack4Momentum + Projectile4Momentum).mag() -
565 aTrack4Momentum.mag() - Projectile4Momentum.mag()) &&
566 (Position.vect().mag() < Rb);
567 }
568
569 if(CanBeCapturedByTarget && CanBeCapturedByProjectile)
570 {
571 if(G4UniformRand() < 0.5)
572 { CanBeCapturedByTarget = true; CanBeCapturedByProjectile = false;}
573 else
574 { CanBeCapturedByTarget = false; CanBeCapturedByProjectile = true;}
575 }
576
577 if(CanBeCapturedByTarget)
578 {
579 // within the target nucleus, neutron or proton
580 // now calculate A, Z of the fragment, momentum,
581 // number of exciton states
582#ifdef debugPrecoInt
583 G4cout<<"Track is CapturedByTarget "<<" "<<part->GetParticleName()<<" "
584 <<aTrack4Momentum<<" "<<aTrack4Momentum.mag()<<G4endl;
585#endif
586 ++anA;
587 ++numberOfEx;
588 G4int Z = G4int(part->GetPDGCharge()/eplus + 0.1);
589 aZ += Z;
590 numberOfCh += Z;
591 Target4Momentum +=aTrack4Momentum;
592 delete (*iter);
593 } else if(CanBeCapturedByProjectile)
594 {
595 // within the projectile nucleus, neutron or proton
596 // now calculate A, Z of the fragment, momentum,
597 // number of exciton states
598#ifdef debugPrecoInt
599 G4cout<<"Track is CapturedByProjectile"<<" "<<part->GetParticleName()<<" "
600 <<aTrack4Momentum<<" "<<aTrack4Momentum.mag()<<G4endl;
601#endif
602 ++anAb;
603 ++numberOfExB;
604 G4int Z = G4int(part->GetPDGCharge()/eplus + 0.1);
605 if( ProjectileIsAntiNucleus ) Z=-Z;
606 aZb += Z;
607 numberOfChB += Z;
608 Projectile4Momentum +=aTrack4Momentum;
609 delete (*iter);
610 } else
611 { // the track is not captured
612 G4ReactionProduct * theNew = new G4ReactionProduct(part);
613 theNew->SetMomentum(aTrack4Momentum.vect());
614 theNew->SetTotalEnergy(aTrack4Momentum.e());
615 theNew->SetCreatorModelID((*iter)->GetCreatorModelID());
616 theNew->SetParentResonanceDef((*iter)->GetParentResonanceDef());
617 theNew->SetParentResonanceID((*iter)->GetParentResonanceID());
618 theTotalResult->push_back(theNew);
619
620#ifdef debugPrecoInt
621 SecondrNum++;
622 secondary4Momemtum += (*iter)->Get4Momentum();
623/*
624 G4cout<<"Secondary "<<SecondrNum<<" "
625 <<theNew->GetDefinition()->GetParticleName()<<" "
626 <<secondary4Momemtum<<G4endl;
627*/
628#endif
629 delete (*iter);
630 continue;
631 }
632 }
633 delete theSecondaries;
634 //-----------------------------------------------------
635
636 #ifdef debugPrecoInt
637 G4cout<<"Final target residual A Z (numberOfLambdas) E* 4mom "<<anA<<" "<<aZ<<" (0"//<<aL
638 <<") "<<exEnergy<<" "<<Target4Momentum<<G4endl;
639 #endif
640
641 if(0!=anA )
642 {
643 // We assume that the target residual is never a hypernucleus
645
646 if((anA == theNucleus->GetMassNumber()) && (exEnergy <= 0.))
647 {Target4Momentum.setE(fMass);}
648
649 G4double RemnMass=Target4Momentum.mag();
650
651 if(RemnMass < fMass)
652 {
653 RemnMass=fMass + exEnergy;
654 Target4Momentum.setE(std::sqrt(Target4Momentum.vect().mag2() +
655 RemnMass*RemnMass));
656 } else
657 { exEnergy=RemnMass-fMass;}
658
659 if( exEnergy < 0.) exEnergy=0.;
660
661 // Need to de-excite the remnant nucleus
662 G4Fragment anInitialState(anA, aZ, Target4Momentum);
663 anInitialState.SetNumberOfParticles(numberOfEx-numberOfHoles);
664 anInitialState.SetNumberOfCharged(numberOfCh);
665 anInitialState.SetNumberOfHoles(numberOfHoles);
666 anInitialState.SetCreatorModelID(secID);
667
668 G4ReactionProductVector * aPrecoResult =
669 theDeExcitation->DeExcite(anInitialState);
670
671 #ifdef debugPrecoInt
672 G4cout<<"Target fragment number "<<aPrecoResult->size()<<G4endl;
673 #endif
674
675 // fill pre-compound part into the result, and return
676 for(unsigned int ll=0; ll<aPrecoResult->size(); ++ll)
677 {
678 theTotalResult->push_back(aPrecoResult->operator[](ll));
679 #ifdef debugPrecoInt
680 G4cout<<"Target fragment "<<ll<<" "
681 <<aPrecoResult->operator[](ll)->GetDefinition()->GetParticleName()<<" "
682 <<aPrecoResult->operator[](ll)->GetMomentum()<<" "
683 <<aPrecoResult->operator[](ll)->GetTotalEnergy()<<" "
684 <<aPrecoResult->operator[](ll)->GetMass()<<G4endl;
685 #endif
686 }
687 delete aPrecoResult;
688 }
689
690 //-----------------------------------------------------
691 if((anAb == theProjectileNucleus->GetMassNumber())&& (exEnergyB <= 0.))
692 {Projectile4Momentum = GetPrimaryProjectile()->Get4Momentum();}
693
694 #ifdef debugPrecoInt
695 G4cout<<"Final projectile residual A Z (numberOfLambdas) E* Pmom Pmag2 "<<anAb<<" "<<aZb<<" ("
696 <<aLb<<") "<<exEnergyB<<" "<<Projectile4Momentum<<" "
697 <<Projectile4Momentum.mag2()<<G4endl;
698 #endif
699
700 if(0!=anAb)
701 {
702 // The projectile residual can be a hypernucleus or anti-hypernucleus
703 G4double fMass = 0.0;
704 if ( aLb > 0 ) {
705 fMass = G4HyperNucleiProperties::GetNuclearMass(anAb, aZb, aLb);
706 } else {
707 fMass = G4NucleiProperties::GetNuclearMass(anAb, aZb);
708 }
709 G4double RemnMass=Projectile4Momentum.mag();
710
711 if(RemnMass < fMass)
712 {
713 RemnMass=fMass + exEnergyB;
714 Projectile4Momentum.setE(std::sqrt(Projectile4Momentum.vect().mag2() +
715 RemnMass*RemnMass));
716 } else
717 { exEnergyB=RemnMass-fMass;}
718
719 if( exEnergyB < 0.) exEnergyB=0.;
720
721 G4ThreeVector bstToCM =Projectile4Momentum.findBoostToCM();
722 Projectile4Momentum.boost(bstToCM);
723
724 // Need to de-excite the remnant nucleus
725 G4Fragment anInitialState(anAb, aZb, aLb, Projectile4Momentum);
726 anInitialState.SetNumberOfParticles(numberOfExB-numberOfHolesB);
727 anInitialState.SetNumberOfCharged(numberOfChB);
728 anInitialState.SetNumberOfHoles(numberOfHolesB);
729 anInitialState.SetCreatorModelID(secID);
730
731 G4ReactionProductVector * aPrecoResult =
732 theDeExcitation->DeExcite(anInitialState);
733
734 #ifdef debugPrecoInt
735 G4cout<<"Projectile fragment number "<<aPrecoResult->size()<<G4endl;
736 #endif
737
738 // fill pre-compound part into the result, and return
739 for(unsigned int ll=0; ll<aPrecoResult->size(); ++ll)
740 {
741 G4LorentzVector tmp=G4LorentzVector(aPrecoResult->operator[](ll)->GetMomentum(),
742 aPrecoResult->operator[](ll)->GetTotalEnergy());
743 tmp.boost(-bstToCM); // Transformation to the system of original remnant
744 aPrecoResult->operator[](ll)->SetMomentum(tmp.vect());
745 aPrecoResult->operator[](ll)->SetTotalEnergy(tmp.e());
746
747 if(ProjectileIsAntiNucleus)
748 {
749 const G4ParticleDefinition * aFragment=aPrecoResult->operator[](ll)->GetDefinition();
750 const G4ParticleDefinition * LastFragment=aFragment;
751 if (aFragment == proton) {LastFragment=G4AntiProton::AntiProtonDefinition();}
752 else if(aFragment == neutron) {LastFragment=G4AntiNeutron::AntiNeutronDefinition();}
753 else if(aFragment == lambda) {LastFragment=G4AntiLambda::AntiLambdaDefinition();}
754 else if(aFragment == deuteron){LastFragment=G4AntiDeuteron::AntiDeuteronDefinition();}
755 else if(aFragment == triton) {LastFragment=G4AntiTriton::AntiTritonDefinition();}
756 else if(aFragment == He3) {LastFragment=G4AntiHe3::AntiHe3Definition();}
757 else if(aFragment == He4) {LastFragment=G4AntiAlpha::AntiAlphaDefinition();}
758 else {}
759
760 if (aLb > 0) { // Anti-hypernucleus
761 if (aFragment == G4HyperTriton::Definition()) {
762 LastFragment=G4AntiHyperTriton::Definition();
763 } else if (aFragment == G4HyperH4::Definition()) {
764 LastFragment=G4AntiHyperH4::Definition();
765 } else if (aFragment == G4HyperAlpha::Definition()) {
766 LastFragment=G4AntiHyperAlpha::Definition();
767 } else if (aFragment == G4HyperHe5::Definition()) {
768 LastFragment=G4AntiHyperHe5::Definition();
769 } else if (aFragment == G4DoubleHyperH4::Definition()) {
770 LastFragment=G4AntiDoubleHyperH4::Definition();
771 } else if (aFragment == G4DoubleHyperDoubleNeutron::Definition()) {
773 }
774 }
775
776 aPrecoResult->operator[](ll)->SetDefinitionAndUpdateE(LastFragment);
777 }
778
779 #ifdef debugPrecoInt
780 G4cout<<"Projectile fragment "<<ll<<" "
781 <<aPrecoResult->operator[](ll)->GetDefinition()->GetParticleName()<<" "
782 <<aPrecoResult->operator[](ll)->GetMomentum()<<" "
783 <<aPrecoResult->operator[](ll)->GetTotalEnergy()<<" "
784 <<aPrecoResult->operator[](ll)->GetMass()<<G4endl;
785 #endif
786
787 theTotalResult->push_back(aPrecoResult->operator[](ll));
788 }
789
790 delete aPrecoResult;
791 }
792
793 return theTotalResult;
794}
Hep3Vector boostVector() const
HepLorentzVector & boost(double, double, double)
Hep3Vector vect() const
static G4AntiAlpha * AntiAlphaDefinition()
static G4AntiDeuteron * AntiDeuteronDefinition()
static G4AntiDoubleHyperDoubleNeutron * Definition()
static G4AntiDoubleHyperH4 * Definition()
static G4AntiHe3 * AntiHe3Definition()
Definition G4AntiHe3.cc:85
static G4AntiHyperAlpha * Definition()
static G4AntiHyperH4 * Definition()
static G4AntiHyperHe5 * Definition()
static G4AntiHyperTriton * Definition()
static G4AntiLambda * AntiLambdaDefinition()
static G4AntiLambda * Definition()
static G4AntiNeutron * AntiNeutronDefinition()
static G4AntiProton * AntiProtonDefinition()
static G4AntiTriton * AntiTritonDefinition()
static G4DoubleHyperDoubleNeutron * Definition()
static G4DoubleHyperH4 * Definition()
void MakeCoalescence(G4KineticTrackVector *theSecondaries)
const G4ParticleDefinition * GetDefinition() const
static G4HyperAlpha * Definition()
static G4HyperH4 * Definition()
Definition G4HyperH4.cc:43
static G4HyperHe5 * Definition()
Definition G4HyperHe5.cc:43
static G4double GetNuclearMass(G4int A, G4int Z, G4int L)
static G4HyperTriton * Definition()
static G4Lambda * Definition()
Definition G4Lambda.cc:48
const G4ParticleDefinition * GetParticleType() const
Definition G4Nucleon.hh:85
G4double GetBindingEnergy() const
Definition G4Nucleon.hh:75
const G4ParticleDefinition * GetDefinition() const
G4double GetTotalEnergy() const
G4ThreeVector GetMomentum() const
virtual G4int GetNumberOfLambdas()=0

◆ SetCaptureThreshold()

void G4GeneratorPrecompoundInterface::SetCaptureThreshold ( G4double value)
inline

Definition at line 117 of file G4GeneratorPrecompoundInterface.hh.

118{
119 CaptureThreshold = value;
120}

◆ SetDeltaM()

void G4GeneratorPrecompoundInterface::SetDeltaM ( G4double value)
inline

Definition at line 123 of file G4GeneratorPrecompoundInterface.hh.

124{
125 DeltaM = value;
126}

◆ SetDeltaR()

void G4GeneratorPrecompoundInterface::SetDeltaR ( G4double value)
inline

Definition at line 129 of file G4GeneratorPrecompoundInterface.hh.

130{
131 DeltaR = value;
132}

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