Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Protected Member Functions
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 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

Constructor & Destructor Documentation

G4InuclParticle::G4InuclParticle ( )
inline

Definition at line 71 of file G4InuclParticle.hh.

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

Definition at line 73 of file G4InuclParticle.hh.

74  : pDP(dynPart), modelId(model) {}
const XML_Char XML_Content * model
G4InuclParticle::G4InuclParticle ( const G4LorentzVector mom,
Model  model = DefaultModel 
)
inline

Definition at line 76 of file G4InuclParticle.hh.

References G4DynamicParticle::Set4Momentum().

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

Definition at line 79 of file G4InuclParticle.hh.

79 {}
G4InuclParticle::G4InuclParticle ( const G4InuclParticle right)
inline

Definition at line 82 of file G4InuclParticle.hh.

83  : pDP(right.pDP), modelId(right.modelId) {}
G4InuclParticle::G4InuclParticle ( G4ParticleDefinition pd,
Model  model = DefaultModel 
)
inlineexplicitprotected

Definition at line 146 of file G4InuclParticle.hh.

References setDefinition().

147  : modelId(model) { setDefinition(pd); }
const XML_Char XML_Content * model
void setDefinition(G4ParticleDefinition *pd)
G4InuclParticle::G4InuclParticle ( G4ParticleDefinition pd,
const G4LorentzVector mom,
G4InuclParticle::Model  model = DefaultModel 
)
protected

Definition at line 43 of file G4InuclParticle.cc.

References setDefinition(), and setMomentum().

46  : modelId(model) {
47  setDefinition(pd);
48  setMomentum(mom);
49 }
const XML_Char XML_Content * model
void setDefinition(G4ParticleDefinition *pd)
void setMomentum(const G4LorentzVector &mom)
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
const XML_Char XML_Content * model

Member Function Documentation

G4double G4InuclParticle::getCharge ( ) const
inline
G4ParticleDefinition* G4InuclParticle::getDefinition ( ) const
inline
const G4DynamicParticle& G4InuclParticle::getDynamicParticle ( ) const
inline

Definition at line 136 of file G4InuclParticle.hh.

Referenced by G4CascadeInterface::makeDynamicParticle().

136  {
137  return pDP;
138  }
G4double G4InuclParticle::getEnergy ( ) const
inline

Definition at line 118 of file G4InuclParticle.hh.

References G4DynamicParticle::GetTotalEnergy().

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

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

Definition at line 142 of file G4InuclParticle.hh.

142 { return modelId; }
G4LorentzVector G4InuclParticle::getMomentum ( ) const
inline
G4double G4InuclParticle::getMomModule ( ) const
inline

Definition at line 122 of file G4InuclParticle.hh.

References G4DynamicParticle::GetTotalMomentum().

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

122  {
123  return pDP.GetTotalMomentum()*CLHEP::MeV/CLHEP::GeV; // From G4 to Bertini units
124  }
G4double GetTotalMomentum() const
bool G4InuclParticle::operator!= ( const G4InuclParticle right)
inline

Definition at line 92 of file G4InuclParticle.hh.

References operator==().

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

Definition at line 53 of file G4InuclParticle.cc.

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

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

Definition at line 88 of file G4InuclParticle.hh.

Referenced by operator!=().

88  {
89  return ( (&right == this) || (pDP == right.pDP) ); // Ignore model code
90  }
void G4InuclParticle::print ( std::ostream &  os) const
virtual

Reimplemented in G4InuclNuclei, and G4InuclElementaryParticle.

Definition at line 92 of file G4InuclParticle.cc.

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

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

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
double py() const
double px() const
double rho() const
double pz() const
void G4InuclParticle::setDefinition ( G4ParticleDefinition pd)
protected

Definition at line 69 of file G4InuclParticle.cc.

References G4DynamicParticle::SetDefinition().

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

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

Definition at line 97 of file G4InuclParticle.hh.

97 { ; }
void G4InuclParticle::setKineticEnergy ( G4double  ekin)
inline

Definition at line 102 of file G4InuclParticle.hh.

References G4DynamicParticle::SetKineticEnergy().

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

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

Definition at line 104 of file G4InuclParticle.hh.

References G4DynamicParticle::SetMass().

Referenced by G4InuclNuclei::setExitationEnergy().

104 { pDP.SetMass(mass*CLHEP::GeV/CLHEP::MeV); }
void SetMass(G4double mass)
void G4InuclParticle::setModel ( Model  model)
inline

Definition at line 141 of file G4InuclParticle.hh.

Referenced by G4InuclNuclei::clear(), G4NonEquilibriumEvaporator::deExcite(), and G4InuclNuclei::fill().

141 { modelId = model; }
const XML_Char XML_Content * model
void G4InuclParticle::setMomentum ( const G4LorentzVector mom)

Definition at line 76 of file G4InuclParticle.cc.

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

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

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 }
void SetMomentum(const G4ThreeVector &momentum)
Hep3Vector vect() const
void Set4Momentum(const G4LorentzVector &momentum)
double G4double
Definition: G4Types.hh:76
G4double getMass() const

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