Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
G4ExcitedString.cc
Go to the documentation of this file.
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26//
27//
28
29// ------------------------------------------------------------
30// GEANT 4 class implementation file
31//
32// ---------------- G4ExcitedString ----------------
33// by Gunter Folger, June 1998.
34// class for an excited string used by Parton String Models
35// ------------------------------------------------------------
36
37
38// G4ExcitedString
39#include "G4ExcitedString.hh"
40#include <algorithm>
41
42
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 }
52
53G4ExcitedString::G4ExcitedString(G4Parton* Color, G4Parton* Gluon, G4Parton* AntiColor, G4int Direction)
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 }
63
65{
66 theTimeOfCreation = track->GetFormationTime(); // Uzhi 15.05.08
67 thePosition = track->GetPosition();
68 theTrack= track;
69 theDirection=0;
70}
71
73{
74 std::for_each(thePartons.begin(), thePartons.end(), DeleteParton());
75}
76
77
78//const G4ExcitedString & G4ExcitedString::operator=(const G4ExcitedString &right)
79//{}
80
81
82//int G4ExcitedString::operator==(const G4ExcitedString &right) const
83//{}
84
85//int G4ExcitedString::operator!=(const G4ExcitedString &right) const
86//{}
87
88
89
90// Additional Declarations
91
92
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 }
102
103//---------------------------------------------------------------------------------
104
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 }
114
115//---------------------------------------------------------------------------------
116
118 {
119 return thePartons[1];
120 }
121
122//---------------------------------------------------------------------------------
123
125 {
126 return thePartons[1 + GluonPos];
127 }
128
129//---------------------------------------------------------------------------------
130
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 }
140
141//---------------------------------------------------------------------------------
142
144 {
145 return (thePartons.size() > 2);
146 }
147
148//---------------------------------------------------------------------------------
149
151 {
152 return theDirection;
153 }
154
155//*********************************************************************************
156
158 {
159 return *thePartons.begin();
160 }
161
162//---------------------------------------------------------------------------------
163
165 {
166 return *(thePartons.end()-1);
167 }
168
169//*********************************************************************************
int G4int
Definition: G4Types.hh:66
bool G4bool
Definition: G4Types.hh:67
HepLorentzVector & boost(double, double, double)
G4Parton * GetAntiColorParton(void) const
G4ExcitedString(G4Parton *Color, G4Parton *Gluon, G4Parton *AntiColor, G4int Direction=PROJECTILE)
G4int GetDirection(void) const
void Boost(G4ThreeVector &Velocity)
G4Parton * GetGluon(void) const
G4Parton * GetRightParton(void) const
G4Parton * GetLeftParton(void) const
G4bool IsItKinkyString(void) const
G4Parton * GetColorParton(void) const
G4double GetFormationTime() const
const G4ThreeVector & GetPosition() const
const G4ThreeVector & GetPosition() const
Definition: G4Parton.hh:129
G4int GetPDGcode() const
Definition: G4Parton.hh:124