Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4LowEIonFragmentation Class Reference

#include <G4LowEIonFragmentation.hh>

Inheritance diagram for G4LowEIonFragmentation:
Collaboration diagram for G4LowEIonFragmentation:

Public Member Functions

 G4LowEIonFragmentation (G4ExcitationHandler *const value)
 
 G4LowEIonFragmentation ()
 
virtual ~G4LowEIonFragmentation ()
 
virtual G4HadFinalStateApplyYourself (const G4HadProjectile &thePrimary, G4Nucleus &theNucleus)
 
G4double GetCrossSection ()
 
- 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, G4double
GetFatalEnergyCheckLevels () const
 
virtual std::pair< G4double,
G4double
GetEnergyMomentumCheckLevels () const
 
void SetEnergyMomentumCheckLevels (G4double relativeLevel, G4double absoluteLevel)
 
virtual void ModelDescription (std::ostream &outFile) const
 
virtual void BuildPhysicsTable (const G4ParticleDefinition &)
 
virtual void InitialiseModel ()
 

Additional Inherited Members

- Protected Member Functions inherited from G4HadronicInteraction
void SetModelName (const G4String &nam)
 
G4bool IsBlocked () const
 
void Block ()
 
- Protected Attributes inherited from G4HadronicInteraction
G4HadFinalState theParticleChange
 
G4int verboseLevel
 
G4double theMinEnergy
 
G4double theMaxEnergy
 
G4bool isBlocked
 

Detailed Description

Definition at line 51 of file G4LowEIonFragmentation.hh.

Constructor & Destructor Documentation

G4LowEIonFragmentation::G4LowEIonFragmentation ( G4ExcitationHandler *const  value)

Definition at line 49 of file G4LowEIonFragmentation.cc.

50 {
51  theHandler = value;
52  theModel = new G4PreCompoundModel(theHandler);
53  proton = G4Proton::Proton();
54  hits = 0;
55  totalTries = 1;
56  area = 0.0;
57 }
const XML_Char int const XML_Char * value
Definition: expat.h:331
static G4Proton * Proton()
Definition: G4Proton.cc:93

Here is the call graph for this function:

G4LowEIonFragmentation::G4LowEIonFragmentation ( )

Definition at line 59 of file G4LowEIonFragmentation.cc.

60 {
61  theHandler = new G4ExcitationHandler;
62  theModel = new G4PreCompoundModel(theHandler);
63  proton = G4Proton::Proton();
64  hits = 0;
65  totalTries = 1;
66  area = 0.0;
67 }
static G4Proton * Proton()
Definition: G4Proton.cc:93

Here is the call graph for this function:

G4LowEIonFragmentation::~G4LowEIonFragmentation ( )
virtual

Definition at line 69 of file G4LowEIonFragmentation.cc.

70 {
71  delete theModel;
72 }

Member Function Documentation

G4HadFinalState * G4LowEIonFragmentation::ApplyYourself ( const G4HadProjectile thePrimary,
G4Nucleus theNucleus 
)
virtual

Implements G4HadronicInteraction.

Definition at line 75 of file G4LowEIonFragmentation.cc.

