G4ExcitedString Class Reference

#include <G4ExcitedString.hh>


Public Types

 PROJECTILE = 1
 TARGET = -1
enum  { PROJECTILE = 1, TARGET = -1 }

Public Member Functions

 G4ExcitedString (G4Parton *Color, G4Parton *Gluon, G4Parton *AntiColor, G4int Direction=PROJECTILE)
 G4ExcitedString (G4Parton *Color, G4Parton *AntiColor, G4int Direction=PROJECTILE)
 G4ExcitedString (G4KineticTrack *atrack)
 ~G4ExcitedString ()
int operator== (const G4ExcitedString &right) const
int operator!= (const G4ExcitedString &right) const
G4double GetTimeOfCreation () const
void SetTimeOfCreation (G4double aTime)
const G4ThreeVector & GetPosition () const
void SetPosition (const G4ThreeVector &aPosition)
const G4PartonVector * GetPartonList () const
G4LorentzVector Get4Momentum () const
void LorentzRotate (const G4LorentzRotation &rotation)
void InsertParton (G4Parton *aParton, const G4Parton *addafter=NULL)
G4LorentzRotation TransformToCenterOfMass ()
G4LorentzRotation TransformToAlignedCms ()
void Boost (G4ThreeVector &Velocity)
G4Parton * GetColorParton (void) const
G4Parton * GetGluon (void) const
G4Parton * GetAntiColorParton (void) const
G4Parton * GetGluon (G4int GluonPos) const
G4KineticTrack * GetKineticTrack () const
G4Parton * GetLeftParton (void) const
G4Parton * GetRightParton (void) const
G4bool IsItKinkyString (void) const
G4int GetDirection (void) const
G4bool IsExcited () const


Detailed Description

Definition at line 51 of file G4ExcitedString.hh.


Member Enumeration Documentation

anonymous enum

Enumerator:
PROJECTILE 
TARGET 

Definition at line 56 of file G4ExcitedString.hh.

00056            {
00057            PROJECTILE  = 1, 
00058            TARGET  = -1 
00059            };


Constructor & Destructor Documentation

G4ExcitedString::G4ExcitedString ( G4Parton *  Color,
G4Parton *  Gluon,
G4Parton *  AntiColor,
G4int  Direction = PROJECTILE 
)

Definition at line 53 of file G4ExcitedString.cc.

References G4Parton::GetPosition().

00054     {
00055     thePartons.push_back(Color);
00056     thePartons.push_back(Gluon);
00057     thePartons.push_back(AntiColor);
00058     theTimeOfCreation = 0.;                            // Uzhi 15.05.08
00059     thePosition = Color->GetPosition();
00060     theDirection = Direction;
00061     theTrack=0;
00062     }

G4ExcitedString::G4ExcitedString ( G4Parton *  Color,
G4Parton *  AntiColor,
G4int  Direction = PROJECTILE 
)

Definition at line 43 of file G4ExcitedString.cc.

References G4Parton::GetPosition().

00044     {
00045     thePartons.push_back(Color);
00046     thePartons.push_back(AntiColor);
00047     theTimeOfCreation = 0.;                           // Uzhi 15.05.08
00048     thePosition = Color->GetPosition();
00049     theDirection = Direction;
00050     theTrack=0;
00051     }

G4ExcitedString::G4ExcitedString ( G4KineticTrack *  atrack  ) 

Definition at line 64 of file G4ExcitedString.cc.

References G4KineticTrack::GetFormationTime(), and G4KineticTrack::GetPosition().

00065 {
00066         theTimeOfCreation = track->GetFormationTime(); // Uzhi 15.05.08
00067         thePosition = track->GetPosition();
00068         theTrack= track;
00069         theDirection=0;
00070 }

G4ExcitedString::~G4ExcitedString (  ) 

Definition at line 72 of file G4ExcitedString.cc.

00073 {
00074   std::for_each(thePartons.begin(), thePartons.end(), DeleteParton());
00075 }


Member Function Documentation

void G4ExcitedString::Boost ( G4ThreeVector &  Velocity  ) 

Definition at line 93 of file G4ExcitedString.cc.

References Get4Momentum().

Referenced by G4QGSModel< ParticipantType >::GetStrings().

00094     {
00095     for(unsigned int cParton = 0; cParton < thePartons.size() ; cParton++ )
00096         {
00097         G4LorentzVector Mom = thePartons[cParton]->Get4Momentum();
00098         Mom.boost(Velocity);
00099         thePartons[cParton]->Set4Momentum(Mom);
00100         }
00101     }

