Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4MCTSimVertex Class Reference

#include <G4MCTSimVertex.hh>

Public Member Functions

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

Detailed Description

Definition at line 45 of file G4MCTSimVertex.hh.

Constructor & Destructor Documentation

G4MCTSimVertex::G4MCTSimVertex ( )

Definition at line 47 of file G4MCTSimVertex.cc.

48  : inParticleTrackID(0),id(-1), time(0.),
49  volumeName(""), volumeNumber(-1),
50  creatorProcessName("none"),
51  storeFlag(false)
53 {
54 }
G4MCTSimVertex::G4MCTSimVertex ( const G4ThreeVector x,
double  t 
)

Definition at line 57 of file G4MCTSimVertex.cc.

58  : inParticleTrackID(0), id(-1), position(x), time(t),
59  volumeName(""), volumeNumber(-1),
60  creatorProcessName("none"), storeFlag(false)
62 {
63 }
G4MCTSimVertex::G4MCTSimVertex ( const G4ThreeVector x,
double  t,
std::string  vname,
int  ncopy,
std::string  pname 
)

Definition at line 66 of file G4MCTSimVertex.cc.

68  : inParticleTrackID(0), id(-1), position(x), time(t),
69  volumeName(vname), volumeNumber(ncopy),
70  creatorProcessName(pname), storeFlag(false)
72 {
73 }
G4MCTSimVertex::~G4MCTSimVertex ( )

Definition at line 76 of file G4MCTSimVertex.cc.

78 {
79  outParticleTrackIDList.clear();
80 }
G4MCTSimVertex::G4MCTSimVertex ( const G4MCTSimVertex right)
inline

Definition at line 107 of file G4MCTSimVertex.hh.

108 {
109  *this= right;
110 }

Member Function Documentation

int G4MCTSimVertex::AddOutParticle ( const G4MCTSimParticle out)
inline

Definition at line 177 of file G4MCTSimVertex.hh.

178 {
179  outParticleTrackIDList.push_back(out->GetTrackID());
180  return outParticleTrackIDList.size();
181 }
int GetTrackID() const

Here is the call graph for this function:

int G4MCTSimVertex::AddOutParticle ( int  out)
inline

Definition at line 183 of file G4MCTSimVertex.hh.

184 {
185  outParticleTrackIDList.push_back(out);
186  return outParticleTrackIDList.size();
187 }
const std::string & G4MCTSimVertex::GetCreatorProcessName ( ) const
inline

Definition at line 158 of file G4MCTSimVertex.hh.

159 { return creatorProcessName; }
int G4MCTSimVertex::GetID ( ) const
inline

Definition at line 129 of file G4MCTSimVertex.hh.

129 { return id; }
int G4MCTSimVertex::GetInParticleTrackID ( ) const
inline

Definition at line 171 of file G4MCTSimVertex.hh.

172 { return inParticleTrackID; }
int G4MCTSimVertex::GetNofOutParticles ( ) const
inline

Definition at line 174 of file G4MCTSimVertex.hh.

175 { return outParticleTrackIDList.size(); }
int G4MCTSimVertex::GetOutParticleTrackID ( int  i) const
inline

Definition at line 189 of file G4MCTSimVertex.hh.

190 {
191  int size= outParticleTrackIDList.size();
192  if(i>=0 && i< size) return outParticleTrackIDList[i];
193  else return 0;
194 }
const G4ThreeVector & G4MCTSimVertex::GetPosition ( ) const
inline

Definition at line 134 of file G4MCTSimVertex.hh.

135 { return position; }
G4bool G4MCTSimVertex::GetStoreFlag ( ) const
inline

Definition at line 163 of file G4MCTSimVertex.hh.

163 { return storeFlag; }
double G4MCTSimVertex::GetTime ( ) const
inline

Definition at line 140 of file G4MCTSimVertex.hh.

141 { return time; }
const std::string & G4MCTSimVertex::GetVolumeName ( ) const
inline

