Geant4 10.7.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, const 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, const G4ParticleDefinition *pd, Model model=DefaultModel)
 
void setType (G4int ityp)
 
G4int type () const
 
G4bool valid () const
 
G4bool isPhoton () const
 
G4bool isMuon () const
 
G4bool isElectron () const
 
G4bool isNeutrino () 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
 
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)
 
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
 

Static Public Member Functions

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

Static Protected Member Functions

static const 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 (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 58 of file G4InuclElementaryParticle.hh.

Constructor & Destructor Documentation

◆ G4InuclElementaryParticle() [1/7]

G4InuclElementaryParticle::G4InuclElementaryParticle ( )
inline

Definition at line 60 of file G4InuclElementaryParticle.hh.

◆ G4InuclElementaryParticle() [2/7]

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

Definition at line 63 of file G4InuclElementaryParticle.hh.

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

◆ G4InuclElementaryParticle() [3/7]

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

Definition at line 66 of file G4InuclElementaryParticle.hh.

68 : G4InuclParticle(dynPart, model) {}

◆ G4InuclElementaryParticle() [4/7]

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

Definition at line 70 of file G4InuclElementaryParticle.hh.

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

◆ G4InuclElementaryParticle() [5/7]

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

Definition at line 74 of file G4InuclElementaryParticle.hh.

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

◆ G4InuclElementaryParticle() [6/7]

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

Definition at line 79 of file G4InuclElementaryParticle.hh.

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

◆ G4InuclElementaryParticle() [7/7]

G4InuclElementaryParticle::G4InuclElementaryParticle ( const G4InuclElementaryParticle right)
inline

Definition at line 85 of file G4InuclElementaryParticle.hh.

86 : G4InuclParticle(right) {}

Member Function Documentation

◆ antibaryon()

G4bool G4InuclElementaryParticle::antibaryon ( ) const
inline

Definition at line 123 of file G4InuclElementaryParticle.hh.

123{ return baryon() < 0; }

◆ antinucleon()

G4bool G4InuclElementaryParticle::antinucleon ( ) const
inline

◆ baryon()

G4int G4InuclElementaryParticle::baryon ( ) const
inline

Definition at line 119 of file G4InuclElementaryParticle.hh.

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

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

◆ fill() [1/4]

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

Definition at line 193 of file G4InuclElementaryParticle.cc.

195 {
196 setDefinition(pd);
197 setMomentum(mom);
198 setModel(model);
199}
void setMomentum(const G4LorentzVector &mom)
void setDefinition(const G4ParticleDefinition *pd)
void setModel(Model model)

◆ fill() [2/4]

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

Definition at line 179 of file G4InuclElementaryParticle.cc.

180 {
181 setType(ityp);
182 setMomentum(mom);
183 setModel(model);
184}

◆ fill() [3/4]

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

Definition at line 186 of file G4InuclElementaryParticle.cc.

187 {
188 setType(ityp);
189 setKineticEnergy(ekin);
190 setModel(model);
191}
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 210 of file G4InuclElementaryParticle.cc.

210 {
211 const G4ParticleDefinition* pd = makeDefinition(ityp);
212 return pd ? (pd->GetQuarkContent(3) - pd->GetAntiQuarkContent(3)) : 0;
213}
G4int GetQuarkContent(G4int flavor) const
G4int GetAntiQuarkContent(G4int flavor) const

◆ hyperon()

G4bool G4InuclElementaryParticle::hyperon ( ) const
inline

Definition at line 125 of file G4InuclElementaryParticle.hh.

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

Referenced by G4IntraNucleiCascader::processTrappedParticle().

◆ isElectron()

G4bool G4InuclElementaryParticle::isElectron ( ) const
inline

Definition at line 113 of file G4InuclElementaryParticle.hh.

G4bool isElectron(G4int ityp)

Referenced by G4InuclCollider::photonuclearOkay().

◆ isMuon()

G4bool G4InuclElementaryParticle::isMuon ( ) const
inline

◆ isNeutrino()

G4bool G4InuclElementaryParticle::isNeutrino ( ) const
inline

◆ isPhoton()

G4bool G4InuclElementaryParticle::isPhoton ( ) const
inline

◆ makeDefinition()

const G4ParticleDefinition * G4InuclElementaryParticle::makeDefinition ( G4int  ityp)
staticprotected

Definition at line 57 of file G4InuclElementaryParticle.cc.

57 {
58 switch(ityp) {
59 case proton: return G4Proton::Definition(); break;
60 case neutron: return G4Neutron::Definition(); break;
61 case pionPlus: return G4PionPlus::Definition(); break;
62 case pionMinus: return G4PionMinus::Definition(); break;
63 case pionZero: return G4PionZero::Definition(); break;
64 case photon: return G4Gamma::Definition(); break;
65 case kaonPlus: return G4KaonPlus::Definition(); break;
66 case kaonMinus: return G4KaonMinus::Definition(); break;
67 case kaonZero: return G4KaonZero::Definition(); break;
68 case kaonZeroBar: return G4AntiKaonZero::Definition(); break;
69 case lambda: return G4Lambda::Definition(); break;
70 case sigmaPlus: return G4SigmaPlus::Definition(); break;
71 case sigmaZero: return G4SigmaZero::Definition(); break;
72 case sigmaMinus: return G4SigmaMinus::Definition(); break;
73 case xiZero: return G4XiZero::Definition(); break;
74 case xiMinus: return G4XiMinus::Definition(); break;
75 case omegaMinus: return G4OmegaMinus::Definition(); break;
76 // NOTE: The four light nuclei "particles" are actually G4Ions
77 case deuteron: return G4Deuteron::Definition(); break;
78 case triton: return G4Triton::Definition(); break;
79 case He3: return G4He3::Definition(); break;
80 case alpha: return G4Alpha::Definition(); break;
81 case antiProton: return G4AntiProton::Definition(); break;
82 case antiNeutron: return G4AntiNeutron::Definition(); break;
83 // NOTE: The the four light antinuclei "particles" are actually G4Ions
84 case antiDeuteron: return G4AntiDeuteron::Definition(); break;
85 case antiTriton: return G4AntiTriton::Definition(); break;
86 case antiHe3: return G4AntiHe3::Definition(); break;
87 case antiAlpha: return G4AntiAlpha::Definition(); break;
88 // NOTE: The three unbound dibaryons are local Bertini classes
89 case diproton: return G4Diproton::Definition(); break;
90 case unboundPN: return G4UnboundPN::Definition(); break;
91 case dineutron: return G4Dineutron::Definition(); break;
92 // Leptons are included for muon capture and future tau/neutrino physics
93 case electron: return G4Electron::Definition(); break;
94 case positron: return G4Positron::Definition(); break;
95 case electronNu: return G4NeutrinoE::Definition(); break;
96 case antiElectronNu: return G4AntiNeutrinoE::Definition(); break;
97 case muonMinus: return G4MuonMinus::Definition(); break;
98 case muonPlus: return G4MuonPlus::Definition(); break;
99 case muonNu: return G4NeutrinoMu::Definition(); break;
100 case antiMuonNu: return G4AntiNeutrinoMu::Definition(); break;
101 case tauMinus: return G4TauMinus::Definition(); break;
102 case tauPlus: return G4TauPlus::Definition(); break;
103 case tauNu: return G4NeutrinoTau::Definition(); break;
104 case antiTauNu: return G4AntiNeutrinoTau::Definition(); break;
105 default:
106 G4cerr << "G4InuclElementaryParticle::makeDefinition: unknown particle type "
107 << ityp << G4endl;
108 }
109
110 return 0;
111}
G4GLOB_DLL std::ostream G4cerr
#define G4endl
Definition: G4ios.hh:57
static G4Alpha * Definition()
Definition: G4Alpha.cc:48
static G4AntiAlpha * Definition()
Definition: G4AntiAlpha.cc:48
static G4AntiDeuteron * Definition()
static G4AntiHe3 * Definition()
Definition: G4AntiHe3.cc:49
static G4AntiKaonZero * Definition()
static G4AntiNeutrinoE * Definition()
static G4AntiNeutrinoMu * Definition()
static G4AntiNeutrinoTau * Definition()
static G4AntiNeutron * Definition()
static G4AntiProton * Definition()
Definition: G4AntiProton.cc:50
static G4AntiTriton * Definition()
Definition: G4AntiTriton.cc:49
static G4Deuteron * Definition()
Definition: G4Deuteron.cc:49
static G4Dineutron * Definition()
Definition: G4Dineutron.cc:67
static G4Diproton * Definition()
Definition: G4Diproton.cc:67
static G4Electron * Definition()
Definition: G4Electron.cc:48
static G4Gamma * Definition()
Definition: G4Gamma.cc:48
static G4He3 * Definition()
Definition: G4He3.cc:49
static G4KaonMinus * Definition()
Definition: G4KaonMinus.cc:53
static G4KaonPlus * Definition()
Definition: G4KaonPlus.cc:53
static G4KaonZero * Definition()
Definition: G4KaonZero.cc:52
static G4Lambda * Definition()
Definition: G4Lambda.cc:52
static G4MuonMinus * Definition()
Definition: G4MuonMinus.cc:51
static G4MuonPlus * Definition()
Definition: G4MuonPlus.cc:51
static G4NeutrinoE * Definition()
Definition: G4NeutrinoE.cc:48
static G4NeutrinoMu * Definition()
Definition: G4NeutrinoMu.cc:48
static G4NeutrinoTau * Definition()
static G4Neutron * Definition()
Definition: G4Neutron.cc:53
static G4OmegaMinus * Definition()
Definition: G4OmegaMinus.cc:52
static G4PionMinus * Definition()
Definition: G4PionMinus.cc:51
static G4PionPlus * Definition()
Definition: G4PionPlus.cc:51
static G4PionZero * Definition()
Definition: G4PionZero.cc:54
static G4Positron * Definition()
Definition: G4Positron.cc:48
static G4Proton * Definition()
Definition: G4Proton.cc:48
static G4SigmaMinus * Definition()
Definition: G4SigmaMinus.cc:52
static G4SigmaPlus * Definition()
Definition: G4SigmaPlus.cc:52
static G4SigmaZero * Definition()
Definition: G4SigmaZero.cc:52
static G4TauMinus * Definition()
Definition: G4TauMinus.cc:53
static G4TauPlus * Definition()
Definition: G4TauPlus.cc:53
static G4Triton * Definition()
Definition: G4Triton.cc:49
static G4UnboundPN * Definition()
Definition: G4UnboundPN.cc:66
static G4XiMinus * Definition()
Definition: G4XiMinus.cc:52
static G4XiZero * Definition()
Definition: G4XiZero.cc:52

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

◆ nucleon()

◆ operator=()

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

Definition at line 204 of file G4InuclElementaryParticle.cc.

204 {
206 return *this;
207}
G4InuclParticle & operator=(const G4InuclParticle &right)

◆ pion()

G4bool G4InuclElementaryParticle::pion ( ) const
inline

Definition at line 115 of file G4InuclElementaryParticle.hh.

115{ return G4InuclParticleNames::pion(type()); }
G4bool pion(G4int ityp)

◆ print()

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

Reimplemented from G4InuclParticle.

Definition at line 223 of file G4InuclElementaryParticle.cc.

223 {
225 os << G4endl << " Particle: " << getDefinition()->GetParticleName()
226 << " type " << type() << " mass " << getMass()
227 << " ekin " << getKineticEnergy();
228}
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 172 of file G4InuclElementaryParticle.cc.

172 {
174}

Referenced by fill().

◆ type() [1/2]

◆ type() [2/2]

G4int G4InuclElementaryParticle::type ( const G4ParticleDefinition pd)
static

Definition at line 115 of file G4InuclElementaryParticle.cc.

115 {
116 if (pd == 0) return 0;
117 if (pd == G4Proton::Definition()) return proton;
118 if (pd == G4Neutron::Definition()) return neutron;
119 if (pd == G4PionPlus::Definition()) return pionPlus;
120 if (pd == G4PionMinus::Definition()) return pionMinus;
121 if (pd == G4PionZero::Definition()) return pionZero;
122 if (pd == G4Gamma::Definition()) return photon;
123 if (pd == G4KaonPlus::Definition()) return kaonPlus;
124 if (pd == G4KaonMinus::Definition()) return kaonMinus;
125 if (pd == G4KaonZero::Definition()) return kaonZero;
126 if (pd == G4AntiKaonZero::Definition()) return kaonZeroBar;
127 if (pd == G4Lambda::Definition()) return lambda;
128 if (pd == G4SigmaPlus::Definition()) return sigmaPlus;
129 if (pd == G4SigmaZero::Definition()) return sigmaZero;
130 if (pd == G4SigmaMinus::Definition()) return sigmaMinus;
131 if (pd == G4XiZero::Definition()) return xiZero;
132 if (pd == G4XiMinus::Definition()) return xiMinus;
133 if (pd == G4OmegaMinus::Definition()) return omegaMinus;
134 // NOTE: The four light nuclei "particles" are actually G4Ions
135 if (pd == G4Deuteron::Definition()) return deuteron;
136 if (pd == G4Triton::Definition()) return triton;
137 if (pd == G4He3::Definition()) return He3;
138 if (pd == G4Alpha::Definition()) return alpha;
139 if (pd == G4AntiProton::Definition()) return antiProton;
140 if (pd == G4AntiNeutron::Definition()) return antiNeutron;
141 // NOTE: The the four light antinuclei "particles" are actually G4Ions
142 if (pd == G4AntiDeuteron::Definition()) return antiDeuteron;
143 if (pd == G4AntiTriton::Definition()) return antiTriton;
144 if (pd == G4AntiHe3::Definition()) return antiHe3;
145 if (pd == G4AntiAlpha::Definition()) return antiAlpha;
146 // NOTE: The three unbound dibaryons are local Bertini classes
147 if (pd == G4Diproton::Definition()) return diproton;
148 if (pd == G4UnboundPN::Definition()) return unboundPN;
149 if (pd == G4Dineutron::Definition()) return dineutron;
150
151 if (pd == G4Electron::Definition()) return electron;
152 if (pd == G4Positron::Definition()) return positron;
153 if (pd == G4NeutrinoE::Definition()) return electronNu;
155 if (pd == G4MuonMinus::Definition()) return muonMinus;
156 if (pd == G4MuonPlus::Definition()) return muonPlus;
157 if (pd == G4NeutrinoMu::Definition()) return muonNu;
158 if (pd == G4AntiNeutrinoMu::Definition()) return antiMuonNu;
159 if (pd == G4TauMinus::Definition()) return tauMinus;
160 if (pd == G4TauPlus::Definition()) return tauPlus;
161 if (pd == G4NeutrinoTau::Definition()) return tauNu;
162 if (pd == G4AntiNeutrinoTau::Definition()) return antiTauNu;
163
164 // Weak neutral kaons must be mixed back to strong (strangeness states)
166 return ((G4UniformRand() > 0.5) ? kaonZero : kaonZeroBar);
167 }
168
169 return 0; // Unknown objects return zero (e.g., nuclei)
170}
#define G4UniformRand()
Definition: Randomize.hh:52
static G4KaonZeroLong * Definition()
static G4KaonZeroShort * Definition()

◆ valid() [1/2]

G4bool G4InuclElementaryParticle::valid ( ) const
inline

Definition at line 109 of file G4InuclElementaryParticle.hh.

109{ return valid(type()); }

Referenced by G4CascadeInterface::createBullet(), and valid().

◆ valid() [2/2]

static G4bool G4InuclElementaryParticle::valid ( G4int  ityp)
inlinestatic

Definition at line 108 of file G4InuclElementaryParticle.hh.

108{ return ityp!=0; }

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