Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4InuclParticle Class Reference

#include <G4InuclParticle.hh>

+ Inheritance 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
 
G4ParticleDefinitiongetDefinition () const
 
const G4DynamicParticlegetDynamicParticle () const
 
void setModel (Model model)
 
Model getModel () const
 

Protected Member Functions

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

Detailed Description

Definition at line 52 of file G4InuclParticle.hh.

Member Enumeration Documentation

◆ Model

Enumerator
DefaultModel 
bullet 
target 
EPCollider 
INCascader 
NonEquilib 
Equilib 
Fissioner 
BigBanger 
PreCompound 
Coalescence 

Definition at line 66 of file G4InuclParticle.hh.

Constructor & Destructor Documentation

◆ G4InuclParticle() [1/7]

G4InuclParticle::G4InuclParticle ( )
inline

Definition at line 71 of file G4InuclParticle.hh.

71: modelId(DefaultModel) {}

◆ G4InuclParticle() [2/7]

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

Definition at line 73 of file G4InuclParticle.hh.

74 : pDP(dynPart), modelId(model) {}

◆ G4InuclParticle() [3/7]

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

Definition at line 76 of file G4InuclParticle.hh.

77 : modelId(model) { pDP.Set4Momentum(mom*CLHEP::GeV/CLHEP::MeV); } // Bertini to G4 units
void Set4Momentum(const G4LorentzVector &momentum)

◆ ~G4InuclParticle()

virtual G4InuclParticle::~G4InuclParticle ( )
inlinevirtual

Definition at line 79 of file G4InuclParticle.hh.

79{}

◆ G4InuclParticle() [4/7]

G4InuclParticle::G4InuclParticle ( const G4InuclParticle right)
inline

Definition at line 82 of file G4InuclParticle.hh.

83 : pDP(right.pDP), modelId(right.modelId) {}

◆ G4InuclParticle() [5/7]

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

Definition at line 146 of file G4InuclParticle.hh.

147 : modelId(model) { setDefinition(pd); }
void setDefinition(G4ParticleDefinition *pd)

◆ G4InuclParticle() [6/7]

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

Definition at line 40 of file G4InuclParticle.cc.

43 : modelId(model) {
44 setDefinition(pd);
45 setMomentum(mom);
46}
void setMomentum(const G4LorentzVector &mom)

◆ G4InuclParticle() [7/7]

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

Definition at line 155 of file G4InuclParticle.hh.

157 : pDP(pd,G4ThreeVector(0.,0.,1.),ekin*CLHEP::GeV/CLHEP::MeV), modelId(model) {}
CLHEP::Hep3Vector G4ThreeVector

Member Function Documentation

◆ getCharge()

◆ getDefinition()

◆ getDynamicParticle()

const G4DynamicParticle & G4InuclParticle::getDynamicParticle ( ) const
inline

Definition at line 136 of file G4InuclParticle.hh.

136 {
137 return pDP;
138 }

Referenced by G4CascadeInterface::makeDynamicParticle().

◆ getEnergy()

G4double G4InuclParticle::getEnergy ( ) const
inline

Definition at line 118 of file G4InuclParticle.hh.

118 {
119 return pDP.GetTotalEnergy()*CLHEP::MeV/CLHEP::GeV; // From G4 to Bertini units
120 }
G4double GetTotalEnergy() const

Referenced by G4CascadeInterface::checkFinalResult(), G4IntraNucleiCascader::decayTrappedParticle(), G4NucleiModel::initializeCascad(), and G4ParticleLargerBeta::operator()().

◆ getKineticEnergy()

◆ getMass()

◆ getModel()

Model G4InuclParticle::getModel ( ) const
inline

Definition at line 142 of file G4InuclParticle.hh.

142{ return modelId; }

◆ getMomentum()

◆ getMomModule()

G4double G4InuclParticle::getMomModule ( ) const
inline

Definition at line 122 of file G4InuclParticle.hh.

