Geant4-11
G4FragmentingString.cc
Go to the documentation of this file.
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
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;
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;
75 Pstring=old.Pstring;
76 Pleft =old.Pleft;
77 Pright =old.Pright;
78 }
79 return *this;
80}
81
82//---------------------------------------------------------------------------------
83
85{
89 Ptleft.setZ(0.);
91 Ptright.setZ(0.);
94
95 if (excited.GetDirection() > 0) {decaying=Left; }
96 else {decaying=Right;}
97
98 Pleft = excited.GetLeftParton()->Get4Momentum();
99 Pright = excited.GetRightParton()->Get4Momentum();
101
102 Pplus = Pstring.plus();
103 Pminus = Pstring.minus();
104}
105
106//---------------------------------------------------------------------------------
107
109 G4ParticleDefinition * newdecay,
110 const G4LorentzVector *momentum)
111{
113 // Momentum of produced hadron
114 G4LorentzVector Momentum = G4LorentzVector(momentum->vect(),momentum->e());
115
116 if ( old.decaying == Left )
117 {
119 Ptright = old.Ptright;
120 Pright = old.Pright;
121
122 LeftParton = newdecay;
123 Ptleft = old.Ptleft - momentum->vect();
124 Ptleft.setZ(0.);
125 Pleft = old.Pleft - Momentum;
126
127 Pstring = Pleft + Pright;
128 Pplus = Pstring.plus();
129 Pminus = Pstring.minus();
130
133 decaying = Left;
134 } else if ( old.decaying == Right )
135 {
136 RightParton = newdecay;
137 Ptright = old.Ptright - momentum->vect();
138 Ptright.setZ(0.);
139 Pright = old.Pright - Momentum;
140
142 Ptleft = old.Ptleft;
143 Pleft = old.Pleft;
144
145 Pstring = Pleft + Pright;
146 Pplus = Pstring.plus();
147 Pminus = Pstring.minus();
148
151 decaying = Right;
152 } else
153 {
154 throw G4HadronicException(__FILE__, __LINE__,
155 "G4FragmentingString::G4FragmentingString: no decay Direction defined");
156 }
157}
158
159
160//---------------------------------------------------------------------------------
161
163 G4ParticleDefinition * newdecay)
164{
165 decaying=None;
166
167 Ptleft.setX(0.); Ptleft.setY(0.); Ptleft.setZ(0.);
168 Ptright.setX(0.); Ptright.setY(0.); Ptright.setZ(0.);
169 Pplus=0.; Pminus=0.;
171
172 Pstring=G4LorentzVector(0.,0.,0.,0.);
173 Pleft =G4LorentzVector(0.,0.,0.,0.);
174 Pright =G4LorentzVector(0.,0.,0.,0.);
175
176 if ( old.decaying == Left )
177 {
179 LeftParton = newdecay;
181 } else if ( old.decaying == Right )
182 {
183 RightParton = newdecay;
184 LeftParton = old.LeftParton;
186 } else
187 {
188 throw G4HadronicException(__FILE__, __LINE__,
189 "G4FragmentingString::G4FragmentingString: no decay Direction defined");
190 }
191}
192
193
194//---------------------------------------------------------------------------------
195
197{}
198
199//---------------------------------------------------------------------------------
200
202{
206}
207
208//---------------------------------------------------------------------------------
209
211{
215}
216
217//---------------------------------------------------------------------------------
218
220{
221 if (decaying == Left ) return +1;
222 else if (decaying == Right) return -1;
223 else throw G4HadronicException(__FILE__, __LINE__,
224 "G4FragmentingString::GetDecayDirection: decay side UNdefined!");
225 return 0;
226}
227
228//---------------------------------------------------------------------------------
229
231{
232 return LeftParton->GetParticleSubType()== "di_quark"
233 && RightParton->GetParticleSubType()== "di_quark";
234}
235
236//---------------------------------------------------------------------------------
237
239{
240 return theDecayParton->GetParticleSubType()== "quark";
241}
242
244{
245 return theStableParton->GetParticleSubType()== "quark";
246}
247
248//---------------------------------------------------------------------------------
249
251{
252 if (decaying == Left ) return Ptright;
253 else if (decaying == Right ) return Ptleft;
254 else throw G4HadronicException(__FILE__, __LINE__, "G4FragmentingString::DecayPt: decay side UNdefined!");
255 return G4ThreeVector();
256}
257
259{
260 if (decaying == Left ) return Ptleft;
261 else if (decaying == Right ) return Ptright;
262 else throw G4HadronicException(__FILE__, __LINE__, "G4FragmentingString::DecayPt: decay side UNdefined!");
263 return G4ThreeVector();
264}
265
266//---------------------------------------------------------------------------------
267
269{
270 return Pplus;
271}
272
274{
275 return Pminus;
276}
277
279{
280 if (decaying == Left ) return Pplus;
281 else if (decaying == Right ) return Pminus;
282 else throw G4HadronicException(__FILE__, __LINE__, "G4FragmentingString::DecayPt: decay side UNdefined!");
283}
284
285//---------------------------------------------------------------------------------
286
288{
289 return Pstring;
290}
291
293{
294 return Pstring.mag2();
295}
296
298{
299 return Pstring.mag();
300}
301
303{
304 return Pplus*Pminus;
305}
306
308{
309 return Pstring;
310}
311
313{
314 return Pleft;
315}
316
318{
319 return Pright;
320}
321
323{
324 G4LorentzVector momentum = Pstring;
325 G4LorentzRotation toAlignedCms(-1*momentum.boostVector());
326 momentum = toAlignedCms * Pleft;
327
328 toAlignedCms.rotateZ(-1*momentum.phi());
329 toAlignedCms.rotateY(-1*momentum.theta());
330
331 Pleft *= toAlignedCms;
332 Pright *= toAlignedCms;
333 Pstring *= toAlignedCms;
334
336 Ptleft.setZ(0.);
338 Pplus = Pstring.plus();
339 Pminus = Pstring.minus();
340
341 return toAlignedCms;
342}
CLHEP::HepLorentzVector G4LorentzVector
CLHEP::Hep3Vector G4ThreeVector
double G4double
Definition: G4Types.hh:83
bool G4bool
Definition: G4Types.hh:86
int G4int
Definition: G4Types.hh:85
void setY(double)
void setZ(double)
void setX(double)
HepLorentzRotation & rotateY(double delta)
HepLorentzRotation & rotateZ(double delta)
double theta() const
Hep3Vector boostVector() const
Hep3Vector vect() const
double minus() const
G4int GetDirection(void) const
G4Parton * GetRightParton(void) const
G4Parton * GetLeftParton(void) const
G4bool IsAFourQuarkString(void) const
G4ParticleDefinition * theDecayParton
G4ParticleDefinition * theStableParton
G4ParticleDefinition * GetLeftParton(void) const
G4ParticleDefinition * GetRightParton(void) const
G4LorentzVector Get4Momentum() const
G4LorentzVector GetPstring()
G4LorentzRotation TransformToAlignedCms()
G4int GetDecayDirection() const
G4LorentzVector GetPright()
G4FragmentingString(const G4FragmentingString &right)
G4FragmentingString & operator=(const G4FragmentingString &)
G4ParticleDefinition * RightParton
G4LorentzVector GetPleft()
G4ParticleDefinition * LeftParton
const G4String & GetParticleSubType() const
G4ParticleDefinition * GetDefinition()
Definition: G4Parton.hh:161
const G4LorentzVector & Get4Momentum() const
Definition: G4Parton.hh:143