#include <G4PrimaryVertex.hh>
Definition at line 48 of file G4PrimaryVertex.hh.
G4PrimaryVertex::G4PrimaryVertex | ( | ) |
Definition at line 37 of file G4PrimaryVertex.cc.
Referenced by operator=().
00038 :X0(0.),Y0(0.),Z0(0.),T0(0.),theParticle(0),theTail(0), 00039 nextVertex(0),tailVertex(0),numberOfParticle(0),Weight0(1.0),userInfo(0) 00040 {;}
Definition at line 42 of file G4PrimaryVertex.cc.
00044 :X0(x0),Y0(y0),Z0(z0),T0(t0),theParticle(0),theTail(0), 00045 nextVertex(0),tailVertex(0),numberOfParticle(0),Weight0(1.0),userInfo(0) 00046 {;}
G4PrimaryVertex::G4PrimaryVertex | ( | G4ThreeVector | xyz0, | |
G4double | t0 | |||
) |
Definition at line 48 of file G4PrimaryVertex.cc.
00049 :T0(t0),theParticle(0),theTail(0), 00050 nextVertex(0),tailVertex(0),numberOfParticle(0),Weight0(1.0),userInfo(0) 00051 { 00052 X0=xyz0.x(); 00053 Y0=xyz0.y(); 00054 Z0=xyz0.z(); 00055 }
G4PrimaryVertex::~G4PrimaryVertex | ( | ) | [virtual] |
Definition at line 65 of file G4PrimaryVertex.cc.
00066 { 00067 if(theParticle != 0) { 00068 delete theParticle; 00069 theParticle = 0; 00070 } 00071 if(nextVertex != 0) { 00072 delete nextVertex; 00073 nextVertex =0; 00074 } 00075 if(userInfo != 0) { 00076 delete userInfo; 00077 userInfo = 0; 00078 } 00079 }
G4PrimaryVertex::G4PrimaryVertex | ( | const G4PrimaryVertex & | right | ) |
Definition at line 57 of file G4PrimaryVertex.cc.
References numberOfParticle.
00058 :theParticle(0),theTail(0), 00059 nextVertex(0),tailVertex(0),userInfo(0) 00060 { 00061 numberOfParticle = right.numberOfParticle; 00062 *this = right; 00063 }
G4PrimaryVertex * G4PrimaryVertex::GetNext | ( | ) | const [inline] |
Definition at line 159 of file G4PrimaryVertex.hh.
Referenced by G4Event::GetPrimaryVertex(), and operator=().
G4int G4PrimaryVertex::GetNumberOfParticle | ( | ) | const [inline] |
G4ThreeVector G4PrimaryVertex::GetPosition | ( | ) | const [inline] |
Definition at line 120 of file G4PrimaryVertex.hh.
Referenced by G4AdjointPrimaryGeneratorAction::GeneratePrimaries().
00121 { return G4ThreeVector(X0,Y0,Z0); }
G4PrimaryParticle * G4PrimaryVertex::GetPrimary | ( | G4int | i = 0 |
) | const |
Definition at line 131 of file G4PrimaryVertex.cc.
References G4PrimaryParticle::GetNext().
Referenced by G4AdjointPrimaryGeneratorAction::GeneratePrimaries(), and G4PrimaryTransformer::GenerateTracks().
00132 { 00133 if( i >= 0 && i < numberOfParticle ) { 00134 G4PrimaryParticle* particle = theParticle; 00135 for( G4int j=0; j<i; j++ ){ 00136 if( particle == 0 ) return 0; 00137 particle = particle->GetNext(); 00138 } 00139 return particle; 00140 } else { 00141 return 0; } 00142 }
G4double G4PrimaryVertex::GetT0 | ( | ) | const [inline] |
Definition at line 135 of file G4PrimaryVertex.hh.
Referenced by G4PrimaryTransformer::GenerateTracks().
G4VUserPrimaryVertexInformation * G4PrimaryVertex::GetUserInformation | ( | ) | const [inline] |
G4double G4PrimaryVertex::GetWeight | ( | ) | const [inline] |
Definition at line 162 of file G4PrimaryVertex.hh.
Referenced by G4PrimaryTransformer::GenerateTracks().
G4double G4PrimaryVertex::GetX0 | ( | ) | const [inline] |
Definition at line 126 of file G4PrimaryVertex.hh.
Referenced by G4PrimaryTransformer::GenerateTracks().
G4double G4PrimaryVertex::GetY0 | ( | ) | const [inline] |
Definition at line 129 of file G4PrimaryVertex.hh.
Referenced by G4PrimaryTransformer::GenerateTracks().
G4double G4PrimaryVertex::GetZ0 | ( | ) | const [inline] |
Definition at line 132 of file G4PrimaryVertex.hh.
Referenced by G4PrimaryTransformer::GenerateTracks().
void G4PrimaryVertex::operator delete | ( | void * | aStackedTrack | ) | [inline] |
Definition at line 115 of file G4PrimaryVertex.hh.
References aPrimaryVertexAllocator.
00116 { 00117 aPrimaryVertexAllocator.FreeSingle((G4PrimaryVertex *) aPrimaryVertex); 00118 }
void * G4PrimaryVertex::operator new | ( | size_t | ) | [inline] |
Definition at line 108 of file G4PrimaryVertex.hh.
References aPrimaryVertexAllocator.
00109 { 00110 void * aPrimaryVertex; 00111 aPrimaryVertex = (void *) aPrimaryVertexAllocator.MallocSingle(); 00112 return aPrimaryVertex; 00113 }
G4int G4PrimaryVertex::operator!= | ( | const G4PrimaryVertex & | right | ) | const |
G4PrimaryVertex & G4PrimaryVertex::operator= | ( | const G4PrimaryVertex & | right | ) |
Definition at line 81 of file G4PrimaryVertex.cc.
References G4PrimaryVertex(), GetNext(), G4PrimaryParticle::GetNext(), nextVertex, T0, theParticle, Weight0, X0, Y0, and Z0.
00082 { 00083 if (this != &right) { 00084 X0 = right.X0; 00085 Y0 = right.Y0; 00086 Z0 = right.Z0; 00087 T0 = right.T0; 00088 Weight0 = right.Weight0; 00089 00090 numberOfParticle = 0; 00091 if (theParticle !=0) delete theParticle; 00092 theParticle =0; 00093 theTail =0; 00094 if (right.theParticle !=0 ) { 00095 theParticle = new G4PrimaryParticle(*(right.theParticle)); 00096 numberOfParticle += 1; 00097 theTail = theParticle; 00098 G4PrimaryParticle * np = theParticle->GetNext(); 00099 while (np !=0) { 00100 numberOfParticle += 1; 00101 theTail = np; 00102 np = np->GetNext(); 00103 } 00104 } 00105 00106 if (nextVertex !=0 ) delete nextVertex; 00107 nextVertex = 0; 00108 tailVertex =0; 00109 if (right.nextVertex !=0 ) { 00110 nextVertex = new G4PrimaryVertex(*(right.nextVertex)); 00111 tailVertex = nextVertex; 00112 G4PrimaryVertex* nv = nextVertex->GetNext(); 00113 while (nv !=0) { 00114 tailVertex = nv; 00115 nv = nv->GetNext(); 00116 } 00117 } 00118 00119 // userInfo can not be copied 00120 userInfo = 0; 00121 } 00122 return *this; 00123 }
G4int G4PrimaryVertex::operator== | ( | const G4PrimaryVertex & | right | ) | const |
void G4PrimaryVertex::Print | ( | ) | const |
Definition at line 144 of file G4PrimaryVertex.cc.
References G4cout, G4endl, ns, Print(), G4PrimaryParticle::Print(), and G4VUserPrimaryVertexInformation::Print().
Referenced by G4PrimaryTransformer::GenerateTracks(), and Print().
00145 { 00146 G4cout << "Vertex ( " 00147 << X0/mm << "[mm], " 00148 << Y0/mm << "[mm], " 00149 << Z0/mm << "[mm], " 00150 << T0/ns << "[ns] )" 00151 << " Weight " << Weight0 << G4endl; 00152 if(userInfo!=0) userInfo->Print(); 00153 G4cout << " -- Primary particles :: " 00154 << " # of primaries =" << numberOfParticle << G4endl; 00155 if( theParticle != 0) theParticle->Print(); 00156 if (nextVertex !=0 ) { 00157 G4cout << "Next Vertex " << G4endl; 00158 nextVertex->Print(); 00159 } 00160 }
void G4PrimaryVertex::SetNext | ( | G4PrimaryVertex * | nv | ) | [inline] |
Definition at line 153 of file G4PrimaryVertex.hh.
References SetNext().
Referenced by G4Event::AddPrimaryVertex(), and SetNext().
00153 { 00154 if(nextVertex == 0) { nextVertex = nv; } 00155 else { tailVertex->SetNext(nv); } 00156 tailVertex = nv; 00157 }
Definition at line 123 of file G4PrimaryVertex.hh.
Referenced by G4AdjointPrimaryGeneratorAction::GeneratePrimaries().
void G4PrimaryVertex::SetPrimary | ( | G4PrimaryParticle * | pp | ) | [inline] |
Definition at line 144 of file G4PrimaryVertex.hh.
References G4InuclParticleNames::pp, and G4PrimaryParticle::SetNext().
Referenced by G4AdjointPrimaryGeneratorAction::GeneratePrimaries(), G4SingleParticleSource::GeneratePrimaryVertex(), G4ParticleGun::GeneratePrimaryVertex(), G4HEPEvtInterface::GeneratePrimaryVertex(), and G4RayShooter::Shoot().
00145 { 00146 if(theParticle == 0) { theParticle = pp; } 00147 else { theTail->SetNext(pp); } 00148 theTail = pp; 00149 numberOfParticle++; 00150 }
void G4PrimaryVertex::SetT0 | ( | G4double | t0 | ) | [inline] |
Definition at line 138 of file G4PrimaryVertex.hh.
Referenced by G4AdjointPrimaryGeneratorAction::GeneratePrimaries().
void G4PrimaryVertex::SetUserInformation | ( | G4VUserPrimaryVertexInformation * | anInfo | ) | [inline] |
void G4PrimaryVertex::SetWeight | ( | G4double | w | ) | [inline] |
Definition at line 165 of file G4PrimaryVertex.hh.
Referenced by G4AdjointPrimaryGeneratorAction::GeneratePrimaries().