Geant4-11
Public Member Functions | Private Attributes
G4MCTSimVertex Class Reference

#include <G4MCTSimVertex.hh>

Public Member Functions

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

Private Attributes

G4String creatorProcessName = "none"
 
G4int id = -1
 
G4int inParticleTrackID = 0
 
std::vector< G4intoutParticleTrackIDList
 
G4ThreeVector position
 
G4bool storeFlag = false
 
G4double time = 0.0
 
G4String volumeName = ""
 
G4int volumeNumber = -1
 

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}
G4ThreeVector position

◆ 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)
59 , position(x)
60 , time(t)
61 , volumeNumber(ncopy)
62{
63}
G4String volumeName
G4String creatorProcessName
string pname
Definition: eplot.py:33

◆ ~G4MCTSimVertex()

G4MCTSimVertex::~G4MCTSimVertex ( )

Definition at line 66 of file G4MCTSimVertex.cc.

67{
69}
std::vector< G4int > outParticleTrackIDList

References outParticleTrackIDList.

◆ 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

References G4MCTSimParticle::GetTrackID(), and outParticleTrackIDList.

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

References outParticleTrackIDList.

◆ GetCreatorProcessName()

const G4String & G4MCTSimVertex::GetCreatorProcessName ( ) const
inline

Definition at line 182 of file G4MCTSimVertex.hh.

183{
184 return creatorProcessName;
185}

References creatorProcessName.

Referenced by G4MCTSimParticle::PrintSingle().

◆ GetID()

G4int G4MCTSimVertex::GetID ( ) const
inline

Definition at line 132 of file G4MCTSimVertex.hh.

133{
134 return id;
135}

References id.

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}

References inParticleTrackID.

◆ GetNofOutParticles()

G4int G4MCTSimVertex::GetNofOutParticles ( ) const
inline

Definition at line 212 of file G4MCTSimVertex.hh.

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

References outParticleTrackIDList.

◆ 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

References outParticleTrackIDList.

◆ GetPosition()

const G4ThreeVector & G4MCTSimVertex::GetPosition ( ) const
inline

Definition at line 142 of file G4MCTSimVertex.hh.

143{
144 return position;
145}

References position.

Referenced by G4MCTSimParticle::PrintSingle().

◆ GetStoreFlag()

G4bool G4MCTSimVertex::GetStoreFlag ( ) const
inline

Definition at line 192 of file G4MCTSimVertex.hh.

193{
194 return storeFlag;
195}

References storeFlag.

Referenced by G4MCTSimParticle::PrintSingle().

◆ GetTime()

G4double G4MCTSimVertex::GetTime ( ) const
inline

Definition at line 152 of file G4MCTSimVertex.hh.

153{
154 return time;
155}

References time.

Referenced by G4MCTSimParticle::PrintSingle().

◆ GetVolumeName()

const G4String & G4MCTSimVertex::GetVolumeName ( ) const
inline

Definition at line 162 of file G4MCTSimVertex.hh.

163{
164 return volumeName;
165}

References volumeName.

Referenced by G4MCTSimParticle::PrintSingle().

◆ GetVolumeNumber()

G4int G4MCTSimVertex::GetVolumeNumber ( ) const
inline

Definition at line 172 of file G4MCTSimVertex.hh.

173{
174 return volumeNumber;
175}

References volumeNumber.

Referenced by G4MCTSimParticle::PrintSingle().

◆ operator=()

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

Definition at line 111 of file G4MCTSimVertex.hh.

113{
116
117 id = right.id;
118 position = right.position;
119 time = right.time;
120 volumeName = right.volumeName;
123
124 return *this;
125}

References creatorProcessName, id, inParticleTrackID, outParticleTrackIDList, position, time, volumeName, and volumeNumber.

◆ 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}
static constexpr double mm
Definition: G4SIunits.hh:95
#define G4endl
Definition: G4ios.hh:57
#define ns
Definition: xmlparse.cc:614

References creatorProcessName, G4endl, inParticleTrackID, mm, ns, outParticleTrackIDList, storeFlag, time, volumeName, and volumeNumber.

◆ SetCreatorProcessName()

void G4MCTSimVertex::SetCreatorProcessName ( const G4String pname)
inline

Definition at line 177 of file G4MCTSimVertex.hh.

178{
180}

References creatorProcessName, and eplot::pname.

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

References G4MCTSimParticle::GetTrackID(), and inParticleTrackID.

◆ SetInParticle() [2/2]

void G4MCTSimVertex::SetInParticle ( G4int  in)
inline

Definition at line 202 of file G4MCTSimVertex.hh.

203{
205}

References inParticleTrackID.

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

References storeFlag.

Referenced by G4MCTSimParticle::SetStoreFlagToParentTree().

◆ SetTime()

void G4MCTSimVertex::SetTime ( G4double  t)
inline

Definition at line 147 of file G4MCTSimVertex.hh.

148{
149 time = t;
150}

References time.

◆ SetVolumeName()

void G4MCTSimVertex::SetVolumeName ( const G4String vname)
inline

Definition at line 157 of file G4MCTSimVertex.hh.

158{
159 volumeName = vname;
160}

References volumeName.

◆ SetVolumeNumber()

void G4MCTSimVertex::SetVolumeNumber ( G4int  n)
inline

Definition at line 167 of file G4MCTSimVertex.hh.

168{
169 volumeNumber = n;
170}

References CLHEP::detail::n, and volumeNumber.

Field Documentation

◆ creatorProcessName

G4String G4MCTSimVertex::creatorProcessName = "none"
private

Definition at line 94 of file G4MCTSimVertex.hh.

Referenced by GetCreatorProcessName(), operator=(), Print(), and SetCreatorProcessName().

◆ id

G4int G4MCTSimVertex::id = -1
private

Definition at line 97 of file G4MCTSimVertex.hh.

Referenced by GetID(), and operator=().

◆ inParticleTrackID

G4int G4MCTSimVertex::inParticleTrackID = 0
private

Definition at line 90 of file G4MCTSimVertex.hh.

Referenced by GetInParticleTrackID(), operator=(), Print(), and SetInParticle().

◆ outParticleTrackIDList

std::vector<G4int> G4MCTSimVertex::outParticleTrackIDList
private

◆ position

G4ThreeVector G4MCTSimVertex::position
private

Definition at line 95 of file G4MCTSimVertex.hh.

Referenced by GetPosition(), and operator=().

◆ storeFlag

G4bool G4MCTSimVertex::storeFlag = false
private

Definition at line 99 of file G4MCTSimVertex.hh.

Referenced by GetStoreFlag(), Print(), and SetStoreFlag().

◆ time

G4double G4MCTSimVertex::time = 0.0
private

Definition at line 96 of file G4MCTSimVertex.hh.

Referenced by GetTime(), operator=(), Print(), and SetTime().

◆ volumeName

G4String G4MCTSimVertex::volumeName = ""
private

Definition at line 93 of file G4MCTSimVertex.hh.

Referenced by GetVolumeName(), operator=(), Print(), and SetVolumeName().

◆ volumeNumber

G4int G4MCTSimVertex::volumeNumber = -1
private

Definition at line 98 of file G4MCTSimVertex.hh.

Referenced by GetVolumeNumber(), operator=(), Print(), and SetVolumeNumber().


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