Geant4-11
Public Types | Public Member Functions | Protected Member Functions | Private Attributes
G4InuclParticle Class Reference

#include <G4InuclParticle.hh>

Inheritance diagram for G4InuclParticle:
G4InuclElementaryParticle G4InuclNuclei

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 G4InuclParticle &right)
 
 G4InuclParticle (const G4LorentzVector &mom, Model model=DefaultModel)
 
G4double getCharge () const
 
const G4ParticleDefinitiongetDefinition () const
 
const G4DynamicParticlegetDynamicParticle () const
 
G4double getEnergy () const
 
G4double getKineticEnergy () const
 
G4double getMass () const
 
Model getModel () const
 
G4LorentzVector getMomentum () const
 
G4double getMomModule () const
 
G4bool operator!= (const G4InuclParticle &right)
 
G4InuclParticleoperator= (const G4InuclParticle &right)
 
G4bool operator== (const G4InuclParticle &right)
 
virtual void print (std::ostream &os) const
 
void setEnergy ()
 
void setKineticEnergy (G4double ekin)
 
void setMass (G4double mass)
 
void setModel (Model model)
 
void setMomentum (const G4LorentzVector &mom)
 
virtual ~G4InuclParticle ()
 

Protected Member Functions

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

Private Attributes

Model modelId
 
G4DynamicParticle pDP
 

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.

◆ 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) {}
G4DynamicParticle pDP

◆ 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)
static constexpr double GeV
static constexpr double MeV

References CLHEP::GeV, CLHEP::MeV, pDP, and G4DynamicParticle::Set4Momentum().

◆ ~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)

References setDefinition().

◆ 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)

References setDefinition(), and setMomentum().

◆ 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()

G4double G4InuclParticle::getCharge ( ) const
inline

◆ getDefinition()

const G4ParticleDefinition * G4InuclParticle::getDefinition ( ) const
inline

◆ getDynamicParticle()

const G4DynamicParticle & G4InuclParticle::getDynamicParticle ( ) const
inline

Definition at line 136 of file G4InuclParticle.hh.

136 {
137 return pDP;
138 }

References pDP.

Referenced by G4CascadeInterface::makeDynamicParticle().

◆ getEnergy()

G4double G4InuclParticle::getEnergy ( ) const
inline

◆ getKineticEnergy()

G4double G4InuclParticle::getKineticEnergy ( ) const
inline

◆ getMass()

G4double G4InuclParticle::getMass ( ) const
inline

◆ getModel()

Model G4InuclParticle::getModel ( ) const
inline

Definition at line 142 of file G4InuclParticle.hh.

142{ return modelId; }

References modelId.

◆ getMomentum()

G4LorentzVector G4InuclParticle::getMomentum ( ) const
inline

◆ getMomModule()

G4double G4InuclParticle::getMomModule ( ) const
inline

◆ 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)

References operator==().

◆ 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}

References modelId, and pDP.

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 }

References pDP.

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

References CLHEP::HepLorentzVector::e(), getMomentum(), modelId, CLHEP::HepLorentzVector::px(), CLHEP::HepLorentzVector::py(), CLHEP::HepLorentzVector::pz(), and CLHEP::HepLorentzVector::rho().

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

◆ setDefinition()

void G4InuclParticle::setDefinition ( const G4ParticleDefinition pd)
protected

◆ setEnergy()

void G4InuclParticle::setEnergy ( )
inline

Definition at line 97 of file G4InuclParticle.hh.

97{ ; }

◆ setKineticEnergy()

void G4InuclParticle::setKineticEnergy ( G4double  ekin)
inline

◆ setMass()

void G4InuclParticle::setMass ( G4double  mass)
inline

Definition at line 104 of file G4InuclParticle.hh.

void SetMass(G4double mass)

References CLHEP::GeV, CLHEP::MeV, pDP, and G4DynamicParticle::SetMass().

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}
static constexpr double GeV
Definition: G4SIunits.hh:203
static constexpr double MeV
Definition: G4SIunits.hh:200
double G4double
Definition: G4Types.hh:83
Hep3Vector vect() const
void SetMomentum(const G4ThreeVector &momentum)
G4double getMass() const

References getMass(), GeV, CLHEP::HepLorentzVector::m(), MeV, pDP, G4DynamicParticle::Set4Momentum(), G4DynamicParticle::SetMomentum(), and CLHEP::HepLorentzVector::vect().

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

Field Documentation

◆ modelId

Model G4InuclParticle::modelId
private

Definition at line 164 of file G4InuclParticle.hh.

Referenced by getModel(), operator=(), print(), and setModel().

◆ pDP

G4DynamicParticle G4InuclParticle::pDP
private

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