Geant4  10.02.p03
G4KineticTrack Class Reference

#include <G4KineticTrack.hh>

Inheritance diagram for G4KineticTrack:
Collaboration diagram for G4KineticTrack:

Public Types

enum  CascadeState {
  undefined, outside, going_in, inside,
  going_out, gone_out, captured, miss_nucleus
}
 

Public Member Functions

 G4KineticTrack ()
 
 G4KineticTrack (const G4KineticTrack &right)
 
 G4KineticTrack (const G4ParticleDefinition *aDefinition, G4double aFormationTime, const G4ThreeVector &aPosition, const G4LorentzVector &a4Momentum)
 
 G4KineticTrack (G4Nucleon *nucleon, const G4ThreeVector &aPosition, const G4LorentzVector &a4Momentum)
 
 ~G4KineticTrack ()
 
G4KineticTrackoperator= (const G4KineticTrack &right)
 
G4int operator== (const G4KineticTrack &right) const
 
G4int operator!= (const G4KineticTrack &right) const
 
const G4ParticleDefinitionGetDefinition () const
 
void SetDefinition (const G4ParticleDefinition *aDefinition)
 
G4double GetFormationTime () const
 
void SetFormationTime (G4double aFormationTime)
 
const G4ThreeVectorGetPosition () const
 
void SetPosition (const G4ThreeVector aPosition)
 
const G4LorentzVectorGet4Momentum () const
 
void Set4Momentum (const G4LorentzVector &a4Momentum)
 
void Update4Momentum (G4double aEnergy)
 
void Update4Momentum (const G4ThreeVector &aMomentum)
 
void SetTrackingMomentum (const G4LorentzVector &a4Momentum)
 
void UpdateTrackingMomentum (G4double aEnergy)
 
void UpdateTrackingMomentum (const G4ThreeVector &aMomentum)
 
const G4LorentzVectorGetTrackingMomentum () const
 
G4double SampleResidualLifetime ()
 
void Hit ()
 
void SetNucleon (G4Nucleon *aN)
 
G4bool IsParticipant () const
 
G4KineticTrackVectorDecay ()
 
G4doubleGetActualWidth () const
 
G4double GetActualMass () const
 
G4int GetnChannels () const
 
CascadeState SetState (const CascadeState new_state)
 
CascadeState GetState () const
 
void SetProjectilePotential (const G4double aPotential)
 
G4double GetProjectilePotential () const
 
G4double BrWig (const G4double Gamma, const G4double rmass, const G4double mass) const
 
- Public Member Functions inherited from G4VKineticNucleon
 G4VKineticNucleon ()
 
 G4VKineticNucleon (const G4VKineticNucleon &right)
 
virtual ~G4VKineticNucleon ()
 
const G4VKineticNucleonoperator= (const G4VKineticNucleon &right)
 
int operator== (const G4VKineticNucleon &right) const
 
int operator!= (const G4VKineticNucleon &right) const
 

Private Member Functions

void SetnChannels (const G4int aChannel)
 
void SetActualWidth (G4double *anActualWidth)
 
G4double EvaluateTotalActualWidth ()
 
G4double EvaluateCMMomentum (const G4double mass, const G4double *m_ij) const
 
G4double IntegrateCMMomentum (const G4double lowerLimit) const
 
G4double IntegrateCMMomentum (const G4double lowerLimit, const G4double polemass) const
 
G4double IntegrateCMMomentum2 () const
 
G4double IntegrandFunction1 (G4double xmass) const
 
G4double IntegrandFunction2 (G4double xmass) const
 
G4double IntegrandFunction3 (G4double xmass) const
 
G4double IntegrandFunction4 (G4double xmass) const
 

Private Attributes

const G4ParticleDefinitiontheDefinition
 
G4double theFormationTime
 
G4ThreeVector thePosition
 
G4LorentzVector the4Momentum
 
G4LorentzVector theFermi3Momentum
 
G4LorentzVector theTotal4Momentum
 
G4NucleontheNucleon
 
G4int nChannels
 
G4double theActualMass
 
G4doubletheActualWidth
 
G4doubletheDaughterMass
 
G4doubletheDaughterWidth
 
CascadeState theStateToNucleus
 
G4double theProjectilePotential
 

Detailed Description

Definition at line 57 of file G4KineticTrack.hh.

Member Enumeration Documentation

◆ CascadeState

Constructor & Destructor Documentation

◆ G4KineticTrack() [1/4]

G4KineticTrack::G4KineticTrack ( )

Definition at line 67 of file G4KineticTrack.cc.

67  :
68  theDefinition(0),
70  thePosition(0),
71  the4Momentum(0),
74  theNucleon(0),
75  nChannels(0),
76  theActualMass(0),
77  theActualWidth(0),
78  theDaughterMass(0),
82 {
84 // DEBUG //
86 
87 /*
88  G4cerr << G4endl << G4endl << G4endl;
89  G4cerr << " G4KineticTrack default constructor invoked! \n";
90  G4cerr << " =========================================== \n" << G4endl;
91 */
92 }
G4double theFormationTime
G4LorentzVector theTotal4Momentum
G4double * theDaughterWidth
G4ThreeVector thePosition
G4double * theDaughterMass
G4LorentzVector theFermi3Momentum
G4LorentzVector the4Momentum
G4double * theActualWidth
G4Nucleon * theNucleon
G4double theActualMass
G4double theProjectilePotential
const G4ParticleDefinition * theDefinition
CascadeState theStateToNucleus

◆ G4KineticTrack() [2/4]

G4KineticTrack::G4KineticTrack ( const G4KineticTrack right)

Definition at line 100 of file G4KineticTrack.cc.

101 {
102  G4int i;
103  theDefinition = right.GetDefinition();
105  thePosition = right.GetPosition();
109  theNucleon=right.theNucleon;
110  nChannels = right.GetnChannels();
111  theActualMass = right.GetActualMass();
113  for (i = 0; i < nChannels; i++)
114  {
115  theActualWidth[i] = right.theActualWidth[i];
116  }
117  theDaughterMass = 0;
118  theDaughterWidth = 0;
121 
123 // DEBUG //
125 
126 /*
127  G4cerr << G4endl << G4endl << G4endl;
128  G4cerr << " G4KineticTrack copy constructor invoked! \n";
129  G4cerr << " ======================================== \n" <<G4endl;
130 */
131 }
const G4ParticleDefinition * GetDefinition() const
const G4ThreeVector & GetPosition() const
G4double theFormationTime
G4LorentzVector theTotal4Momentum
G4double * theDaughterWidth
G4double GetFormationTime() const
G4ThreeVector thePosition
const G4LorentzVector & GetTrackingMomentum() const
int G4int
Definition: G4Types.hh:78
G4double * theDaughterMass
G4LorentzVector theFermi3Momentum
G4int GetnChannels() const
G4LorentzVector the4Momentum
G4double * theActualWidth
G4double GetActualMass() const
G4Nucleon * theNucleon
G4double theActualMass
double G4double
Definition: G4Types.hh:76
G4double theProjectilePotential
const G4ParticleDefinition * theDefinition
CascadeState theStateToNucleus
Here is the call graph for this function:

◆ G4KineticTrack() [3/4]

G4KineticTrack::G4KineticTrack ( const G4ParticleDefinition aDefinition,
G4double  aFormationTime,
const G4ThreeVector aPosition,
const G4LorentzVector a4Momentum 
)

