Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
G4FragmentingString.cc
이 파일의 문서화 페이지로 가기
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 
28 
29 // ------------------------------------------------------------
30 // GEANT 4 class implementation file
31 //
32 // ---------------- G4FragmentingString ----------------
33 // by Gunter Folger, September 2001.
34 // class for an excited string used in Fragmention
35 // ------------------------------------------------------------
36 
37 
38 // G4FragmentingString
39 #include "G4FragmentingString.hh"
40 #include "G4ExcitedString.hh"
41 
42 //---------------------------------------------------------------------------------
43 
44 //---------------------------------------------------------------------------------
45 
47 {
50  Ptleft=old.Ptleft;
51  Ptright=old.Ptright;
52  Pplus=old.Pplus;
53  Pminus=old.Pminus;
56  decaying=old.decaying;
57 Pstring=old.Pstring;
58 Pleft =old.Pleft;
59 Pright =old.Pright;
60 }
61 
63 {
64  if (this != &old)
65  {
68  Ptleft=old.Ptleft;
69  Ptright=old.Ptright;
70  Pplus=old.Pplus;
71  Pminus=old.Pminus;
74  decaying=old.decaying;
75 Pstring=old.Pstring;
76 Pleft =old.Pleft;
77 Pright =old.Pright;
78  }
79  return *this;
80 }
81 
82 //---------------------------------------------------------------------------------
83 
85 {
88  Ptleft=excited.GetLeftParton()->Get4Momentum().vect();
89  Ptleft.setZ(0.);
90  Ptright=excited.GetRightParton()->Get4Momentum().vect();
91  Ptright.setZ(0.);
92  G4LorentzVector P=excited.Get4Momentum();
93  Pplus =P.e() + P.pz();
94  Pminus=P.e() - P.pz();
97 
98  if(excited.GetDirection() > 0) {decaying=Left; }
99  else {decaying=Right;}
100 
101 Pleft = excited.GetLeftParton()->Get4Momentum();
102 Pright = excited.GetRightParton()->Get4Momentum();
103 Pstring= Pleft + Pright;
104 }
105 
106 //---------------------------------------------------------------------------------
107 
109  G4ParticleDefinition * newdecay,
110  const G4LorentzVector *momentum)
111 {
112  decaying=None;
113 G4LorentzVector Momentum = G4LorentzVector(momentum->vect(),momentum->e());
114  // Momentum of produced hadron
115 //G4cout<<"Had Mom "<<Momentum<<G4endl;
116 //G4cout<<"Str Mom "<<old.Pstring<<G4endl;
117 Pstring = old.Pstring - Momentum;
118 //G4cout<<"New Str Mom "<<Pstring<<" "<<Pstring.mag()<<G4endl;
119 
120 G4double StringMass = Pstring.mag();
121 
122 G4LorentzRotation toLAB(Pstring.boostVector());
123 
124 Pleft = toLAB*G4LorentzVector(0.,0., StringMass/2.,StringMass/2.);
125 Pright = toLAB*G4LorentzVector(0.,0.,-StringMass/2.,StringMass/2.);
126 
127 Ptleft =Pleft.vect(); Ptleft.setZ(0.);
129 
130 //G4cout<<"Pleft "<<Pleft<<G4endl;
131 //G4cout<<"Pright "<<Pright<<G4endl;
132 //G4cout<<"Pstring "<<Pstring<<G4endl;
133  if ( old.decaying == Left )
134  {
136 // Ptright = old.Ptright;
137 //Pright = old.Pright;
138 
139  LeftParton = newdecay;
140 // Ptleft = old.Ptleft - momentum->vect();
141 // Ptleft.setZ(0.);
142 //Pleft = old.Pleft - Momentum;
143 //Pstring=Pleft + Pright;
144 
147  decaying=Left;
148  } else if ( old.decaying == Right )
149  {
150  RightParton = newdecay;
151 // Ptright = old.Ptright - momentum->vect();
152 // Ptright.setZ(0.);
153 //Pright = old.Pright + Momentum;
154 
155  LeftParton = old.LeftParton;
156 // Ptleft = old.Ptleft;
157 //Pleft = old.Pleft;
158 //Pstring=Pleft + Pright;
159 
162  decaying=Right;
163  } else
164  {
165  throw G4HadronicException(__FILE__, __LINE__, "G4FragmentingString::G4FragmentingString: no decay Direction defined");
166  }
167  Pplus = Pstring.plus(); //old.Pplus - (momentum->e() + momentum->pz());
168  Pminus = Pstring.minus();//old.Pminus - (momentum->e() - momentum->pz());
169 }
170 
171 
172 //---------------------------------------------------------------------------------
173 
175  G4ParticleDefinition * newdecay)
176 {
177  decaying=None;
178 
179  Ptleft.setX(0.); Ptleft.setY(0.); Ptleft.setZ(0.);
180  Ptright.setX(0.); Ptright.setY(0.); Ptright.setZ(0.);
181  Pplus=0.; Pminus=0.;
183 
184 Pstring=G4LorentzVector(0.,0.,0.,0.);
185 Pleft =G4LorentzVector(0.,0.,0.,0.);
186 Pright =G4LorentzVector(0.,0.,0.,0.);
187 
188  if ( old.decaying == Left )
189  {
190  RightParton= old.RightParton;
191  LeftParton = newdecay;
192  decaying=Left;
193  } else if ( old.decaying == Right )
194  {
195  RightParton = newdecay;
196  LeftParton = old.LeftParton;
197  decaying=Right;
198  } else
199  {
200  throw G4HadronicException(__FILE__, __LINE__, "G4FragmentingString::G4FragmentingString: no decay Direction defined");
201  }
202 }
203 
204 
205 //---------------------------------------------------------------------------------
206 
208 {}
209 
210 
211 //---------------------------------------------------------------------------------
212 
214 {
217  decaying=Right;
218 }
219 
220 //---------------------------------------------------------------------------------
221 
223 {
226  decaying=Left;
227 }
228 
229 //---------------------------------------------------------------------------------
230 
232 {
233  if (decaying == Left ) return +1;
234  else if (decaying == Right) return -1;
235  else throw G4HadronicException(__FILE__, __LINE__, "G4FragmentingString::GetDecayDirection: decay side UNdefined!");
236  return 0;
237 }
238 
239 //---------------------------------------------------------------------------------
240 
242 {
243  return LeftParton->GetParticleSubType()== "di_quark"
244  && RightParton->GetParticleSubType()== "di_quark";
245 }
246 
247 //---------------------------------------------------------------------------------
248 
250 {
251  return theDecayParton->GetParticleSubType()== "quark";
252 }
253 
255 {
256  return theStableParton->GetParticleSubType()== "quark";
257 }
258 
259 //---------------------------------------------------------------------------------
260 
262 {
263  if (decaying == Left ) return Ptright;
264  else if (decaying == Right ) return Ptleft;
265  else throw G4HadronicException(__FILE__, __LINE__, "G4FragmentingString::DecayPt: decay side UNdefined!");
266  return G4ThreeVector();
267 }
268 
270 {
271  if (decaying == Left ) return Ptleft;
272  else if (decaying == Right ) return Ptright;
273  else throw G4HadronicException(__FILE__, __LINE__, "G4FragmentingString::DecayPt: decay side UNdefined!");
274  return G4ThreeVector();
275 }
276 
277 //---------------------------------------------------------------------------------
278 
280 {
281  return Pplus;
282 }
283 
285 {
286  return Pminus;
287 }
288 
290 {
291  if (decaying == Left ) return Pplus;
292  else if (decaying == Right ) return Pminus;
293  else throw G4HadronicException(__FILE__, __LINE__, "G4FragmentingString::DecayPt: decay side UNdefined!");
294 }
295 
296 //---------------------------------------------------------------------------------
297 
299 {
300  G4LorentzVector momentum(Ptleft+Ptright,0);
301  momentum.setPz(0.5*(Pplus-Pminus));
302  momentum.setE(0.5*(Pplus+Pminus));
303  return momentum;
304 }
305 
307 {
308 // return Pplus*Pminus - (Ptleft+Ptright).mag2();
309 return Pstring.mag2();
310 }
311 
313 {
314 // return std::sqrt(this->Mass2());
315 return Pstring.mag();
316 }
317 
319 {
320  return Pplus*Pminus;
321 }
322 
324 {return Pstring;}
325 
327 {return Pleft;}
328 
330 {return Pright;}
G4LorentzVector GetPleft()
double mag2() const
G4LorentzVector GetPright()
G4double Mass() const
G4Parton * GetRightParton(void) const
CLHEP::Hep3Vector G4ThreeVector
double plus() const
G4ParticleDefinition * GetDefinition()
Definition: G4Parton.hh:161
G4ParticleDefinition * GetRightParton(void) const
G4ParticleDefinition * theDecayParton
const G4String & GetParticleSubType() const
G4FragmentingString(const G4FragmentingString &right)
G4FragmentingString & operator=(const G4FragmentingString &)
void setX(double)
G4double MassT2() const
G4int GetDirection(void) const
double G4double
Definition: G4Types.hh:76
bool G4bool
Definition: G4Types.hh:79
G4ParticleDefinition * theStableParton
G4int GetDecayDirection() const
double minus() const
void setZ(double)
G4LorentzVector Get4Momentum() const
G4Parton * GetLeftParton(void) const
static double P[]
double mag() const
int G4int
Definition: G4Types.hh:78
G4ParticleDefinition * GetLeftParton(void) const
G4ParticleDefinition * LeftParton
G4bool FourQuarkString(void) const
double pz() const
G4LorentzVector Get4Momentum() const
Hep3Vector boostVector() const
Hep3Vector vect() const
CLHEP::HepLorentzVector G4LorentzVector
const G4LorentzVector & Get4Momentum() const
Definition: G4Parton.hh:143
G4double Mass2() const
G4LorentzVector GetPstring()
void setY(double)
G4ParticleDefinition * RightParton