Changeset 1340 for trunk/source/processes/hadronic/models/cascade/cascade/include/G4CollisionOutput.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/G4CollisionOutput.hh
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4CollisionOutput.hh,v 1.2 0.2.1 2010/06/25 09:43:06 gunterExp $27 // Geant4 tag: $Name: geant4-09-04-beta-01$26 // $Id: G4CollisionOutput.hh,v 1.29 2010/09/26 04:06:03 mkelsey Exp $ 27 // Geant4 tag: $Name: hadr-casc-V09-03-85 $ 28 28 // 29 29 // 20100114 M. Kelsey -- Remove G4CascadeMomentum, use G4LorentzVector directly … … 32 32 // 20100418 M. Kelsey -- Add function to boost output lists to lab frame 33 33 // 20100520 M. Kelsey -- Add function to rotate Z axis, from G4Casc.Interface 34 // 20100620 M. Kelsey -- Add setVerboseLevel() function 35 // 20100715 M. Kelsey -- Add total charge and baryon number functions, and a 36 // combined "add()" function to put two of these together. 37 // 20100716 M. Kelsey -- Add interface to handle G4CascadParticles 38 // 20100924 M. Kelsey -- Use "OutgoingNuclei" name consistently, replacing 39 // old "TargetFragment". Add new (reusable) G4Fragment buffer 40 // and access functions for initial post-cascade processing. 41 // Move implementation of add() to .cc file. 42 // 20100925 M. Kelsey -- Add function to process G4ReactionProduct list 34 43 35 44 #ifndef G4COLLISION_OUTPUT_HH 36 45 #define G4COLLISION_OUTPUT_HH 37 46 47 #include "G4Fragment.hh" 38 48 #include "G4InuclElementaryParticle.hh" 39 49 #include "G4InuclNuclei.hh" 40 50 #include "G4LorentzRotation.hh" 51 #include "G4ReactionProductVector.hh" 41 52 #include <algorithm> 42 53 #include <vector> 43 54 55 class G4CascadParticle; 44 56 class G4LorentzConvertor; 45 57 58 46 59 class G4CollisionOutput { 47 48 60 public: 49 50 61 G4CollisionOutput(); 51 52 62 G4CollisionOutput& operator=(const G4CollisionOutput& right); 53 63 54 void reset(); 64 void setVerboseLevel(G4int verbose) { verboseLevel = verbose; }; 65 66 // ===== Accumulate contents of lists ===== 67 68 void reset(); // Empties lists for new event 69 70 void add(const G4CollisionOutput& right); // Merge complete objects 55 71 56 72 void addOutgoingParticle(const G4InuclElementaryParticle& particle) { … … 60 76 void addOutgoingParticles(const std::vector<G4InuclElementaryParticle>& particles); 61 77 62 void add TargetFragment(const G4InuclNuclei& nuclei) {63 nucleiFragments.push_back(nuclei);78 void addOutgoingNucleus(const G4InuclNuclei& nuclei) { 79 outgoingNuclei.push_back(nuclei); 64 80 }; 65 81 66 void add TargetFragments(const std::vector<G4InuclNuclei>& nuclea);82 void addOutgoingNuclei(const std::vector<G4InuclNuclei>& nuclea); 67 83 84 // These are primarily for G4IntraNucleiCascader internal checks 85 void addOutgoingParticle(const G4CascadParticle& cparticle); 86 void addOutgoingParticles(const std::vector<G4CascadParticle>& cparticles); 87 88 void addOutgoingParticles(const G4ReactionProductVector* rproducts); 89 90 // Special buffer for initial, possible unstable fragment from cascade 91 void addRecoilFragment(const G4Fragment* aFragment) { 92 if (aFragment) addRecoilFragment(*aFragment); 93 } 94 95 void addRecoilFragment(const G4Fragment& aFragment) { 96 theRecoilFragment = aFragment; 97 } 98 99 // ===== Access contents of lists ===== 100 101 G4int numberOfOutgoingParticles() const { return outgoingParticles.size(); } 102 68 103 const std::vector<G4InuclElementaryParticle>& getOutgoingParticles() const { 69 104 return outgoingParticles; 70 105 }; 71 106 72 G4int numberOfNucleiFragments() const { 73 return nucleiFragments.size(); 74 }; 107 G4int numberOfOutgoingNuclei() const { return outgoingNuclei.size(); }; 75 108 76 const std::vector<G4InuclNuclei>& get NucleiFragments() const {77 return nucleiFragments;109 const std::vector<G4InuclNuclei>& getOutgoingNuclei() const { 110 return outgoingNuclei; 78 111 }; 79 112 113 const G4Fragment& getRecoilFragment() const { return theRecoilFragment; } 114 115 // ===== Get event totals for conservation checking, recoil, etc. ====== 116 80 117 G4LorentzVector getTotalOutputMomentum() const; 118 G4int getTotalCharge() const; // NOTE: No fractional charges! 119 G4int getTotalBaryonNumber() const; 81 120 82 121 void printCollisionOutput() const; 83 122 123 // ===== Manipulate final-state particles for kinematics ===== 124 84 125 void boostToLabFrame(const G4LorentzConvertor& convertor); 85 86 126 void rotateEvent(const G4LorentzRotation& rotate); 87 88 void trivialise(G4InuclParticle* bullet, 89 G4InuclParticle* target); 90 91 void setOnShell(G4InuclParticle* bullet, 92 G4InuclParticle* target); 93 127 void trivialise(G4InuclParticle* bullet, G4InuclParticle* target); 128 void setOnShell(G4InuclParticle* bullet, G4InuclParticle* target); 94 129 void setRemainingExitationEnergy(); 95 130 96 double getRemainingExitationEnergy() const { 97 return eex_rest; 98 }; 99 100 G4bool acceptable() const { 101 return on_shell; 102 }; 131 double getRemainingExitationEnergy() const { return eex_rest; }; 132 G4bool acceptable() const { return on_shell; }; 103 133 104 134 private: 105 135 G4int verboseLevel; 136 106 137 std::vector<G4InuclElementaryParticle> outgoingParticles; 107 std::vector<G4InuclNuclei> nucleiFragments; 108 G4double eex_rest; 138 std::vector<G4InuclNuclei> outgoingNuclei; 139 G4Fragment theRecoilFragment; 140 141 G4double eex_rest; // Used by setOnShell() for kinematics 109 142 110 143 std::pair<std::pair<G4int,G4int>, G4int> selectPairToTune(G4double de) const; 111 144 112 145 G4bool on_shell; 113 114 146 }; 115 147
Note: See TracChangeset
for help on using the changeset viewer.