Geant4  10.02.p03
G4InuclParticle Class Reference

#include <G4InuclParticle.hh>

Inheritance diagram for G4InuclParticle:
Collaboration diagram for G4InuclParticle:

Public Types

enum  Model {
  DefaultModel, bullet, target, EPCollider,
  INCascader, NonEquilib, Equilib, Fissioner,
  BigBanger, PreCompound, Coalescence
}
 

Public Member Functions

 G4InuclParticle ()
 
 G4InuclParticle (const G4DynamicParticle &dynPart, Model model=DefaultModel)
 
 G4InuclParticle (const G4LorentzVector &mom, Model model=DefaultModel)
 
virtual ~G4InuclParticle ()
 
 G4InuclParticle (const G4InuclParticle &right)
 
G4InuclParticleoperator= (const G4InuclParticle &right)
 
bool operator== (const G4InuclParticle &right)
 
bool operator!= (const G4InuclParticle &right)
 
void setEnergy ()
 
void setMomentum (const G4LorentzVector &mom)
 
void setKineticEnergy (G4double ekin)
 
void setMass (G4double mass)
 
G4double getMass () const
 
G4double getCharge () const
 
G4double getKineticEnergy () const
 
G4double getEnergy () const
 
G4double getMomModule () const
 
G4LorentzVector getMomentum () const
 
virtual void print (std::ostream &os) const
 
const G4ParticleDefinitiongetDefinition () const
 
const G4DynamicParticlegetDynamicParticle () const
 
void setModel (Model model)
 
Model getModel () const
 

Protected Member Functions

 G4InuclParticle (const G4ParticleDefinition *pd, Model model=DefaultModel)
 
 G4InuclParticle (const G4ParticleDefinition *pd, const G4LorentzVector &mom, Model model=DefaultModel)
 
 G4InuclParticle (const G4ParticleDefinition *pd, G4double ekin, Model model=DefaultModel)
 
void setDefinition (const G4ParticleDefinition *pd)
 

Private Attributes

G4DynamicParticle pDP
 
Model modelId
 

Detailed Description

Definition at line 53 of file G4InuclParticle.hh.

Member Enumeration Documentation

◆ Model

Constructor & Destructor Documentation

◆ G4InuclParticle() [1/7]

G4InuclParticle::G4InuclParticle ( )
inline

Definition at line 72 of file G4InuclParticle.hh.

Here is the caller graph for this function:

◆ G4InuclParticle() [2/7]

G4InuclParticle::G4InuclParticle ( const G4DynamicParticle dynPart,
Model  model = DefaultModel 
)
inline

Definition at line 74 of file G4InuclParticle.hh.

75  : pDP(dynPart), modelId(model) {}
G4DynamicParticle pDP

◆ G4InuclParticle() [3/7]

G4InuclParticle::G4InuclParticle ( const G4LorentzVector mom,
Model  model = DefaultModel 
)
inline

Definition at line 77 of file G4InuclParticle.hh.

78  : modelId(model) { pDP.Set4Momentum(mom*CLHEP::GeV/CLHEP::MeV); } // Bertini to G4 units
G4DynamicParticle pDP
static const double GeV
void Set4Momentum(const G4LorentzVector &momentum)
static const double MeV
Here is the call graph for this function:

◆ ~G4InuclParticle()

virtual G4InuclParticle::~G4InuclParticle ( )
inlinevirtual

Definition at line 80 of file G4InuclParticle.hh.

80 {}

◆ G4InuclParticle() [4/7]

G4InuclParticle::G4InuclParticle ( const G4InuclParticle right)
inline

Definition at line 83 of file G4InuclParticle.hh.

84  : pDP(right.pDP), modelId(right.modelId) {}
G4DynamicParticle pDP
Here is the call graph for this function:

◆ G4InuclParticle() [5/7]

G4InuclParticle::G4InuclParticle ( const G4ParticleDefinition pd,
Model  model = DefaultModel 
)
inlineexplicitprotected

Definition at line 147 of file G4InuclParticle.hh.

