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 #ifndef G4INUCL_PARTICLE_HH
00043 #define G4INUCL_PARTICLE_HH
00044
00045 #include <iosfwd>
00046 #include <CLHEP/Units/SystemOfUnits.h>
00047
00048 #include "globals.hh"
00049 #include "G4LorentzVector.hh"
00050 #include "G4DynamicParticle.hh"
00051
00052 class G4InuclParticle {
00053 public:
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066 enum Model { DefaultModel, bullet, target, EPCollider, INCascader,
00067 NonEquilib, Equilib, Fissioner, BigBanger, PreCompound,
00068 Coalescence };
00069
00070 public:
00071 G4InuclParticle() : modelId(DefaultModel) {}
00072
00073 G4InuclParticle(const G4DynamicParticle& dynPart, Model model=DefaultModel)
00074 : pDP(dynPart), modelId(model) {}
00075
00076 G4InuclParticle(const G4LorentzVector& mom, Model model=DefaultModel)
00077 : modelId(model) { pDP.Set4Momentum(mom*CLHEP::GeV/CLHEP::MeV); }
00078
00079 virtual ~G4InuclParticle() {}
00080
00081
00082 G4InuclParticle(const G4InuclParticle& right)
00083 : pDP(right.pDP), modelId(right.modelId) {}
00084
00085 G4InuclParticle& operator=(const G4InuclParticle& right);
00086
00087
00088 bool operator==(const G4InuclParticle& right) {
00089 return ( (&right == this) || (pDP == right.pDP) );
00090 }
00091
00092 bool operator!=(const G4InuclParticle& right) {
00093 return !operator==(right);
00094 }
00095
00096
00097 void setEnergy() { ; }
00098
00099
00100 void setMomentum(const G4LorentzVector& mom);
00101
00102 void setKineticEnergy(G4double ekin) { pDP.SetKineticEnergy(ekin*CLHEP::GeV/CLHEP::MeV); }
00103
00104 void setMass(G4double mass) { pDP.SetMass(mass*CLHEP::GeV/CLHEP::MeV); }
00105
00106 G4double getMass() const {
00107 return pDP.GetMass()*CLHEP::MeV/CLHEP::GeV;
00108 }
00109
00110 G4double getCharge() const {
00111 return pDP.GetCharge();
00112 }
00113
00114 G4double getKineticEnergy() const {
00115 return pDP.GetKineticEnergy()*CLHEP::MeV/CLHEP::GeV;
00116 }
00117
00118 G4double getEnergy() const {
00119 return pDP.GetTotalEnergy()*CLHEP::MeV/CLHEP::GeV;
00120 }
00121
00122 G4double getMomModule() const {
00123 return pDP.GetTotalMomentum()*CLHEP::MeV/CLHEP::GeV;
00124 }
00125
00126 G4LorentzVector getMomentum() const {
00127 return pDP.Get4Momentum()*CLHEP::MeV/CLHEP::GeV;
00128 }
00129
00130 virtual void print(std::ostream& os) const;
00131
00132 G4ParticleDefinition* getDefinition() const {
00133 return pDP.GetDefinition();
00134 }
00135
00136 const G4DynamicParticle& getDynamicParticle() const {
00137 return pDP;
00138 }
00139
00140 public:
00141 void setModel(Model model) { modelId = model; }
00142 Model getModel() const { return modelId; }
00143
00144 protected:
00145
00146 explicit G4InuclParticle(G4ParticleDefinition* pd, Model model=DefaultModel)
00147 : modelId(model) { setDefinition(pd); }
00148
00149
00150
00151 G4InuclParticle(G4ParticleDefinition* pd, const G4LorentzVector& mom,
00152 Model model=DefaultModel);
00153
00154
00155 G4InuclParticle(G4ParticleDefinition* pd, G4double ekin,
00156 Model model=DefaultModel)
00157 : pDP(pd,G4ThreeVector(0.,0.,1.),ekin*CLHEP::GeV/CLHEP::MeV), modelId(model) {}
00158
00159 void setDefinition(G4ParticleDefinition* pd);
00160
00161 private:
00162 G4DynamicParticle pDP;
00163 Model modelId;
00164 };
00165
00166
00167
00168 std::ostream& operator<<(std::ostream& os, const G4InuclParticle& part);
00169
00170 #endif // G4INUCL_PARTICLE_HH