Changeset 1340 for trunk/source/processes/hadronic/models/cascade/cascade/include/G4LorentzConvertor.hh
- Timestamp:
- Nov 5, 2010, 3:45:55 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/processes/hadronic/models/cascade/cascade/include/G4LorentzConvertor.hh
r1337 r1340 23 23 // * acceptance of all terms of the Geant4 Software license. * 24 24 // ******************************************************************** 25 // 26 // $Id: G4LorentzConvertor.hh,v 1.15.2.1 2010/06/25 09:43:36 gunter Exp $ 27 // Geant4 tag: $Name: geant4-09-04-beta-01 $ 25 // $Id: G4LorentzConvertor.hh,v 1.17 2010/09/15 20:16:16 mkelsey Exp $ 26 // Geant4 tag: $Name: hadr-casc-V09-03-85 $ 28 27 // 29 28 // 20100108 Michael Kelsey -- Use G4LorentzVector internally … … 31 30 // 20100126 M. Kelsey -- Remove G4CascadeMomentum, use G4LorentzVector directly 32 31 // 20100519 M. Kelsey -- Add interfaces to pass G4InuclParticles directly 32 // 20100616 M. Kelsey -- Report bullet and target four-momenta when set 33 // 20100915 M. Kelsey -- Move constructors to .cc file, add initializers 33 34 34 35 #ifndef G4LORENTZ_CONVERTOR_HH … … 42 43 43 44 class G4LorentzConvertor { 44 45 45 public: 46 47 46 G4LorentzConvertor(); 48 47 49 48 G4LorentzConvertor(const G4LorentzVector& bmom, G4double bmass, 50 const G4LorentzVector& tmom, G4double tmass) { 51 setBullet(bmom, bmass); 52 setTarget(tmom, tmass); 53 } 49 const G4LorentzVector& tmom, G4double tmass); 54 50 55 51 G4LorentzConvertor(const G4InuclParticle* bullet, 56 const G4InuclParticle* target) { 57 setBullet(bullet); 58 setTarget(target); 59 } 52 const G4InuclParticle* target); 60 53 61 54 void setVerbose(G4int vb=0) { verboseLevel = vb; } … … 68 61 69 62 // Use correct four-vectors as input 70 void setBullet(const G4LorentzVector& bmom) { bullet_mom = bmom; } 71 void setTarget(const G4LorentzVector& bmom) { target_mom = bmom; } 63 void setBullet(const G4LorentzVector& bmom) { 64 bullet_mom = bmom; 65 if (verboseLevel > 3) printBullet(); 66 } 72 67 73 // NOTE: These functions "repair" input 4-vectors using specified mass 68 void setTarget(const G4LorentzVector& bmom) { 69 target_mom = bmom; 70 if (verboseLevel > 3) printTarget(); 71 } 72 73 // These functions "repair" input 4-vectors using specified mass 74 74 void setBullet(const G4LorentzVector& bmom, G4double bmass) { 75 75 bullet_mom.setVectM(bmom.vect(), bmass); 76 77 // G4cout << " bullet: e " << bullet_mom.e() << " mass " 78 // << bullet_mom.m() << G4endl; 79 }; 80 76 if (verboseLevel > 3) printBullet(); 77 } 78 81 79 void setTarget(const G4LorentzVector& tmom, G4double tmass) { 82 80 target_mom.setVectM(tmom.vect(), tmass); 83 84 // G4cout << " target: e " << target_mom.e() << " mass " 85 // << target_mom.m() << G4endl; 86 }; 81 if (verboseLevel > 3) printTarget(); 82 } 87 83 88 84 void toTheCenterOfMass(); … … 109 105 G4bool trivial() const { return degenerated; } 110 106 107 // Reporting functions for diagnostics 108 void printBullet() const; 109 void printTarget() const; 110 111 111 private: 112 112 static const G4double small;
Note: See TracChangeset
for help on using the changeset viewer.