Geant4  10.02.p03
G4ExcitedString Class Reference

#include <G4ExcitedString.hh>

Collaboration diagram for G4ExcitedString:

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 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
 

Private Member Functions

 G4ExcitedString (const G4ExcitedString &right)
 
G4ExcitedString & operator= (const G4ExcitedString &right)
 

Private Attributes

G4int theDirection
 
G4double theTimeOfCreation
 
G4ThreeVector thePosition
 
G4PartonVector thePartons
 
G4KineticTrack * theTrack
 

Detailed Description

Definition at line 51 of file G4ExcitedString.hh.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
PROJECTILE 
TARGET 

Definition at line 56 of file G4ExcitedString.hh.

Constructor & Destructor Documentation

◆ G4ExcitedString() [1/4]

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

Definition at line 53 of file G4ExcitedString.cc.

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  }
G4double theTimeOfCreation
G4PartonVector thePartons
G4ThreeVector thePosition
const G4ThreeVector & GetPosition() const
Definition: G4Parton.hh:129
G4KineticTrack * theTrack
Here is the call graph for this function:

◆ G4ExcitedString() [2/4]

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

Definition at line 43 of file G4ExcitedString.cc.

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  }
G4double theTimeOfCreation
G4PartonVector thePartons
G4ThreeVector thePosition
const G4ThreeVector & GetPosition() const
Definition: G4Parton.hh:129
G4KineticTrack * theTrack
Here is the call graph for this function:

◆ G4ExcitedString() [3/4]

G4ExcitedString::G4ExcitedString ( G4KineticTrack *  atrack)

Definition at line 64 of file G4ExcitedString.cc.

65 {
66  theTimeOfCreation = track->GetFormationTime(); // Uzhi 15.05.08
67  thePosition = track->GetPosition();
68  theTrack= track;
69  theDirection=0;
70 }
G4double theTimeOfCreation
G4ThreeVector thePosition
G4KineticTrack * theTrack
Here is the call graph for this function:

◆ ~G4ExcitedString()

G4ExcitedString::~G4ExcitedString ( )

Definition at line 72 of file G4ExcitedString.cc.

73 {
74  std::for_each(thePartons.begin(), thePartons.end(), DeleteParton());
75  if ( theTrack ) {
76  delete theTrack;
77  theTrack=0;
78  }
79 }
G4PartonVector thePartons
G4KineticTrack * theTrack

◆ G4ExcitedString() [4/4]

G4ExcitedString::G4ExcitedString ( const G4ExcitedString &  right)
private

Member Function Documentation

◆ Boost()

void G4ExcitedString::Boost ( G4ThreeVector &  Velocity)

Definition at line 97 of file G4ExcitedString.cc.

98  {
99  for(unsigned int cParton = 0; cParton < thePartons.size() ; cParton++ )
100  {
101  G4LorentzVector Mom = thePartons[cParton]->Get4Momentum();
102  Mom.boost(Velocity);
103  thePartons[cParton]->Set4Momentum(Mom);
104  }
105  }
G4PartonVector thePartons
HepLorentzVector & boost(double, double, double)
Here is the call graph for this function:

◆ Get4Momentum()

G4LorentzVector G4ExcitedString::Get4Momentum ( ) const
inline

Definition at line 161 of file G4ExcitedString.hh.

162 {
163  G4LorentzVector momentum;
164  if ( IsExcited() )
165  {
166  for ( unsigned int index=0; index < thePartons.size() ; index++ )
167  {
168  // std::cout << "HPW "<<thePartons[index]->Get4Momentum()<<std::endl;
169  momentum += thePartons[index]->Get4Momentum();
170  }
171  }
172  else
173  {
174  momentum=theTrack->Get4Momentum();
175  }
176  return momentum;
177 }
Int_t index
G4PartonVector thePartons
G4bool IsExcited() const
G4KineticTrack * theTrack
const G4LorentzVector & Get4Momentum() const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetAntiColorParton()

G4Parton * G4ExcitedString::GetAntiColorParton ( void  ) const

Definition at line 135 of file G4ExcitedString.cc.

136  {
137  G4Parton * start = *(thePartons.begin());
138  G4Parton * end = *(thePartons.end()-1);
139  G4int Encoding = start->GetPDGcode();
140  if (Encoding < -1000 || ((Encoding < 1000) && (Encoding > 0)))
141  return end;
142  return start;
143  }
int G4int
Definition: G4Types.hh:78
G4PartonVector thePartons
G4int GetPDGcode() const
Definition: G4Parton.hh:124
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetColorParton()

