#include <G4MCTEvent.hh>
Definition at line 49 of file G4MCTEvent.hh.
typedef MCTGen2SimParticleMap::const_iterator G4MCTEvent::genprimary_const_iterator |
Definition at line 84 of file G4MCTEvent.hh.
typedef MCTSim2GenParticleMap::const_iterator G4MCTEvent::simprimary_const_iterator |
Definition at line 88 of file G4MCTEvent.hh.
G4MCTEvent::G4MCTEvent | ( | ) |
Definition at line 43 of file G4MCTEvent.cc.
References genEvent, and simEvent.
00044 : eventNumber(0) 00046 { 00047 genEvent= new G4MCTGenEvent(); // will be reused. 00048 simEvent= new G4MCTSimEvent(); 00049 }
G4MCTEvent::~G4MCTEvent | ( | ) | [virtual] |
G4MCTEvent::G4MCTEvent | ( | const G4MCTEvent & | right | ) | [inline] |
int G4MCTEvent::AddPrimaryPair | ( | const G4MCTGenParticle & | genp, | |
const G4MCTSimParticle * | simp | |||
) |
Definition at line 87 of file G4MCTEvent.cc.
References gen2simParticleMap, and sim2genParticleMap.
00090 { 00091 gen2simParticleMap.insert(std::make_pair(const_cast<G4MCTGenParticle&>(genp), 00092 const_cast<G4MCTSimParticle*>(simp))); 00093 sim2genParticleMap.insert(std::make_pair(const_cast<G4MCTSimParticle*>(simp), 00094 const_cast<G4MCTGenParticle&>(genp))); 00095 00096 return gen2simParticleMap.size(); 00097 }
void G4MCTEvent::ClearEvent | ( | ) |
Definition at line 100 of file G4MCTEvent.cc.
References gen2simParticleMap, genEvent, sim2genParticleMap, and simEvent.
00102 { 00103 gen2simParticleMap.clear(); 00104 sim2genParticleMap.clear(); 00105 00106 genEvent-> ClearEvent(); 00107 simEvent-> ClearEvent(); 00108 }
G4MCTEvent::genprimary_const_iterator G4MCTEvent::genprimaries_begin | ( | ) | const [inline] |
Definition at line 124 of file G4MCTEvent.hh.
References gen2simParticleMap.
00125 { return gen2simParticleMap.begin(); }
G4MCTEvent::genprimary_const_iterator G4MCTEvent::genprimaries_end | ( | ) | const [inline] |
Definition at line 127 of file G4MCTEvent.hh.
References gen2simParticleMap.
00128 { return gen2simParticleMap.end(); }
int G4MCTEvent::GetEventNumber | ( | ) | const [inline] |
Definition at line 116 of file G4MCTEvent.hh.
References eventNumber.
Referenced by G4Pevent::G4Pevent().
00116 { return eventNumber; }
G4MCTGenEvent * G4MCTEvent::GetGenEvent | ( | ) | const [inline] |
G4MCTGenParticle G4MCTEvent::GetGenParticle | ( | const G4MCTSimParticle * | simpart | ) | const |
Definition at line 74 of file G4MCTEvent.cc.
00076 { 00077 MCTSim2GenParticleMap::const_iterator 00078 pos= sim2genParticleMap.find(const_cast<G4MCTSimParticle*>(simpart)); 00079 if(pos != sim2genParticleMap.end()) { 00080 return pos-> second; 00081 } else { 00082 return G4MCTGenParticle((void*)0,(void*)0); 00083 } 00084 }
int G4MCTEvent::GetNofPrimaries | ( | ) | const [inline] |
Definition at line 118 of file G4MCTEvent.hh.
References gen2simParticleMap.
00119 { return gen2simParticleMap.size(); }
G4MCTSimEvent * G4MCTEvent::GetSimEvent | ( | ) | const [inline] |
G4MCTSimParticle * G4MCTEvent::GetSimParticle | ( | const G4MCTGenParticle & | genpart | ) | const |
Definition at line 61 of file G4MCTEvent.cc.
00063 { 00064 MCTGen2SimParticleMap::const_iterator pos= gen2simParticleMap.find(genpart); 00065 if(pos != gen2simParticleMap.end()) { 00066 return pos-> second; 00067 } else { 00068 return 0; 00069 } 00070 }
const G4MCTEvent & G4MCTEvent::operator= | ( | const G4MCTEvent & | right | ) | [inline] |
Definition at line 102 of file G4MCTEvent.hh.
References eventNumber, gen2simParticleMap, genEvent, sim2genParticleMap, and simEvent.
00103 { 00104 eventNumber= right.eventNumber; 00105 00106 simEvent= right.simEvent; // shallow copy... 00107 genEvent= right.genEvent; 00108 00109 gen2simParticleMap= right.gen2simParticleMap; 00110 sim2genParticleMap= right.sim2genParticleMap; 00111 00112 return *this; 00113 }
void G4MCTEvent::Print | ( | std::ostream & | ostr = std::cout |
) | const |
Definition at line 111 of file G4MCTEvent.cc.
References G4endl.
00113 { 00114 ostr << "Event#:" << eventNumber << G4endl; 00115 simEvent-> Print(ostr); 00116 }
void G4MCTEvent::SetEventNumber | ( | int | n | ) | [inline] |
G4MCTEvent::simprimary_const_iterator G4MCTEvent::simprimaries_begin | ( | ) | const [inline] |
Definition at line 130 of file G4MCTEvent.hh.
References sim2genParticleMap.
00131 { return sim2genParticleMap.begin(); }
G4MCTEvent::simprimary_const_iterator G4MCTEvent::simprimaries_end | ( | ) | const [inline] |
Definition at line 133 of file G4MCTEvent.hh.
References sim2genParticleMap.
00134 { return sim2genParticleMap.end(); }
int G4MCTEvent::eventNumber [protected] |
Definition at line 51 of file G4MCTEvent.hh.
Referenced by GetEventNumber(), operator=(), and SetEventNumber().
MCTGen2SimParticleMap G4MCTEvent::gen2simParticleMap [protected] |
Definition at line 56 of file G4MCTEvent.hh.
Referenced by AddPrimaryPair(), ClearEvent(), genprimaries_begin(), genprimaries_end(), GetNofPrimaries(), and operator=().
G4MCTGenEvent* G4MCTEvent::genEvent [protected] |
Definition at line 52 of file G4MCTEvent.hh.
Referenced by ClearEvent(), G4MCTEvent(), GetGenEvent(), operator=(), and ~G4MCTEvent().
MCTSim2GenParticleMap G4MCTEvent::sim2genParticleMap [protected] |
Definition at line 57 of file G4MCTEvent.hh.
Referenced by AddPrimaryPair(), ClearEvent(), operator=(), simprimaries_begin(), and simprimaries_end().
G4MCTSimEvent* G4MCTEvent::simEvent [protected] |
Definition at line 53 of file G4MCTEvent.hh.
Referenced by ClearEvent(), G4MCTEvent(), GetSimEvent(), operator=(), and ~G4MCTEvent().