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

#include <G4InuclElementaryParticle.hh>

+ Inheritance diagram for G4InuclElementaryParticle:

Public Member Functions

 G4InuclElementaryParticle ()
 
 G4InuclElementaryParticle (G4int ityp, Model model=DefaultModel)
 
 G4InuclElementaryParticle (const G4DynamicParticle &dynPart, Model model=DefaultModel)
 
 G4InuclElementaryParticle (const G4LorentzVector &mom, G4int ityp, Model model=DefaultModel)
 
 G4InuclElementaryParticle (G4double ekin, G4int ityp, Model model=DefaultModel)
 
 G4InuclElementaryParticle (const G4LorentzVector &mom, G4ParticleDefinition *pd, Model model=DefaultModel)
 
 G4InuclElementaryParticle (const G4InuclElementaryParticle &right)
 
G4InuclElementaryParticleoperator= (const G4InuclElementaryParticle &right)
 
void fill (G4int ityp, Model model=DefaultModel)
 
void fill (const G4LorentzVector &mom, G4int ityp, Model model=DefaultModel)
 
void fill (G4double ekin, G4int ityp, Model model=DefaultModel)
 
void fill (const G4LorentzVector &mom, G4ParticleDefinition *pd, Model model=DefaultModel)
 
void setType (G4int ityp)
 
G4int type () const
 
G4bool isPhoton () const
 
G4bool pion () const
 
G4bool nucleon () const
 
G4bool antinucleon () const
 
G4int baryon () const
 
G4bool antibaryon () const
 
G4bool hyperon () const
 
G4bool quasi_deutron () const
 
G4int getStrangeness () const
 
G4bool valid () const
 
virtual void print (std::ostream &os) const
 
- Public Member Functions inherited from G4InuclParticle
 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
 

Static Public Member Functions

static G4int type (const G4ParticleDefinition *pd)
 
static G4int getStrangeness (G4int type)
 
static G4double getParticleMass (G4int type)
 

Static Protected Member Functions

static G4ParticleDefinitionmakeDefinition (G4int ityp)
 

Additional Inherited Members

- Public Types inherited from G4InuclParticle
enum  Model {
  DefaultModel , bullet , target , EPCollider ,
  INCascader , NonEquilib , Equilib , Fissioner ,
  BigBanger , PreCompound , Coalescence
}
 
- Protected Member Functions inherited from G4InuclParticle
 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 57 of file G4InuclElementaryParticle.hh.

Constructor & Destructor Documentation

◆ G4InuclElementaryParticle() [1/7]

G4InuclElementaryParticle::G4InuclElementaryParticle ( )
inline

Definition at line 59 of file G4InuclElementaryParticle.hh.

◆ G4InuclElementaryParticle() [2/7]

G4InuclElementaryParticle::G4InuclElementaryParticle ( G4int  ityp,
Model  model = DefaultModel 
)
inline

Definition at line 62 of file G4InuclElementaryParticle.hh.

63 : G4InuclParticle(makeDefinition(ityp), model) {}
static G4ParticleDefinition * makeDefinition(G4int ityp)

◆ G4InuclElementaryParticle() [3/7]

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

Definition at line 65 of file G4InuclElementaryParticle.hh.

67 : G4InuclParticle(dynPart, model) {}

◆ G4InuclElementaryParticle() [4/7]

G4InuclElementaryParticle::G4InuclElementaryParticle ( const G4LorentzVector mom,
G4int  ityp,
Model  model = DefaultModel 
)
inline

Definition at line 69 of file G4InuclElementaryParticle.hh.

71 : G4InuclParticle(makeDefinition(ityp), mom, model) {}

◆ G4InuclElementaryParticle() [5/7]

G4InuclElementaryParticle::G4InuclElementaryParticle ( G4double  ekin,
G4int  ityp,
Model  model = DefaultModel 
)
inline

Definition at line 73 of file G4InuclElementaryParticle.hh.

75 : G4InuclParticle(makeDefinition(ityp), ekin, model) {}

◆ G4InuclElementaryParticle() [6/7]

G4InuclElementaryParticle::G4InuclElementaryParticle ( const G4LorentzVector mom,
G4ParticleDefinition pd,
Model  model = DefaultModel 
)
inline

Definition at line 78 of file G4InuclElementaryParticle.hh.