Definition at line 138 of file G4KineticTrack.cc.

141  :
142  theDefinition(aDefinition),
143  theFormationTime(aFormationTime),
144  thePosition(aPosition),
145  the4Momentum(a4Momentum),
147  theTotal4Momentum(a4Momentum),
148  theNucleon(0),
151 {
154  {
155  if(G4UniformRand()<0.5)
156  {
158  }
159  else
160  {
162  }
163  }
164 
165 //
166 // Get the number of decay channels
167 //
168 
169  G4DecayTable* theDecayTable = theDefinition->GetDecayTable();
170  if (theDecayTable != 0)
171  {
172  nChannels = theDecayTable->entries();
173 
174  }
175  else
176  {
177  nChannels = 0;
178  }
179 
180 //
181 // Get the actual mass value
182 //
183 
185 
186 //
187 // Create an array to Store the actual partial widths
188 // of the decay channels
189 //
190 
191  theDaughterMass = 0;
192  theDaughterWidth = 0;
193  theActualWidth = 0;
194  G4bool * theDaughterIsShortLived = 0;
195 
197 
198  // cout << " ****CONSTR*** ActualMass ******* " << theActualMass << G4endl;
199  G4int index;
200  for (index = nChannels - 1; index >= 0; index--)
201  {
202  G4VDecayChannel* theChannel = theDecayTable->GetDecayChannel(index);
203  G4int nDaughters = theChannel->GetNumberOfDaughters();
204  G4double theMotherWidth;
205  if (nDaughters == 2 || nDaughters == 3)
206  {
207  G4double thePoleMass = theDefinition->GetPDGMass();
208  theMotherWidth = theDefinition->GetPDGWidth();
209  G4double thePoleWidth = theChannel->GetBR()*theMotherWidth;
210  const G4ParticleDefinition* aDaughter;
211  theDaughterMass = new G4double[nDaughters];
212  theDaughterWidth = new G4double[nDaughters];
213  theDaughterIsShortLived = new G4bool[nDaughters];
214  G4int n;
215  for (n = 0; n < nDaughters; n++)
216  {
217  aDaughter = theChannel->GetDaughter(n);
218  theDaughterMass[n] = aDaughter->GetPDGMass();
219  theDaughterWidth[n] = aDaughter->GetPDGWidth();
220  theDaughterIsShortLived[n] = aDaughter->IsShortLived();
221  }
222 
223 //
224 // Check whether both the decay products are stable
225 //
226 
227  G4double theActualMom = 0.0;
228  G4double thePoleMom = 0.0;
229  G4SampleResonance aSampler;
230  if (nDaughters==2)
231  {
232  if ( !theDaughterIsShortLived[0] && !theDaughterIsShortLived[1] )
233  {
234 
235  // G4cout << G4endl << "Both the " << nDaughters <<
236  // " decay products are stable!";
237  // cout << " LB: Both decay products STABLE !" << G4endl;
238  // cout << " parent: " << theChannel->GetParentName() << G4endl;
239  // cout << " particle1: " << theChannel->GetDaughterName(0) << G4endl;
240  // cout << " particle2: " << theChannel->GetDaughterName(1) << G4endl;
241 
242  theActualMom = EvaluateCMMomentum(theActualMass,
243  theDaughterMass);
244  thePoleMom = EvaluateCMMomentum(thePoleMass,
246  // cout << G4endl;
247  // cout << " LB: ActualMass/DaughterMass " << theActualMass << " " << theDaughterMass << G4endl;
248  // cout << " LB: ActualMom " << theActualMom << G4endl;
249  // cout << " LB: PoleMom " << thePoleMom << G4endl;
250  // cout << G4endl;
251  }
252  else if ( !theDaughterIsShortLived[0] && theDaughterIsShortLived[1] )
253  {
254 
255  // G4cout << G4endl << "Only the first of the " << nDaughters <<" decay products is stable!";
256  // cout << " LB: only the first decay product is STABLE !" << G4endl;
257  // cout << " parent: " << theChannel->GetParentName() << G4endl;
258  // cout << " particle1: " << theChannel->GetDaughterName(0) << G4endl;
259  // cout << " particle2: " << theChannel->GetDaughterName(1) << G4endl;
260 
261 // global variable definition
262  G4double lowerLimit = aSampler.GetMinimumMass(theChannel->GetDaughter(1));
263  theActualMom = IntegrateCMMomentum(lowerLimit);
264  thePoleMom = IntegrateCMMomentum(lowerLimit, thePoleMass);
265  // cout << " LB Parent Mass = " << G4KineticTrack_Gmass << G4endl;
266  // cout << " LB Actual Mass = " << theActualMass << G4endl;
267  // cout << " LB Daughter1 Mass = " << G4KineticTrack_Gmass1 << G4endl;
268  // cout << " LB Daughter2 Mass = " << G4KineticTrack_Gmass2 << G4endl;
269  // cout << " The Actual Momentum = " << theActualMom << G4endl;
270  // cout << " The Pole Momentum = " << thePoleMom << G4endl;
271  // cout << G4endl;
272 
273  }
274  else if ( theDaughterIsShortLived[0] && !theDaughterIsShortLived[1] )
275  {
276 
277  // G4cout << G4endl << "Only the second of the " << nDaughters <<
278  // " decay products is stable!";
279  // cout << " LB: only the second decay product is STABLE !" << G4endl;
280  // cout << " parent: " << theChannel->GetParentName() << G4endl;
281  // cout << " particle1: " << theChannel->GetDaughterName(0) << G4endl;
282  // cout << " particle2: " << theChannel->GetDaughterName(1) << G4endl;
283 
284 //
285 // Swap the content of the theDaughterMass and theDaughterWidth arrays!!!
286 //
287 
290 
291 // global variable definition
292  G4double lowerLimit = aSampler.GetMinimumMass(theChannel->GetDaughter(0));
293  theActualMom = IntegrateCMMomentum(lowerLimit);
294  thePoleMom = IntegrateCMMomentum(lowerLimit, thePoleMass);
295  // cout << " LB Parent Mass = " << G4KineticTrack_Gmass << G4endl;
296  // cout << " LB Actual Mass = " << theActualMass << G4endl;
297  // cout << " LB Daughter1 Mass = " << G4KineticTrack_Gmass1 << G4endl;
298  // cout << " LB Daughter2 Mass = " << G4KineticTrack_Gmass2 << G4endl;
299  // cout << " The Actual Momentum = " << theActualMom << G4endl;
300  // cout << " The Pole Momentum = " << thePoleMom << G4endl;
301  // cout << G4endl;
302 
303  }
304  else if ( theDaughterIsShortLived[0] && theDaughterIsShortLived[1] )
305  {
306 
307 // G4cout << G4endl << "Both the " << nDaughters <<
308 // " decay products are resonances!";
309  // cout << " LB: both decay products are RESONANCES !" << G4endl;
310  // cout << " parent: " << theChannel->GetParentName() << G4endl;
311  // cout << " particle1: " << theChannel->GetDaughterName(0) << G4endl;
312  // cout << " particle2: " << theChannel->GetDaughterName(1) << G4endl;
313 
314 // global variable definition
316  theActualMom = IntegrateCMMomentum2();
317  G4KineticTrack_Gmass = thePoleMass;
318  thePoleMom = IntegrateCMMomentum2();
319  // cout << " LB Parent Mass = " << G4KineticTrack_Gmass << G4endl;
320  // cout << " LB Daughter1 Mass = " << G4KineticTrack_Gmass1 << G4endl;
321  // cout << " LB Daughter2 Mass = " << G4KineticTrack_Gmass2 << G4endl;
322  // cout << " The Actual Momentum = " << theActualMom << G4endl;
323  // cout << " The Pole Momentum = " << thePoleMom << G4endl;
324  // cout << G4endl;
325 
326  }
327  }
328  else // (nDaughter==3)
329  {
330 
331  G4int nShortLived = 0;
332  if ( theDaughterIsShortLived[0] )
333  {
334  nShortLived++;
335  }
336  if ( theDaughterIsShortLived[1] )
337  {
338  nShortLived++;
341  }
342  if ( theDaughterIsShortLived[2] )
343  {
344  nShortLived++;
347  }
348  if ( nShortLived == 0 )
349  {
351  theActualMom = EvaluateCMMomentum(theActualMass,
352  theDaughterMass);
353  thePoleMom = EvaluateCMMomentum(thePoleMass,
355  }
356 // else if ( nShortLived == 1 )
357  else if ( nShortLived >= 1 )
358  {
359  // need the shortlived particle in slot 1! (very bad style...)
363  theActualMom = IntegrateCMMomentum(0.0);
364  thePoleMom = IntegrateCMMomentum(0.0, thePoleMass);
365  }
366 // else
367 // {
368 // throw G4HadronicException(__FILE__, __LINE__, ("can't handle more than one shortlived in 3 particle output channel");
369 // }
370 
371  }
372 
373  //if(nDaughters<3) theChannel->GetAngularMomentum();
374  G4double theMassRatio = thePoleMass / theActualMass;
375  G4double theMomRatio = theActualMom / thePoleMom;
376  // VI 11.06.2015: for l=0 one not need use pow
377  //G4double l=0;
378  //theActualWidth[index] = thePoleWidth * theMassRatio *
379  // std::pow(theMomRatio, (2 * l + 1)) *
380  // (1.2 / (1+ 0.2*std::pow(theMomRatio, (2 * l))));
381  theActualWidth[index] = thePoleWidth * theMassRatio *
382  theMomRatio;
383  delete [] theDaughterMass;
384  theDaughterMass = 0;
385  delete [] theDaughterWidth;
386  theDaughterWidth = 0;
387  delete [] theDaughterIsShortLived;
388  theDaughterIsShortLived = 0;
389  }
390 
391  else // nDaughter = 1 ( e.g. K0 decays 50% to Kshort, 50% Klong
392  {
393  theMotherWidth = theDefinition->GetPDGWidth();
394  theActualWidth[index] = theChannel->GetBR()*theMotherWidth;
395  }
396  }
397 
399 // DEBUG //
401 
402 // for (G4int y = nChannels - 1; y >= 0; y--)
403 // {
404 // G4cout << G4endl << theActualWidth[y];
405 // }
406 // G4cout << G4endl << G4endl << G4endl;
407 
408  /*
409  G4cerr << G4endl << G4endl << G4endl;
410  G4cerr << " G4KineticTrack by argument constructor invoked! \n";
411  G4cerr << " =============================================== \n" << G4endl;
412  */
413 
414 }
static G4KaonZero * KaonZero()
Definition: G4KaonZero.cc:104
void G4SwapObj(T *a, T *b)
Definition: templates.hh:129
G4double theFormationTime
G4LorentzVector theTotal4Momentum
Int_t index
G4double * theDaughterWidth
G4ParticleDefinition * GetDaughter(G4int anIndex)
static G4ThreadLocal G4double G4KineticTrack_Gmass
static G4KaonZeroLong * KaonZeroLong()
G4ThreeVector thePosition
G4double IntegrateCMMomentum2() const
int G4int
Definition: G4Types.hh:78
G4double * theDaughterMass
G4int GetNumberOfDaughters() const
G4LorentzVector theFermi3Momentum
Char_t n[5]
#define G4UniformRand()
Definition: Randomize.hh:97
static G4KaonZeroShort * KaonZeroShort()
bool G4bool
Definition: G4Types.hh:79
G4LorentzVector the4Momentum
G4double IntegrateCMMomentum(const G4double lowerLimit) const
G4double GetMinimumMass(const G4ParticleDefinition *p) const
G4DecayTable * GetDecayTable() const
G4double GetPDGWidth() const
G4int entries() const
static G4AntiKaonZero * AntiKaonZero()
G4VDecayChannel * GetDecayChannel(G4int index) const
G4double * theActualWidth
G4double GetActualMass() const
G4Nucleon * theNucleon
G4double theActualMass
double G4double
Definition: G4Types.hh:76
G4double EvaluateCMMomentum(const G4double mass, const G4double *m_ij) const
G4double theProjectilePotential
G4double GetBR() const
const G4ParticleDefinition * theDefinition
CascadeState theStateToNucleus
Here is the call graph for this function:

◆ G4KineticTrack() [4/4]

G4KineticTrack::G4KineticTrack ( G4Nucleon nucleon,
const G4ThreeVector aPosition,
const G4LorentzVector a4Momentum 
)

Definition at line 416 of file G4KineticTrack.cc.

419  : theDefinition(nucleon->GetDefinition()),
420  theFormationTime(0),
421  thePosition(aPosition),
422  the4Momentum(a4Momentum),
423  theFermi3Momentum(nucleon->GetMomentum()),
424  theNucleon(nucleon),
425  nChannels(0),
426  theActualMass(nucleon->GetDefinition()->GetPDGMass()),
427  theActualWidth(0),
428  theDaughterMass(0),
429  theDaughterWidth(0),
432 {
434  Set4Momentum(a4Momentum);
435 }
G4double theFormationTime
G4double * theDaughterWidth
G4ThreeVector thePosition
G4double * theDaughterMass
G4LorentzVector theFermi3Momentum
virtual const G4ParticleDefinition * GetDefinition() const
Definition: G4Nucleon.hh:85
const G4LorentzVector & GetMomentum() const
Definition: G4Nucleon.hh:71
G4LorentzVector the4Momentum
void Set4Momentum(const G4LorentzVector &a4Momentum)
G4double * theActualWidth
G4Nucleon * theNucleon
G4double theActualMass
G4double theProjectilePotential
const G4ParticleDefinition * theDefinition
CascadeState theStateToNucleus
Here is the call graph for this function:

◆ ~G4KineticTrack()

G4KineticTrack::~G4KineticTrack ( )

Definition at line 438 of file G4KineticTrack.cc.

439 {
440  if (theActualWidth != 0) delete [] theActualWidth;
441  if (theDaughterMass != 0) delete [] theDaughterMass;
442  if (theDaughterWidth != 0) delete [] theDaughterWidth;
443 }
G4double * theDaughterWidth
G4double * theDaughterMass
G4double * theActualWidth

Member Function Documentation

◆ BrWig()

G4double G4KineticTrack::BrWig ( const G4double  Gamma,
const G4double  rmass,
const G4double  mass 
) const
inline

Definition at line 379 of file G4KineticTrack.hh.

380 {
381  G4double Norm = CLHEP::twopi;
382  return (Gamma/((mass-rmass)*(mass-rmass)+Gamma*Gamma/4.))/Norm;
383 }
double G4double
Definition: G4Types.hh:76
static const double twopi
Definition: SystemOfUnits.h:54
Here is the caller graph for this function:

◆ Decay()

G4KineticTrackVector * G4KineticTrack::Decay ( )
virtual

Reimplemented from G4VKineticNucleon.

Definition at line 486 of file G4KineticTrack.cc.

487 {
488 //
489 // Select a possible decay channel
490 //
491 /*
492  G4int index1;
493  for (index1 = nChannels - 1; index1 >= 0; index1--)
494  G4cout << "DECAY Actual Width IND/ActualW " << index1 << " " << theActualWidth[index1] << G4endl;
495  G4cout << "DECAY Actual Mass " << theActualMass << G4endl;
496 */
497  const G4ParticleDefinition* thisDefinition = this->GetDefinition();
498  if(!thisDefinition)
499  {
500  G4cerr << "Error condition encountered in G4KineticTrack::Decay()"<<G4endl;
501  G4cerr << " track has no particle definition associated."<<G4endl;
502  return 0;
503  }
504  G4DecayTable* theDecayTable = thisDefinition->GetDecayTable();
505  if(!theDecayTable)
506  {
507  G4cerr << "Error condition encountered in G4KineticTrack::Decay()"<<G4endl;
508  G4cerr << " particle definiton has no decay table associated."<<G4endl;
509  G4cerr << " particle was "<<thisDefinition->GetParticleName()<<G4endl;
510  return 0;
511  }
512 
513  G4int chargeBalance = G4lrint(theDefinition->GetPDGCharge() );
514  G4int baryonBalance = G4lrint(theDefinition->GetBaryonNumber() );
515  G4LorentzVector energyMomentumBalance(Get4Momentum());
516  G4double theTotalActualWidth = this->EvaluateTotalActualWidth();
517  if (theTotalActualWidth !=0)
518  {
519  G4int index;
520  G4double theSumActualWidth = 0.0;
521  G4double* theCumActualWidth = new G4double[nChannels];
522  for (index = nChannels - 1; index >= 0; index--)
523  {
524  theSumActualWidth += theActualWidth[index];
525  theCumActualWidth[index] = theSumActualWidth;
526  // cout << "DECAY Cum. Width " << index << " " << theCumActualWidth[index] << G4endl;
527  }
528  // cout << "DECAY Total Width " << theSumActualWidth << G4endl;
529  // cout << "DECAY Total Width " << theTotalActualWidth << G4endl;
530  G4double r = theTotalActualWidth * G4UniformRand();
531  G4VDecayChannel* theDecayChannel(0);
532  G4int chosench=-1;
533  for (index = nChannels - 1; index >= 0; index--)
534  {
535  if (r < theCumActualWidth[index])
536  {
537  theDecayChannel = theDecayTable->GetDecayChannel(index);
538  // cout << "DECAY SELECTED CHANNEL" << index << G4endl;
539  chosench=index;
540  break;
541  }
542  }
543 
544  delete [] theCumActualWidth;
545 
546  if(!theDecayChannel)
547  {
548  G4cerr << "Error condition encountered in G4KineticTrack::Decay()"<<G4endl;
549  G4cerr << " decay channel has 0x0 channel associated."<<G4endl;
550  G4cerr << " particle was "<<thisDefinition->GetParticleName()<<G4endl;
551  G4cerr << " channel index "<< chosench << "of "<<nChannels<<"channels"<<G4endl;
552  return 0;
553  }
554  G4String theParentName = theDecayChannel->GetParentName();
555  G4double theParentMass = this->GetActualMass();
556  G4double theBR = theActualWidth[index];
557  // cout << "**BR*** DECAYNEW " << theBR << G4endl;
558  G4int theNumberOfDaughters = theDecayChannel->GetNumberOfDaughters();
559  G4String theDaughtersName1 = "";
560  G4String theDaughtersName2 = "";
561  G4String theDaughtersName3 = "";
562  G4String theDaughtersName4 = "";
563 
564  G4double masses[4]={0.,0.,0.,0.};
565  G4int shortlivedDaughters[4];
566  G4int numberOfShortliveds(0);
567  G4double SumLongLivedMass(0);
568  for (G4int aD=0; aD < theNumberOfDaughters ; aD++)
569  {
570  const G4ParticleDefinition* aDaughter = theDecayChannel->GetDaughter(aD);
571  masses[aD] = aDaughter->GetPDGMass();
572  if ( aDaughter->IsShortLived() )
573  {
574  shortlivedDaughters[numberOfShortliveds]=aD;
575  numberOfShortliveds++;
576  } else {
577  SumLongLivedMass += aDaughter->GetPDGMass();
578  }
579 
580  }
581  switch (theNumberOfDaughters)
582  {
583  case 0:
584  break;
585  case 1:
586  theDaughtersName1 = theDecayChannel->GetDaughterName(0);
587  theDaughtersName2 = "";
588  theDaughtersName3 = "";
589  theDaughtersName4 = "";
590  break;
591  case 2:
592  theDaughtersName1 = theDecayChannel->GetDaughterName(0);
593  theDaughtersName2 = theDecayChannel->GetDaughterName(1);
594  theDaughtersName3 = "";
595  theDaughtersName4 = "";
596  if ( numberOfShortliveds == 1)
597  { G4SampleResonance aSampler;
598  G4double massmax=theParentMass - SumLongLivedMass;
599  const G4ParticleDefinition * aDaughter=theDecayChannel->GetDaughter(shortlivedDaughters[0]);
600  masses[shortlivedDaughters[0]]= aSampler.SampleMass(aDaughter,massmax);
601  } else if ( numberOfShortliveds == 2) {
602  // choose masses one after the other, start with randomly choosen
603  G4int zero= (G4UniformRand() > 0.5) ? 0 : 1;
604  G4int one = 1-zero;
605  G4SampleResonance aSampler;
606  G4double massmax=theParentMass - aSampler.GetMinimumMass(theDecayChannel->GetDaughter(shortlivedDaughters[one]));
607  const G4ParticleDefinition * aDaughter=theDecayChannel->GetDaughter(shortlivedDaughters[zero]);
608  masses[shortlivedDaughters[zero]]=aSampler.SampleMass(aDaughter,massmax);
609  massmax=theParentMass - masses[shortlivedDaughters[zero]];
610  aDaughter=theDecayChannel->GetDaughter(shortlivedDaughters[one]);
611  masses[shortlivedDaughters[one]]=aSampler.SampleMass(aDaughter,massmax);
612  }
613  break;
614  case 3:
615  theDaughtersName1 = theDecayChannel->GetDaughterName(0);
616  theDaughtersName2 = theDecayChannel->GetDaughterName(1);
617  theDaughtersName3 = theDecayChannel->GetDaughterName(2);
618  theDaughtersName4 = "";
619  if ( numberOfShortliveds == 1)
620  { G4SampleResonance aSampler;
621  G4double massmax=theParentMass - SumLongLivedMass;
622  const G4ParticleDefinition * aDaughter=theDecayChannel->GetDaughter(shortlivedDaughters[0]);
623  masses[shortlivedDaughters[0]]= aSampler.SampleMass(aDaughter,massmax);
624  }
625  break;
626  default:
627  theDaughtersName1 = theDecayChannel->GetDaughterName(0);
628  theDaughtersName2 = theDecayChannel->GetDaughterName(1);
629  theDaughtersName3 = theDecayChannel->GetDaughterName(2);
630  theDaughtersName4 = theDecayChannel->GetDaughterName(3);
631  if ( numberOfShortliveds == 1)
632  { G4SampleResonance aSampler;
633  G4double massmax=theParentMass - SumLongLivedMass;
634  const G4ParticleDefinition * aDaughter=theDecayChannel->GetDaughter(shortlivedDaughters[0]);
635  masses[shortlivedDaughters[0]]= aSampler.SampleMass(aDaughter,massmax);
636  }
637  if ( theNumberOfDaughters > 4 ) {
639  ed << "More than 4 decay daughters: kept only the first 4" << G4endl;
640  G4Exception( "G4KineticTrack::Decay()", "KINTRK5", JustWarning, ed );
641  }
642  break;
643  }
644 
645 //
646 // Get the decay products List
647 //
648 
649  G4GeneralPhaseSpaceDecay thePhaseSpaceDecayChannel(theParentName,
650  theParentMass,
651  theBR,
652  theNumberOfDaughters,
653  theDaughtersName1,
654  theDaughtersName2,
655  theDaughtersName3,
656  theDaughtersName4,
657  masses);
658  G4DecayProducts* theDecayProducts = thePhaseSpaceDecayChannel.DecayIt();
659  if(!theDecayProducts)
660  {
662  ed << "Error condition encountered: phase-space decay failed." << G4endl
663  << "\t the decaying particle is: " << thisDefinition->GetParticleName() << G4endl
664  << "\t the channel index is: "<< chosench << " of "<< nChannels << "channels" << G4endl
665  << "\t " << theNumberOfDaughters << " daughter particles: "
666  << theDaughtersName1 << " " << theDaughtersName2 << " " << theDaughtersName3 << " "
667  << theDaughtersName4 << G4endl;
668  G4Exception( "G4KineticTrack::Decay ", "HAD_KINTRACK_001", JustWarning, ed );
669  return 0;
670  }
671 
672 //
673 // Create the kinetic track List associated to the decay products
674 //
675  G4LorentzRotation toMoving(Get4Momentum().boostVector());
676  G4DynamicParticle* theDynamicParticle;
677  G4double formationTime = 0.0;
679  G4LorentzVector momentum;
680  G4LorentzVector momentumBalanceCMS(0);
681  G4KineticTrackVector* theDecayProductList = new G4KineticTrackVector;
682  G4int dEntries = theDecayProducts->entries();
683  const G4ParticleDefinition * aProduct = 0;
684  for (G4int i=dEntries; i > 0; i--)
685  {
686  theDynamicParticle = theDecayProducts->PopProducts();
687  aProduct = theDynamicParticle->GetDefinition();
688  chargeBalance -= G4lrint(aProduct->GetPDGCharge() );
689  baryonBalance -= G4lrint(aProduct->GetBaryonNumber() );
690  momentumBalanceCMS += theDynamicParticle->Get4Momentum();
691  momentum = toMoving*theDynamicParticle->Get4Momentum();
692  energyMomentumBalance -= momentum;
693  theDecayProductList->push_back(new G4KineticTrack (aProduct,
694  formationTime,
695  position,
696  momentum));
697  delete theDynamicParticle;
698  }
699  delete theDecayProducts;
700  if(getenv("DecayEnergyBalanceCheck"))
701  std::cout << "DEBUGGING energy balance in cms and lab, charge baryon balance : "
702  << momentumBalanceCMS << " "
703  <<energyMomentumBalance << " "
704  <<chargeBalance<<" "
705  <<baryonBalance<<" "
706  <<G4endl;
707  return theDecayProductList;
708  }
709  else
710  {
711  return 0;
712  }
713 }
const G4ParticleDefinition * GetDefinition() const
const G4ThreeVector & GetPosition() const
std::ostringstream G4ExceptionDescription
Definition: globals.hh:76
Int_t index
int G4int
Definition: G4Types.hh:78
G4double SampleMass(const G4double poleMass, const G4double gamma, const G4double minMass, const G4double maxMass) const
const G4String & GetParticleName() const
#define G4UniformRand()
Definition: Randomize.hh:97
G4double GetMinimumMass(const G4ParticleDefinition *p) const
G4DecayTable * GetDecayTable() const
G4double EvaluateTotalActualWidth()
G4int entries() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
G4VDecayChannel * GetDecayChannel(G4int index) const
int G4lrint(double ad)
Definition: templates.hh:163
G4DynamicParticle * PopProducts()
G4double * theActualWidth
G4double GetActualMass() const
G4LorentzVector Get4Momentum() const
G4ParticleDefinition * GetDefinition() const
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
G4double GetPDGCharge() const
G4GLOB_DLL std::ostream G4cerr
const G4LorentzVector & Get4Momentum() const
const G4ParticleDefinition * theDefinition
Here is the call graph for this function:
Here is the caller graph for this function:

◆ EvaluateCMMomentum()

G4double G4KineticTrack::EvaluateCMMomentum ( const G4double  mass,
const G4double m_ij 
) const
inlineprivate

Definition at line 365 of file G4KineticTrack.hh.

367 {
368  G4double theCMMomentum;
369  if((m_ij[0]+m_ij[1])<mass)
370  theCMMomentum = 1 / (2 * mass) *
371  std::sqrt (((mass * mass) - (m_ij[0] + m_ij[1]) * (m_ij[0] + m_ij[1])) *
372  ((mass * mass) - (m_ij[0] - m_ij[1]) * (m_ij[0] - m_ij[1])));
373  else
374  theCMMomentum=0.;
375 
376  return theCMMomentum;
377 }
double G4double
Definition: G4Types.hh:76
Here is the caller graph for this function:

◆ EvaluateTotalActualWidth()

G4double G4KineticTrack::EvaluateTotalActualWidth ( )
inlineprivate

Definition at line 346 of file G4KineticTrack.hh.

347 {
348  G4int index;
349  G4double theTotalActualWidth = 0.0;
350  for (index = nChannels - 1; index >= 0; index--)
351  {
352  theTotalActualWidth += theActualWidth[index];
353  }
354  return theTotalActualWidth;
355 }
Int_t index
int G4int
Definition: G4Types.hh:78
G4double * theActualWidth
double G4double
Definition: G4Types.hh:76
Here is the caller graph for this function:

◆ Get4Momentum()

const G4LorentzVector & G4KineticTrack::Get4Momentum ( ) const
inlinevirtual

Implements G4VKineticNucleon.

Definition at line 240 of file G4KineticTrack.hh.

241 {
242  return theTotal4Momentum;
243 }
G4LorentzVector theTotal4Momentum

◆ GetActualMass()

G4double G4KineticTrack::GetActualMass ( ) const
inline

Definition at line 319 of file G4KineticTrack.hh.

320 {
321  return std::sqrt(std::abs(the4Momentum.mag2()));
322 }
G4LorentzVector the4Momentum
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetActualWidth()

G4double * G4KineticTrack::GetActualWidth ( ) const
inline

Definition at line 334 of file G4KineticTrack.hh.

335 {
336  return theActualWidth;
337 }
G4double * theActualWidth
Here is the caller graph for this function:

◆ GetDefinition()

const G4ParticleDefinition * G4KineticTrack::GetDefinition ( ) const
inlinevirtual

Implements G4VKineticNucleon.

Definition at line 210 of file G4KineticTrack.hh.

211 {
212  return theDefinition;
213 }
const G4ParticleDefinition * theDefinition

◆ GetFormationTime()

G4double G4KineticTrack::GetFormationTime ( ) const
inline

Definition at line 220 of file G4KineticTrack.hh.

221 {
222  return theFormationTime;
223 }
G4double theFormationTime
Here is the caller graph for this function:

◆ GetnChannels()

G4int G4KineticTrack::GetnChannels ( ) const
inline

Definition at line 324 of file G4KineticTrack.hh.

325 {
326  return nChannels;
327 }
Here is the caller graph for this function:

◆ GetPosition()

const G4ThreeVector & G4KineticTrack::GetPosition ( void  ) const
inlinevirtual

Implements G4VKineticNucleon.

Definition at line 230 of file G4KineticTrack.hh.

231 {
232  return thePosition;
233 }
G4ThreeVector thePosition
Here is the caller graph for this function:

◆ GetProjectilePotential()

G4double G4KineticTrack::GetProjectilePotential ( ) const
inline

Definition at line 421 of file G4KineticTrack.hh.

422 {
423  return theProjectilePotential;
424 }
G4double theProjectilePotential
Here is the caller graph for this function:

◆ GetState()

G4KineticTrack::CascadeState G4KineticTrack::GetState ( ) const
inline

Definition at line 402 of file G4KineticTrack.hh.

403 {
404  return theStateToNucleus;
405 }
CascadeState theStateToNucleus
Here is the caller graph for this function:

◆ GetTrackingMomentum()

const G4LorentzVector & G4KineticTrack::GetTrackingMomentum ( ) const
inline

Definition at line 245 of file G4KineticTrack.hh.

246 {
247  return the4Momentum;
248 }
G4LorentzVector the4Momentum
Here is the caller graph for this function:

◆ Hit()

void G4KineticTrack::Hit ( )
inline

Definition at line 386 of file G4KineticTrack.hh.

387 {
388  if(theNucleon)
389  {
390  theNucleon->Hit(1);
391  }
392 }
void Hit(G4VSplitableHadron *aHit)
Definition: G4Nucleon.hh:90
G4Nucleon * theNucleon
Here is the call graph for this function:
Here is the caller graph for this function:

◆ IntegrandFunction1()

G4double G4KineticTrack::IntegrandFunction1 ( G4double  xmass) const
private

Definition at line 715 of file G4KineticTrack.cc.

716 {
717  G4double mass = theActualMass; /* the actual mass value */
718  G4double mass1 = theDaughterMass[0];
719  G4double mass2 = theDaughterMass[1];
720  G4double gamma2 = theDaughterWidth[1];
721 
722  G4double result = (1. / (2 * mass)) *
723  std::sqrt(std::max((((mass * mass) - (mass1 + xmass) * (mass1 + xmass)) *
724  ((mass * mass) - (mass1 - xmass) * (mass1 - xmass))),0.0)) *
725  BrWig(gamma2, mass2, xmass);
726  return result;
727 }
G4double * theDaughterWidth
G4double * theDaughterMass
G4double BrWig(const G4double Gamma, const G4double rmass, const G4double mass) const
G4double theActualMass
double G4double
Definition: G4Types.hh:76
Here is the call graph for this function:
Here is the caller graph for this function:

◆ IntegrandFunction2()

G4double G4KineticTrack::IntegrandFunction2 ( G4double  xmass) const
private

Definition at line 729 of file G4KineticTrack.cc.

730 {
731  G4double mass = theDefinition->GetPDGMass(); /* the pole mass value */
732  G4double mass1 = theDaughterMass[0];
733  G4double mass2 = theDaughterMass[1];
734  G4double gamma2 = theDaughterWidth[1];
735  G4double result = (1. / (2 * mass)) *
736  std::sqrt(std::max((((mass * mass) - (mass1 + xmass) * (mass1 + xmass)) *
737  ((mass * mass) - (mass1 - xmass) * (mass1 - xmass))),0.0)) *
738  BrWig(gamma2, mass2, xmass);
739  return result;
740 }
G4double * theDaughterWidth
G4double * theDaughterMass
G4double BrWig(const G4double Gamma, const G4double rmass, const G4double mass) const
double G4double
Definition: G4Types.hh:76
const G4ParticleDefinition * theDefinition
Here is the call graph for this function:
Here is the caller graph for this function:

◆ IntegrandFunction3()

G4double G4KineticTrack::IntegrandFunction3 ( G4double  xmass) const
private

Definition at line 742 of file G4KineticTrack.cc.

743 {
744  const G4double mass = G4KineticTrack_Gmass; /* the actual mass value */
745 // const G4double mass1 = theDaughterMass[0];
746  const G4double mass2 = theDaughterMass[1];
747  const G4double gamma2 = theDaughterWidth[1];
748 
749  const G4double result = (1. / (2 * mass)) *
750  std::sqrt(((mass * mass) - (G4KineticTrack_xmass1 + xmass) * (G4KineticTrack_xmass1 + xmass)) *
751  ((mass * mass) - (G4KineticTrack_xmass1 - xmass) * (G4KineticTrack_xmass1 - xmass))) *
752  BrWig(gamma2, mass2, xmass);
753  return result;
754 }
G4double * theDaughterWidth
static G4ThreadLocal G4double G4KineticTrack_Gmass
G4double * theDaughterMass
G4double BrWig(const G4double Gamma, const G4double rmass, const G4double mass) const
static G4ThreadLocal G4double G4KineticTrack_xmass1
double G4double
Definition: G4Types.hh:76
Here is the call graph for this function:
Here is the caller graph for this function:

◆ IntegrandFunction4()

G4double G4KineticTrack::IntegrandFunction4 ( G4double  xmass) const
private

Definition at line 756 of file G4KineticTrack.cc.

757 {
758  const G4double mass = G4KineticTrack_Gmass;
759  const G4double mass1 = theDaughterMass[0];
760  const G4double gamma1 = theDaughterWidth[0];
761 // const G4double mass2 = theDaughterMass[1];
762 
763  G4KineticTrack_xmass1 = xmass;
764 
765  const G4double theLowerLimit = 0.0;
766  const G4double theUpperLimit = mass - xmass;
767  const G4int nIterations = 100;
768 
770  G4double result = BrWig(gamma1, mass1, xmass)*
771  integral.Simpson(this, &G4KineticTrack::IntegrandFunction3, theLowerLimit, theUpperLimit, nIterations);
772 
773  return result;
774 }
G4double IntegrandFunction3(G4double xmass) const
G4double * theDaughterWidth
static G4ThreadLocal G4double G4KineticTrack_Gmass
int G4int
Definition: G4Types.hh:78
G4double * theDaughterMass
G4double BrWig(const G4double Gamma, const G4double rmass, const G4double mass) const
static G4ThreadLocal G4double G4KineticTrack_xmass1
G4double Simpson(T &typeT, F f, G4double a, G4double b, G4int n)
double G4double
Definition: G4Types.hh:76
Here is the call graph for this function:
Here is the caller graph for this function:

◆ IntegrateCMMomentum() [1/2]

G4double G4KineticTrack::IntegrateCMMomentum ( const G4double  lowerLimit) const
private

Definition at line 776 of file G4KineticTrack.cc.

777 {
778  const G4double theUpperLimit = theActualMass - theDaughterMass[0];
779  const G4int nIterations = 100;
780 
781  if (theLowerLimit>=theUpperLimit) return 0.0;
782 
784  G4double theIntegralOverMass2 = integral.Simpson(this, &G4KineticTrack::IntegrandFunction1,
785  theLowerLimit, theUpperLimit, nIterations);
786  return theIntegralOverMass2;
787 }
int G4int
Definition: G4Types.hh:78
G4double * theDaughterMass
G4double IntegrandFunction1(G4double xmass) const
G4double Simpson(T &typeT, F f, G4double a, G4double b, G4int n)
G4double theActualMass
double G4double
Definition: G4Types.hh:76
Here is the call graph for this function:
Here is the caller graph for this function:

◆ IntegrateCMMomentum() [2/2]

G4double G4KineticTrack::IntegrateCMMomentum ( const G4double  lowerLimit,
const G4double  polemass 
) const
private

Definition at line 789 of file G4KineticTrack.cc.

790 {
791  const G4double theUpperLimit = poleMass - theDaughterMass[0];
792  const G4int nIterations = 100;
793 
794  if (theLowerLimit>=theUpperLimit) return 0.0;
795 
797  const G4double theIntegralOverMass2 = integral.Simpson(this, &G4KineticTrack::IntegrandFunction2,
798  theLowerLimit, theUpperLimit, nIterations);
799  return theIntegralOverMass2;
800 }
int G4int
Definition: G4Types.hh:78
G4double * theDaughterMass
G4double Simpson(T &typeT, F f, G4double a, G4double b, G4int n)
double G4double
Definition: G4Types.hh:76
G4double IntegrandFunction2(G4double xmass) const
Here is the call graph for this function:

◆ IntegrateCMMomentum2()

G4double G4KineticTrack::IntegrateCMMomentum2 ( ) const
private

Definition at line 803 of file G4KineticTrack.cc.

804 {
805  const G4double theLowerLimit = 0.0;
806  const G4double theUpperLimit = theActualMass;
807  const G4int nIterations = 100;
808 
809  if (theLowerLimit>=theUpperLimit) return 0.0;
810 
812  G4double theIntegralOverMass2 = integral.Simpson(this, &G4KineticTrack::IntegrandFunction4,
813  theLowerLimit, theUpperLimit, nIterations);
814  return theIntegralOverMass2;
815 }
G4double IntegrandFunction4(G4double xmass) const
int G4int
Definition: G4Types.hh:78
G4double Simpson(T &typeT, F f, G4double a, G4double b, G4int n)
G4double theActualMass
double G4double
Definition: G4Types.hh:76
Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsParticipant()

G4bool G4KineticTrack::IsParticipant ( ) const
inline

Definition at line 395 of file G4KineticTrack.hh.

396 {
397  if(!theNucleon) return true;
398  return theNucleon->AreYouHit();
399 }
G4bool AreYouHit() const
Definition: G4Nucleon.hh:97
G4Nucleon * theNucleon
Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator!=()

G4int G4KineticTrack::operator!= ( const G4KineticTrack right) const

Definition at line 479 of file G4KineticTrack.cc.

480 {
481  return (this != & right);
482 }

◆ operator=()

G4KineticTrack & G4KineticTrack::operator= ( const G4KineticTrack right)

Definition at line 447 of file G4KineticTrack.cc.

448 {
449  if (this != &right)
450  {
451  theDefinition = right.GetDefinition();
453  the4Momentum = right.the4Momentum;
457  theNucleon=right.theNucleon;
459  if (theActualWidth != 0) delete [] theActualWidth;
460  nChannels = right.GetnChannels();
462  for ( G4int i = 0; i < nChannels; i++)
463  {
464  theActualWidth[i] = right.theActualWidth[i];
465  }
466  }
467  return *this;
468 }
const G4ParticleDefinition * GetDefinition() const
G4double theFormationTime
G4LorentzVector theTotal4Momentum
G4double GetFormationTime() const
const G4LorentzVector & GetTrackingMomentum() const
int G4int
Definition: G4Types.hh:78
G4LorentzVector theFermi3Momentum
G4int GetnChannels() const
G4LorentzVector the4Momentum
G4double * theActualWidth
G4Nucleon * theNucleon
double G4double
Definition: G4Types.hh:76
const G4ParticleDefinition * theDefinition
CascadeState theStateToNucleus
Here is the call graph for this function:

◆ operator==()

G4int G4KineticTrack::operator== ( const G4KineticTrack right) const

Definition at line 472 of file G4KineticTrack.cc.

473 {
474  return (this == & right);
475 }

◆ SampleResidualLifetime()

G4double G4KineticTrack::SampleResidualLifetime ( )
inline

Definition at line 357 of file G4KineticTrack.hh.

358 {
359  G4double theTotalActualWidth = this->EvaluateTotalActualWidth();
360  G4double tau = CLHEP::hbar_Planck * (-1.0 / theTotalActualWidth);
361  G4double theResidualLifetime = tau * G4Log(G4UniformRand());
362  return theResidualLifetime*the4Momentum.gamma();
363 }
#define G4UniformRand()
Definition: Randomize.hh:97
G4LorentzVector the4Momentum
G4double EvaluateTotalActualWidth()
G4double G4Log(G4double x)
Definition: G4Log.hh:230
double G4double
Definition: G4Types.hh:76
static const double hbar_Planck
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Set4Momentum()

void G4KineticTrack::Set4Momentum ( const G4LorentzVector a4Momentum)
inline

Definition at line 250 of file G4KineticTrack.hh.

251 {
252 // set the4Momentum and update theTotal4Momentum
253 
254  theTotal4Momentum=a4Momentum;
257 }
G4LorentzVector theTotal4Momentum
G4LorentzVector theFermi3Momentum
G4LorentzVector the4Momentum
CLHEP::HepLorentzVector G4LorentzVector
Here is the caller graph for this function:

◆ SetActualWidth()

void G4KineticTrack::SetActualWidth ( G4double anActualWidth)
inlineprivate

Definition at line 339 of file G4KineticTrack.hh.

340 {
341  theActualWidth = anActualWidth;
342 }
G4double * theActualWidth

◆ SetDefinition()

void G4KineticTrack::SetDefinition ( const G4ParticleDefinition aDefinition)
inline

Definition at line 215 of file G4KineticTrack.hh.

216 {
217  theDefinition = aDefinition;
218 }
const G4ParticleDefinition * theDefinition

◆ SetFormationTime()

void G4KineticTrack::SetFormationTime ( G4double  aFormationTime)
inline

Definition at line 225 of file G4KineticTrack.hh.

226 {
227  theFormationTime = aFormationTime;
228 }
G4double theFormationTime
Here is the caller graph for this function:

◆ SetnChannels()

void G4KineticTrack::SetnChannels ( const G4int  aChannel)
inlineprivate

Definition at line 329 of file G4KineticTrack.hh.

330 {
331  nChannels = numberOfChannels;
332 }

◆ SetNucleon()

void G4KineticTrack::SetNucleon ( G4Nucleon aN)
inline

Definition at line 106 of file G4KineticTrack.hh.

106 {theNucleon = aN;}
G4Nucleon * theNucleon
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetPosition()

void G4KineticTrack::SetPosition ( const G4ThreeVector  aPosition)
inline

Definition at line 235 of file G4KineticTrack.hh.

236 {
237  thePosition = aPosition;
238 }
G4ThreeVector thePosition
Here is the caller graph for this function:

◆ SetProjectilePotential()

void G4KineticTrack::SetProjectilePotential ( const G4double  aPotential)
inline

Definition at line 416 of file G4KineticTrack.hh.

417 {
418  theProjectilePotential = aPotential;
419 }
G4double theProjectilePotential
Here is the caller graph for this function:

◆ SetState()

G4KineticTrack::CascadeState G4KineticTrack::SetState ( const CascadeState  new_state)
inline

Definition at line 408 of file G4KineticTrack.hh.

409 {
411  theStateToNucleus=new_state;
412  return old_state;
413 }
CascadeState theStateToNucleus
Here is the caller graph for this function:

◆ SetTrackingMomentum()

void G4KineticTrack::SetTrackingMomentum ( const G4LorentzVector a4Momentum)
inline

Definition at line 283 of file G4KineticTrack.hh.

284 {
285 // set the4Momentum and update theTotal4Momentum, keep the mass of aMomentum
286 
287  the4Momentum = aMomentum;
289 // keep mass of aMomentum for the total momentum
290  G4double mass2 = aMomentum.mag2();
292  theTotal4Momentum.setE(std::sqrt(mass2+p2));
293 }
G4LorentzVector theTotal4Momentum
double mag2() const
Hep3Vector vect() const
G4LorentzVector theFermi3Momentum
G4LorentzVector the4Momentum
double G4double
Definition: G4Types.hh:76
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Update4Momentum() [1/2]

void G4KineticTrack::Update4Momentum ( G4double  aEnergy)
inline

Definition at line 259 of file G4KineticTrack.hh.

260 {
261 // update the4Momentum with aEnergy at constant mass (the4Momentum.mag()
262 // updates theTotal4Momentum as well.
263  G4double newP(0);
265  if ( sqr(aEnergy) > mass2 )
266  {
267  newP = std::sqrt(sqr(aEnergy) - mass2 );
268  } else
269  {
270  aEnergy=std::sqrt(mass2);
271  }
272  Set4Momentum(G4LorentzVector(newP*the4Momentum.vect().unit(), aEnergy));
273 }
G4LorentzVector theTotal4Momentum
Hep3Vector vect() const
G4LorentzVector the4Momentum
Hep3Vector unit() const
void Set4Momentum(const G4LorentzVector &a4Momentum)
T sqr(const T &x)
Definition: templates.hh:145
double G4double
Definition: G4Types.hh:76
CLHEP::HepLorentzVector G4LorentzVector
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Update4Momentum() [2/2]

void G4KineticTrack::Update4Momentum ( const G4ThreeVector aMomentum)
inline

Definition at line 275 of file G4KineticTrack.hh.

276 {
277 // update the4Momentum with aMomentum at constant mass (the4Momentum.mag()
278 // updates theTotal4Momentum as well.
279  G4double newE=std::sqrt(theTotal4Momentum.mag2() + aMomentum.mag2());
280  Set4Momentum(G4LorentzVector(aMomentum, newE));
281 }
G4LorentzVector theTotal4Momentum
double mag2() const
void Set4Momentum(const G4LorentzVector &a4Momentum)
double G4double
Definition: G4Types.hh:76
CLHEP::HepLorentzVector G4LorentzVector
Here is the call graph for this function:

◆ UpdateTrackingMomentum() [1/2]

void G4KineticTrack::UpdateTrackingMomentum ( G4double  aEnergy)
inline

Definition at line 295 of file G4KineticTrack.hh.

296 {
297 // update the4Momentum with aEnergy at constant mass (the4Momentum.mag()
298 // updates theTotal4Momentum as well.
299  G4double newP(0);
301  if ( sqr(aEnergy) > mass2 )
302  {
303  newP = std::sqrt(sqr(aEnergy) - mass2 );
304  } else
305  {
306  aEnergy=std::sqrt(mass2);
307  }
309 }
G4LorentzVector theTotal4Momentum
Hep3Vector vect() const
G4LorentzVector the4Momentum
Hep3Vector unit() const
void SetTrackingMomentum(const G4LorentzVector &a4Momentum)
T sqr(const T &x)
Definition: templates.hh:145
double G4double
Definition: G4Types.hh:76
CLHEP::HepLorentzVector G4LorentzVector
Here is the call graph for this function:

◆ UpdateTrackingMomentum() [2/2]

void G4KineticTrack::UpdateTrackingMomentum ( const G4ThreeVector aMomentum)
inline

Definition at line 311 of file G4KineticTrack.hh.

312 {
313 // update the4Momentum with aMomentum at constant mass (the4Momentum.mag()
314 // updates theTotal4Momentum as well.
315  G4double newE=std::sqrt(theTotal4Momentum.mag2() + aMomentum.mag2());
316  SetTrackingMomentum(G4LorentzVector(aMomentum, newE));
317 }
G4LorentzVector theTotal4Momentum
double mag2() const
void SetTrackingMomentum(const G4LorentzVector &a4Momentum)
double G4double
Definition: G4Types.hh:76
CLHEP::HepLorentzVector G4LorentzVector
Here is the call graph for this function:

Member Data Documentation

◆ nChannels

G4int G4KineticTrack::nChannels
private

Definition at line 176 of file G4KineticTrack.hh.

◆ the4Momentum

G4LorentzVector G4KineticTrack::the4Momentum
private

Definition at line 170 of file G4KineticTrack.hh.

◆ theActualMass

G4double G4KineticTrack::theActualMass
private

Definition at line 178 of file G4KineticTrack.hh.

◆ theActualWidth

G4double* G4KineticTrack::theActualWidth
private

Definition at line 180 of file G4KineticTrack.hh.

◆ theDaughterMass

G4double* G4KineticTrack::theDaughterMass
private

Definition at line 184 of file G4KineticTrack.hh.

◆ theDaughterWidth

G4double* G4KineticTrack::theDaughterWidth
private

Definition at line 185 of file G4KineticTrack.hh.

◆ theDefinition

const G4ParticleDefinition* G4KineticTrack::theDefinition
private

Definition at line 164 of file G4KineticTrack.hh.

◆ theFermi3Momentum

G4LorentzVector G4KineticTrack::theFermi3Momentum
private

Definition at line 171 of file G4KineticTrack.hh.

◆ theFormationTime

G4double G4KineticTrack::theFormationTime
private

Definition at line 166 of file G4KineticTrack.hh.

◆ theNucleon

G4Nucleon* G4KineticTrack::theNucleon
private

Definition at line 174 of file G4KineticTrack.hh.

◆ thePosition

G4ThreeVector G4KineticTrack::thePosition
private

Definition at line 168 of file G4KineticTrack.hh.

◆ theProjectilePotential

G4double G4KineticTrack::theProjectilePotential
private

Definition at line 189 of file G4KineticTrack.hh.

◆ theStateToNucleus

CascadeState G4KineticTrack::theStateToNucleus
private

Definition at line 187 of file G4KineticTrack.hh.

◆ theTotal4Momentum

G4LorentzVector G4KineticTrack::theTotal4Momentum
private

Definition at line 172 of file G4KineticTrack.hh.


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