G4QGSMFragmentation Class Reference

#include <G4QGSMFragmentation.hh>

Inheritance diagram for G4QGSMFragmentation:

G4VLongitudinalStringDecay

Public Member Functions

 G4QGSMFragmentation ()
 ~G4QGSMFragmentation ()
virtual G4KineticTrackVectorFragmentString (const G4ExcitedString &theString)

Detailed Description

Definition at line 40 of file G4QGSMFragmentation.hh.


Constructor & Destructor Documentation

G4QGSMFragmentation::G4QGSMFragmentation (  ) 

Definition at line 45 of file G4QGSMFragmentation.cc.

00045                                          :
00046 arho(0.5), aphi(0.), an(-0.5), ala(-0.75), aksi(-1.), alft(0.5)
00047    {
00048    }

G4QGSMFragmentation::~G4QGSMFragmentation (  ) 

Definition at line 50 of file G4QGSMFragmentation.cc.

00051    {
00052    }


Member Function Documentation

G4KineticTrackVector * G4QGSMFragmentation::FragmentString ( const G4ExcitedString theString  )  [virtual]

Implements G4VLongitudinalStringDecay.

Definition at line 56 of file G4QGSMFragmentation.cc.

References C1, G4VLongitudinalStringDecay::CalculateHadronTimePosition(), G4VLongitudinalStringDecay::CPExcited(), G4ExcitedString::Get4Momentum(), G4FragmentingString::GetDecayDirection(), G4ExcitedString::GetPosition(), G4VLongitudinalStringDecay::LightFragmentationTest(), G4VLongitudinalStringDecay::PastInitPhase, G4VLongitudinalStringDecay::Splitup(), G4VLongitudinalStringDecay::StringLoopInterrupt, and G4ExcitedString::TransformToAlignedCms().

00057 {
00058 //    Can no longer modify Parameters for Fragmentation.
00059         PastInitPhase=true;
00060         
00061 //      check if string has enough mass to fragment...
00062         G4KineticTrackVector * LeftVector=LightFragmentationTest(&theString);
00063         if ( LeftVector != 0 ) return LeftVector;
00064         
00065         LeftVector = new G4KineticTrackVector;
00066         G4KineticTrackVector * RightVector=new G4KineticTrackVector;
00067 
00068 // this should work but its only a semi deep copy. %GF  G4ExcitedString theStringInCMS(theString);
00069         G4ExcitedString *theStringInCMS=CPExcited(theString);
00070         G4LorentzRotation toCms=theStringInCMS->TransformToAlignedCms();
00071 
00072         G4bool success=false, inner_sucess=true;
00073         G4int attempt=0;
00074         while ( !success && attempt++ < StringLoopInterrupt )
00075         {
00076                 G4FragmentingString *currentString=new G4FragmentingString(*theStringInCMS);
00077 
00078                 std::for_each(LeftVector->begin(), LeftVector->end(), DeleteKineticTrack());
00079                 LeftVector->clear();
00080                 std::for_each(RightVector->begin(), RightVector->end(), DeleteKineticTrack());
00081                 RightVector->clear();
00082                 
00083                 inner_sucess=true;  // set false on failure..
00084                 while (! StopFragmenting(currentString) )
00085                 {  // Split current string into hadron + new string
00086                         G4FragmentingString *newString=0;  // used as output from SplitUp...
00087                         G4KineticTrack * Hadron=Splitup(currentString,newString);
00088                         if ( Hadron != 0 && IsFragmentable(newString)) 
00089                         {
00090                            if ( currentString->GetDecayDirection() > 0 )
00091                                    LeftVector->push_back(Hadron);
00092                            else
00093                                    RightVector->push_back(Hadron);
00094                            delete currentString;
00095                            currentString=newString;
00096                         } else {
00097                          // abandon ... start from the beginning
00098                            if (newString) delete newString;          // Uzhi restore 20.06.08
00099                            if (Hadron)    delete Hadron;
00100                            inner_sucess=false;
00101                            break;
00102                         }
00103                 } 
00104                 // Split current string into 2 final Hadrons
00105                 if ( inner_sucess && 
00106                      SplitLast(currentString,LeftVector, RightVector) ) 
00107                 {
00108                         success=true;
00109                 }
00110                 delete currentString;
00111         }
00112         
00113         delete theStringInCMS;
00114         
00115         if ( ! success )
00116         {
00117                 std::for_each(LeftVector->begin(), LeftVector->end(), DeleteKineticTrack());
00118                 LeftVector->clear();
00119                 std::for_each(RightVector->begin(), RightVector->end(), DeleteKineticTrack());
00120                 delete RightVector;
00121                 return LeftVector;
00122         }
00123                 
00124         // Join Left- and RightVector into LeftVector in correct order.
00125         while(!RightVector->empty())
00126         {
00127             LeftVector->push_back(RightVector->back());
00128             RightVector->erase(RightVector->end()-1);
00129         }
00130         delete RightVector;
00131 
00132         CalculateHadronTimePosition(theString.Get4Momentum().mag(), LeftVector);
00133 
00134         G4LorentzRotation toObserverFrame(toCms.inverse());
00135 
00136         for(size_t C1 = 0; C1 < LeftVector->size(); C1++)
00137         {
00138            G4KineticTrack* Hadron = LeftVector->operator[](C1);
00139            G4LorentzVector Momentum = Hadron->Get4Momentum();
00140            Momentum = toObserverFrame*Momentum;
00141            Hadron->Set4Momentum(Momentum);
00142            G4LorentzVector Coordinate(Hadron->GetPosition(), Hadron->GetFormationTime());
00143            Momentum = toObserverFrame*Coordinate;
00144            Hadron->SetFormationTime(Momentum.e());
00145            G4ThreeVector aPosition(Momentum.vect());
00146            Hadron->SetPosition(theString.GetPosition()+aPosition);
00147         }
00148         return LeftVector;
00149                 
00150 
00151 
00152 }


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:53:08 2013 for Geant4 by  doxygen 1.4.7