80 : G4InuclParticle(pd, mom, model) {}

◆ G4InuclElementaryParticle() [7/7]

G4InuclElementaryParticle::G4InuclElementaryParticle ( const G4InuclElementaryParticle right)
inline

Definition at line 83 of file G4InuclElementaryParticle.hh.

84 : G4InuclParticle(right) {}

Member Function Documentation

◆ antibaryon()

G4bool G4InuclElementaryParticle::antibaryon ( ) const
inline

Definition at line 122 of file G4InuclElementaryParticle.hh.

122{ return baryon() < 0; }

◆ antinucleon()

G4bool G4InuclElementaryParticle::antinucleon ( ) const
inline

◆ baryon()

G4int G4InuclElementaryParticle::baryon ( ) const
inline

Definition at line 118 of file G4InuclElementaryParticle.hh.

118 { // Can use as a bool (!=0 ==> true)
119 return getDefinition()->GetBaryonNumber();
120 }
G4ParticleDefinition * getDefinition() const

Referenced by antibaryon(), G4CascadeCheckBalance::collide(), hyperon(), and G4IntraNucleiCascader::setupCascade().

◆ fill() [1/4]

void G4InuclElementaryParticle::fill ( const G4LorentzVector mom,
G4int  ityp,
G4InuclParticle::Model  model = DefaultModel 
)

Definition at line 181 of file G4InuclElementaryParticle.cc.

182 {
183 setType(ityp);
184 setMomentum(mom);
185 setModel(model);
186}
void setMomentum(const G4LorentzVector &mom)
void setModel(Model model)

◆ fill() [2/4]

void G4InuclElementaryParticle::fill ( const G4LorentzVector mom,
G4ParticleDefinition pd,
G4InuclParticle::Model  model = DefaultModel 
)

Definition at line 195 of file G4InuclElementaryParticle.cc.

197 {
198 setDefinition(pd);
199 setMomentum(mom);
200 setModel(model);
201}
void setDefinition(G4ParticleDefinition *pd)

◆ fill() [3/4]

void G4InuclElementaryParticle::fill ( G4double  ekin,
G4int  ityp,
G4InuclParticle::Model  model = DefaultModel 
)

Definition at line 188 of file G4InuclElementaryParticle.cc.

189 {
190 setType(ityp);
191 setKineticEnergy(ekin);
192 setModel(model);
193}
void setKineticEnergy(G4double ekin)

◆ fill() [4/4]

void G4InuclElementaryParticle::fill ( G4int  ityp,
Model  model = DefaultModel 
)
inline

◆ getParticleMass()

G4double G4InuclElementaryParticle::getParticleMass ( G4int  type)
static

◆ getStrangeness() [1/2]

G4int G4InuclElementaryParticle::getStrangeness ( ) const
inline

◆ getStrangeness() [2/2]

G4int G4InuclElementaryParticle::getStrangeness ( G4int  type)
static

Definition at line 212 of file G4InuclElementaryParticle.cc.

212 {
214 return pd ? (pd->GetQuarkContent(3) - pd->GetAntiQuarkContent(3)) : 0;
215}
G4int GetQuarkContent(G4int flavor) const
G4int GetAntiQuarkContent(G4int flavor) const

◆ hyperon()

G4bool G4InuclElementaryParticle::hyperon ( ) const
inline

Definition at line 124 of file G4InuclElementaryParticle.hh.

124{ return (baryon() && getStrangeness()); }

Referenced by G4IntraNucleiCascader::processTrappedParticle().

◆ isPhoton()

G4bool G4InuclElementaryParticle::isPhoton ( ) const
inline

◆ makeDefinition()

G4ParticleDefinition * G4InuclElementaryParticle::makeDefinition ( G4int  ityp)
staticprotected

Definition at line 86 of file G4InuclElementaryParticle.cc.

