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.

00048   : inParticleTrackID(0),id(-1), time(0.),
00049     volumeName(""), volumeNumber(-1),
00050     creatorProcessName("none"),
00051     storeFlag(false)
00053 {
00054 }

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

Definition at line 57 of file G4MCTSimVertex.cc.

00058   : inParticleTrackID(0), id(-1), position(x), time(t),
00059     volumeName(""), volumeNumber(-1),
00060     creatorProcessName("none"), storeFlag(false)
00062 {
00063 }

G4MCTSimVertex::G4MCTSimVertex ( const G4ThreeVector x,
double  t,
std::string  vname,
int  ncopy,
std::string  pname 
)

Definition at line 66 of file G4MCTSimVertex.cc.

00068   : inParticleTrackID(0), id(-1), position(x), time(t),
00069     volumeName(vname), volumeNumber(ncopy),
00070     creatorProcessName(pname), storeFlag(false)
00072 {
00073 }

G4MCTSimVertex::~G4MCTSimVertex (  ) 

Definition at line 76 of file G4MCTSimVertex.cc.

00078 {
00079   outParticleTrackIDList.clear();
00080 }

G4MCTSimVertex::G4MCTSimVertex ( const G4MCTSimVertex right  )  [inline]

Definition at line 107 of file G4MCTSimVertex.hh.

00108 {
00109   *this= right;
00110 }


Member Function Documentation

int G4MCTSimVertex::AddOutParticle ( int  out  )  [inline]

Definition at line 183 of file G4MCTSimVertex.hh.

00184 {
00185   outParticleTrackIDList.push_back(out);
00186   return outParticleTrackIDList.size();
00187 }

int G4MCTSimVertex::AddOutParticle ( const G4MCTSimParticle out  )  [inline]

Definition at line 177 of file G4MCTSimVertex.hh.

References G4MCTSimParticle::GetTrackID().

00178 { 
00179   outParticleTrackIDList.push_back(out->GetTrackID());
00180   return outParticleTrackIDList.size();
00181 }

const std::string & G4MCTSimVertex::GetCreatorProcessName (  )  const [inline]

Definition at line 158 of file G4MCTSimVertex.hh.

00159 { return creatorProcessName; }

int G4MCTSimVertex::GetID (  )  const [inline]

Definition at line 129 of file G4MCTSimVertex.hh.

00129 { return id; }

int G4MCTSimVertex::GetInParticleTrackID (  )  const [inline]

Definition at line 171 of file G4MCTSimVertex.hh.

00172 { return inParticleTrackID; }

int G4MCTSimVertex::GetNofOutParticles (  )  const [inline]

Definition at line 174 of file G4MCTSimVertex.hh.

00175 { return outParticleTrackIDList.size(); }

int G4MCTSimVertex::GetOutParticleTrackID ( int  i  )  const [inline]

Definition at line 189 of file G4MCTSimVertex.hh.

00190 {
00191   int size= outParticleTrackIDList.size();
00192   if(i>=0 && i< size) return outParticleTrackIDList[i];
00193   else return 0;    
00194 }

const G4ThreeVector & G4MCTSimVertex::GetPosition (  )  const [inline]

Definition at line 134 of file G4MCTSimVertex.hh.

00135 { return position; }

G4bool G4MCTSimVertex::GetStoreFlag (  )  const [inline]

Definition at line 163 of file G4MCTSimVertex.hh.

00163 { return storeFlag; }

double G4MCTSimVertex::GetTime (  )  const [inline]

Definition at line 140 of file G4MCTSimVertex.hh.

00141 { return time; }

const std::string & G4MCTSimVertex::GetVolumeName (  )  const [inline]

Definition at line 146 of file G4MCTSimVertex.hh.

00147 { return volumeName; }

int G4MCTSimVertex::GetVolumeNumber (  )  const [inline]

Definition at line 152 of file G4MCTSimVertex.hh.

00153 { return volumeNumber; }

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

Definition at line 113 of file G4MCTSimVertex.hh.

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

00114 {
00115   inParticleTrackID= right.inParticleTrackID;
00116   outParticleTrackIDList= right.outParticleTrackIDList;
00117 
00118   id= right.id;
00119   position= right.position;
00120   time= right.time;
00121   volumeName= right.volumeName;
00122   volumeNumber= right.volumeNumber;
00123   creatorProcessName= right.creatorProcessName;
00124 
00125   return *this;
00126 }

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

Definition at line 83 of file G4MCTSimVertex.cc.

References G4endl, ns, and position.

00085 {
00086   std::ostringstream os;
00087   char cq=' ';
00088   if(storeFlag) cq='+';
00089   os << cq << id << '\0';
00090   std::string sid(os.str());
00091   
00092   ostr.unsetf(std::ios::fixed);
00093   ostr.setf(std::ios::scientific|std::ios::right|std::ios::showpoint);
00094   //ostr << std::setw(4) << id;
00095   ostr << std::setw(6) << sid;
00096   ostr << " : X(" << std::setw(9) << std::setprecision(2) 
00097        << position.x()/mm 
00098        << "," << std::setw(9) << std::setprecision(2) 
00099        << position.y()/mm
00100        << "," << std::setw(9) << std::setprecision(2) 
00101        << position.z()/mm 
00102        << "," << std::setw(9) << std::setprecision(2) 
00103        << time/ns << ")";
00104   ostr.unsetf(std::ios::scientific);
00105   ostr << "@" << volumeName
00106        << "-" << volumeNumber
00107        << "%" << creatorProcessName
00108        << G4endl;
00109   
00110   ostr << "      " << std::setw(4) << inParticleTrackID << "-> ";
00111   size_t np= outParticleTrackIDList.size();
00112   for (size_t i=0; i<np; i++) ostr << outParticleTrackIDList[i] << ", ";
00113   ostr << G4endl;
00114 }

void G4MCTSimVertex::SetCreatorProcessName ( std::string  pname  )  [inline]

Definition at line 155 of file G4MCTSimVertex.hh.

00156 { creatorProcessName= pname; }

void G4MCTSimVertex::SetID ( int  i  )  [inline]

Definition at line 128 of file G4MCTSimVertex.hh.

00128 { id= i; }

void G4MCTSimVertex::SetInParticle ( int  in  )  [inline]

Definition at line 168 of file G4MCTSimVertex.hh.

00169 { inParticleTrackID= in; }

void G4MCTSimVertex::SetInParticle ( const G4MCTSimParticle in  )  [inline]

Definition at line 165 of file G4MCTSimVertex.hh.

00166 { inParticleTrackID= in-> GetTrackID(); }

void G4MCTSimVertex::SetPosition ( const G4ThreeVector x  )  [inline]

Definition at line 131 of file G4MCTSimVertex.hh.

00132 { position= x; }

void G4MCTSimVertex::SetStoreFlag ( G4bool  q  )  [inline]

Definition at line 161 of file G4MCTSimVertex.hh.

00161 { storeFlag= q; }

void G4MCTSimVertex::SetTime ( double  t  )  [inline]

Definition at line 137 of file G4MCTSimVertex.hh.

00138 { time= t; }

void G4MCTSimVertex::SetVolumeName ( std::string  vname  )  [inline]

Definition at line 143 of file G4MCTSimVertex.hh.

00144 { volumeName= vname; }

void G4MCTSimVertex::SetVolumeNumber ( int  n  )  [inline]

Definition at line 149 of file G4MCTSimVertex.hh.

00150 { volumeNumber= n; }


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:52:28 2013 for Geant4 by  doxygen 1.4.7