G4LorentzVector G4ExcitedString::Get4Momentum (  )  const [inline]

Definition at line 161 of file G4ExcitedString.hh.

Referenced by Boost(), G4QGSMFragmentation::FragmentString(), G4LundStringFragmentation::FragmentString(), G4FragmentingString::G4FragmentingString(), G4VLongitudinalStringDecay::LightFragmentationTest(), LorentzRotate(), TransformToAlignedCms(), and TransformToCenterOfMass().

00162 {
00163         G4LorentzVector momentum;
00164         for ( unsigned int index=0; index < thePartons.size() ; index++ )
00165         {
00166             // std::cout << "HPW "<<thePartons[index]->Get4Momentum()<<std::endl;
00167             momentum += thePartons[index]->Get4Momentum();
00168         }
00169         return momentum;
00170 }

G4Parton * G4ExcitedString::GetAntiColorParton ( void   )  const

Definition at line 131 of file G4ExcitedString.cc.

References G4Parton::GetPDGcode().

Referenced by G4VKinkyStringDecay::FragmentString().

00132     {
00133     G4Parton * start = *(thePartons.begin());
00134     G4Parton * end = *(thePartons.end()-1);
00135     G4int Encoding = start->GetPDGcode();
00136     if (Encoding < -1000 || ((Encoding  < 1000) && (Encoding > 0)))
00137         return end; 
00138     return start; 
00139     }

G4Parton * G4ExcitedString::GetColorParton ( void   )  const

Definition at line 105 of file G4ExcitedString.cc.

References G4Parton::GetPDGcode().

Referenced by G4VKinkyStringDecay::FragmentString().

00106     {
00107     G4Parton * start = *(thePartons.begin());
00108     G4Parton * end = *(thePartons.end()-1);
00109     G4int Encoding = start->GetPDGcode();
00110     if (Encoding < -1000 || ((Encoding  < 1000) && (Encoding > 0)))
00111         return start;
00112     return end; 
00113     }

G4int G4ExcitedString::GetDirection ( void   )  const

Definition at line 150 of file G4ExcitedString.cc.

Referenced by G4VLongitudinalStringDecay::CPExcited(), and G4VKinkyStringDecay::FragmentString().

00151     {
00152     return theDirection;    
00153     }

G4Parton * G4ExcitedString::GetGluon ( G4int  GluonPos  )  const

Definition at line 124 of file G4ExcitedString.cc.

00125     {
00126     return thePartons[1 + GluonPos]; 
00127     }

G4Parton * G4ExcitedString::GetGluon ( void   )  const

Definition at line 117 of file G4ExcitedString.cc.

Referenced by G4VKinkyStringDecay::FragmentString().

00118     {
00119     return thePartons[1]; 
00120     }

G4KineticTrack * G4ExcitedString::GetKineticTrack (  )  const [inline]

Definition at line 240 of file G4ExcitedString.hh.

00241 {
00242         return theTrack;
00243 }

G4Parton * G4ExcitedString::GetLeftParton ( void   )  const

Definition at line 157 of file G4ExcitedString.cc.

Referenced by G4VLongitudinalStringDecay::CPExcited(), and G4FragmentingString::G4FragmentingString().

00158     {
00159     return *thePartons.begin(); 
00160     }

const G4PartonVector * G4ExcitedString::GetPartonList (  )  const [inline]

Definition at line 234 of file G4ExcitedString.hh.

00235 {
00236         return &thePartons;
00237 }

const G4ThreeVector & G4ExcitedString::GetPosition (  )  const [inline]

Definition at line 149 of file G4ExcitedString.hh.

Referenced by G4QGSMFragmentation::FragmentString(), G4LundStringFragmentation::FragmentString(), and G4VLongitudinalStringDecay::LightFragmentationTest().

00150 {
00151         return thePosition;
00152 }

G4Parton * G4ExcitedString::GetRightParton ( void   )  const

Definition at line 164 of file G4ExcitedString.cc.

Referenced by G4VLongitudinalStringDecay::CPExcited(), and G4FragmentingString::G4FragmentingString().

00165     {
00166     return *(thePartons.end()-1); 
00167     }

G4double G4ExcitedString::GetTimeOfCreation (  )  const [inline]

