Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
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

anonymous enum
Enumerator
PROJECTILE 
TARGET 

Definition at line 56 of file G4ExcitedString.hh.

56 {
57 PROJECTILE = 1,
58 TARGET = -1
59 };

Constructor & Destructor Documentation

◆ G4ExcitedString() [1/3]

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 }
const G4ThreeVector & GetPosition() const
Definition: G4Parton.hh:129

◆ G4ExcitedString() [2/3]

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 }

◆ G4ExcitedString() [3/3]

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}

◆ ~G4ExcitedString()

G4ExcitedString::~G4ExcitedString ( )

Definition at line 72 of file G4ExcitedString.cc.

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

Member Function Documentation

◆ Boost()

void G4ExcitedString::Boost ( G4ThreeVector Velocity)

Definition at line 93 of file G4ExcitedString.cc.

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)

◆ Get4Momentum()

G4LorentzVector G4ExcitedString::Get4Momentum ( ) const
inline

Definition at line 161 of file G4ExcitedString.hh.

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}

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

◆ GetAntiColorParton()

G4Parton * G4ExcitedString::GetAntiColorParton ( void  ) const

Definition at line 131 of file G4ExcitedString.cc.

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 }
int G4int
Definition: G4Types.hh:66
G4int GetPDGcode() const
Definition: G4Parton.hh:124

Referenced by G4VKinkyStringDecay::FragmentString().

◆ GetColorParton()

G4Parton * G4ExcitedString::GetColorParton ( void  ) const

Definition at line 105 of file G4ExcitedString.cc.

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 }

Referenced by G4VKinkyStringDecay::FragmentString().

◆ GetDirection()

G4int G4ExcitedString::GetDirection ( void  ) const

Definition at line 150 of file G4ExcitedString.cc.

151 {
152 return theDirection;
153 }

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

◆ GetGluon() [1/2]

G4Parton * G4ExcitedString::GetGluon ( G4int  GluonPos) const

Definition at line 124 of file G4ExcitedString.cc.

125 {
126 return thePartons[1 + GluonPos];
127 }

◆ GetGluon() [2/2]

G4Parton * G4ExcitedString::GetGluon ( void  ) const

Definition at line 117 of file G4ExcitedString.cc.

118 {
119 return thePartons[1];
120 }

Referenced by G4VKinkyStringDecay::FragmentString().

◆ GetKineticTrack()

G4KineticTrack * G4ExcitedString::GetKineticTrack ( ) const
inline

Definition at line 240 of file G4ExcitedString.hh.

241{
242 return theTrack;
243}

◆ GetLeftParton()

G4Parton * G4ExcitedString::GetLeftParton ( void  ) const

Definition at line 157 of file G4ExcitedString.cc.

158 {
159 return *thePartons.begin();
160 }

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

◆ GetPartonList()

const G4PartonVector * G4ExcitedString::GetPartonList ( ) const
inline

Definition at line 234 of file G4ExcitedString.hh.

235{
236 return &thePartons;
237}

◆ GetPosition()

const G4ThreeVector & G4ExcitedString::GetPosition ( ) const
inline

◆ GetRightParton()

G4Parton * G4ExcitedString::GetRightParton ( void  ) const

Definition at line 164 of file G4ExcitedString.cc.

165 {
166 return *(thePartons.end()-1);
167 }

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

◆ GetTimeOfCreation()

G4double G4ExcitedString::GetTimeOfCreation ( ) const
inline

Definition at line 137 of file G4ExcitedString.hh.

138{
139 return theTimeOfCreation;
140}

Referenced by G4LundStringFragmentation::FragmentString().

◆ InsertParton()

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}

◆ IsExcited()

G4bool G4ExcitedString::IsExcited ( ) const
inline

Definition at line 246 of file G4ExcitedString.hh.

247{
248 return theTrack == 0;
249}

◆ IsItKinkyString()

G4bool G4ExcitedString::IsItKinkyString ( void  ) const

Definition at line 143 of file G4ExcitedString.cc.

144 {
145 return (thePartons.size() > 2);
146 }

◆ LorentzRotate()

void G4ExcitedString::LorentzRotate ( const G4LorentzRotation rotation)
inline

Definition at line 173 of file G4ExcitedString.hh.

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

◆ operator!=()

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

Definition at line 131 of file G4ExcitedString.hh.

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

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

Referenced by G4DiffractiveExcitation::CreateStrings().

◆ SetTimeOfCreation()

void G4ExcitedString::SetTimeOfCreation ( G4double  aTime)
inline

Definition at line 143 of file G4ExcitedString.hh.

144{
145 theTimeOfCreation=aTime; // Uzhi 15.05.08
146}

Referenced by G4DiffractiveExcitation::CreateStrings().

◆ TransformToAlignedCms()

G4LorentzRotation G4ExcitedString::TransformToAlignedCms ( )
inline

Definition at line 215 of file G4ExcitedString.hh.

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}
double theta() const
Hep3Vector boostVector() const

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

◆ TransformToCenterOfMass()

G4LorentzRotation G4ExcitedString::TransformToCenterOfMass ( )
inline

Definition at line 201 of file G4ExcitedString.hh.

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}

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