122 {
123 return pDP.GetTotalMomentum()*CLHEP::MeV/CLHEP::GeV; // From G4 to Bertini units
124 }
G4double GetTotalMomentum() const

Referenced by G4ElementaryParticleCollider::collide(), and G4ParticleLargerBeta::operator()().

◆ operator!=()

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

Definition at line 92 of file G4InuclParticle.hh.

92 {
93 return !operator==(right);
94 }
bool operator==(const G4InuclParticle &right)

◆ operator=()

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

Definition at line 50 of file G4InuclParticle.cc.

50 {
51 pDP = right.pDP;
52 modelId = right.modelId;
53
54 return *this;
55}

Referenced by G4InuclElementaryParticle::operator=(), and G4InuclNuclei::operator=().

◆ operator==()

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

Definition at line 88 of file G4InuclParticle.hh.

88 {
89 return ( (&right == this) || (pDP == right.pDP) ); // Ignore model code
90 }

Referenced by operator!=().

◆ print()

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

Reimplemented in G4InuclElementaryParticle, and G4InuclNuclei.

Definition at line 85 of file G4InuclParticle.cc.

85 {
87 os << " px " << mom.px() << " py " << mom.py() << " pz " << mom.pz()
88 << " pmod " << mom.rho() << " E " << mom.e()
89 << " creator model " << modelId;
90}
G4LorentzVector getMomentum() const

Referenced by operator<<(), G4InuclElementaryParticle::print(), and G4InuclNuclei::print().

◆ setDefinition()

void G4InuclParticle::setDefinition ( G4ParticleDefinition pd)
protected

Definition at line 59 of file G4InuclParticle.cc.

59 {
60 if (pd) pDP.SetDefinition(pd);
61 else {
62 static const G4DynamicParticle empty; // To zero out everything
63 pDP = empty;
64 }
65}
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)

Referenced by G4InuclNuclei::clear(), G4InuclNuclei::fill(), G4InuclElementaryParticle::fill(), G4InuclParticle(), and G4InuclElementaryParticle::setType().

◆ setEnergy()

void G4InuclParticle::setEnergy ( )
inline

Definition at line 97 of file G4InuclParticle.hh.

97{ ; }

◆ setKineticEnergy()

void G4InuclParticle::setKineticEnergy ( G4double  ekin)
inline

Definition at line 102 of file G4InuclParticle.hh.

102{ pDP.SetKineticEnergy(ekin*CLHEP::GeV/CLHEP::MeV); }
void SetKineticEnergy(G4double aEnergy)

Referenced by G4InuclNuclei::fill(), G4InuclElementaryParticle::fill(), and G4InuclNuclei::setExitationEnergy().

◆ setMass()

void G4InuclParticle::setMass ( G4double  mass)
inline

Definition at line 104 of file G4InuclParticle.hh.

104{ pDP.SetMass(mass*CLHEP::GeV/CLHEP::MeV); }
void SetMass(G4double mass)

Referenced by G4InuclNuclei::setExitationEnergy().

◆ setModel()

void G4InuclParticle::setModel ( Model  model)
inline

◆ setMomentum()

void G4InuclParticle::setMomentum ( const G4LorentzVector mom)

Definition at line 69 of file G4InuclParticle.cc.

69 {
70 G4double mass = getMass();
71 if (std::fabs(mass-mom.m()) <= 1e-5)
72 pDP.Set4Momentum(mom*GeV/MeV); // From Bertini to G4 units
73 else
74 pDP.SetMomentum(mom.vect()*GeV/MeV); // Don't change current mass!
75}
double G4double
Definition: G4Types.hh:64
Hep3Vector vect() const
void SetMomentum(const G4ThreeVector &momentum)
G4double getMass() const

Referenced by G4NonEquilibriumEvaporator::collide(), G4InuclNuclei::fill(), G4InuclElementaryParticle::fill(), G4InuclParticle(), and G4CascadParticle::updateParticleMomentum().


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