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

#include <G4LMsdGenerator.hh>

Inheritance diagram for G4LMsdGenerator:
Collaboration diagram for G4LMsdGenerator:

Public Member Functions

 G4LMsdGenerator (const G4String &name="LMsdGenerator")
 
 ~G4LMsdGenerator ()
 
G4bool IsApplicable (const G4HadProjectile &thePrimary, G4Nucleus &theNucleus)
 
G4HadFinalStateApplyYourself (const G4HadProjectile &thePrimary, G4Nucleus &theNucleus)
 
G4double SampleMx (const G4HadProjectile *aParticle)
 
G4double SampleT (const G4HadProjectile *aParticle, G4double Mx)
 
void ModelDescription (std::ostream &outFile) const
 
- 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)
 
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 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 60 of file G4LMsdGenerator.hh.

Constructor & Destructor Documentation

G4LMsdGenerator::G4LMsdGenerator ( const G4String name = "LMsdGenerator")

Definition at line 46 of file G4LMsdGenerator.cc.

47  : G4HadronicInteraction(name)
48 
49 {
50  fPDGencoding = 0;
51 
52  // theParticleChange = new G4HadFinalState;
53 }
G4HadronicInteraction(const G4String &modelName="HadronicModel")
G4LMsdGenerator::~G4LMsdGenerator ( )

Definition at line 55 of file G4LMsdGenerator.cc.

56 {
57  // delete theParticleChange;
58 }

Member Function Documentation

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

Implements G4HadronicInteraction.

Definition at line 113 of file G4LMsdGenerator.cc.

