File indexing completed on 2025-01-18 09:58:31
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048 #ifndef G4INUCL_ELEMENTARY_PARTICLE_HH
0049 #define G4INUCL_ELEMENTARY_PARTICLE_HH
0050
0051 #include "G4InuclParticle.hh"
0052 #include "G4InuclParticleNames.hh"
0053 #include "globals.hh"
0054
0055 class G4ParticleDefinition;
0056
0057
0058 class G4InuclElementaryParticle : public G4InuclParticle {
0059 public:
0060 G4InuclElementaryParticle()
0061 : G4InuclParticle() {}
0062
0063 G4InuclElementaryParticle(G4int ityp, Model model=DefaultModel)
0064 : G4InuclParticle(makeDefinition(ityp), model) {}
0065
0066 G4InuclElementaryParticle(const G4DynamicParticle& dynPart,
0067 Model model=DefaultModel)
0068 : G4InuclParticle(dynPart, model) {}
0069
0070 G4InuclElementaryParticle(const G4LorentzVector& mom,
0071 G4int ityp, Model model=DefaultModel)
0072 : G4InuclParticle(makeDefinition(ityp), mom, model) {}
0073
0074 G4InuclElementaryParticle(G4double ekin, G4int ityp,
0075 Model model=DefaultModel)
0076 : G4InuclParticle(makeDefinition(ityp), ekin, model) {}
0077
0078
0079 G4InuclElementaryParticle(const G4LorentzVector& mom,
0080 const G4ParticleDefinition* pd,
0081 Model model=DefaultModel)
0082 : G4InuclParticle(pd, mom, model) {}
0083
0084
0085 G4InuclElementaryParticle(const G4InuclElementaryParticle& right)
0086 : G4InuclParticle(right) {}
0087
0088 G4InuclElementaryParticle& operator=(const G4InuclElementaryParticle& right);
0089
0090
0091 void fill(G4int ityp, Model model=DefaultModel) { fill(0., ityp, model); }
0092
0093 void fill(const G4LorentzVector& mom, G4int ityp, Model model=DefaultModel);
0094
0095 void fill(G4double ekin, G4int ityp, Model model=DefaultModel);
0096
0097
0098 void fill(const G4LorentzVector& mom, const G4ParticleDefinition* pd,
0099 Model model=DefaultModel);
0100
0101
0102 void setType(G4int ityp);
0103 G4int type() const { return type(getDefinition()); }
0104
0105 static G4int type(const G4ParticleDefinition* pd);
0106
0107
0108 inline static G4bool valid(G4int ityp) { return ityp!=0; }
0109 G4bool valid() const { return valid(type()); }
0110
0111 G4bool isPhoton() const { return G4InuclParticleNames::isPhoton(type()); }
0112 G4bool isMuon() const { return G4InuclParticleNames::isMuon(type()); }
0113 G4bool isElectron() const { return G4InuclParticleNames::isElectron(type()); }
0114 G4bool isNeutrino() const { return G4InuclParticleNames::isNeutrino(type()); }
0115 G4bool pion() const { return G4InuclParticleNames::pion(type()); }
0116 G4bool nucleon() const { return G4InuclParticleNames::nucleon(type()); }
0117 G4bool antinucleon() const { return G4InuclParticleNames::antinucleon(type()); }
0118
0119 G4int baryon() const {
0120 return getDefinition()->GetBaryonNumber();
0121 }
0122
0123 G4bool antibaryon() const { return baryon() < 0; }
0124
0125 G4bool hyperon() const { return (baryon() && getStrangeness()); }
0126
0127 G4bool quasi_deutron() const {
0128 return G4InuclParticleNames::quasi_deutron(type());
0129 }
0130
0131 G4int getStrangeness() const { return getStrangeness(type()); }
0132
0133 virtual void print(std::ostream& os) const;
0134
0135 static G4int getStrangeness(G4int type);
0136 static G4double getParticleMass(G4int type);
0137
0138 protected:
0139
0140 static const G4ParticleDefinition* makeDefinition(G4int ityp);
0141 };
0142
0143 #endif