Geant4 10.7.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)
 
G4bool operator== (const G4InuclParticle &right)
 
G4bool 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)
 

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 ( const G4ParticleDefinition pd,
Model  model = DefaultModel 
)
inlineexplicitprotected

Definition at line 146 of file G4InuclParticle.hh.

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

◆ G4InuclParticle() [6/7]

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

Definition at line 43 of file G4InuclParticle.cc.

46 : modelId(model) {
47 setDefinition(pd);
48 setMomentum(mom);
49}
void setMomentum(const G4LorentzVector &mom)

◆ G4InuclParticle() [7/7]

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

Definition at line 156 of file G4InuclParticle.hh.

158 : 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!=()

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

Definition at line 92 of file G4InuclParticle.hh.

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

◆ operator=()

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

Definition at line 53 of file G4InuclParticle.cc.

53 {
54 if (this != &right) {
55 pDP = right.pDP;
56 modelId = right.modelId;
57 }
58
59 return *this;
60}

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

◆ operator==()

G4bool 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 92 of file G4InuclParticle.cc.

92 {
94 os << " px " << mom.px() << " py " << mom.py() << " pz " << mom.pz()
95 << " pmod " << mom.rho() << " E " << mom.e()
96 << " creator model " << modelId;
97}
G4LorentzVector getMomentum() const

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

◆ setDefinition()

void G4InuclParticle::setDefinition ( const G4ParticleDefinition pd)
protected

Definition at line 69 of file G4InuclParticle.cc.

69 {
70 if (pd) pDP.SetDefinition(pd);
71 else pDP = empty;
72}
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)

Referenced by G4InuclNuclei::clear(), G4InuclElementaryParticle::fill(), G4InuclNuclei::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 76 of file G4InuclParticle.cc.

76 {
77 G4double mass = getMass();
78 if (std::fabs(mass-mom.m()) <= 1e-5)
79 pDP.Set4Momentum(mom*GeV/MeV); // From Bertini to G4 units
80 else
81 pDP.SetMomentum(mom.vect()*GeV/MeV); // Don't change current mass!
82}
double G4double
Definition: G4Types.hh:83
Hep3Vector vect() const
void SetMomentum(const G4ThreeVector &momentum)
G4double getMass() const

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


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