1 | // |
---|
2 | // ******************************************************************** |
---|
3 | // * License and Disclaimer * |
---|
4 | // * * |
---|
5 | // * The Geant4 software is copyright of the Copyright Holders of * |
---|
6 | // * the Geant4 Collaboration. It is provided under the terms and * |
---|
7 | // * conditions of the Geant4 Software License, included in the file * |
---|
8 | // * LICENSE and available at http://cern.ch/geant4/license . These * |
---|
9 | // * include a list of copyright holders. * |
---|
10 | // * * |
---|
11 | // * Neither the authors of this software system, nor their employing * |
---|
12 | // * institutes,nor the agencies providing financial support for this * |
---|
13 | // * work make any representation or warranty, express or implied, * |
---|
14 | // * regarding this software system or assume any liability for its * |
---|
15 | // * use. Please see the license in the file LICENSE and URL above * |
---|
16 | // * for the full disclaimer and the limitation of liability. * |
---|
17 | // * * |
---|
18 | // * This code implementation is the result of the scientific and * |
---|
19 | // * technical work of the GEANT4 collaboration. * |
---|
20 | // * By using, copying, modifying or distributing the software (or * |
---|
21 | // * any work based on the software) you agree to acknowledge its * |
---|
22 | // * use in resulting scientific publications, and indicate your * |
---|
23 | // * acceptance of all terms of the Geant4 Software license. * |
---|
24 | // ******************************************************************** |
---|
25 | // |
---|
26 | // |
---|
27 | // $Id: G4Quasmon.hh,v 1.39 2007/08/09 13:07:47 mkossov Exp $ |
---|
28 | // GEANT4 tag $Name: geant4-09-02-ref-02 $ |
---|
29 | // |
---|
30 | // ---------------- G4Quasmon ---------------- |
---|
31 | // by Mikhail Kossov, July 1999. |
---|
32 | // class for a Quasmon used by the CHIPS Model |
---|
33 | // ------------------------------------------------------------ |
---|
34 | |
---|
35 | #ifndef G4Quasmon_h |
---|
36 | #define G4Quasmon_h 1 |
---|
37 | |
---|
38 | // Standard G4-headers |
---|
39 | #include "G4ios.hh" |
---|
40 | #include "globals.hh" |
---|
41 | #include "G4ThreeVector.hh" |
---|
42 | #include "G4LorentzVector.hh" |
---|
43 | #include "G4LorentzRotation.hh" |
---|
44 | //CHIPS-headers |
---|
45 | #include "G4QCHIPSWorld.hh" |
---|
46 | #include "G4QChipolino.hh" |
---|
47 | #include "G4QHadronVector.hh" |
---|
48 | #include "G4QNucleus.hh" |
---|
49 | |
---|
50 | class G4Quasmon |
---|
51 | { |
---|
52 | public: |
---|
53 | G4Quasmon(G4QContent qQCont = G4QContent(0,0,0,0,0,0), |
---|
54 | G4LorentzVector q4M = G4LorentzVector(0.,0.,0.,0.), |
---|
55 | G4LorentzVector ph4M = G4LorentzVector(0.,0.,0.,0.));// Direct Constructor |
---|
56 | G4Quasmon(const G4Quasmon& right); // Copy Quasmon by object |
---|
57 | G4Quasmon(G4Quasmon* right); // Copy Quasmon by pointer |
---|
58 | |
---|
59 | ~G4Quasmon(); // Public Destructor |
---|
60 | |
---|
61 | // Overloaded Operators |
---|
62 | const G4Quasmon& operator=(const G4Quasmon& right); |
---|
63 | G4bool operator==(const G4Quasmon &right) const; |
---|
64 | G4bool operator!=(const G4Quasmon &right) const; |
---|
65 | |
---|
66 | // Static functions |
---|
67 | static void SetParameters(G4double temper=180., G4double ssin2g=.3, G4double etaetap=.3); |
---|
68 | static void SetTemper(G4double temperature); |
---|
69 | static void SetSOverU(G4double ssin2g); |
---|
70 | static void SetEtaSup(G4double etaetap); |
---|
71 | static void OpenElectromagneticDecays(); |
---|
72 | static void CloseElectromagneticDecays(); |
---|
73 | |
---|
74 | //Selectors |
---|
75 | G4double GetTemper() const; |
---|
76 | G4double GetSOverU() const; |
---|
77 | G4double GetEtaSup() const; |
---|
78 | G4LorentzVector Get4Momentum() const; |
---|
79 | G4QContent GetQC() const; |
---|
80 | G4QPDGCode GetQPDG() const; |
---|
81 | G4int GetStatus() const; |
---|
82 | G4int GetCharge() const; |
---|
83 | G4int GetBaryonNumber() const; |
---|
84 | G4int GetStrangeness() const; |
---|
85 | |
---|
86 | //Modifiers |
---|
87 | // Public wrapper for HadronizeQuasmon(,) |
---|
88 | G4QHadronVector* Fragment(G4QNucleus& nucEnviron, G4int nQ = 1); |
---|
89 | G4QHadronVector* DecayQuasmon(); // Decay Quasmon if it's Res or Chipo |
---|
90 | G4QHadronVector* DecayQHadron(G4QHadron* hadron); // Decay Quasmon if it's Res or Chipo |
---|
91 | void ClearOutput(); // Clear but not destroy the output |
---|
92 | void InitQuasmon(const G4QContent& qQCont, const G4LorentzVector& q4M); |
---|
93 | void IncreaseBy(const G4Quasmon* pQuasm); // as operator+= but by pointer |
---|
94 | void ClearQuasmon(); // Clear Quasmon (status=0) |
---|
95 | void KillQuasmon(); // Kill Quasmon (status=0) |
---|
96 | G4int CalculateNumberOfQPartons(G4double qMass); |
---|
97 | |
---|
98 | private: |
---|
99 | G4QHadronVector HadronizeQuasmon(G4QNucleus& qEnv, G4int nQ=1); // + new Neuclear Envir |
---|
100 | G4double GetRandomMass(G4int PDGCode, G4double maxM); |
---|
101 | void ModifyInMatterCandidates(); |
---|
102 | void CalculateHadronizationProbabilities(G4double excE, G4double kQ, |
---|
103 | G4LorentzVector k4M, G4bool piF, |
---|
104 | G4bool gaF, G4bool first=false); |
---|
105 | void FillHadronVector(G4QHadron* qHadron); |
---|
106 | G4int RandomPoisson(G4double meanValue); |
---|
107 | G4double GetQPartonMomentum(G4double mMinResidual2, G4double mCandidate2); |
---|
108 | G4bool CheckGroundState(G4bool corFlag=false); // Forbid correction by default |
---|
109 | void KillEnvironment(); // Kill Environment (Z,N,S=0,LV=0) |
---|
110 | |
---|
111 | // Body |
---|
112 | private: |
---|
113 | // Static Parameters |
---|
114 | static G4double Temperature; // Quasmon Temperature |
---|
115 | static G4double SSin2Gluons; // Percent of ssbar sea in a constituen gluon |
---|
116 | static G4double EtaEtaprime; // Part of eta-prime in all etas |
---|
117 | static G4bool WeakDecays; // Flag for opening WeakDecays (notUsed: allAreClosed) |
---|
118 | static G4bool ElMaDecays; // Flag for opening ElectroMagDecays (true by default) |
---|
119 | // Hadronic input |
---|
120 | G4LorentzVector q4Mom; // 4-momentum of the Quasmon +++++ |
---|
121 | G4QContent valQ; // Quark Content of the Quasmon +++++ |
---|
122 | G4QNucleus theEnvironment;// Nuclear (or Vacuum) Environment around the Quasmon |
---|
123 | // Output |
---|
124 | G4int status; // -1-Panic,0-Done,1-FilledSomething,2-DidNothing,3-StopedByCB,4-JustBorn |
---|
125 | G4QHadronVector theQHadrons; // Vector of generated secondary hadrons +++++ |
---|
126 | // Internal working objects (@@ it is possible to sacrifice some of them in future) |
---|
127 | G4QCHIPSWorld* theWorld; // Pointer to the CHIPS World |
---|
128 | G4LorentzVector phot4M; // Gamma 4-momentum for interaction with a quark-parton |
---|
129 | G4int nBarClust; // Maximum barion number of clusters in the Environment |
---|
130 | G4int nOfQ; // a#of quark-partons in theQuasmon (to accelerate) |
---|
131 | G4QCandidateVector theQCandidates;// Vector of possible secondary hadrons/clusters(*del*) |
---|
132 | G4double f2all; // Ratio of free nucleons to free+freeInDense nucleons |
---|
133 | G4double rEP; // E+p for the Residual Coloured Quasmon im LS +++++ |
---|
134 | G4double rMo; // p for the Residual Coloured Quasmon im LS +++++ |
---|
135 | G4double totMass; // Mass of totalCompoundSys: curQuasmon+curEnvironment |
---|
136 | G4int bEn; // BaryoNumber of the Limit Active Nuclear Environment |
---|
137 | G4double mbEn; // Mass of the LimActNucEnv |
---|
138 | G4LorentzVector bEn4M; // 4-momentum of the LimitActiveNuclearEnviron |
---|
139 | G4QContent bEnQC; // QuarkContent of the LimitActiveNuclEnv |
---|
140 | }; |
---|
141 | |
---|
142 | inline G4bool G4Quasmon::operator==(const G4Quasmon &rhs) const {return this == &rhs;} |
---|
143 | inline G4bool G4Quasmon::operator!=(const G4Quasmon &rhs) const {return this != &rhs;} |
---|
144 | inline G4double G4Quasmon::GetTemper() const {return Temperature;} |
---|
145 | inline G4double G4Quasmon::GetSOverU() const {return SSin2Gluons;} |
---|
146 | inline G4double G4Quasmon::GetEtaSup() const {return EtaEtaprime;} |
---|
147 | inline G4LorentzVector G4Quasmon::Get4Momentum() const {return q4Mom;} |
---|
148 | inline G4QContent G4Quasmon::GetQC() const {return valQ;} |
---|
149 | inline G4int G4Quasmon::GetCharge() const{return valQ.GetCharge();} |
---|
150 | inline G4int G4Quasmon::GetBaryonNumber() const{return valQ.GetBaryonNumber();} |
---|
151 | inline G4int G4Quasmon::GetStrangeness() const{return valQ.GetStrangeness();} |
---|
152 | inline G4QPDGCode G4Quasmon::GetQPDG() const {return G4QPDGCode(valQ);} |
---|
153 | inline G4int G4Quasmon::GetStatus() const {return status;} |
---|
154 | inline void G4Quasmon::ClearOutput() |
---|
155 | {std::for_each(theQHadrons.begin(), theQHadrons.end(), DeleteQHadron()); |
---|
156 | theQHadrons.clear(); |
---|
157 | } |
---|
158 | inline void G4Quasmon::KillEnvironment() |
---|
159 | {theEnvironment=G4QNucleus(0,0,0,G4LorentzVector(0.,0.,0.,0.));} |
---|
160 | inline G4double G4Quasmon::GetRandomMass(G4int PDG, G4double maxM) |
---|
161 | { |
---|
162 | G4QParticle* part = theWorld->GetQParticle(PDG); |
---|
163 | return G4QHadron(part, maxM).GetMass(); |
---|
164 | } |
---|
165 | |
---|
166 | inline void G4Quasmon::IncreaseBy(const G4Quasmon* pQuasm) |
---|
167 | { |
---|
168 | valQ += pQuasm->GetQC(); |
---|
169 | q4Mom += pQuasm->Get4Momentum(); |
---|
170 | status= 3; |
---|
171 | } |
---|
172 | |
---|
173 | inline void G4Quasmon::InitQuasmon(const G4QContent& qQCont, const G4LorentzVector& q4M) |
---|
174 | { |
---|
175 | valQ = qQCont; |
---|
176 | q4Mom = q4M; |
---|
177 | status= 3; |
---|
178 | } |
---|
179 | |
---|
180 | inline void G4Quasmon::ClearQuasmon() |
---|
181 | { |
---|
182 | static const G4QContent zeroQC(0,0,0,0,0,0); |
---|
183 | static const G4LorentzVector nothing(0.,0.,0.,0.); |
---|
184 | phot4M= nothing; |
---|
185 | valQ = zeroQC; |
---|
186 | q4Mom = nothing; |
---|
187 | status= 0; |
---|
188 | std::for_each(theQCandidates.begin(), theQCandidates.end(), DeleteQCandidate()); |
---|
189 | theQCandidates.clear(); |
---|
190 | |
---|
191 | } |
---|
192 | |
---|
193 | inline void G4Quasmon::KillQuasmon() |
---|
194 | { |
---|
195 | ClearQuasmon(); |
---|
196 | ClearOutput(); |
---|
197 | } |
---|
198 | |
---|
199 | #endif |
---|
200 | |
---|
201 | |
---|
202 | |
---|
203 | |
---|
204 | |
---|