Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4MCTSimVertex Class Reference

#include <G4MCTSimVertex.hh>

Public Member Functions

 G4MCTSimVertex ()
 
 G4MCTSimVertex (const G4ThreeVector &x, G4double t)
 
 G4MCTSimVertex (const G4ThreeVector &x, G4double t, const G4String &vname, G4int ncopy, const G4String &pname)
 
 ~G4MCTSimVertex ()
 
 G4MCTSimVertex (const G4MCTSimVertex &right)
 
G4MCTSimVertexoperator= (const G4MCTSimVertex &right)
 
void SetID (G4int i)
 
G4int GetID () const
 
void SetPosition (const G4ThreeVector &x)
 
const G4ThreeVectorGetPosition () const
 
void SetTime (G4double t)
 
G4double GetTime () const
 
void SetVolumeName (const G4String &vname)
 
const G4StringGetVolumeName () const
 
void SetVolumeNumber (G4int n)
 
G4int GetVolumeNumber () const
 
void SetCreatorProcessName (const G4String &pname)
 
const G4StringGetCreatorProcessName () const
 
void SetStoreFlag (G4bool q)
 
G4bool GetStoreFlag () const
 
void SetInParticle (const G4MCTSimParticle *in)
 
void SetInParticle (G4int in)
 
G4int GetInParticleTrackID () const
 
G4int GetNofOutParticles () const
 
G4int AddOutParticle (const G4MCTSimParticle *out)
 
G4int AddOutParticle (G4int out)
 
G4int GetOutParticleTrackID (G4int i) const
 
void Print (std::ostream &ostr=std::cout) const
 

Detailed Description

Definition at line 41 of file G4MCTSimVertex.hh.

Constructor & Destructor Documentation

◆ G4MCTSimVertex() [1/4]

G4MCTSimVertex::G4MCTSimVertex ( )

Definition at line 42 of file G4MCTSimVertex.cc.

43{
44}

◆ G4MCTSimVertex() [2/4]

G4MCTSimVertex::G4MCTSimVertex ( const G4ThreeVector x,
G4double  t 
)

Definition at line 47 of file G4MCTSimVertex.cc.

48 : position(x)
49 , time(t)
50{
51}

◆ G4MCTSimVertex() [3/4]

G4MCTSimVertex::G4MCTSimVertex ( const G4ThreeVector x,
G4double  t,
const G4String vname,
G4int  ncopy,
const G4String pname 
)

Definition at line 54 of file G4MCTSimVertex.cc.

57 : volumeName(vname)
58 , creatorProcessName(pname)
59 , position(x)
60 , time(t)
61 , volumeNumber(ncopy)
62{
63}

◆ ~G4MCTSimVertex()

G4MCTSimVertex::~G4MCTSimVertex ( )

Definition at line 66 of file G4MCTSimVertex.cc.

67{
68 outParticleTrackIDList.clear();
69}

◆ G4MCTSimVertex() [4/4]

G4MCTSimVertex::G4MCTSimVertex ( const G4MCTSimVertex right)
inline

Definition at line 106 of file G4MCTSimVertex.hh.

107{
108 *this = right;
109}

Member Function Documentation

◆ AddOutParticle() [1/2]

G4int G4MCTSimVertex::AddOutParticle ( const G4MCTSimParticle out)
inline

Definition at line 217 of file G4MCTSimVertex.hh.

218{
219 outParticleTrackIDList.push_back(out->GetTrackID());
220 return outParticleTrackIDList.size();
221}
G4int GetTrackID() const

◆ AddOutParticle() [2/2]

G4int G4MCTSimVertex::AddOutParticle ( G4int  out)
inline

Definition at line 223 of file G4MCTSimVertex.hh.

224{
225 outParticleTrackIDList.push_back(out);
226 return outParticleTrackIDList.size();
227}

◆ GetCreatorProcessName()

const G4String & G4MCTSimVertex::GetCreatorProcessName ( ) const
inline

Definition at line 182 of file G4MCTSimVertex.hh.

183{
184 return creatorProcessName;
185}

Referenced by G4MCTSimParticle::PrintSingle().

◆ GetID()

G4int G4MCTSimVertex::GetID ( ) const
inline

Definition at line 132 of file G4MCTSimVertex.hh.

133{
134 return id;
135}

Referenced by G4MCTSimEvent::BuildVertexContainer(), and G4MCTSimParticle::PrintSingle().

◆ GetInParticleTrackID()

G4int G4MCTSimVertex::GetInParticleTrackID ( ) const
inline

Definition at line 207 of file G4MCTSimVertex.hh.

208{
209 return inParticleTrackID;
210}

◆ GetNofOutParticles()

G4int G4MCTSimVertex::GetNofOutParticles ( ) const
inline

Definition at line 212 of file G4MCTSimVertex.hh.

213{
214 return outParticleTrackIDList.size();
215}

◆ GetOutParticleTrackID()

G4int G4MCTSimVertex::GetOutParticleTrackID ( G4int  i) const
inline

Definition at line 229 of file G4MCTSimVertex.hh.

230{
231 G4int size = outParticleTrackIDList.size();
232 if(i >= 0 && i < size)
233 return outParticleTrackIDList[i];
234 else
235 return 0;
236}
int G4int
Definition: G4Types.hh:85

◆ GetPosition()

const G4ThreeVector & G4MCTSimVertex::GetPosition ( ) const
inline