115 {
117 
118  const G4HadProjectile* aParticle = &aTrack;
119  G4double eTkin = aParticle->GetKineticEnergy();
120 
121  if( eTkin <= 1.*CLHEP::GeV && aTrack.GetDefinition() != G4Proton::Proton())
122  {
124  theParticleChange.SetMomentumChange(aTrack.Get4Momentum().vect().unit());
125  return &theParticleChange;
126  }
127 
128  G4int A = targetNucleus.GetA_asInt();
129  G4int Z = targetNucleus.GetZ_asInt();
130 
131  G4double plab = aParticle->GetTotalMomentum();
132  G4double plab2 = plab*plab;
133 
134  const G4ParticleDefinition* theParticle = aParticle->GetDefinition();
135  G4double partMass = theParticle->GetPDGMass();
136 
137  G4double oldE = partMass + eTkin;
138 
140  G4double targMass2 = targMass*targMass;
141 
142  G4LorentzVector partLV = aParticle->Get4Momentum();
143 
144  G4double sumE = oldE + targMass;
145  G4double sumE2 = sumE*sumE;
146 
147  G4ThreeVector p1 = partLV.vect();
148  // G4cout<<"p1 = "<<p1<<G4endl;
149  G4ParticleMomentum p1unit = p1.unit();
150 
151  G4double Mx = SampleMx(aParticle); // in GeV
152  G4double t = SampleT( aParticle, Mx); // in GeV
153 
154  Mx *= CLHEP::GeV;
155 
156  G4double Mx2 = Mx*Mx;
157 
158  // equation for q|| based on sum-E-P and new invariant mass
159 
160  G4double B = sumE2 + targMass2 - Mx2 - plab2;
161 
162  G4double a = 4*(plab2 - sumE2);
163  G4double b = 4*plab*B;
164  G4double c = B*B - 4*sumE2*targMass2;
165  G4double det2 = b*b - 4*a*c;
166  G4double qLong, det, eRetard; // , x2, x3, e2;
167 
168  if( det2 >= 0.)
169  {
170  det = std::sqrt(det2);
171  qLong = (-b - det)/2./a;
172  eRetard = std::sqrt((plab-qLong)*(plab-qLong)+Mx2);
173  }
174  else
175  {
177  theParticleChange.SetMomentumChange(aTrack.Get4Momentum().vect().unit());
178  return &theParticleChange;
179  }
181 
182  plab -= qLong;
183 
184  G4ThreeVector pRetard = plab*p1unit;
185 
186  G4ThreeVector pTarg = p1 - pRetard;
187 
188  G4double eTarg = std::sqrt( targMass2 + pTarg.mag2()); // std::sqrt( targMass*targMass + pTarg.mag2() );
189 
190  G4LorentzVector lvRetard(pRetard, eRetard);
191  G4LorentzVector lvTarg(pTarg, eTarg);
192 
193  lvTarg += lvRetard; // sum LV
194 
195  G4ThreeVector bst = lvTarg.boostVector();
196 
197  lvRetard.boost(-bst); // to CNS
198 
199  G4ThreeVector pCMS = lvRetard.vect();
200  G4double momentumCMS = pCMS.mag();
201  G4double tMax = 4.0*momentumCMS*momentumCMS;
202 
203  if( t > tMax ) t = tMax*G4UniformRand();
204 
205  G4double cost = 1. - 2.0*t/tMax;
206 
207 
209  G4double sint;
210 
211  if( cost > 1.0 || cost < -1.0 ) //
212  {
213  cost = 1.0;
214  sint = 0.0;
215  }
216  else // normal situation
217  {
218  sint = std::sqrt( (1.0-cost)*(1.0+cost) );
219  }
220  G4ThreeVector v1( sint*std::cos(phi), sint*std::sin(phi), cost);
221 
222  v1 *= momentumCMS;
223 
224  G4LorentzVector lvRes( v1.x(),v1.y(),v1.z(), std::sqrt( momentumCMS*momentumCMS + Mx2));
225 
226  lvRes.boost(bst); // to LS
227 
228  lvTarg -= lvRes;
229 
230  G4double eRecoil = lvTarg.e() - targMass;
231 
232  if( eRecoil > 100.*CLHEP::MeV ) // add recoil nucleus
233  {
234  G4ParticleDefinition * recoilDef = 0;
235 
236  if ( Z == 1 && A == 1 ) { recoilDef = G4Proton::Proton(); }
237  else if ( Z == 1 && A == 2 ) { recoilDef = G4Deuteron::Deuteron(); }
238  else if ( Z == 1 && A == 3 ) { recoilDef = G4Triton::Triton(); }
239  else if ( Z == 2 && A == 3 ) { recoilDef = G4He3::He3(); }
240  else if ( Z == 2 && A == 4 ) { recoilDef = G4Alpha::Alpha(); }
241  else
242  {
243  recoilDef =
245  }
246  G4DynamicParticle * aSec = new G4DynamicParticle( recoilDef, lvTarg);
248  }
249  else if( eRecoil > 0.0 )
250  {
252  }
253 
255  FindParticle(fPDGencoding);
256 
257  // G4cout<<fPDGencoding<<", "<<ddPart->GetParticleName()<<", "<<ddPart->GetPDGMass()<<" MeV; lvRes = "<<lvRes<<G4endl;
258 
259  // G4DynamicParticle * aRes = new G4DynamicParticle( ddPart, lvRes);
260  // theParticleChange.AddSecondary(aRes); // simply return resonance
261 
262 
263 
264  // Recursive decay using methods of G4KineticTrack
265 
266  G4KineticTrack ddkt( ddPart, 0., G4ThreeVector(0.,0.,0.), lvRes);
267  G4KineticTrackVector* ddktv = ddkt.Decay();
268 
269  G4DecayKineticTracks decay( ddktv );
270 
271  for( unsigned int i = 0; i < ddktv->size(); i++ ) // add products to partchange
272  {
273  G4DynamicParticle * aNew =
274  new G4DynamicParticle( ddktv->operator[](i)->GetDefinition(),
275  ddktv->operator[](i)->Get4Momentum());
276 
277  // G4cout<<" "<<i<<", "<<aNew->GetDefinition()->GetParticleName()<<", "<<aNew->Get4Momentum()<<G4endl;
278 
280  delete ddktv->operator[](i);
281  }
282  delete ddktv;
283 
284  return &theParticleChange;
285 }
static G4double GetNuclearMass(const G4double A, const G4double Z)
CLHEP::Hep3Vector G4ThreeVector
G4ParticleDefinition * GetIon(G4int Z, G4int A, G4int lvl=0)
Definition: G4IonTable.cc:503
double B(double temperature)
int G4int
Definition: G4Types.hh:78
void SetStatusChange(G4HadFinalStateStatus aS)
G4IonTable * GetIonTable() const
Hep3Vector vect() const
#define G4UniformRand()
Definition: Randomize.hh:97
double A(double temperature)
ParticleList decay(Cluster *const c)
Carries out a cluster decay.
const G4ParticleDefinition * GetDefinition() const
G4double SampleMx(const G4HadProjectile *aParticle)
HepLorentzVector & boost(double, double, double)
G4double GetKineticEnergy() const
static constexpr double MeV
static G4Triton * Triton()
Definition: G4Triton.cc:95
static G4Proton * Proton()
Definition: G4Proton.cc:93
const G4LorentzVector & Get4Momentum() const
static G4Deuteron * Deuteron()
Definition: G4Deuteron.cc:94
static constexpr double GeV
void SetEnergyChange(G4double anEnergy)
G4double GetPDGMass() const
static G4ParticleTable * GetParticleTable()
Hep3Vector unit() const
G4double SampleT(const G4HadProjectile *aParticle, G4double Mx)
double mag2() const
void SetLocalEnergyDeposit(G4double aE)
static G4Alpha * Alpha()
Definition: G4Alpha.cc:89
void AddSecondary(G4DynamicParticle *aP, G4int mod=-1)
double G4double
Definition: G4Types.hh:76
static G4He3 * He3()
Definition: G4He3.cc:94
double mag() const
void SetMomentumChange(const G4ThreeVector &aV)
static constexpr double twopi
Definition: SystemOfUnits.h:55
G4double GetTotalMomentum() const

