Geant4 Cross Reference

Cross-Referencing   Geant4
Geant4/processes/hadronic/models/parton_string/hadronization/src/G4FragmentingString.cc

Version: [ ReleaseNotes ] [ 1.0 ] [ 1.1 ] [ 2.0 ] [ 3.0 ] [ 3.1 ] [ 3.2 ] [ 4.0 ] [ 4.0.p1 ] [ 4.0.p2 ] [ 4.1 ] [ 4.1.p1 ] [ 5.0 ] [ 5.0.p1 ] [ 5.1 ] [ 5.1.p1 ] [ 5.2 ] [ 5.2.p1 ] [ 5.2.p2 ] [ 6.0 ] [ 6.0.p1 ] [ 6.1 ] [ 6.2 ] [ 6.2.p1 ] [ 6.2.p2 ] [ 7.0 ] [ 7.0.p1 ] [ 7.1 ] [ 7.1.p1 ] [ 8.0 ] [ 8.0.p1 ] [ 8.1 ] [ 8.1.p1 ] [ 8.1.p2 ] [ 8.2 ] [ 8.2.p1 ] [ 8.3 ] [ 8.3.p1 ] [ 8.3.p2 ] [ 9.0 ] [ 9.0.p1 ] [ 9.0.p2 ] [ 9.1 ] [ 9.1.p1 ] [ 9.1.p2 ] [ 9.1.p3 ] [ 9.2 ] [ 9.2.p1 ] [ 9.2.p2 ] [ 9.2.p3 ] [ 9.2.p4 ] [ 9.3 ] [ 9.3.p1 ] [ 9.3.p2 ] [ 9.4 ] [ 9.4.p1 ] [ 9.4.p2 ] [ 9.4.p3 ] [ 9.4.p4 ] [ 9.5 ] [ 9.5.p1 ] [ 9.5.p2 ] [ 9.6 ] [ 9.6.p1 ] [ 9.6.p2 ] [ 9.6.p3 ] [ 9.6.p4 ] [ 10.0 ] [ 10.0.p1 ] [ 10.0.p2 ] [ 10.0.p3 ] [ 10.0.p4 ] [ 10.1 ] [ 10.1.p1 ] [ 10.1.p2 ] [ 10.1.p3 ] [ 10.2 ] [ 10.2.p1 ] [ 10.2.p2 ] [ 10.2.p3 ] [ 10.3 ] [ 10.3.p1 ] [ 10.3.p2 ] [ 10.3.p3 ] [ 10.4 ] [ 10.4.p1 ] [ 10.4.p2 ] [ 10.4.p3 ] [ 10.5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /processes/hadronic/models/parton_string/hadronization/src/G4FragmentingString.cc (Version 11.3.0) and /processes/hadronic/models/parton_string/hadronization/src/G4FragmentingString.cc (Version 10.6.p3)


  1 //                                                  1 //
  2 // *******************************************      2 // ********************************************************************
  3 // * License and Disclaimer                         3 // * License and Disclaimer                                           *
  4 // *                                                4 // *                                                                  *
  5 // * The  Geant4 software  is  copyright of th      5 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
  6 // * the Geant4 Collaboration.  It is provided      6 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
  7 // * conditions of the Geant4 Software License      7 // * conditions of the Geant4 Software License,  included in the file *
  8 // * LICENSE and available at  http://cern.ch/      8 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
  9 // * include a list of copyright holders.           9 // * include a list of copyright holders.                             *
 10 // *                                               10 // *                                                                  *
 11 // * Neither the authors of this software syst     11 // * Neither the authors of this software system, nor their employing *
 12 // * institutes,nor the agencies providing fin     12 // * institutes,nor the agencies providing financial support for this *
 13 // * work  make  any representation or  warran     13 // * work  make  any representation or  warranty, express or implied, *
 14 // * regarding  this  software system or assum     14 // * regarding  this  software system or assume any liability for its *
 15 // * use.  Please see the license in the file      15 // * use.  Please see the license in the file  LICENSE  and URL above *
 16 // * for the full disclaimer and the limitatio     16 // * for the full disclaimer and the limitation of liability.         *
 17 // *                                               17 // *                                                                  *
 18 // * This  code  implementation is the result      18 // * This  code  implementation is the result of  the  scientific and *
 19 // * technical work of the GEANT4 collaboratio     19 // * technical work of the GEANT4 collaboration.                      *
 20 // * By using,  copying,  modifying or  distri     20 // * By using,  copying,  modifying or  distributing the software (or *
 21 // * any work based  on the software)  you  ag     21 // * any work based  on the software)  you  agree  to acknowledge its *
 22 // * use  in  resulting  scientific  publicati     22 // * use  in  resulting  scientific  publications,  and indicate your *
 23 // * acceptance of all terms of the Geant4 Sof     23 // * acceptance of all terms of the Geant4 Software license.          *
 24 // *******************************************     24 // ********************************************************************
 25 //                                                 25 //
 26 //                                                 26 //
 27                                                    27 
 28                                                    28 
 29 // -------------------------------------------     29 // ------------------------------------------------------------
 30 //      GEANT 4 class implementation file          30 //      GEANT 4 class implementation file
 31 //                                                 31 //
 32 //      ---------------- G4FragmentingString -     32 //      ---------------- G4FragmentingString ----------------
 33 //             by Gunter Folger, September 200     33 //             by Gunter Folger, September 2001.
 34 //       class for an excited string used in F     34 //       class for an excited string used in Fragmention
 35 // -------------------------------------------     35 // ------------------------------------------------------------
 36                                                    36 
 37                                                    37 
 38 // G4FragmentingString                             38 // G4FragmentingString
 39 #include "G4FragmentingString.hh"                  39 #include "G4FragmentingString.hh"
 40 #include "G4ExcitedString.hh"                      40 #include "G4ExcitedString.hh"
 41                                                    41 
 42 //--------------------------------------------     42 //---------------------------------------------------------------------------------
 43                                                    43 
 44 //--------------------------------------------     44 //---------------------------------------------------------------------------------
 45                                                    45 
 46 G4FragmentingString::G4FragmentingString(const     46 G4FragmentingString::G4FragmentingString(const G4FragmentingString &old)
 47 {                                                  47 {
 48   LeftParton=old.LeftParton;                       48   LeftParton=old.LeftParton;
 49   RightParton=old.RightParton;                     49   RightParton=old.RightParton;
 50   Ptleft=old.Ptleft;                               50   Ptleft=old.Ptleft;
 51   Ptright=old.Ptright;                             51   Ptright=old.Ptright;
 52   Pplus=old.Pplus;                                 52   Pplus=old.Pplus;
 53   Pminus=old.Pminus;                               53   Pminus=old.Pminus;
 54   theStableParton=old.theStableParton;             54   theStableParton=old.theStableParton;
 55   theDecayParton=old.theDecayParton;               55   theDecayParton=old.theDecayParton;
 56   decaying=old.decaying;                           56   decaying=old.decaying;
 57         Pstring=old.Pstring;                       57         Pstring=old.Pstring;
 58         Pleft  =old.Pleft;                         58         Pleft  =old.Pleft;
 59         Pright =old.Pright;                        59         Pright =old.Pright;
 60 }                                                  60 }
 61                                                    61 
 62 G4FragmentingString & G4FragmentingString::ope     62 G4FragmentingString & G4FragmentingString::operator =(const G4FragmentingString &old)
 63 {                                                  63 {
 64    if (this != &old)                               64    if (this != &old)
 65    {                                               65    {
 66      LeftParton=old.LeftParton;                    66      LeftParton=old.LeftParton;
 67      RightParton=old.RightParton;                  67      RightParton=old.RightParton;
 68      Ptleft=old.Ptleft;                            68      Ptleft=old.Ptleft;
 69      Ptright=old.Ptright;                          69      Ptright=old.Ptright;
 70      Pplus=old.Pplus;                              70      Pplus=old.Pplus;
 71      Pminus=old.Pminus;                            71      Pminus=old.Pminus;
 72      theStableParton=old.theStableParton;          72      theStableParton=old.theStableParton;
 73      theDecayParton=old.theDecayParton;            73      theDecayParton=old.theDecayParton;
 74      decaying=old.decaying;                        74      decaying=old.decaying;
 75      Pstring=old.Pstring;                          75      Pstring=old.Pstring;
 76      Pleft  =old.Pleft;                            76      Pleft  =old.Pleft;
 77      Pright =old.Pright;                           77      Pright =old.Pright;
 78    }                                               78    }
 79    return *this;                                   79    return *this;
 80 }                                                  80 }
 81                                                    81 
 82 //--------------------------------------------     82 //---------------------------------------------------------------------------------
 83                                                    83 
 84 G4FragmentingString::G4FragmentingString(const     84 G4FragmentingString::G4FragmentingString(const G4ExcitedString &excited)
 85 {                                                  85 {
 86   LeftParton=excited.GetLeftParton()->GetDefin     86   LeftParton=excited.GetLeftParton()->GetDefinition();
 87   RightParton=excited.GetRightParton()->GetDef     87   RightParton=excited.GetRightParton()->GetDefinition();
 88   Ptleft=excited.GetLeftParton()->Get4Momentum     88   Ptleft=excited.GetLeftParton()->Get4Momentum().vect();
 89   Ptleft.setZ(0.);                                 89   Ptleft.setZ(0.);
 90   Ptright=excited.GetRightParton()->Get4Moment     90   Ptright=excited.GetRightParton()->Get4Momentum().vect();
 91   Ptright.setZ(0.);                                91   Ptright.setZ(0.);
                                                   >>  92   G4LorentzVector P=excited.Get4Momentum();
                                                   >>  93   Pplus =P.e() + P.pz();
                                                   >>  94   Pminus=P.e() - P.pz();
 92   theStableParton=0;                               95   theStableParton=0;
 93   theDecayParton=0;                                96   theDecayParton=0;
 94                                                    97 
 95         if (excited.GetDirection() > 0) {decay     98         if (excited.GetDirection() > 0) {decaying=Left; }
 96         else                            {decay     99         else                            {decaying=Right;}
 97                                                   100 
 98         Pleft  = excited.GetLeftParton()->Get4    101         Pleft  = excited.GetLeftParton()->Get4Momentum();
 99         Pright = excited.GetRightParton()->Get    102         Pright = excited.GetRightParton()->Get4Momentum();
100         Pstring= Pleft + Pright;                  103         Pstring= Pleft + Pright;
101                                                << 
102         Pplus  = Pstring.plus();               << 
103         Pminus = Pstring.minus();              << 
104 }                                                 104 }
105                                                   105 
106 //--------------------------------------------    106 //---------------------------------------------------------------------------------
107                                                   107 
108 G4FragmentingString::G4FragmentingString(const    108 G4FragmentingString::G4FragmentingString(const G4FragmentingString &old,
109            G4ParticleDefinition * newdecay,       109            G4ParticleDefinition * newdecay,
110            const G4LorentzVector *momentum)       110            const G4LorentzVector *momentum)
111 {                                                 111 {
112   decaying=None;                                  112   decaying=None;
113   // Momentum of produced hadron               << 
114         G4LorentzVector Momentum = G4LorentzVe    113         G4LorentzVector Momentum = G4LorentzVector(momentum->vect(),momentum->e());
115                                                << 114              // Momentum of produced hadron
116         if ( old.decaying == Left )            << 115         //G4cout<<"Had Mom "<<Momentum<<G4endl;
117         {                                      << 116         //G4cout<<"Str Mom "<<old.Pstring<<G4endl;
118                 RightParton= old.RightParton;  << 117         Pstring = old.Pstring - Momentum;
119                 Ptright    = old.Ptright;      << 118         //G4cout<<"New Str Mom "<<Pstring<<" "<<Pstring.mag()<<G4endl;
120                 Pright     = old.Pright;       << 119 
121                                                << 120         G4double StringMass = Pstring.mag();
122                 LeftParton = newdecay;         << 121 
123                 Ptleft     = old.Ptleft - mome << 122         G4LorentzRotation toLAB(Pstring.boostVector());
124                 Ptleft.setZ(0.);               << 123 
125                 Pleft = old.Pleft - Momentum;  << 124         Pleft  = toLAB*G4LorentzVector(0.,0., StringMass/2.,StringMass/2.);
126                                                << 125         Pright = toLAB*G4LorentzVector(0.,0.,-StringMass/2.,StringMass/2.);
127                 Pstring = Pleft + Pright;      << 126 
128                 Pplus   = Pstring.plus();      << 127         Ptleft =Pleft.vect();  Ptleft.setZ(0.);
129                 Pminus  = Pstring.minus();     << 128         Ptright=Pright.vect(); Ptright.setZ(0.);
130                                                << 129 
131                 theDecayParton=GetLeftParton() << 130         //G4cout<<"Pleft   "<<Pleft<<G4endl;
132                 theStableParton=GetRightParton << 131         //G4cout<<"Pright  "<<Pright<<G4endl;
133                 decaying = Left;               << 132         //G4cout<<"Pstring "<<Pstring<<G4endl;
134         } else if ( old.decaying == Right )    << 133   if ( old.decaying == Left )
135         {                                      << 134   {
136           RightParton = newdecay;              << 135     RightParton= old.RightParton;
137                 Ptright     = old.Ptright - mo << 136                 // Ptright    = old.Ptright;
138                 Ptright.setZ(0.);              << 137                 // Pright = old.Pright;
139                 Pright = old.Pright - Momentum << 138 
140                                                << 139     LeftParton = newdecay;
141                 LeftParton  = old.LeftParton;  << 140                 // Ptleft     = old.Ptleft - momentum->vect();
142                 Ptleft      = old.Ptleft;      << 141                 // Ptleft.setZ(0.);
143                 Pleft  = old.Pleft;            << 142                 // Pleft  = old.Pleft - Momentum;
144                                                << 143                 // Pstring=Pleft + Pright;
145                 Pstring = Pleft + Pright;      << 144 
146                 Pplus   = Pstring.plus();      << 145     theDecayParton=GetLeftParton();
147                 Pminus  = Pstring.minus();     << 146     theStableParton=GetRightParton();
148                                                << 147     decaying=Left;
149                 theDecayParton=GetRightParton( << 148   } else if ( old.decaying == Right )
150                 theStableParton=GetLeftParton( << 149   {
151                 decaying = Right;              << 150     RightParton = newdecay;
152         } else                                 << 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 
                                                   >> 160     theDecayParton=GetRightParton();
                                                   >> 161     theStableParton=GetLeftParton();
                                                   >> 162     decaying=Right;
                                                   >> 163   } else
153   {                                               164   {
154     throw G4HadronicException(__FILE__, __LINE    165     throw G4HadronicException(__FILE__, __LINE__, 
155                   "G4FragmentingString::G4Frag    166                   "G4FragmentingString::G4FragmentingString: no decay Direction defined");
156   }                                               167   }
                                                   >> 168   Pplus  = Pstring.plus();   //old.Pplus  - (momentum->e() + momentum->pz());
                                                   >> 169   Pminus = Pstring.minus();  //old.Pminus - (momentum->e() - momentum->pz());
157 }                                                 170 }
158                                                   171 
159                                                   172 
160 //--------------------------------------------    173 //---------------------------------------------------------------------------------
161                                                   174 
162 G4FragmentingString::G4FragmentingString(const    175 G4FragmentingString::G4FragmentingString(const G4FragmentingString &old,  
163            G4ParticleDefinition * newdecay)       176            G4ParticleDefinition * newdecay) 
164 {                                                 177 {                                                                         
165   decaying=None;                                  178   decaying=None;                                                    
166                                                   179 
167         Ptleft.setX(0.);  Ptleft.setY(0.);  Pt    180         Ptleft.setX(0.);  Ptleft.setY(0.);  Ptleft.setZ(0.);
168         Ptright.setX(0.); Ptright.setY(0.); Pt    181         Ptright.setX(0.); Ptright.setY(0.); Ptright.setZ(0.);
169         Pplus=0.; Pminus=0.;                      182         Pplus=0.; Pminus=0.;                               
170         theStableParton=0; theDecayParton=0;      183         theStableParton=0; theDecayParton=0;              
171                                                   184 
172         Pstring=G4LorentzVector(0.,0.,0.,0.);     185         Pstring=G4LorentzVector(0.,0.,0.,0.);
173         Pleft  =G4LorentzVector(0.,0.,0.,0.);     186         Pleft  =G4LorentzVector(0.,0.,0.,0.);
174         Pright =G4LorentzVector(0.,0.,0.,0.);     187         Pright =G4LorentzVector(0.,0.,0.,0.);
175                                                   188 
176   if ( old.decaying == Left )                     189   if ( old.decaying == Left )                                       
177   {                                               190   {                                                                 
178     RightParton= old.RightParton;                 191     RightParton= old.RightParton;                             
179     LeftParton = newdecay;                        192     LeftParton = newdecay;                                    
180                 decaying=Left;                    193                 decaying=Left;
181   } else if ( old.decaying == Right )             194   } else if ( old.decaying == Right )                               
182   {                                               195   {                                                                 
183     RightParton = newdecay;                       196     RightParton = newdecay;                                   
184     LeftParton  = old.LeftParton;                 197     LeftParton  = old.LeftParton;                             
185                 decaying=Right;                   198                 decaying=Right;
186   } else                                          199   } else                                                            
187   {                                               200   {
188     throw G4HadronicException(__FILE__, __LINE    201     throw G4HadronicException(__FILE__, __LINE__, 
189                   "G4FragmentingString::G4Frag    202                   "G4FragmentingString::G4FragmentingString: no decay Direction defined");
190   }                                               203   }
191 }                                                 204 }
192                                                   205 
193                                                   206 
194 //--------------------------------------------    207 //---------------------------------------------------------------------------------
195                                                   208 
196 G4FragmentingString::~G4FragmentingString()       209 G4FragmentingString::~G4FragmentingString()
197 {}                                                210 {}
198                                                   211 
                                                   >> 212 
199 //--------------------------------------------    213 //---------------------------------------------------------------------------------
200                                                   214 
201 void G4FragmentingString::SetLeftPartonStable(    215 void G4FragmentingString::SetLeftPartonStable()
202 {                                                 216 {
203      theStableParton=GetLeftParton();             217      theStableParton=GetLeftParton();
204      theDecayParton=GetRightParton();             218      theDecayParton=GetRightParton();
205      decaying=Right;                              219      decaying=Right;
206 }                                                 220 }
207                                                   221 
208 //--------------------------------------------    222 //---------------------------------------------------------------------------------
209                                                   223 
210 void G4FragmentingString::SetRightPartonStable    224 void G4FragmentingString::SetRightPartonStable()
211 {                                                 225 {
212      theStableParton=GetRightParton();            226      theStableParton=GetRightParton();
213      theDecayParton=GetLeftParton();              227      theDecayParton=GetLeftParton();
214      decaying=Left;                               228      decaying=Left;
215 }                                                 229 }
216                                                   230 
217 //--------------------------------------------    231 //---------------------------------------------------------------------------------
218                                                   232 
219 G4int G4FragmentingString::GetDecayDirection()    233 G4int G4FragmentingString::GetDecayDirection() const
220 {                                                 234 {
221   if      (decaying == Left ) return +1;          235   if      (decaying == Left ) return +1;
222   else if (decaying == Right) return -1;          236   else if (decaying == Right) return -1;
223   else throw G4HadronicException(__FILE__, __L    237   else throw G4HadronicException(__FILE__, __LINE__, 
224                "G4FragmentingString::GetDecayD    238                "G4FragmentingString::GetDecayDirection: decay side UNdefined!");
225   return 0;                                       239   return 0;
226 }                                                 240 }
227                                                   241  
228 //--------------------------------------------    242 //---------------------------------------------------------------------------------
229                                                   243 
230 G4bool G4FragmentingString::IsAFourQuarkString    244 G4bool G4FragmentingString::IsAFourQuarkString() const
231 {                                                 245 {
232   return   LeftParton->GetParticleSubType()==     246   return   LeftParton->GetParticleSubType()== "di_quark" 
233        && RightParton->GetParticleSubType()==     247        && RightParton->GetParticleSubType()== "di_quark";
234 }                                                 248 }
235                                                   249 
236 //--------------------------------------------    250 //---------------------------------------------------------------------------------
237                                                   251 
238 G4bool G4FragmentingString::DecayIsQuark()        252 G4bool G4FragmentingString::DecayIsQuark()
239 {                                                 253 {
240   return theDecayParton->GetParticleSubType()=    254   return theDecayParton->GetParticleSubType()== "quark";
241 }                                                 255 }
242                                                   256 
243 G4bool G4FragmentingString::StableIsQuark()       257 G4bool G4FragmentingString::StableIsQuark()
244 {                                                 258 {
245   return theStableParton->GetParticleSubType()    259   return theStableParton->GetParticleSubType()== "quark";
246 }                                                 260 }
247                                                   261 
248 //--------------------------------------------    262 //---------------------------------------------------------------------------------
249                                                   263 
250 G4ThreeVector G4FragmentingString::StablePt()     264 G4ThreeVector G4FragmentingString::StablePt()
251 {                                                 265 {
252   if (decaying == Left ) return Ptright;          266   if (decaying == Left ) return Ptright;
253   else if (decaying == Right ) return Ptleft;     267   else if (decaying == Right ) return Ptleft;
254   else throw G4HadronicException(__FILE__, __L    268   else throw G4HadronicException(__FILE__, __LINE__, "G4FragmentingString::DecayPt: decay side UNdefined!");
255   return G4ThreeVector();                         269   return G4ThreeVector();
256 }                                                 270 }
257                                                   271 
258 G4ThreeVector G4FragmentingString::DecayPt()      272 G4ThreeVector G4FragmentingString::DecayPt()
259 {                                                 273 {
260   if (decaying == Left ) return Ptleft;           274   if (decaying == Left ) return Ptleft;
261   else if (decaying == Right ) return Ptright;    275   else if (decaying == Right ) return Ptright;
262   else throw G4HadronicException(__FILE__, __L    276   else throw G4HadronicException(__FILE__, __LINE__, "G4FragmentingString::DecayPt: decay side UNdefined!");
263   return G4ThreeVector();                         277   return G4ThreeVector();
264 }                                                 278 }
265                                                   279 
266 //--------------------------------------------    280 //---------------------------------------------------------------------------------
267                                                   281 
268 G4double G4FragmentingString::LightConePlus()     282 G4double G4FragmentingString::LightConePlus()
269 {                                                 283 {
270   return Pplus;                                   284   return Pplus;
271 }                                                 285 }
272                                                   286 
273 G4double G4FragmentingString::LightConeMinus()    287 G4double G4FragmentingString::LightConeMinus()
274 {                                                 288 {
275   return Pminus;                                  289   return Pminus;
276 }                                                 290 }
277                                                   291 
278 G4double G4FragmentingString::LightConeDecay()    292 G4double G4FragmentingString::LightConeDecay()
279 {                                                 293 {
280   if (decaying == Left ) return Pplus;            294   if (decaying == Left ) return Pplus;
281   else if (decaying == Right ) return Pminus;     295   else if (decaying == Right ) return Pminus;
282   else throw G4HadronicException(__FILE__, __L    296   else throw G4HadronicException(__FILE__, __LINE__, "G4FragmentingString::DecayPt: decay side UNdefined!");
283 }                                                 297 }
284                                                   298 
285 //--------------------------------------------    299 //---------------------------------------------------------------------------------
286                                                   300 
287 G4LorentzVector G4FragmentingString::Get4Momen    301 G4LorentzVector G4FragmentingString::Get4Momentum() const
288 {                                                 302 {
289         return Pstring;                        << 303         G4LorentzVector momentum(Ptleft+Ptright,0);
                                                   >> 304   momentum.setPz(0.5*(Pplus-Pminus));
                                                   >> 305   momentum.setE(0.5*(Pplus+Pminus));
                                                   >> 306   return momentum;
290 }                                                 307 }
291                                                   308 
292 G4double G4FragmentingString::Mass2() const       309 G4double G4FragmentingString::Mass2() const
293 {                                                 310 {
                                                   >> 311   // return Pplus*Pminus - (Ptleft+Ptright).mag2();
294   return Pstring.mag2();                          312   return Pstring.mag2();
295 }                                                 313 }
296                                                   314 
297 G4double G4FragmentingString::Mass() const        315 G4double G4FragmentingString::Mass() const
298 {                                                 316 {
                                                   >> 317   // return std::sqrt(this->Mass2());
299   return Pstring.mag();                           318   return Pstring.mag();
300 }                                                 319 }
301                                                   320 
302 G4double G4FragmentingString::MassT2() const      321 G4double G4FragmentingString::MassT2() const
303 {                                                 322 {
304   return Pplus*Pminus;                            323   return Pplus*Pminus;
305 }                                                 324 }
306                                                   325 
307 G4LorentzVector G4FragmentingString::GetPstrin    326 G4LorentzVector G4FragmentingString::GetPstring()
308 {                                                 327 { 
309   return Pstring;                                 328   return Pstring;
310 }                                                 329 }
311                                                   330 
312 G4LorentzVector G4FragmentingString::GetPleft(    331 G4LorentzVector G4FragmentingString::GetPleft()
313 {                                                 332 { 
314   return Pleft;                                   333   return Pleft;
315 }                                                 334 }
316                                                   335 
317 G4LorentzVector G4FragmentingString::GetPright    336 G4LorentzVector G4FragmentingString::GetPright()
318 {                                                 337 { 
319   return Pright;                                  338   return Pright;
320 }                                                 339 }
321                                                   340 
322 G4LorentzRotation G4FragmentingString::Transfo << 
323 {                                              << 
324      G4LorentzVector momentum = Pstring;       << 
325      G4LorentzRotation toAlignedCms(-1*momentu << 
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                                                << 
335      Ptleft  = G4ThreeVector(Pleft.vect());    << 
336      Ptleft.setZ(0.);                          << 
337      Ptright = G4ThreeVector(Pright.vect());   << 
338      Pplus  = Pstring.plus();                  << 
339      Pminus = Pstring.minus();                 << 
340                                                << 
341      return toAlignedCms;                      << 
342 }                                              << 
343                                                   341