Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
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{
48 LeftParton=old.LeftParton;
49 RightParton=old.RightParton;
50 Ptleft=old.Ptleft;
51 Ptright=old.Ptright;
52 Pplus=old.Pplus;
53 Pminus=old.Pminus;
54 theStableParton=old.theStableParton;
55 theDecayParton=old.theDecayParton;
56 decaying=old.decaying;
57}
58
60{
61 if (this != &old)
62 {
63 LeftParton=old.LeftParton;
64 RightParton=old.RightParton;
65 Ptleft=old.Ptleft;
66 Ptright=old.Ptright;
67 Pplus=old.Pplus;
68 Pminus=old.Pminus;
69 theStableParton=old.theStableParton;
70 theDecayParton=old.theDecayParton;
71 decaying=old.decaying;
72 }
73 return *this;
74}
75
76//---------------------------------------------------------------------------------
77
79{
80 LeftParton=excited.GetLeftParton()->GetDefinition();
81 RightParton=excited.GetRightParton()->GetDefinition();
82 Ptleft=excited.GetLeftParton()->Get4Momentum().vect();
83 Ptleft.setZ(0.);
84 Ptright=excited.GetRightParton()->Get4Momentum().vect();
85 Ptright.setZ(0.);
86 G4LorentzVector P=excited.Get4Momentum();
87 Pplus =P.e() + P.pz();
88 Pminus=P.e() - P.pz();
89 theStableParton=0;
90 theDecayParton=0;
91 decaying=None;
92}
93
94//---------------------------------------------------------------------------------
95
97 G4ParticleDefinition * newdecay,
98 const G4LorentzVector *momentum)
99{
100 decaying=None;
101 if ( old.decaying == Left )
102 {
103 RightParton= old.RightParton;
104 Ptright = old.Ptright;
105 LeftParton = newdecay;
106 Ptleft = old.Ptleft - momentum->vect();
107 Ptleft.setZ(0.);
108 theDecayParton=GetLeftParton();
109 theStableParton=GetRightParton();
110 } else if ( old.decaying == Right )
111 {
112 RightParton = newdecay;
113 Ptright = old.Ptright - momentum->vect();
114 Ptright.setZ(0.);
115 LeftParton = old.LeftParton;
116 Ptleft = old.Ptleft;
117 theDecayParton=GetRightParton();
118 theStableParton=GetLeftParton();
119 } else
120 {
121 throw G4HadronicException(__FILE__, __LINE__, "G4FragmentingString::G4FragmentingString: no decay Direction defined");
122 }
123 Pplus = old.Pplus - (momentum->e() + momentum->pz());
124 Pminus = old.Pminus - (momentum->e() - momentum->pz());
125
126 //G4double Eold=0.5 * (old.Pplus + old.Pminus);
127 //G4double Enew=0.5 * (Pplus + Pminus);
128}
129
130
131//---------------------------------------------------------------------------------
132
134 G4ParticleDefinition * newdecay)
135{
136 decaying=None;
137
138 Ptleft.setX(0.); Ptleft.setY(0.); Ptleft.setZ(0.); // Uzhi 25.02.2011
139 Ptright.setX(0.); Ptright.setY(0.); Ptright.setZ(0.); // Uzhi 25.02.2011
140 Pplus=0.; Pminus=0.; // Uzhi 25.02.2011
141 theStableParton=0; theDecayParton=0; // Uzhi 25.02.2011
142
143 if ( old.decaying == Left )
144 {
145 RightParton= old.RightParton;
146 LeftParton = newdecay;
147 } else if ( old.decaying == Right )
148 {
149 RightParton = newdecay;
150 LeftParton = old.LeftParton;
151 } else
152 {
153 throw G4HadronicException(__FILE__, __LINE__, "G4FragmentingString::G4FragmentingString: no decay Direction defined");
154 }
155}
156
157
158//---------------------------------------------------------------------------------
159
161{}
162
163
164//---------------------------------------------------------------------------------
165
167{
168 theStableParton=GetLeftParton();
169 theDecayParton=GetRightParton();
170 decaying=Right;
171}
172
173//---------------------------------------------------------------------------------
174
176{
177 theStableParton=GetRightParton();
178 theDecayParton=GetLeftParton();
179 decaying=Left;
180}
181
182//---------------------------------------------------------------------------------
183
185{
186 if (decaying == Left ) return +1;
187 else if (decaying == Right) return -1;
188 else throw G4HadronicException(__FILE__, __LINE__, "G4FragmentingString::GetDecayDirection: decay side UNdefined!");
189 return 0;
190}
191
192//---------------------------------------------------------------------------------
193
195{
196 return LeftParton->GetParticleSubType()== "di_quark"
197 && RightParton->GetParticleSubType()== "di_quark";
198}
199
200//---------------------------------------------------------------------------------
201
203{
204 return theDecayParton->GetParticleSubType()== "quark";
205}
206
208{
209 return theStableParton->GetParticleSubType()== "quark";
210}
211
212//---------------------------------------------------------------------------------
213
215{
216 if (decaying == Left ) return Ptright;
217 else if (decaying == Right ) return Ptleft;
218 else throw G4HadronicException(__FILE__, __LINE__, "G4FragmentingString::DecayPt: decay side UNdefined!");
219 return G4ThreeVector();
220}
221
223{
224 if (decaying == Left ) return Ptleft;
225 else if (decaying == Right ) return Ptright;
226 else throw G4HadronicException(__FILE__, __LINE__, "G4FragmentingString::DecayPt: decay side UNdefined!");
227 return G4ThreeVector();
228}
229
230//---------------------------------------------------------------------------------
231
233{
234 return Pplus;
235}
236
238{
239 return Pminus;
240}
241
243{
244 if (decaying == Left ) return Pplus;
245 else if (decaying == Right ) return Pminus;
246 else throw G4HadronicException(__FILE__, __LINE__, "G4FragmentingString::DecayPt: decay side UNdefined!");
247 return 0;
248}
249
250//---------------------------------------------------------------------------------
251
253{
254 G4LorentzVector momentum(Ptleft+Ptright,0);
255 momentum.setPz(0.5*(Pplus-Pminus));
256 momentum.setE(0.5*(Pplus+Pminus));
257 return momentum;
258}
259
261{
262 return Pplus*Pminus - (Ptleft+Ptright).mag2();
263}
264
266{
267 return std::sqrt(this->Mass2());
268}
269
271{
272 return Pplus*Pminus;
273}
CLHEP::Hep3Vector G4ThreeVector
double G4double
Definition: G4Types.hh:64
int G4int
Definition: G4Types.hh:66
bool G4bool
Definition: G4Types.hh:67
void setY(double)
void setZ(double)
void setX(double)
Hep3Vector vect() const
G4Parton * GetRightParton(void) const
G4Parton * GetLeftParton(void) const
G4LorentzVector Get4Momentum() const
G4ParticleDefinition * GetLeftParton(void) const
G4ParticleDefinition * GetRightParton(void) const
G4LorentzVector Get4Momentum() const
G4int GetDecayDirection() const
G4FragmentingString(const G4FragmentingString &right)
G4FragmentingString & operator=(const G4FragmentingString &)
G4bool FourQuarkString(void) const
const G4String & GetParticleSubType() const
G4ParticleDefinition * GetDefinition()
Definition: G4Parton.hh:158
const G4LorentzVector & Get4Momentum() const
Definition: G4Parton.hh:140