Here is the call graph for this function:

G4bool G4LMsdGenerator::IsApplicable ( const G4HadProjectile thePrimary,
G4Nucleus theNucleus 
)
virtual

Reimplemented from G4HadronicInteraction.

Definition at line 77 of file G4LMsdGenerator.cc.

79 {
80  G4bool applied = false;
81 
82  if( ( aTrack.GetDefinition() == G4Proton::Proton() ||
83  aTrack.GetDefinition() == G4Neutron::Neutron() ) &&
84  targetNucleus.GetA_asInt() >= 1 &&
85  // aTrack.GetKineticEnergy() > 1800*CLHEP::MeV
86  aTrack.GetKineticEnergy() > 300*CLHEP::MeV
87  ) // 750*CLHEP::MeV )
88  {
89  applied = true;
90  }
91  else if( ( aTrack.GetDefinition() == G4PionPlus::PionPlus() ||
92  aTrack.GetDefinition() == G4PionMinus::PionMinus() ) &&
93  targetNucleus.GetA_asInt() >= 1 &&
94  aTrack.GetKineticEnergy() > 2340*CLHEP::MeV )
95  {
96  applied = true;
97  }
98  else if( ( aTrack.GetDefinition() == G4KaonPlus::KaonPlus() ||
99  aTrack.GetDefinition() == G4KaonMinus::KaonMinus() ) &&
100  targetNucleus.GetA_asInt() >= 1 &&
101  aTrack.GetKineticEnergy() > 1980*CLHEP::MeV )
102  {
103  applied = true;
104  }
105  return applied;
106 }
static G4KaonMinus * KaonMinus()
Definition: G4KaonMinus.cc:113
bool G4bool
Definition: G4Types.hh:79
static constexpr double MeV
static G4Proton * Proton()
Definition: G4Proton.cc:93
static G4PionPlus * PionPlus()
Definition: G4PionPlus.cc:98
static G4Neutron * Neutron()
Definition: G4Neutron.cc:104
static G4PionMinus * PionMinus()
Definition: G4PionMinus.cc:98
static G4KaonPlus * KaonPlus()
Definition: G4KaonPlus.cc:113