76 {
77  area = 0.0;
78  // initialize the particle change
79  theResult.Clear();
80  theResult.SetStatusChange( stopAndKill );
81  theResult.SetEnergyChange( 0.0 );
82 
83  // Get Target A, Z
84  G4int aTargetA = theNucleus.GetA_asInt();
85  G4int aTargetZ = theNucleus.GetZ_asInt();
86 
87  // Get Projectile A, Z
88  G4int aProjectileA = thePrimary.GetDefinition()->GetBaryonNumber();
89  G4int aProjectileZ = G4lrint(thePrimary.GetDefinition()->GetPDGCharge()/eplus);
90 
91  // Get Maximum radius of both
92 
93  G4Fancy3DNucleus aPrim;
94  aPrim.Init(aProjectileA, aProjectileZ);
95  G4double projectileOuterRadius = aPrim.GetOuterRadius();
96 
97  G4Fancy3DNucleus aTarg;
98  aTarg.Init(aTargetA, aTargetZ);
99  G4double targetOuterRadius = aTarg.GetOuterRadius();
100 
101  // Get the Impact parameter
102  G4int particlesFromProjectile = 0;
103  G4int chargedFromProjectile = 0;
104  G4double impactParameter = 0;
105  G4double x,y;
106  G4Nucleon * pNucleon;
107  // need at lease one particle from the projectile model beyond the
108  // projectileHorizon.
109 
110  // Loop checking, 05-Aug-2015, Vladimir Ivanchenko
111  while(0==particlesFromProjectile)
112  {
113  do
114  {
115  x = 2*G4UniformRand() - 1;
116  y = 2*G4UniformRand() - 1;
117  }
118  // Loop checking, 05-Aug-2015, Vladimir Ivanchenko
119  while(x*x + y*y > 1);
120  impactParameter = std::sqrt(x*x+y*y)*(targetOuterRadius+projectileOuterRadius);
121  ++totalTries;
122  area = pi*(targetOuterRadius+projectileOuterRadius)*
123  (targetOuterRadius+projectileOuterRadius);
124  G4double projectileHorizon = impactParameter-targetOuterRadius;
125 
126  // Empirical boundary transparency.
127  G4double empirical = G4UniformRand();
128  if(projectileHorizon > empirical*projectileOuterRadius) { continue; }
129 
130  // Calculate the number of nucleons involved in collision
131  // From projectile
132  aPrim.StartLoop();
133 
134  // Loop checking, 05-Aug-2015, Vladimir Ivanchenko
135  while((pNucleon = aPrim.GetNextNucleon()))
136  {
137  if(pNucleon->GetPosition().y()>projectileHorizon)
138  {
139  // We have one
140  ++particlesFromProjectile;
141  if(pNucleon->GetParticleType() == proton)
142  {
143  ++chargedFromProjectile;
144  }
145  }
146  }
147  }
148  ++hits;
149 
150  // From target:
151  G4double targetHorizon = impactParameter-projectileOuterRadius;
152  G4int chargedFromTarget = 0;
153  G4int particlesFromTarget = 0;
154  aTarg.StartLoop();
155  // Loop checking, 05-Aug-2015, Vladimir Ivanchenko
156  while((pNucleon = aTarg.GetNextNucleon()))
157  {
158  if(pNucleon->GetPosition().y()>targetHorizon)
159  {
160  // We have one
161  ++particlesFromTarget;
162  if(pNucleon->GetParticleType() == proton)
163  {
164  ++chargedFromTarget;
165  }
166  }
167  }
168 
169  // Energy sharing between projectile and target.
170  // Note that this is a quite simplistic kinetically.
171  G4ThreeVector momentum = thePrimary.Get4Momentum().vect();
172  G4double w = (G4double)particlesFromProjectile/(G4double)aProjectileA;
173 
174  G4double projTotEnergy = thePrimary.GetTotalEnergy();
175  G4double targetMass = G4NucleiProperties::GetNuclearMass(aTargetA, aTargetZ);
176  G4LorentzVector fragment4Momentum(momentum*w, projTotEnergy*w + targetMass);
177 
178  // take the nucleons and fill the Fragments
179  G4Fragment anInitialState(aTargetA+particlesFromProjectile,
180  aTargetZ+chargedFromProjectile,
181  fragment4Momentum);
182  // M.A. Cortes fix
183  //anInitialState.SetNumberOfParticles(particlesFromProjectile);
184  anInitialState.SetNumberOfExcitedParticle(particlesFromProjectile
185  + particlesFromTarget,
186  chargedFromProjectile
187  + chargedFromTarget);
188  anInitialState.SetNumberOfHoles(particlesFromProjectile+particlesFromTarget,
189  chargedFromProjectile + chargedFromTarget);
190  G4double time = thePrimary.GetGlobalTime();
191  anInitialState.SetCreationTime(time);
192 
193  // Fragment the Fragment using Pre-compound
194  G4ReactionProductVector* thePreCompoundResult =
195  theModel->DeExcite(anInitialState);
196 
197  // De-excite the projectile using ExcitationHandler
198  G4ReactionProductVector * theExcitationResult = 0;
199  if(particlesFromProjectile < aProjectileA)
200  {
201  G4LorentzVector residual4Momentum(momentum*(1.0-w), projTotEnergy*(1.0-w));
202 
203  G4Fragment initialState2(aProjectileA-particlesFromProjectile,
204  aProjectileZ-chargedFromProjectile,
205  residual4Momentum );
206 
207  // half of particles are excited (?!)
208  G4int pinit = (aProjectileA-particlesFromProjectile)/2;
209  G4int cinit = (aProjectileZ-chargedFromProjectile)/2;
210 
211  initialState2.SetNumberOfExcitedParticle(pinit,cinit);
212  initialState2.SetNumberOfHoles(pinit,cinit);
213  initialState2.SetCreationTime(time);
214 
215  theExcitationResult = theHandler->BreakItUp(initialState2);
216  }
217 
218  // Fill the particle change and clear intermediate vectors
219  G4int nexc = 0;
220  G4int npre = 0;
221  if(theExcitationResult) { nexc = theExcitationResult->size(); }
222  if(thePreCompoundResult) { npre = thePreCompoundResult->size();}
223 
224  if(nexc > 0) {
225  for(G4int k=0; k<nexc; ++k) {
226  G4ReactionProduct* p = (*theExcitationResult)[k];
227  theResult.AddSecondary(new G4DynamicParticle(p->GetDefinition(),
228  p->GetMomentum()));
229  delete p;
230  }
231  }
232 
233  if(npre > 0) {
234  for(G4int k=0; k<npre; ++k) {
235  G4ReactionProduct* p = (*thePreCompoundResult)[k];
236  theResult.AddSecondary(new G4DynamicParticle(p->GetDefinition(),
237  p->GetMomentum()));
238  delete p;
239  }
240  }
241 
242  delete thePreCompoundResult;
243  delete theExcitationResult;
244 
245  // return the particle change
246  return &theResult;
247 }
G4int GetA_asInt() const
Definition: G4Nucleus.hh:109
const G4ParticleDefinition * GetParticleType() const
Definition: G4Nucleon.hh:84
static G4double GetNuclearMass(const G4double A, const G4double Z)
const char * p
Definition: xmltok.h:285
virtual const G4ThreeVector & GetPosition() const
Definition: G4Nucleon.hh:68
int G4int
Definition: G4Types.hh:78
G4ReactionProductVector * BreakItUp(const G4Fragment &theInitialState)
void SetStatusChange(G4HadFinalStateStatus aS)
std::vector< G4ReactionProduct * > G4ReactionProductVector
const G4ParticleDefinition * GetDefinition() const
Hep3Vector vect() const
#define G4UniformRand()
Definition: Randomize.hh:97
const G4ParticleDefinition * GetDefinition() const
static constexpr double eplus
Definition: G4SIunits.hh:199
void Init(G4int theA, G4int theZ)
G4double GetGlobalTime() const
const G4LorentzVector & Get4Momentum() const
void SetEnergyChange(G4double anEnergy)
int G4lrint(double ad)
Definition: templates.hh:163
double y() const
G4int GetZ_asInt() const
Definition: G4Nucleus.hh:115
G4ThreeVector GetMomentum() const
static constexpr double pi
Definition: G4SIunits.hh:75
void AddSecondary(G4DynamicParticle *aP, G4int mod=-1)
G4double GetOuterRadius()
double G4double
Definition: G4Types.hh:76
virtual G4ReactionProductVector * DeExcite(G4Fragment &aFragment) final
G4double GetPDGCharge() const
G4Nucleon * GetNextNucleon()
G4double GetTotalEnergy() const

Here is the call graph for this function:

G4double G4LowEIonFragmentation::GetCrossSection ( )
inline

Definition at line 64 of file G4LowEIonFragmentation.hh.

65  {
66  // G4cout << "area/millibarn = "<<area/millibarn<<G4endl;
67  // G4cout << "hits = "<<hits<<G4endl;
68  // G4cout << "totalTries = "<<totalTries<<G4endl;
69  return area*hits/(static_cast<G4double>(totalTries)*CLHEP::millibarn);
70  }
static constexpr double millibarn
Definition: SystemOfUnits.h:86
double G4double
Definition: G4Types.hh:76

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