G4Parton * G4ExcitedString::GetColorParton ( void  ) const

Definition at line 109 of file G4ExcitedString.cc.

110  {
111  G4Parton * start = *(thePartons.begin());
112  G4Parton * end = *(thePartons.end()-1);
113  G4int Encoding = start->GetPDGcode();
114  if (Encoding < -1000 || ((Encoding < 1000) && (Encoding > 0)))
115  return start;
116  return end;
117  }
int G4int
Definition: G4Types.hh:78
G4PartonVector thePartons
G4int GetPDGcode() const
Definition: G4Parton.hh:124
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetDirection()

G4int G4ExcitedString::GetDirection ( void  ) const

Definition at line 154 of file G4ExcitedString.cc.

155  {
156  return theDirection;
157  }
Here is the caller graph for this function:

◆ GetGluon() [1/2]

G4Parton * G4ExcitedString::GetGluon ( void  ) const

Definition at line 121 of file G4ExcitedString.cc.

122  {
123  return thePartons[1];
124  }
G4PartonVector thePartons
Here is the caller graph for this function:

◆ GetGluon() [2/2]

G4Parton * G4ExcitedString::GetGluon ( G4int  GluonPos) const

Definition at line 128 of file G4ExcitedString.cc.

129  {
130  return thePartons[1 + GluonPos];
131  }
G4PartonVector thePartons

◆ GetKineticTrack()

G4KineticTrack * G4ExcitedString::GetKineticTrack ( ) const
inline

Definition at line 262 of file G4ExcitedString.hh.

263 {
264  return theTrack;
265 }
G4KineticTrack * theTrack

◆ GetLeftParton()

G4Parton * G4ExcitedString::GetLeftParton ( void  ) const

Definition at line 161 of file G4ExcitedString.cc.

162  {
163  return *thePartons.begin();
164  }
G4PartonVector thePartons
Here is the caller graph for this function:

◆ GetPartonList()

const G4PartonVector * G4ExcitedString::GetPartonList ( ) const
inline

Definition at line 256 of file G4ExcitedString.hh.

257 {
258  return &thePartons;
259 }
G4PartonVector thePartons

◆ GetPosition()

const G4ThreeVector & G4ExcitedString::GetPosition ( void  ) const
inline

Definition at line 149 of file G4ExcitedString.hh.

150 {
151  return thePosition;
152 }
G4ThreeVector thePosition
Here is the caller graph for this function:

◆ GetRightParton()

G4Parton * G4ExcitedString::GetRightParton ( void  ) const

Definition at line 168 of file G4ExcitedString.cc.

169  {
170  return *(thePartons.end()-1);
171  }
G4PartonVector thePartons
Here is the caller graph for this function:

◆ GetTimeOfCreation()

G4double G4ExcitedString::GetTimeOfCreation ( ) const
inline

Definition at line 137 of file G4ExcitedString.hh.

138 {
139  return theTimeOfCreation;
140 }
G4double theTimeOfCreation
Here is the caller graph for this function:

◆ InsertParton()

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

Definition at line 196 of file G4ExcitedString.hh.

197 {
198 
199  G4PartonVector::iterator insert_index;
200 
201  if ( addafter != NULL )
202  {
203  insert_index=std::find(thePartons.begin(), thePartons.end(), addafter);
204  if ( insert_index == thePartons.end() ) // No object addafter in thePartons
205  {
206  G4String text = "G4ExcitedString::InsertParton called with invalid second argument";
207  throw G4HadronicException(__FILE__, __LINE__, text);
208  }
209  }
210 
211  thePartons.insert(insert_index+1, aParton);
212 }
G4PartonVector thePartons

◆ IsExcited()

G4bool G4ExcitedString::IsExcited ( ) const
inline

Definition at line 268 of file G4ExcitedString.hh.

269 {
270  return theTrack == 0;
271 }
G4KineticTrack * theTrack
Here is the caller graph for this function:

◆ IsItKinkyString()

G4bool G4ExcitedString::IsItKinkyString ( void  ) const

Definition at line 147 of file G4ExcitedString.cc.

148  {
149  return (thePartons.size() > 2);
150  }
G4PartonVector thePartons