86 {
87 switch(ityp) {
88 case proton: return G4Proton::Definition(); break;
89 case neutron: return G4Neutron::Definition(); break;
90 case pionPlus: return G4PionPlus::Definition(); break;
91 case pionMinus: return G4PionMinus::Definition(); break;
92 case pionZero: return G4PionZero::Definition(); break;
93 case photon: return G4Gamma::Definition(); break;
94 case kaonPlus: return G4KaonPlus::Definition(); break;
95 case kaonMinus: return G4KaonMinus::Definition(); break;
96 case kaonZero: return G4KaonZero::Definition(); break;
97 case kaonZeroBar: return G4AntiKaonZero::Definition(); break;
98 case lambda: return G4Lambda::Definition(); break;
99 case sigmaPlus: return G4SigmaPlus::Definition(); break;
100 case sigmaZero: return G4SigmaZero::Definition(); break;
101 case sigmaMinus: return G4SigmaMinus::Definition(); break;
102 case xiZero: return G4XiZero::Definition(); break;
103 case xiMinus: return G4XiMinus::Definition(); break;
104 case omegaMinus: return G4OmegaMinus::Definition(); break;
105 // NOTE: The four light nuclei "particles" are actually G4Ions
106 case deuteron: return G4Deuteron::Definition(); break;
107 case triton: return G4Triton::Definition(); break;
108 case He3: return G4He3::Definition(); break;
109 case alpha: return G4Alpha::Definition(); break;
110 case antiProton: return G4AntiProton::Definition(); break;
111 case antiNeutron: return G4AntiNeutron::Definition(); break;
112 // NOTE: The the four light antinuclei "particles" are actually G4Ions
113 case antiDeuteron: return G4AntiDeuteron::Definition(); break;
114 case antiTriton: return G4AntiTriton::Definition(); break;
115 case antiHe3: return G4AntiHe3::Definition(); break;
116 case antiAlpha: return G4AntiAlpha::Definition(); break;
117 // NOTE: The three unbound dibaryons are local Bertini classes
118 case diproton: return G4Diproton::Definition(); break;
119 case unboundPN: return G4UnboundPN::Definition(); break;
120 case dineutron: return G4Dineutron::Definition(); break;
121 default:
122 G4cerr << " uups, unknown particle type " << ityp << G4endl;
123 }
124
125 return 0;
126}
@ photon
@ neutron
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT std::ostream G4cerr
static G4Alpha * Definition()
Definition: G4Alpha.cc:49
static G4AntiAlpha * Definition()
Definition: G4AntiAlpha.cc:49
static G4AntiDeuteron * Definition()
static G4AntiHe3 * Definition()
Definition: G4AntiHe3.cc:50
static G4AntiKaonZero * Definition()
static G4AntiNeutron * Definition()
static G4AntiProton * Definition()
Definition: G4AntiProton.cc:51
static G4AntiTriton * Definition()
Definition: G4AntiTriton.cc:50
static G4Deuteron * Definition()
Definition: G4Deuteron.cc:50
static G4Dineutron * Definition()
Definition: G4Dineutron.cc:67
static G4Diproton * Definition()
Definition: G4Diproton.cc:67
static G4Gamma * Definition()
Definition: G4Gamma.cc:49
static G4He3 * Definition()
Definition: G4He3.cc:50
static G4KaonMinus * Definition()
Definition: G4KaonMinus.cc:54
static G4KaonPlus * Definition()
Definition: G4KaonPlus.cc:54
static G4KaonZero * Definition()
Definition: G4KaonZero.cc:53
static G4Lambda * Definition()
Definition: G4Lambda.cc:53
static G4Neutron * Definition()
Definition: G4Neutron.cc:54
static G4OmegaMinus * Definition()
Definition: G4OmegaMinus.cc:53
static G4PionMinus * Definition()
Definition: G4PionMinus.cc:52
static G4PionPlus * Definition()
Definition: G4PionPlus.cc:52
static G4PionZero * Definition()
Definition: G4PionZero.cc:54
static G4Proton * Definition()
Definition: G4Proton.cc:49
static G4SigmaMinus * Definition()
Definition: G4SigmaMinus.cc:53
static G4SigmaPlus * Definition()
Definition: G4SigmaPlus.cc:53
static G4SigmaZero * Definition()
Definition: G4SigmaZero.cc:52
static G4Triton * Definition()
Definition: G4Triton.cc:50
static G4UnboundPN * Definition()
Definition: G4UnboundPN.cc:66
static G4XiMinus * Definition()
Definition: G4XiMinus.cc:53
static G4XiZero * Definition()
Definition: G4XiZero.cc:53

Referenced by getParticleMass(), getStrangeness(), and setType().

