Geant4 10.7.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 ()
 
G4bool operator== (const G4ExcitedString &right) const
 
G4bool 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:132

◆ 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 if ( theTrack ) {
76 delete theTrack;
77 theTrack=0;
78 }
79}

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 }
HepLorentzVector & boost(double, double, double)

◆ 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}
G4bool IsExcited() const
const G4LorentzVector & Get4Momentum() const

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

◆ 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:85
G4int GetPDGcode() const
Definition: G4Parton.hh:127

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

◆ GetDirection()

G4int G4ExcitedString::GetDirection ( void  ) const

◆ GetGluon() [1/2]

G4Parton * G4ExcitedString::GetGluon ( G4int  GluonPos) const

Definition at line 128 of file G4ExcitedString.cc.

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

◆ GetGluon() [2/2]

G4Parton * G4ExcitedString::GetGluon ( void  ) const

Definition at line 121 of file G4ExcitedString.cc.

122 {
123 return thePartons[1];
124 }

◆ GetKineticTrack()

G4KineticTrack * G4ExcitedString::GetKineticTrack ( ) const
inline

Definition at line 262 of file G4ExcitedString.hh.

263{
264 return theTrack;
265}

◆ GetLeftParton()

G4Parton * G4ExcitedString::GetLeftParton ( void  ) const

◆ GetPartonList()

const G4PartonVector * G4ExcitedString::GetPartonList ( ) const
inline

Definition at line 256 of file G4ExcitedString.hh.

257{
258 return &thePartons;
259}

◆ GetPosition()

const G4ThreeVector & G4ExcitedString::GetPosition ( ) const
inline

◆ GetRightParton()

G4Parton * G4ExcitedString::GetRightParton ( void  ) const

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

◆ IsExcited()

G4bool G4ExcitedString::IsExcited ( ) const
inline

Definition at line 268 of file G4ExcitedString.hh.

269{
270 return theTrack == 0;
271}

Referenced by Get4Momentum(), LorentzRotate(), and TransformToCenterOfMass().

◆ IsItKinkyString()

G4bool G4ExcitedString::IsItKinkyString ( void  ) const

Definition at line 147 of file G4ExcitedString.cc.

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

◆ 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 {
191 theTrack->Set4Momentum(rotation*theTrack->Get4Momentum());
192 }
193}
G4LorentzVector Get4Momentum() const
void Set4Momentum(const G4LorentzVector &a4Momentum)

◆ operator!=()

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

Definition at line 131 of file G4ExcitedString.hh.

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

◆ operator==()

G4bool 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;
146}

Referenced by G4DiffractiveExcitation::CreateStrings().

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

Referenced by G4QGSMFragmentation::FragmentString().

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

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