#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 G4MCTSimVertex & | operator= (const G4MCTSimVertex &right) |
void | SetID (int i) |
int | GetID () const |
void | SetPosition (const G4ThreeVector &x) |
const G4ThreeVector & | GetPosition () 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 |
Definition at line 45 of file G4MCTSimVertex.hh.
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 | ( | ) |
G4MCTSimVertex::G4MCTSimVertex | ( | const G4MCTSimVertex & | right | ) | [inline] |
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] |
int G4MCTSimVertex::GetID | ( | ) | const [inline] |
int G4MCTSimVertex::GetInParticleTrackID | ( | ) | const [inline] |
int G4MCTSimVertex::GetNofOutParticles | ( | ) | const [inline] |
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] |
G4bool G4MCTSimVertex::GetStoreFlag | ( | ) | const [inline] |
double G4MCTSimVertex::GetTime | ( | ) | const [inline] |
const std::string & G4MCTSimVertex::GetVolumeName | ( | ) | const [inline] |
int G4MCTSimVertex::GetVolumeNumber | ( | ) | const [inline] |
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] |
void G4MCTSimVertex::SetID | ( | int | i | ) | [inline] |
void G4MCTSimVertex::SetInParticle | ( | int | in | ) | [inline] |
void G4MCTSimVertex::SetInParticle | ( | const G4MCTSimParticle * | in | ) | [inline] |
void G4MCTSimVertex::SetPosition | ( | const G4ThreeVector & | x | ) | [inline] |
void G4MCTSimVertex::SetStoreFlag | ( | G4bool | q | ) | [inline] |
void G4MCTSimVertex::SetTime | ( | double | t | ) | [inline] |
void G4MCTSimVertex::SetVolumeName | ( | std::string | vname | ) | [inline] |
void G4MCTSimVertex::SetVolumeNumber | ( | int | n | ) | [inline] |