149  : modelId(model) { setDefinition(pd); }
void setDefinition(const G4ParticleDefinition *pd)
Here is the call graph for this function:

◆ G4InuclParticle() [6/7]

G4InuclParticle::G4InuclParticle ( const G4ParticleDefinition pd,
const G4LorentzVector mom,
G4InuclParticle::Model  model = DefaultModel 
)
protected

Definition at line 44 of file G4InuclParticle.cc.

47  : modelId(model) {
48  setDefinition(pd);
49  setMomentum(mom);
50 }
void setDefinition(const G4ParticleDefinition *pd)
void setMomentum(const G4LorentzVector &mom)
Here is the call graph for this function:

◆ G4InuclParticle() [7/7]

G4InuclParticle::G4InuclParticle ( const G4ParticleDefinition pd,
G4double  ekin,
Model  model = DefaultModel 
)
inlineprotected

Definition at line 157 of file G4InuclParticle.hh.

159  : pDP(pd,G4ThreeVector(0.,0.,1.),ekin*CLHEP::GeV/CLHEP::MeV), modelId(model) {}
G4DynamicParticle pDP
CLHEP::Hep3Vector G4ThreeVector
static const double GeV
static const double MeV
Here is the call graph for this function:

Member Function Documentation

◆ getCharge()

G4double G4InuclParticle::getCharge ( ) const
inline

Definition at line 111 of file G4InuclParticle.hh.

111  {
112  return pDP.GetCharge();
113  }
G4DynamicParticle pDP
G4double GetCharge() const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getDefinition()

const G4ParticleDefinition* G4InuclParticle::getDefinition ( ) const
inline

Definition at line 133 of file G4InuclParticle.hh.

133  {
134  return pDP.GetDefinition();
135  }
G4DynamicParticle pDP
G4ParticleDefinition * GetDefinition() const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getDynamicParticle()

const G4DynamicParticle& G4InuclParticle::getDynamicParticle ( ) const
inline

Definition at line 137 of file G4InuclParticle.hh.

137  {
138  return pDP;
139  }
G4DynamicParticle pDP
Here is the caller graph for this function:

◆ getEnergy()

G4double G4InuclParticle::getEnergy ( ) const
inline

Definition at line 119 of file G4InuclParticle.hh.

119  {
120  return pDP.GetTotalEnergy()*CLHEP::MeV/CLHEP::GeV; // From G4 to Bertini units
121  }
G4DynamicParticle pDP
G4double GetTotalEnergy() const
static const double GeV
static const double MeV
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getKineticEnergy()

G4double G4InuclParticle::getKineticEnergy ( ) const
inline

Definition at line 115 of file G4InuclParticle.hh.

115  {
116  return pDP.GetKineticEnergy()*CLHEP::MeV/CLHEP::GeV; // From G4 to Bertini units
117  }
G4DynamicParticle pDP
static const double GeV
G4double GetKineticEnergy() const
static const double MeV
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getMass()

G4double G4InuclParticle::getMass ( ) const
inline

Definition at line 107 of file G4InuclParticle.hh.

107  {
108  return pDP.GetMass()*CLHEP::MeV/CLHEP::GeV; // From G4 to Bertini units
109  }
G4DynamicParticle pDP
G4double GetMass() const
static const double GeV
static const double MeV
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getModel()

Model G4InuclParticle::getModel ( ) const
inline

Definition at line 143 of file G4InuclParticle.hh.

143 { return modelId; }

◆ getMomentum()

G4LorentzVector G4InuclParticle::getMomentum ( ) const
inline

Definition at line 127 of file G4InuclParticle.hh.

127  {
128  return pDP.Get4Momentum()*CLHEP::MeV/CLHEP::GeV; // From G4 to Bertini units
129  }
G4DynamicParticle pDP
static const double GeV
G4LorentzVector Get4Momentum() const
static const double MeV
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getMomModule()

G4double G4InuclParticle::getMomModule ( ) const
inline

Definition at line 123 of file G4InuclParticle.hh.