Definition at line 146 of file G4MCTSimVertex.hh.

147 { return volumeName; }
int G4MCTSimVertex::GetVolumeNumber ( ) const
inline

Definition at line 152 of file G4MCTSimVertex.hh.

153 { return volumeNumber; }
const G4MCTSimVertex & G4MCTSimVertex::operator= ( const G4MCTSimVertex right)
inline

Definition at line 113 of file G4MCTSimVertex.hh.

114 {
115  inParticleTrackID= right.inParticleTrackID;
116  outParticleTrackIDList= right.outParticleTrackIDList;
117 
118  id= right.id;
119  position= right.position;
120  time= right.time;
121  volumeName= right.volumeName;
122  volumeNumber= right.volumeNumber;
123  creatorProcessName= right.creatorProcessName;
124 
125  return *this;
126 }
void G4MCTSimVertex::Print ( std::ostream &  ostr = std::cout) const

Definition at line 83 of file G4MCTSimVertex.cc.

85 {
86  std::ostringstream os;
87  char cq=' ';
88  if(storeFlag) cq='+';
89  os << cq << id << '\0';
90  std::string sid(os.str());
91 
92  ostr.unsetf(std::ios::fixed);
93  ostr.setf(std::ios::scientific|std::ios::right|std::ios::showpoint);
94  //ostr << std::setw(4) << id;
95  ostr << std::setw(6) << sid;
96  ostr << " : X(" << std::setw(9) << std::setprecision(2)
97  << position.x()/mm
98  << "," << std::setw(9) << std::setprecision(2)
99  << position.y()/mm
100  << "," << std::setw(9) << std::setprecision(2)
101  << position.z()/mm
102  << "," << std::setw(9) << std::setprecision(2)
103  << time/ns << ")";
104  ostr.unsetf(std::ios::scientific);
105  ostr << "@" << volumeName
106  << "-" << volumeNumber
107  << "%" << creatorProcessName
108  << G4endl;
109 
110  ostr << " " << std::setw(4) << inParticleTrackID << "-> ";
111  size_t np= outParticleTrackIDList.size();
112  for (size_t i=0; i<np; i++) ostr << outParticleTrackIDList[i] << ", ";
113  ostr << G4endl;
114 }
static constexpr double mm
Definition: G4SIunits.hh:115
#define G4endl
Definition: G4ios.hh:61
#define ns
Definition: xmlparse.cc:614
void G4MCTSimVertex::SetCreatorProcessName ( std::string  pname)
inline

Definition at line 155 of file G4MCTSimVertex.hh.

156 { creatorProcessName= pname; }
void G4MCTSimVertex::SetID ( int  i)
inline

Definition at line 128 of file G4MCTSimVertex.hh.

128 { id= i; }
void G4MCTSimVertex::SetInParticle ( const G4MCTSimParticle in)
inline

Definition at line 165 of file G4MCTSimVertex.hh.

166 { inParticleTrackID= in-> GetTrackID(); }
void G4MCTSimVertex::SetInParticle ( int  in)
inline

Definition at line 168 of file G4MCTSimVertex.hh.

169 { inParticleTrackID= in; }
void G4MCTSimVertex::SetPosition ( const G4ThreeVector x)
inline

Definition at line 131 of file G4MCTSimVertex.hh.

132 { position= x; }
void G4MCTSimVertex::SetStoreFlag ( G4bool  q)
inline

Definition at line 161 of file G4MCTSimVertex.hh.

161 { storeFlag= q; }
void G4MCTSimVertex::SetTime ( double  t)
inline

Definition at line 137 of file G4MCTSimVertex.hh.

138 { time= t; }
void G4MCTSimVertex::SetVolumeName ( std::string  vname)
inline

Definition at line 143 of file G4MCTSimVertex.hh.

144 { volumeName= vname; }
void G4MCTSimVertex::SetVolumeNumber ( int  n)
inline

Definition at line 149 of file G4MCTSimVertex.hh.

150 { volumeNumber= n; }

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