Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
G4LowEIonFragmentation Class Reference

#include <G4LowEIonFragmentation.hh>

Inheritance diagram for G4LowEIonFragmentation:
G4HadronicInteraction

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 &, G4Nucleus &)
 
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)
 
const G4HadronicInteractionGetMyPointer () const
 
virtual G4int GetVerboseLevel () const
 
virtual 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
 
G4bool operator== (const G4HadronicInteraction &right) const
 
G4bool operator!= (const G4HadronicInteraction &right) 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
 

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.

References G4InuclParticleNames::proton, and G4Proton::Proton().

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

Definition at line 59 of file G4LowEIonFragmentation.cc.

References G4InuclParticleNames::proton, and G4Proton::Proton().

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
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.

References G4HadFinalState::AddSecondary(), G4ExcitationHandler::BreakItUp(), G4HadFinalState::Clear(), G4PreCompoundModel::DeExcite(), python.hepunit::eplus, G4lrint(), G4UniformRand, G4HadProjectile::Get4Momentum(), G4Nucleus::GetA_asInt(), G4ParticleDefinition::GetBaryonNumber(), G4HadProjectile::GetDefinition(), G4ReactionProduct::GetDefinition(), G4HadProjectile::GetGlobalTime(), G4ReactionProduct::GetMomentum(), G4Fancy3DNucleus::GetNextNucleon(), G4NucleiProperties::GetNuclearMass(), G4Fancy3DNucleus::GetOuterRadius(), G4Nucleon::GetParticleType(), G4ParticleDefinition::GetPDGCharge(), G4Nucleon::GetPosition(), G4HadProjectile::GetTotalEnergy(), G4Nucleus::GetZ_asInt(), G4Fancy3DNucleus::Init(), python.hepunit::pi, G4InuclParticleNames::proton, G4Fragment::SetCreationTime(), G4HadFinalState::SetEnergyChange(), G4Fragment::SetNumberOfExcitedParticle(), G4Fragment::SetNumberOfHoles(), G4HadFinalState::SetStatusChange(), G4Fancy3DNucleus::StartLoop(), stopAndKill, CLHEP::HepLorentzVector::vect(), test::x, and CLHEP::Hep3Vector::y().

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  while(0==particlesFromProjectile)
110  {
111  do
112  {
113  x = 2*G4UniformRand() - 1;
114  y = 2*G4UniformRand() - 1;
115  }
116  while(x*x + y*y > 1);
117  impactParameter = std::sqrt(x*x+y*y)*(targetOuterRadius+projectileOuterRadius);
118  ++totalTries;
119  area = pi*(targetOuterRadius+projectileOuterRadius)*
120  (targetOuterRadius+projectileOuterRadius);
121  G4double projectileHorizon = impactParameter-targetOuterRadius;
122 
123  // Empirical boundary transparency.
124  G4double empirical = G4UniformRand();
125  if(projectileHorizon > empirical*projectileOuterRadius) { continue; }
126 
127  // Calculate the number of nucleons involved in collision
128  // From projectile
129  aPrim.StartLoop();
130  while((pNucleon = aPrim.GetNextNucleon()))
131  {
132  if(pNucleon->GetPosition().y()>projectileHorizon)
133  {
134  // We have one
135  ++particlesFromProjectile;
136  if(pNucleon->GetParticleType() == proton)
137  {
138  ++chargedFromProjectile;
139  }
140  }
141  }
142  }
143  ++hits;
144 
145  // From target:
146  G4double targetHorizon = impactParameter-projectileOuterRadius;
147  G4int chargedFromTarget = 0;
148  G4int particlesFromTarget = 0;
149  aTarg.StartLoop();
150  while((pNucleon = aTarg.GetNextNucleon()))
151  {
152  if(pNucleon->GetPosition().y()>targetHorizon)
153  {
154  // We have one
155  ++particlesFromTarget;
156  if(pNucleon->GetParticleType() == proton)
157  {
158  ++chargedFromTarget;
159  }
160  }
161  }
162 
163  // Energy sharing between projectile and target.
164  // Note that this is a quite simplistic kinetically.
165  G4ThreeVector momentum = thePrimary.Get4Momentum().vect();
166  G4double w = (G4double)particlesFromProjectile/(G4double)aProjectileA;
167 
168  G4double projTotEnergy = thePrimary.GetTotalEnergy();
169  G4double targetMass = G4NucleiProperties::GetNuclearMass(aTargetA, aTargetZ);
170  G4LorentzVector fragment4Momentum(momentum*w, projTotEnergy*w + targetMass);
171 
172  // take the nucleons and fill the Fragments
173  G4Fragment anInitialState(aTargetA+particlesFromProjectile,
174  aTargetZ+chargedFromProjectile,
175  fragment4Momentum);
176  // M.A. Cortes fix
177  //anInitialState.SetNumberOfParticles(particlesFromProjectile);
178  anInitialState.SetNumberOfExcitedParticle(particlesFromProjectile+particlesFromTarget,
179  chargedFromProjectile + chargedFromTarget);
180  anInitialState.SetNumberOfHoles(particlesFromProjectile+particlesFromTarget,
181  chargedFromProjectile + chargedFromTarget);
182  G4double time = thePrimary.GetGlobalTime();
183  anInitialState.SetCreationTime(time);
184 
185  // Fragment the Fragment using Pre-compound
186  G4ReactionProductVector* thePreCompoundResult = theModel->DeExcite(anInitialState);
187 
188  // De-excite the projectile using ExcitationHandler
189  G4ReactionProductVector * theExcitationResult = 0;
190  if(particlesFromProjectile < aProjectileA)
191  {
192  G4LorentzVector residual4Momentum(momentum*(1.0-w), projTotEnergy*(1.0-w));
193 
194  G4Fragment initialState2(aProjectileA-particlesFromProjectile,
195  aProjectileZ-chargedFromProjectile,
196  residual4Momentum );
197 
198  // half of particles are excited (?!)
199  G4int pinit = (aProjectileA-particlesFromProjectile)/2;
200  G4int cinit = (aProjectileZ-chargedFromProjectile)/2;
201 
202  initialState2.SetNumberOfExcitedParticle(pinit,cinit);
203  initialState2.SetNumberOfHoles(pinit,cinit);
204  initialState2.SetCreationTime(time);
205 
206  theExcitationResult = theHandler->BreakItUp(initialState2);
207  }
208 
209  // Fill the particle change and clear intermediate vectors
210  G4int nexc = 0;
211  G4int npre = 0;
212  if(theExcitationResult) { nexc = theExcitationResult->size(); }
213  if(thePreCompoundResult) { npre = thePreCompoundResult->size();}
214 
215  if(nexc > 0) {
216  for(G4int k=0; k<nexc; ++k) {
217  G4ReactionProduct* p = (*theExcitationResult)[k];
218  theResult.AddSecondary(new G4DynamicParticle(p->GetDefinition(),p->GetMomentum()));
219  delete p;
220  }
221  }
222 
223  if(npre > 0) {
224  for(G4int k=0; k<npre; ++k) {
225  G4ReactionProduct* p = (*thePreCompoundResult)[k];
226  theResult.AddSecondary(new G4DynamicParticle(p->GetDefinition(),p->GetMomentum()));
227  delete p;
228  }
229  }
230 
231  delete thePreCompoundResult;
232  delete theExcitationResult;
233 
234  // return the particle change
235  return &theResult;
236 
237 }
G4int GetA_asInt() const
Definition: G4Nucleus.hh:109
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) const
G4ParticleDefinition * GetDefinition() const
void SetStatusChange(G4HadFinalStateStatus aS)
std::vector< G4ReactionProduct * > G4ReactionProductVector
Hep3Vector vect() const
#define G4UniformRand()
Definition: Randomize.hh:87
const G4ParticleDefinition * GetDefinition() const
void Init(G4int theA, G4int theZ)
G4double GetGlobalTime() const
const G4LorentzVector & Get4Momentum() const
virtual G4ReactionProductVector * DeExcite(G4Fragment &aFragment)
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
G4ParticleDefinition * GetParticleType() const
Definition: G4Nucleon.hh:84
G4double GetOuterRadius()
double G4double
Definition: G4Types.hh:76
G4double GetPDGCharge() const
G4Nucleon * GetNextNucleon()
void AddSecondary(G4DynamicParticle *aP)
G4double GetTotalEnergy() const
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  }
double G4double
Definition: G4Types.hh:76

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