123  {
124  return pDP.GetTotalMomentum()*CLHEP::MeV/CLHEP::GeV; // From G4 to Bertini units
125  }
G4DynamicParticle pDP
G4double GetTotalMomentum() const
static const double GeV
static const double MeV
Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator!=()

bool G4InuclParticle::operator!= ( const G4InuclParticle right)
inline

Definition at line 93 of file G4InuclParticle.hh.

93  {
94  return !operator==(right);
95  }
bool operator==(const G4InuclParticle &right)
Here is the call graph for this function:

◆ operator=()

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

Definition at line 54 of file G4InuclParticle.cc.

54  {
55  if (this != &right) {
56  pDP = right.pDP;
57  modelId = right.modelId;
58  }
59 
60  return *this;
61 }
G4DynamicParticle pDP
Here is the caller graph for this function:

◆ operator==()

bool G4InuclParticle::operator== ( const G4InuclParticle right)
inline

Definition at line 89 of file G4InuclParticle.hh.

89  {
90  return ( (&right == this) || (pDP == right.pDP) ); // Ignore model code
91  }
G4DynamicParticle pDP
Here is the caller graph for this function:

◆ print()

void G4InuclParticle::print ( std::ostream &  os) const
virtual

Reimplemented in G4InuclNuclei, and G4InuclElementaryParticle.

Definition at line 93 of file G4InuclParticle.cc.

93  {
95  os << " px " << mom.px() << " py " << mom.py() << " pz " << mom.pz()
96  << " pmod " << mom.rho() << " E " << mom.e()
97  << " creator model " << modelId;
98 }
G4LorentzVector getMomentum() const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setDefinition()

void G4InuclParticle::setDefinition ( const G4ParticleDefinition pd)
protected

Definition at line 70 of file G4InuclParticle.cc.

70  {
71  if (pd) pDP.SetDefinition(pd);
72  else pDP = empty;
73 }
G4DynamicParticle pDP
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setEnergy()

void G4InuclParticle::setEnergy ( )
inline

Definition at line 98 of file G4InuclParticle.hh.

98 { ; }
Here is the call graph for this function:

◆ setKineticEnergy()

void G4InuclParticle::setKineticEnergy ( G4double  ekin)
inline

Definition at line 103 of file G4InuclParticle.hh.

G4DynamicParticle pDP
static const double GeV
void SetKineticEnergy(G4double aEnergy)
static const double MeV
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setMass()

void G4InuclParticle::setMass ( G4double  mass)
inline

Definition at line 105 of file G4InuclParticle.hh.

105 { pDP.SetMass(mass*CLHEP::GeV/CLHEP::MeV); }
G4DynamicParticle pDP
static const double GeV
void SetMass(G4double mass)
static const double MeV
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setModel()

void G4InuclParticle::setModel ( Model  model)
inline

Definition at line 142 of file G4InuclParticle.hh.

142 { modelId = model; }
Here is the caller graph for this function:

◆ setMomentum()

void G4InuclParticle::setMomentum ( const G4LorentzVector mom)

Definition at line 77 of file G4InuclParticle.cc.

77  {
78  G4double mass = getMass();
79  if (std::fabs(mass-mom.m()) <= 1e-5)
80  pDP.Set4Momentum(mom*GeV/MeV); // From Bertini to G4 units
81  else
82  pDP.SetMomentum(mom.vect()*GeV/MeV); // Don't change current mass!
83 }
G4DynamicParticle pDP
static const double MeV
Definition: G4SIunits.hh:211
void SetMomentum(const G4ThreeVector &momentum)
Hep3Vector vect() const
static const double GeV
Definition: G4SIunits.hh:214
void Set4Momentum(const G4LorentzVector &momentum)
double G4double
Definition: G4Types.hh:76
G4double getMass() const
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ modelId

Model G4InuclParticle::modelId
private

Definition at line 165 of file G4InuclParticle.hh.

◆ pDP

G4DynamicParticle G4InuclParticle::pDP
private

Definition at line 164 of file G4InuclParticle.hh.


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