Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions
G4ExcitedString Class Reference

#include <G4ExcitedString.hh>

Public Types

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 G4ThreeVectorGetPosition () const
 
void SetPosition (const G4ThreeVector &aPosition)
 
const G4PartonVectorGetPartonList () 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)
 
G4PartonGetColorParton (void) const
 
G4PartonGetGluon (void) const
 
G4PartonGetAntiColorParton (void) const
 
G4PartonGetGluon (G4int GluonPos) const
 
G4KineticTrackGetKineticTrack () const
 
G4PartonGetLeftParton (void) const
 
G4PartonGetRightParton (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.

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().

54  {
55  thePartons.push_back(Color);
56  thePartons.push_back(Gluon);
57  thePartons.push_back(AntiColor);
58  theTimeOfCreation = 0.; // Uzhi 15.05.08
59  thePosition = Color->GetPosition();
60  theDirection = Direction;
61  theTrack=0;
62  }
const G4ThreeVector & GetPosition() const
Definition: G4Parton.hh:129
G4ExcitedString::G4ExcitedString ( G4Parton Color,
G4Parton AntiColor,
G4int  Direction = PROJECTILE 
)

Definition at line 43 of file G4ExcitedString.cc.

References G4Parton::GetPosition().

44  {
45  thePartons.push_back(Color);
46  thePartons.push_back(AntiColor);
47  theTimeOfCreation = 0.; // Uzhi 15.05.08
48  thePosition = Color->GetPosition();
49  theDirection = Direction;
50  theTrack=0;
51  }
const G4ThreeVector & GetPosition() const
Definition: G4Parton.hh:129
G4ExcitedString::G4ExcitedString ( G4KineticTrack atrack)

Definition at line 64 of file G4ExcitedString.cc.

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

65 {
66  theTimeOfCreation = track->GetFormationTime(); // Uzhi 15.05.08
67  thePosition = track->GetPosition();
68  theTrack= track;
69  theDirection=0;
70 }
G4ExcitedString::~G4ExcitedString ( )

Definition at line 72 of file G4ExcitedString.cc.

73 {
74  std::for_each(thePartons.begin(), thePartons.end(), DeleteParton());
75 }

Member Function Documentation

void G4ExcitedString::Boost ( G4ThreeVector Velocity)

Definition at line 93 of file G4ExcitedString.cc.

References CLHEP::HepLorentzVector::boost().

94  {
95  for(unsigned int cParton = 0; cParton < thePartons.size() ; cParton++ )
96  {
97  G4LorentzVector Mom = thePartons[cParton]->Get4Momentum();
98  Mom.boost(Velocity);
99  thePartons[cParton]->Set4Momentum(Mom);
100  }
101  }
HepLorentzVector & boost(double, double, double)
G4LorentzVector G4ExcitedString::Get4Momentum ( ) const
inline

Definition at line 161 of file G4ExcitedString.hh.

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

162 {
163  G4LorentzVector momentum;
164  for ( unsigned int index=0; index < thePartons.size() ; index++ )
165  {
166  // std::cout << "HPW "<<thePartons[index]->Get4Momentum()<<std::endl;
167  momentum += thePartons[index]->Get4Momentum();
168  }
169  return momentum;
170 }
G4Parton * G4ExcitedString::GetAntiColorParton ( void  ) const

Definition at line 131 of file G4ExcitedString.cc.

References G4Parton::GetPDGcode().

Referenced by G4VKinkyStringDecay::FragmentString().

132  {
133  G4Parton * start = *(thePartons.begin());
134  G4Parton * end = *(thePartons.end()-1);
135  G4int Encoding = start->GetPDGcode();
136  if (Encoding < -1000 || ((Encoding < 1000) && (Encoding > 0)))
137  return end;
138  return start;
139  }
G4int GetPDGcode() const
Definition: G4Parton.hh:124
int G4int
Definition: G4Types.hh:78
G4Parton * G4ExcitedString::GetColorParton ( void  ) const

Definition at line 105 of file G4ExcitedString.cc.

References G4Parton::GetPDGcode().

Referenced by G4VKinkyStringDecay::FragmentString().

106  {
107  G4Parton * start = *(thePartons.begin());
108  G4Parton * end = *(thePartons.end()-1);
109  G4int Encoding = start->GetPDGcode();
110  if (Encoding < -1000 || ((Encoding < 1000) && (Encoding > 0)))
111  return start;
112  return end;
113  }
G4int GetPDGcode() const
Definition: G4Parton.hh:124
int G4int
Definition: G4Types.hh:78
G4int G4ExcitedString::GetDirection ( void  ) const

Definition at line 150 of file G4ExcitedString.cc.

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

151  {
152  return theDirection;
153  }
G4Parton * G4ExcitedString::GetGluon ( void  ) const

Definition at line 117 of file G4ExcitedString.cc.

Referenced by G4VKinkyStringDecay::FragmentString().

118  {
119  return thePartons[1];
120  }
G4Parton * G4ExcitedString::GetGluon ( G4int  GluonPos) const

Definition at line 124 of file G4ExcitedString.cc.

125  {
126  return thePartons[1 + GluonPos];
127  }
G4KineticTrack * G4ExcitedString::GetKineticTrack ( ) const
inline

Definition at line 240 of file G4ExcitedString.hh.

241 {
242  return theTrack;
243 }
G4Parton * G4ExcitedString::GetLeftParton ( void  ) const

Definition at line 157 of file G4ExcitedString.cc.

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

158  {
159  return *thePartons.begin();
160  }
const G4PartonVector * G4ExcitedString::GetPartonList ( ) const
inline

Definition at line 234 of file G4ExcitedString.hh.

235 {
236  return &thePartons;
237 }
const G4ThreeVector & G4ExcitedString::GetPosition ( void  ) const
inline
G4Parton * G4ExcitedString::GetRightParton ( void  ) const

Definition at line 164 of file G4ExcitedString.cc.

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

165  {
166  return *(thePartons.end()-1);
167  }
G4double G4ExcitedString::GetTimeOfCreation ( ) const
inline

Definition at line 137 of file G4ExcitedString.hh.

Referenced by G4LundStringFragmentation::FragmentString().

138 {
139  return theTimeOfCreation;
140 }
void G4ExcitedString::InsertParton ( G4Parton aParton,
const G4Parton addafter = NULL 
)
inline

Definition at line 182 of file G4ExcitedString.hh.

183 {
184 
185  G4PartonVector::iterator insert_index;
186 
187  if ( addafter != NULL )
188  {
189  insert_index=std::find(thePartons.begin(), thePartons.end(), addafter);
190  if (insert_index == thePartons.end()) // No object addafter in thePartons
191  {
192  G4String text = "G4ExcitedString::InsertParton called with invalid second argument";
193  throw G4HadronicException(__FILE__, __LINE__, text);
194  }
195  }
196 
197  thePartons.insert(insert_index+1, aParton);
198 }
G4bool G4ExcitedString::IsExcited ( ) const
inline

Definition at line 246 of file G4ExcitedString.hh.

247 {
248  return theTrack == 0;
249 }
G4bool G4ExcitedString::IsItKinkyString ( void  ) const

Definition at line 143 of file G4ExcitedString.cc.

144  {
145  return (thePartons.size() > 2);
146  }
void G4ExcitedString::LorentzRotate ( const G4LorentzRotation rotation)
inline

Definition at line 173 of file G4ExcitedString.hh.

References Get4Momentum().

174 {
175  for ( unsigned int index=0; index < thePartons.size() ; index++ )
176  {
177  thePartons[index]->Set4Momentum(rotation*thePartons[index]->Get4Momentum());
178  }
179 }
G4LorentzVector Get4Momentum() const
int G4ExcitedString::operator!= ( const G4ExcitedString right) const
inline

Definition at line 131 of file G4ExcitedString.hh.

References right.

132 {
133  return this != &right;
134 }
int G4ExcitedString::operator== ( const G4ExcitedString right) const
inline

Definition at line 125 of file G4ExcitedString.hh.

References right.

126 {
127  return this == &right;
128 }
void G4ExcitedString::SetPosition ( const G4ThreeVector aPosition)
inline

Definition at line 155 of file G4ExcitedString.hh.

Referenced by G4DiffractiveExcitation::CreateStrings().

156 {
157  thePosition= aPosition;
158 }
void G4ExcitedString::SetTimeOfCreation ( G4double  aTime)
inline

Definition at line 143 of file G4ExcitedString.hh.

Referenced by G4DiffractiveExcitation::CreateStrings().

144 {
145  theTimeOfCreation=aTime; // Uzhi 15.05.08
146 }
G4LorentzRotation G4ExcitedString::TransformToAlignedCms ( )
inline

Definition at line 215 of file G4ExcitedString.hh.

References CLHEP::HepLorentzVector::boostVector(), and Get4Momentum().

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

216 {
217  G4LorentzVector momentum=Get4Momentum();
218  G4LorentzRotation toAlignedCms(-1*momentum.boostVector());
219 
220  momentum= toAlignedCms* thePartons[0]->Get4Momentum();
221  toAlignedCms.rotateZ(-1*momentum.phi());
222  toAlignedCms.rotateY(-1*momentum.theta());
223 
224  for ( unsigned int index=0; index < thePartons.size() ; index++ )
225  {
226  momentum=toAlignedCms * thePartons[index]->Get4Momentum();
227  thePartons[index]->Set4Momentum(momentum);
228  }
229  return toAlignedCms;
230 }
Hep3Vector boostVector() const
G4LorentzVector Get4Momentum() const
G4LorentzRotation G4ExcitedString::TransformToCenterOfMass ( )
inline

Definition at line 201 of file G4ExcitedString.hh.

References CLHEP::HepLorentzVector::boostVector(), and Get4Momentum().

202 {
203  G4LorentzVector momentum=Get4Momentum();
204  G4LorentzRotation toCms(-1*momentum.boostVector());
205 
206  for ( unsigned int index=0; index < thePartons.size() ; index++ )
207  {
208  momentum=toCms * thePartons[index]->Get4Momentum();
209  thePartons[index]->Set4Momentum(momentum);
210  }
211  return toCms;
212 }
Hep3Vector boostVector() const
G4LorentzVector Get4Momentum() const

The documentation for this class was generated from the following files: