Geant4-11
Public Types | Public Member Functions | Private Member Functions | Private Attributes
G4ExcitedString Class Reference

#include <G4ExcitedString.hh>

Public Types

enum  { PROJECTILE = 1 , TARGET = -1 }
 

Public Member Functions

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

Private Member Functions

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

Private Attributes

G4int theDirection
 
G4PartonVector thePartons
 
G4ThreeVector thePosition
 
G4double theTimeOfCreation
 
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.

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

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 }
G4ThreeVector thePosition
G4KineticTrack * theTrack
G4PartonVector thePartons
G4double theTimeOfCreation
const G4ThreeVector & GetPosition() const
Definition: G4Parton.hh:132

References G4Parton::GetPosition(), theDirection, thePartons, thePosition, theTimeOfCreation, and theTrack.

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

References G4Parton::GetPosition(), theDirection, thePartons, thePosition, theTimeOfCreation, and theTrack.

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

References G4KineticTrack::GetFormationTime(), G4KineticTrack::GetPosition(), theDirection, thePosition, theTimeOfCreation, and theTrack.

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

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

References CLHEP::HepLorentzVector::boost(), and thePartons.

◆ 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

References G4KineticTrack::Get4Momentum(), IsExcited(), thePartons, and theTrack.

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

References G4Parton::GetPDGcode(), and thePartons.

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

References G4Parton::GetPDGcode(), and thePartons.

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

References thePartons.

◆ GetGluon() [2/2]

G4Parton * G4ExcitedString::GetGluon ( void  ) const

Definition at line 121 of file G4ExcitedString.cc.

122 {
123 return thePartons[1];
124 }

References thePartons.

◆ GetKineticTrack()

G4KineticTrack * G4ExcitedString::GetKineticTrack ( ) const
inline

Definition at line 262 of file G4ExcitedString.hh.

263{
264 return theTrack;
265}

References theTrack.

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

References thePartons.

◆ GetPosition()

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

◆ GetRightParton()

G4Parton * G4ExcitedString::GetRightParton ( void  ) const

◆ GetTimeOfCreation()

G4double G4ExcitedString::GetTimeOfCreation ( ) const
inline

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

References thePartons.

◆ IsExcited()

G4bool G4ExcitedString::IsExcited ( ) const
inline

Definition at line 268 of file G4ExcitedString.hh.

269{
270 return theTrack == 0;
271}

References theTrack.

Referenced by G4FTFModel::BuildStrings(), 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 }

References 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}
G4LorentzVector Get4Momentum() const
void Set4Momentum(const G4LorentzVector &a4Momentum)

References Get4Momentum(), G4KineticTrack::Get4Momentum(), IsExcited(), G4KineticTrack::Set4Momentum(), thePartons, and theTrack.

◆ operator!=()

G4bool 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==()

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}

References thePosition.

Referenced by G4DiffractiveExcitation::CreateStrings().

◆ SetTimeOfCreation()

void G4ExcitedString::SetTimeOfCreation ( G4double  aTime)
inline

Definition at line 143 of file G4ExcitedString.hh.

144{
145 theTimeOfCreation=aTime;
146}

References theTimeOfCreation.

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

References CLHEP::HepLorentzVector::boostVector(), Get4Momentum(), CLHEP::HepLorentzVector::phi(), CLHEP::HepLorentzRotation::rotateY(), CLHEP::HepLorentzRotation::rotateZ(), thePartons, and CLHEP::HepLorentzVector::theta().

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}

References CLHEP::HepLorentzVector::boostVector(), Get4Momentum(), IsExcited(), G4KineticTrack::Set4Momentum(), thePartons, and theTrack.

Field Documentation

◆ theDirection

G4int G4ExcitedString::theDirection
private

Definition at line 116 of file G4ExcitedString.hh.

Referenced by G4ExcitedString(), and GetDirection().

◆ thePartons

G4PartonVector G4ExcitedString::thePartons
private

◆ thePosition

G4ThreeVector G4ExcitedString::thePosition
private

Definition at line 118 of file G4ExcitedString.hh.

Referenced by G4ExcitedString(), GetPosition(), and SetPosition().

◆ theTimeOfCreation

G4double G4ExcitedString::theTimeOfCreation
private

Definition at line 117 of file G4ExcitedString.hh.

Referenced by G4ExcitedString(), GetTimeOfCreation(), and SetTimeOfCreation().

◆ theTrack

G4KineticTrack* G4ExcitedString::theTrack
private

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