◆ LorentzRotate()

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

Definition at line 180 of file G4ExcitedString.hh.

181 {
182  if ( IsExcited() )
183  {
184  for ( unsigned int index=0; index < thePartons.size() ; index++ )
185  {
186  thePartons[index]->Set4Momentum(rotation*thePartons[index]->Get4Momentum());
187  }
188  }
189  else
190  {
192  }
193 }
Int_t index
G4PartonVector thePartons
G4LorentzVector Get4Momentum() const
void Set4Momentum(const G4LorentzVector &a4Momentum)
G4bool IsExcited() const
G4KineticTrack * theTrack
const G4LorentzVector & Get4Momentum() const
Here is the call graph for this function:

◆ operator!=()

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

Definition at line 131 of file G4ExcitedString.hh.

132 {
133  return this != &right;
134 }

◆ operator=()

G4ExcitedString& G4ExcitedString::operator= ( const G4ExcitedString &  right)
private

◆ operator==()

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

Definition at line 125 of file G4ExcitedString.hh.

126 {
127  return this == &right;
128 }

◆ SetPosition()

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

Definition at line 155 of file G4ExcitedString.hh.

156 {
157  thePosition= aPosition;
158 }
G4ThreeVector thePosition
Here is the caller graph for this function:

◆ SetTimeOfCreation()

void G4ExcitedString::SetTimeOfCreation ( G4double  aTime)
inline

Definition at line 143 of file G4ExcitedString.hh.

144 {
145  theTimeOfCreation=aTime;
146 }
G4double theTimeOfCreation
Here is the caller graph for this function:

◆ TransformToAlignedCms()

G4LorentzRotation G4ExcitedString::TransformToAlignedCms ( )
inline

Definition at line 237 of file G4ExcitedString.hh.

238 {
239  G4LorentzVector momentum=Get4Momentum();
240  G4LorentzRotation toAlignedCms(-1*momentum.boostVector());
241 
242  momentum= toAlignedCms* thePartons[0]->Get4Momentum();
243  toAlignedCms.rotateZ(-1*momentum.phi());
244  toAlignedCms.rotateY(-1*momentum.theta());
245 
246  for ( unsigned int index=0; index < thePartons.size() ; index++ )
247  {
248  momentum=toAlignedCms * thePartons[index]->Get4Momentum();
249  thePartons[index]->Set4Momentum(momentum);
250  }
251  return toAlignedCms;
252 }
Int_t index
G4PartonVector thePartons
G4LorentzVector Get4Momentum() const
Hep3Vector boostVector() const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ TransformToCenterOfMass()

G4LorentzRotation G4ExcitedString::TransformToCenterOfMass ( )
inline

Definition at line 215 of file G4ExcitedString.hh.

216 {
217  G4LorentzVector momentum=Get4Momentum();
218  G4LorentzRotation toCms(-1*momentum.boostVector());
219 
220  if ( IsExcited() )
221  {
222  for ( unsigned int index=0; index < thePartons.size() ; index++ )
223  {
224  momentum=toCms * thePartons[index]->Get4Momentum();
225  thePartons[index]->Set4Momentum(momentum);
226  }
227  }
228  else
229  {
230  momentum*=toCms;
231  theTrack->Set4Momentum(momentum);
232  }
233  return toCms;
234 }
Int_t index
G4PartonVector thePartons
G4LorentzVector Get4Momentum() const
void Set4Momentum(const G4LorentzVector &a4Momentum)
Hep3Vector boostVector() const
G4bool IsExcited() const
G4KineticTrack * theTrack
Here is the call graph for this function:

Member Data Documentation

◆ theDirection

G4int G4ExcitedString::theDirection
private

Definition at line 116 of file G4ExcitedString.hh.

◆ thePartons

G4PartonVector G4ExcitedString::thePartons
private

Definition at line 119 of file G4ExcitedString.hh.

◆ thePosition

G4ThreeVector G4ExcitedString::thePosition
private

Definition at line 118 of file G4ExcitedString.hh.

◆ theTimeOfCreation

G4double G4ExcitedString::theTimeOfCreation
private

Definition at line 117 of file G4ExcitedString.hh.

◆ theTrack

G4KineticTrack* G4ExcitedString::theTrack
private

Definition at line 120 of file G4ExcitedString.hh.


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