Definition at line 137 of file G4ExcitedString.hh.

Referenced by G4LundStringFragmentation::FragmentString().

00138 {
00139         return theTimeOfCreation;
00140 }

void G4ExcitedString::InsertParton ( G4Parton *  aParton,
const G4Parton *  addafter = NULL 
) [inline]

Definition at line 182 of file G4ExcitedString.hh.

00183 {
00184 
00185         G4PartonVector::iterator insert_index;
00186         
00187         if ( addafter != NULL ) 
00188         {
00189            insert_index=std::find(thePartons.begin(), thePartons.end(), addafter);
00190            if (insert_index == thePartons.end())                // No object addafter in thePartons
00191            {
00192               G4String text = "G4ExcitedString::InsertParton called with invalid second argument";
00193               throw G4HadronicException(__FILE__, __LINE__, text);
00194            }
00195         }
00196         
00197         thePartons.insert(insert_index+1, aParton);
00198 } 

G4bool G4ExcitedString::IsExcited (  )  const [inline]

Definition at line 246 of file G4ExcitedString.hh.

00247 {
00248         return theTrack == 0;
00249 }

G4bool G4ExcitedString::IsItKinkyString ( void   )  const

Definition at line 143 of file G4ExcitedString.cc.

00144     {
00145     return (thePartons.size() > 2);    
00146     }

void G4ExcitedString::LorentzRotate ( const G4LorentzRotation &  rotation  )  [inline]

Definition at line 173 of file G4ExcitedString.hh.

References Get4Momentum().

00174 {
00175         for ( unsigned int index=0; index < thePartons.size() ; index++ )
00176         {
00177             thePartons[index]->Set4Momentum(rotation*thePartons[index]->Get4Momentum());
00178         }
00179 }

int G4ExcitedString::operator!= ( const G4ExcitedString &  right  )  const [inline]

Definition at line 131 of file G4ExcitedString.hh.

00132 {
00133         return this != &right;
00134 }

int G4ExcitedString::operator== ( const G4ExcitedString &  right  )  const [inline]

Definition at line 125 of file G4ExcitedString.hh.

00126 {
00127         return this == &right;
00128 }

void G4ExcitedString::SetPosition ( const G4ThreeVector &  aPosition  )  [inline]

Definition at line 155 of file G4ExcitedString.hh.

Referenced by G4DiffractiveExcitation::CreateStrings(), and G4QGSDiffractiveExcitation::String().

00156 {
00157         thePosition= aPosition;
00158 }

void G4ExcitedString::SetTimeOfCreation ( G4double  aTime  )  [inline]

Definition at line 143 of file G4ExcitedString.hh.

Referenced by G4DiffractiveExcitation::CreateStrings().

00144 {
00145         theTimeOfCreation=aTime;                         // Uzhi 15.05.08
00146 }

G4LorentzRotation G4ExcitedString::TransformToAlignedCms (  )  [inline]

Definition at line 215 of file G4ExcitedString.hh.

References Get4Momentum().

Referenced by G4QGSMFragmentation::FragmentString(), and G4LundStringFragmentation::FragmentString().

00216 {
00217         G4LorentzVector momentum=Get4Momentum();
00218         G4LorentzRotation toAlignedCms(-1*momentum.boostVector());
00219 
00220         momentum= toAlignedCms* thePartons[0]->Get4Momentum();
00221         toAlignedCms.rotateZ(-1*momentum.phi());
00222         toAlignedCms.rotateY(-1*momentum.theta());
00223         
00224         for ( unsigned int index=0; index < thePartons.size() ; index++ )
00225         {
00226             momentum=toAlignedCms * thePartons[index]->Get4Momentum();
00227             thePartons[index]->Set4Momentum(momentum);
00228         }
00229         return toAlignedCms;
00230 }

G4LorentzRotation G4ExcitedString::TransformToCenterOfMass (  )  [inline]

Definition at line 201 of file G4ExcitedString.hh.

References Get4Momentum().

00202 {
00203         G4LorentzVector momentum=Get4Momentum();
00204         G4LorentzRotation toCms(-1*momentum.boostVector());
00205 
00206         for ( unsigned int index=0; index < thePartons.size() ; index++ )
00207         {
00208             momentum=toCms * thePartons[index]->Get4Momentum();
00209             thePartons[index]->Set4Momentum(momentum);
00210         }
00211         return toCms;
00212 }


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