00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047 #ifndef G4INUCL_ELEMENTARY_PARTICLE_HH
00048 #define G4INUCL_ELEMENTARY_PARTICLE_HH
00049
00050 #include "G4InuclParticle.hh"
00051 #include "G4InuclParticleNames.hh"
00052 #include "globals.hh"
00053
00054 class G4ParticleDefinition;
00055
00056
00057 class G4InuclElementaryParticle : public G4InuclParticle {
00058 public:
00059 G4InuclElementaryParticle()
00060 : G4InuclParticle() {}
00061
00062 G4InuclElementaryParticle(G4int ityp, Model model=DefaultModel)
00063 : G4InuclParticle(makeDefinition(ityp), model) {}
00064
00065 G4InuclElementaryParticle(const G4DynamicParticle& dynPart,
00066 Model model=DefaultModel)
00067 : G4InuclParticle(dynPart, model) {}
00068
00069 G4InuclElementaryParticle(const G4LorentzVector& mom,
00070 G4int ityp, Model model=DefaultModel)
00071 : G4InuclParticle(makeDefinition(ityp), mom, model) {}
00072
00073 G4InuclElementaryParticle(G4double ekin, G4int ityp,
00074 Model model=DefaultModel)
00075 : G4InuclParticle(makeDefinition(ityp), ekin, model) {}
00076
00077
00078 G4InuclElementaryParticle(const G4LorentzVector& mom,
00079 G4ParticleDefinition* pd, Model model=DefaultModel)
00080 : G4InuclParticle(pd, mom, model) {}
00081
00082
00083 G4InuclElementaryParticle(const G4InuclElementaryParticle& right)
00084 : G4InuclParticle(right) {}
00085
00086 G4InuclElementaryParticle& operator=(const G4InuclElementaryParticle& right);
00087
00088
00089 void fill(G4int ityp, Model model=DefaultModel) { fill(0., ityp, model); }
00090
00091 void fill(const G4LorentzVector& mom, G4int ityp, Model model=DefaultModel);
00092
00093 void fill(G4double ekin, G4int ityp, Model model=DefaultModel);
00094
00095
00096 void fill(const G4LorentzVector& mom, G4ParticleDefinition* pd,
00097 Model model=DefaultModel);
00098
00099
00100 void setType(G4int ityp);
00101 G4int type() const { return type(getDefinition()); }
00102
00103 static G4int type(const G4ParticleDefinition* pd);
00104
00105 G4bool isPhoton() const { return (type() == G4InuclParticleNames::photon); }
00106
00107 G4bool pion() const { return (type()==G4InuclParticleNames::pionPlus ||
00108 type()==G4InuclParticleNames::pionMinus ||
00109 type()==G4InuclParticleNames::pionZero); }
00110
00111 G4bool nucleon() const { return (type()==G4InuclParticleNames::proton ||
00112 type()==G4InuclParticleNames::neutron); }
00113
00114 G4bool antinucleon() const {
00115 return (type()==G4InuclParticleNames::antiProton ||
00116 type()==G4InuclParticleNames::antiNeutron); }
00117
00118 G4int baryon() const {
00119 return getDefinition()->GetBaryonNumber();
00120 }
00121
00122 G4bool antibaryon() const { return baryon() < 0; }
00123
00124 G4bool hyperon() const { return (baryon() && getStrangeness()); }
00125
00126 G4bool quasi_deutron() const { return (type() > 100); }
00127
00128 G4int getStrangeness() const { return getStrangeness(type()); }
00129
00130 G4bool valid() const { return type()>0; }
00131
00132 virtual void print(std::ostream& os) const;
00133
00134 static G4int getStrangeness(G4int type);
00135 static G4double getParticleMass(G4int type);
00136
00137 protected:
00138
00139 static G4ParticleDefinition* makeDefinition(G4int ityp);
00140 };
00141
00142 #endif // G4INUCL_ELEMENTARY_PARTICLE_HH