Here is the call graph for this function:

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

Reimplemented from G4HadronicInteraction.

Definition at line 60 of file G4LMsdGenerator.cc.

61 {
62  outFile << GetModelName() <<" consists of a "
63  << " string model and a stage to de-excite the excited nuclear fragment."
64  << "\n<p>"
65  << "The string model simulates the interaction of\n"
66  << "an incident hadron with a nucleus, forming \n"
67  << "excited strings, decays these strings into hadrons,\n"
68  << "and leaves an excited nucleus. \n"
69  << "<p>The string model:\n";
70 }
const G4String & GetModelName() const

Here is the call graph for this function:

G4double G4LMsdGenerator::SampleMx ( const G4HadProjectile aParticle)

Definition at line 291 of file G4LMsdGenerator.cc.

292 {
293  G4double Mx = 0.;
294  G4int i;
295  G4double rand = G4UniformRand();
296 
297  for( i = 0; i < 60; i++)
298  {
299  if( rand >= fProbMx[i][1] ) break;
300  }
301  if(i <= 0) Mx = fProbMx[0][0];
302  else if(i >= 59) Mx = fProbMx[59][0];
303  else Mx = fProbMx[i][0];
304 
305  fPDGencoding = 0;
306 
307  if ( Mx <= 1.45 )
308  {
309  if( aParticle->GetDefinition() == G4Proton::Proton() )
310  {
311  Mx = 1.44;
312  // fPDGencoding = 12212;
313  fPDGencoding = 2214;
314  }
315  else if( aParticle->GetDefinition() == G4Neutron::Neutron() )
316  {
317  Mx = 1.44;
318  fPDGencoding = 12112;
319  }
320  else if( aParticle->GetDefinition() == G4PionPlus::PionPlus() )
321  {
322  // Mx = 1.3;
323  // fPDGencoding = 100211;
324  Mx = 1.26;
325  fPDGencoding = 20213; // a1(1260)+
326  }
327  else if( aParticle->GetDefinition() == G4PionMinus::PionMinus() )
328  {
329  // Mx = 1.3;
330  // fPDGencoding = -100211;
331  Mx = 1.26;
332  fPDGencoding = -20213; // a1(1260)-
333  }
334  else if( aParticle->GetDefinition() == G4KaonPlus::KaonPlus() )
335  {
336  Mx = 1.27;
337  fPDGencoding = 10323;
338  }
339  else if( aParticle->GetDefinition() == G4KaonMinus::KaonMinus() )
340  {
341  Mx = 1.27;
342  fPDGencoding = -10323;
343  }
344  }
345  else if ( Mx <= 1.55 )
346  {
347  if( aParticle->GetDefinition() == G4Proton::Proton() )
348  {
349  Mx = 1.52;
350  // fPDGencoding = 2124;
351  fPDGencoding = 2214;
352  }
353  else if( aParticle->GetDefinition() == G4Neutron::Neutron() )
354  {
355  Mx = 1.52;
356  fPDGencoding = 1214;
357  }
358  else if( aParticle->GetDefinition() == G4PionPlus::PionPlus() )
359  {
360  // Mx = 1.45;
361  // fPDGencoding = 10211;
362  Mx = 1.32;
363  fPDGencoding = 215; // a2(1320)+
364  }
365  else if( aParticle->GetDefinition() == G4PionMinus::PionMinus() )
366  {
367  // Mx = 1.45;
368  // fPDGencoding = -10211;
369  Mx = 1.32;
370  fPDGencoding = -215; // a2(1320)-
371  }
372  else if( aParticle->GetDefinition() == G4KaonPlus::KaonPlus() )
373  {
374  Mx = 1.46;
375  fPDGencoding = 100321;
376  }
377  else if( aParticle->GetDefinition() == G4KaonMinus::KaonMinus() )
378  {
379  Mx = 1.46;
380  fPDGencoding = -100321;
381  }
382  }
383  else
384  {
385  if( aParticle->GetDefinition() == G4Proton::Proton() )
386  {
387  Mx = 1.68;
388  // fPDGencoding = 12216;
389  fPDGencoding = 2214;
390  }
391  else if( aParticle->GetDefinition() == G4Neutron::Neutron() )
392  {
393  Mx = 1.68;
394  fPDGencoding = 12116;
395  }
396  else if( aParticle->GetDefinition() == G4PionPlus::PionPlus() )
397  {
398  Mx = 1.67;
399  fPDGencoding = 10215; // pi2(1670)+
400  // Mx = 1.45;
401  // fPDGencoding = 10211;
402  }
403  else if( aParticle->GetDefinition() == G4PionMinus::PionMinus() )
404  {
405  Mx = 1.67; // f0 problems->4pi vmg 20.11.14
406  fPDGencoding = -10215; // pi2(1670)-
407  // Mx = 1.45;
408  // fPDGencoding = -10211;
409  }
410  else if( aParticle->GetDefinition() == G4KaonPlus::KaonPlus() )
411  {
412  Mx = 1.68;
413  fPDGencoding = 30323;
414  }
415  else if( aParticle->GetDefinition() == G4KaonMinus::KaonMinus() )
416  {
417  Mx = 1.68;
418  fPDGencoding = -30323;
419  }
420  }
421  if(fPDGencoding == 0)
422  {
423  Mx = 1.44;
424  // fPDGencoding = 12212;
425  fPDGencoding = 2214;
426  }
427  G4ParticleDefinition* myResonance =
429 
430  if ( myResonance ) Mx = myResonance->GetPDGMass();
431 
432  // G4cout<<"PDG-ID = "<<fPDGencoding<<"; with mass = "<<Mx/CLHEP::GeV<<" GeV"<<G4endl;
433 
434  return Mx/CLHEP::GeV;
435 }
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
int G4int
Definition: G4Types.hh:78
static G4KaonMinus * KaonMinus()
Definition: G4KaonMinus.cc:113
#define G4UniformRand()
Definition: Randomize.hh:97
const G4ParticleDefinition * GetDefinition() const
static G4Proton * Proton()
Definition: G4Proton.cc:93
static G4PionPlus * PionPlus()
Definition: G4PionPlus.cc:98
static G4Neutron * Neutron()
Definition: G4Neutron.cc:104
static constexpr double GeV
G4double GetPDGMass() const
static G4ParticleTable * GetParticleTable()
static G4PionMinus * PionMinus()
Definition: G4PionMinus.cc:98
double G4double
Definition: G4Types.hh:76
static G4KaonPlus * KaonPlus()
Definition: G4KaonPlus.cc:113

