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 #ifndef G4INUCL_PARTICLE_HH
0043 #define G4INUCL_PARTICLE_HH
0044
0045 #include <iosfwd>
0046 #include <CLHEP/Units/SystemOfUnits.h>
0047
0048 #include "globals.hh"
0049 #include "G4LorentzVector.hh"
0050 #include "G4DynamicParticle.hh"
0051
0052 class G4InuclParticle {
0053 public:
0054
0055
0056
0057
0058
0059
0060
0061
0062
0063
0064
0065
0066 enum Model { DefaultModel, bullet, target, EPCollider, INCascader,
0067 NonEquilib, Equilib, Fissioner, BigBanger, PreCompound,
0068 Coalescence };
0069
0070 public:
0071 G4InuclParticle() : modelId(DefaultModel) {}
0072
0073 G4InuclParticle(const G4DynamicParticle& dynPart, Model model=DefaultModel)
0074 : pDP(dynPart), modelId(model) {}
0075
0076 G4InuclParticle(const G4LorentzVector& mom, Model model=DefaultModel)
0077 : modelId(model) { pDP.Set4Momentum(mom*CLHEP::GeV/CLHEP::MeV); }
0078
0079 virtual ~G4InuclParticle() {}
0080
0081
0082 G4InuclParticle(const G4InuclParticle& right)
0083 : pDP(right.pDP), modelId(right.modelId) {}
0084
0085 G4InuclParticle& operator=(const G4InuclParticle& right);
0086
0087
0088 G4bool operator==(const G4InuclParticle& right) {
0089 return ( (&right == this) || (pDP == right.pDP) );
0090 }
0091
0092 G4bool operator!=(const G4InuclParticle& right) {
0093 return !operator==(right);
0094 }
0095
0096
0097 void setEnergy() { ; }
0098
0099
0100 void setMomentum(const G4LorentzVector& mom);
0101
0102 void setKineticEnergy(G4double ekin) { pDP.SetKineticEnergy(ekin*CLHEP::GeV/CLHEP::MeV); }
0103
0104 void setMass(G4double mass) { pDP.SetMass(mass*CLHEP::GeV/CLHEP::MeV); }
0105
0106 G4double getMass() const {
0107 return pDP.GetMass()*CLHEP::MeV/CLHEP::GeV;
0108 }
0109
0110 G4double getCharge() const {
0111 return pDP.GetCharge();
0112 }
0113
0114 G4double getKineticEnergy() const {
0115 return pDP.GetKineticEnergy()*CLHEP::MeV/CLHEP::GeV;
0116 }
0117
0118 G4double getEnergy() const {
0119 return pDP.GetTotalEnergy()*CLHEP::MeV/CLHEP::GeV;
0120 }
0121
0122 G4double getMomModule() const {
0123 return pDP.GetTotalMomentum()*CLHEP::MeV/CLHEP::GeV;
0124 }
0125
0126 G4LorentzVector getMomentum() const {
0127 return pDP.Get4Momentum()*CLHEP::MeV/CLHEP::GeV;
0128 }
0129
0130 virtual void print(std::ostream& os) const;
0131
0132 const G4ParticleDefinition* getDefinition() const {
0133 return pDP.GetDefinition();
0134 }
0135
0136 const G4DynamicParticle& getDynamicParticle() const {
0137 return pDP;
0138 }
0139
0140 public:
0141 void setModel(Model model) { modelId = model; }
0142 Model getModel() const { return modelId; }
0143
0144 protected:
0145
0146 explicit G4InuclParticle(const G4ParticleDefinition* pd,
0147 Model model=DefaultModel)
0148 : modelId(model) { setDefinition(pd); }
0149
0150
0151
0152 G4InuclParticle(const G4ParticleDefinition* pd, const G4LorentzVector& mom,
0153 Model model=DefaultModel);
0154
0155
0156 G4InuclParticle(const G4ParticleDefinition* pd, G4double ekin,
0157 Model model=DefaultModel)
0158 : pDP(pd,G4ThreeVector(0.,0.,1.),ekin*CLHEP::GeV/CLHEP::MeV), modelId(model) {}
0159
0160 void setDefinition(const G4ParticleDefinition* pd);
0161
0162 private:
0163 G4DynamicParticle pDP;
0164 Model modelId;
0165 };
0166
0167
0168
0169 std::ostream& operator<<(std::ostream& os, const G4InuclParticle& part);
0170
0171 #endif