File indexing completed on 2025-01-18 09:58:38
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 #ifndef G4LORENTZ_CONVERTOR_HH
0036 #define G4LORENTZ_CONVERTOR_HH
0037
0038 #include "globals.hh"
0039 #include "G4LorentzVector.hh"
0040 #include "G4ThreeVector.hh"
0041
0042 class G4InuclParticle;
0043
0044 class G4LorentzConvertor {
0045 public:
0046 G4LorentzConvertor();
0047
0048 G4LorentzConvertor(const G4LorentzVector& bmom, G4double bmass,
0049 const G4LorentzVector& tmom, G4double tmass);
0050
0051 G4LorentzConvertor(const G4InuclParticle* bullet,
0052 const G4InuclParticle* target);
0053
0054 void setVerbose(G4int vb=0) { verboseLevel = vb; }
0055
0056 void setBullet(const G4InuclParticle* bullet);
0057 void setTarget(const G4InuclParticle* target);
0058
0059 void setBullet(const G4InuclParticle& bullet) { setBullet(&bullet); }
0060 void setTarget(const G4InuclParticle& target) { setTarget(&target); }
0061
0062
0063 void setBullet(const G4LorentzVector& bmom) {
0064 bullet_mom = bmom;
0065 if (verboseLevel > 3) printBullet();
0066 }
0067
0068 void setTarget(const G4LorentzVector& bmom) {
0069 target_mom = bmom;
0070 if (verboseLevel > 3) printTarget();
0071 }
0072
0073
0074 void setBullet(const G4LorentzVector& bmom, G4double bmass) {
0075 bullet_mom.setVectM(bmom.vect(), bmass);
0076 if (verboseLevel > 3) printBullet();
0077 }
0078
0079 void setTarget(const G4LorentzVector& tmom, G4double tmass) {
0080 target_mom.setVectM(tmom.vect(), tmass);
0081 if (verboseLevel > 3) printTarget();
0082 }
0083
0084
0085 void toTheCenterOfMass();
0086 void toTheTargetRestFrame();
0087 void fillKinematics();
0088
0089 G4LorentzVector backToTheLab(const G4LorentzVector& mom) const;
0090
0091
0092 const G4LorentzVector& getBullet() const { return bullet_mom; }
0093 const G4LorentzVector& getTarget() const { return target_mom; }
0094
0095 G4double getKinEnergyInTheTRS() const;
0096 G4double getTotalSCMEnergy() const { return ecm_tot; }
0097 G4double getSCMMomentum() const { return scm_momentum.rho(); }
0098 G4double getTRSMomentum() const;
0099
0100 G4LorentzVector rotate(const G4LorentzVector& mom) const;
0101
0102 G4LorentzVector rotate(const G4LorentzVector& mom1,
0103 const G4LorentzVector& mom) const;
0104
0105 G4bool reflectionNeeded() const;
0106
0107 G4bool trivial() const { return degenerated; }
0108
0109
0110 void printBullet() const;
0111 void printTarget() const;
0112
0113 private:
0114 static const G4double small;
0115
0116 G4int verboseLevel;
0117 G4LorentzVector bullet_mom;
0118 G4LorentzVector target_mom;
0119
0120 G4LorentzVector scm_momentum;
0121 G4ThreeVector scm_direction;
0122
0123
0124 G4ThreeVector velocity;
0125 G4double v2;
0126 G4double ecm_tot;
0127 G4double valong;
0128 G4bool degenerated;
0129 };
0130
0131 #endif