Definition at line 142 of file G4MCTSimVertex.hh.

143{
144 return position;
145}

Referenced by G4MCTSimParticle::PrintSingle().

◆ GetStoreFlag()

G4bool G4MCTSimVertex::GetStoreFlag ( ) const
inline

Definition at line 192 of file G4MCTSimVertex.hh.

193{
194 return storeFlag;
195}

Referenced by G4MCTSimParticle::PrintSingle().

◆ GetTime()

G4double G4MCTSimVertex::GetTime ( ) const
inline

Definition at line 152 of file G4MCTSimVertex.hh.

153{
154 return time;
155}

Referenced by G4MCTSimParticle::PrintSingle().

◆ GetVolumeName()

const G4String & G4MCTSimVertex::GetVolumeName ( ) const
inline

Definition at line 162 of file G4MCTSimVertex.hh.

163{
164 return volumeName;
165}

Referenced by G4MCTSimParticle::PrintSingle().

◆ GetVolumeNumber()

G4int G4MCTSimVertex::GetVolumeNumber ( ) const
inline

Definition at line 172 of file G4MCTSimVertex.hh.

173{
174 return volumeNumber;
175}

Referenced by G4MCTSimParticle::PrintSingle().

◆ operator=()

G4MCTSimVertex & G4MCTSimVertex::operator= ( const G4MCTSimVertex right)
inline

Definition at line 111 of file G4MCTSimVertex.hh.

113{
114 inParticleTrackID = right.inParticleTrackID;
115 outParticleTrackIDList = right.outParticleTrackIDList;
116
117 id = right.id;
118 position = right.position;
119 time = right.time;
120 volumeName = right.volumeName;
121 volumeNumber = right.volumeNumber;
122 creatorProcessName = right.creatorProcessName;
123
124 return *this;
125}

◆ Print()

void G4MCTSimVertex::Print ( std::ostream &  ostr = std::cout) const

Definition at line 72 of file G4MCTSimVertex.cc.

73{
74 std::ostringstream os;
75 char cq = ' ';
76 if(storeFlag)
77 cq = '+';
78 os << cq << id << '\0';
79 std::string sid(os.str());
80
81 ostr.unsetf(std::ios::fixed);
82 ostr.setf(std::ios::scientific | std::ios::right | std::ios::showpoint);
83 // ostr << std::setw(4) << id;
84 ostr << std::setw(6) << sid;
85 ostr << " : X(" << std::setw(9) << std::setprecision(2) << position.x() / mm
86 << "," << std::setw(9) << std::setprecision(2) << position.y() / mm
87 << "," << std::setw(9) << std::setprecision(2) << position.z() / mm
88 << "," << std::setw(9) << std::setprecision(2) << time / ns << ")";
89 ostr.unsetf(std::ios::scientific);
90 ostr << "@" << volumeName << "-" << volumeNumber << "%" << creatorProcessName
91 << G4endl;
92
93 ostr << " " << std::setw(4) << inParticleTrackID << "-> ";
94 std::size_t np = outParticleTrackIDList.size();
95 for(std::size_t i = 0; i < np; ++i)
96 ostr << outParticleTrackIDList[i] << ", ";
97 ostr << G4endl;
98}
#define G4endl
Definition: G4ios.hh:57
#define ns
Definition: xmlparse.cc:614

◆ SetCreatorProcessName()

void G4MCTSimVertex::SetCreatorProcessName ( const G4String pname)
inline

Definition at line 177 of file G4MCTSimVertex.hh.

178{
179 creatorProcessName = pname;
180}

◆ SetID()

void G4MCTSimVertex::SetID ( G4int  i)
inline

Definition at line 127 of file G4MCTSimVertex.hh.

128{
129 id = i;
130}

Referenced by G4MCTSimEvent::BuildVertexContainer().

◆ SetInParticle() [1/2]

void G4MCTSimVertex::SetInParticle ( const G4MCTSimParticle in)
inline

Definition at line 197 of file G4MCTSimVertex.hh.

198{
199 inParticleTrackID = in->GetTrackID();
200}

◆ SetInParticle() [2/2]

void G4MCTSimVertex::SetInParticle ( G4int  in)
inline

Definition at line 202 of file G4MCTSimVertex.hh.

203{
204 inParticleTrackID = in;
205}

◆ SetPosition()

void G4MCTSimVertex::SetPosition ( const G4ThreeVector x)
inline

Definition at line 137 of file G4MCTSimVertex.hh.

138{
139 position = x;
140}

◆ SetStoreFlag()

void G4MCTSimVertex::SetStoreFlag ( G4bool  q)
inline

Definition at line 187 of file G4MCTSimVertex.hh.

188{
189 storeFlag = q;
190}

Referenced by G4MCTSimParticle::SetStoreFlagToParentTree().

◆ SetTime()

void G4MCTSimVertex::SetTime ( G4double  t)
inline

Definition at line 147 of file G4MCTSimVertex.hh.

148{
149 time = t;
150}

◆ SetVolumeName()

void G4MCTSimVertex::SetVolumeName ( const G4String vname)
inline

Definition at line 157 of file G4MCTSimVertex.hh.

158{
159 volumeName = vname;
160}

◆ SetVolumeNumber()

void G4MCTSimVertex::SetVolumeNumber ( G4int  n)
inline

Definition at line 167 of file G4MCTSimVertex.hh.

168{
169 volumeNumber = n;
170}

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