Here is the call graph for this function:

Here is the caller graph for this function:

G4double G4LMsdGenerator::SampleT ( const G4HadProjectile aParticle,
G4double  Mx 
)

Definition at line 441 of file G4LMsdGenerator.cc.

443 {
444  G4double t=0., b=0., rTkin = 50.*CLHEP::GeV, eTkin = aParticle->GetKineticEnergy();
445  G4int i;
446 
447  for( i = 0; i < 23; ++i)
448  {
449  if( Mx <= fMxBdata[i][0] ) break;
450  }
451  if( i <= 0 ) b = fMxBdata[0][1];
452  else if( i >= 22 ) b = fMxBdata[22][1];
453  else b = fMxBdata[i][1];
454 
455  if( eTkin > rTkin ) b *= 1. + G4Log(eTkin/rTkin);
456 
457  G4double rand = G4UniformRand();
458 
459  t = -G4Log(rand)/b;
460 
461  t *= (CLHEP::GeV*CLHEP::GeV); // in G4 internal units
462 
463  return t;
464 }
int G4int
Definition: G4Types.hh:78
#define G4UniformRand()
Definition: Randomize.hh:97
G4double GetKineticEnergy() const
G4double G4Log(G4double x)
Definition: G4Log.hh:230
static constexpr double GeV
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

Here is the caller graph for this function:


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