◆ nucleon()

◆ operator=()

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

Definition at line 206 of file G4InuclElementaryParticle.cc.

206 {
208 return *this;
209}
G4InuclParticle & operator=(const G4InuclParticle &right)

◆ pion()

G4bool G4InuclElementaryParticle::pion ( ) const
inline

◆ print()

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

Reimplemented from G4InuclParticle.

Definition at line 225 of file G4InuclElementaryParticle.cc.

225 {
227 os << G4endl << " Particle: " << getDefinition()->GetParticleName()
228 << " type " << type() << " mass " << getMass()
229 << " ekin " << getKineticEnergy();
230}
virtual void print(std::ostream &os) const
G4double getKineticEnergy() const
G4double getMass() const
const G4String & GetParticleName() const

◆ quasi_deutron()

G4bool G4InuclElementaryParticle::quasi_deutron ( ) const
inline

◆ setType()

void G4InuclElementaryParticle::setType ( G4int  ityp)

Definition at line 174 of file G4InuclElementaryParticle.cc.

174 {
176}

Referenced by fill().

◆ type() [1/2]

◆ type() [2/2]

G4int G4InuclElementaryParticle::type ( const G4ParticleDefinition pd)
static

Definition at line 130 of file G4InuclElementaryParticle.cc.

130 {
131 if (pd == 0) return 0;
132 if (pd == G4Proton::Definition()) return proton;
133 if (pd == G4Neutron::Definition()) return neutron;
134 if (pd == G4PionPlus::Definition()) return pionPlus;
135 if (pd == G4PionMinus::Definition()) return pionMinus;
136 if (pd == G4PionZero::Definition()) return pionZero;
137 if (pd == G4Gamma::Definition()) return photon;
138 if (pd == G4KaonPlus::Definition()) return kaonPlus;
139 if (pd == G4KaonMinus::Definition()) return kaonMinus;
140 if (pd == G4KaonZero::Definition()) return kaonZero;
141 if (pd == G4AntiKaonZero::Definition()) return kaonZeroBar;
142 if (pd == G4Lambda::Definition()) return lambda;
143 if (pd == G4SigmaPlus::Definition()) return sigmaPlus;
144 if (pd == G4SigmaZero::Definition()) return sigmaZero;
145 if (pd == G4SigmaMinus::Definition()) return sigmaMinus;
146 if (pd == G4XiZero::Definition()) return xiZero;
147 if (pd == G4XiMinus::Definition()) return xiMinus;
148 if (pd == G4OmegaMinus::Definition()) return omegaMinus;
149 // NOTE: The four light nuclei "particles" are actually G4Ions
150 if (pd == G4Deuteron::Definition()) return deuteron;
151 if (pd == G4Triton::Definition()) return triton;
152 if (pd == G4He3::Definition()) return He3;
153 if (pd == G4Alpha::Definition()) return alpha;
154 if (pd == G4AntiProton::Definition()) return antiProton;
155 if (pd == G4AntiNeutron::Definition()) return antiNeutron;
156 // NOTE: The the four light antinuclei "particles" are actually G4Ions
157 if (pd == G4AntiDeuteron::Definition()) return antiDeuteron;
158 if (pd == G4AntiTriton::Definition()) return antiTriton;
159 if (pd == G4AntiHe3::Definition()) return antiHe3;
160 if (pd == G4AntiAlpha::Definition()) return antiAlpha;
161 // NOTE: The three unbound dibaryons are local Bertini classes
162 if (pd == G4Diproton::Definition()) return diproton;
163 if (pd == G4UnboundPN::Definition()) return unboundPN;
164 if (pd == G4Dineutron::Definition()) return dineutron;
165
166 // Weak neutral kaons must be mixed back to strong (strangeness states)
168 return ((G4UniformRand() > 0.5) ? kaonZero : kaonZeroBar);
169 }
170
171 return 0; // Unknown objects return zero (e.g., nuclei)
172}
#define G4UniformRand()
Definition: Randomize.hh:53
static G4KaonZeroLong * Definition()
static G4KaonZeroShort * Definition()

◆ valid()

G4bool G4InuclElementaryParticle::valid ( ) const
inline

Definition at line 130 of file G4InuclElementaryParticle.hh.

130{ return type()>0; }

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