#include <SimVertex.h>
Collaboration diagram for DayaBay::SimVertex:
Public Member Functions | |
SimVertex () | |
Default constructor. | |
SimVertex (const SimTrackReference &track, const SimProcess &process, double time, const Gaudi::XYZPoint &position, double totEnergy, const Gaudi::XYZVector &momentum) | |
Create with data. | |
virtual | ~SimVertex () |
Default Destructor. | |
double | mass () const |
Get the mass from energy+momentum. May not be exact due to rounding. | |
double | kineticEnergy () const |
Get the mass from energy+momentum. May not be exact due to rounding. | |
void | addSecondary (const SimTrackReference &ref) |
Add a secondary to the existing collection. | |
std::ostream & | fillStream (std::ostream &s) const |
Serialize to an ostream. | |
const DayaBay::SimTrackReference & | track () const |
Retrieve const The parent track (or it's ancestor). | |
void | setTrack (const DayaBay::SimTrackReference &value) |
Update The parent track (or it's ancestor). | |
const DayaBay::SimProcess & | process () const |
Retrieve const Process at this vertex. | |
void | setProcess (const DayaBay::SimProcess &value) |
Update Process at this vertex. | |
double | time () const |
Retrieve const Simulation global time. | |
void | setTime (double value) |
Update Simulation global time. | |
const Gaudi::XYZPoint & | position () const |
Retrieve const Global XYZ coordinates. | |
void | setPosition (const Gaudi::XYZPoint &value) |
Update Global XYZ coordinates. | |
double | totalEnergy () const |
Retrieve const Total energy. | |
void | setTotalEnergy (double value) |
Update Total energy. | |
const Gaudi::XYZVector & | momentum () const |
Retrieve const Momentum vector. | |
void | setMomentum (const Gaudi::XYZVector &value) |
Update Momentum vector. | |
const std::vector< DayaBay::SimTrackReference > & | secondaries () const |
Retrieve const SimTracks origninating from here, including indirect ones. | |
void | setSecondaries (const std::vector< DayaBay::SimTrackReference > &value) |
Update SimTracks origninating from here, including indirect ones. | |
Static Public Member Functions | |
static void * | operator new (size_t size) |
operator new | |
static void * | operator new (size_t size, void *pObj) |
placement operator new it is needed by libstdc++ 3.2.3 (e.g. | |
static void | operator delete (void *p) |
operator delete | |
static void | operator delete (void *p, void *pObj) |
placement operator delete not sure if really needed, but it does not harm | |
Private Attributes | |
DayaBay::SimTrackReference | m_track |
The parent track (or it's ancestor). | |
DayaBay::SimProcess | m_process |
Process at this vertex. | |
double | m_time |
Simulation global time. | |
Gaudi::XYZPoint | m_position |
Global XYZ coordinates. | |
double | m_totalEnergy |
Total energy. | |
Gaudi::XYZVector | m_momentum |
Momentum vector. | |
std::vector< DayaBay::SimTrackReference > | m_secondaries |
SimTracks origninating from here, including indirect ones. |
May be shared by more than one track in the case of a parent/child relationship.
Definition at line 47 of file SimVertex.h.
DayaBay::SimVertex::SimVertex | ( | ) | [inline] |
Default constructor.
Definition at line 52 of file SimVertex.h.
00052 : m_track(), 00053 m_process(), 00054 m_time(-1e18), 00055 m_position(), 00056 m_totalEnergy(0), 00057 m_momentum(), 00058 m_secondaries(0) {}
DayaBay::SimVertex::SimVertex | ( | const SimTrackReference & | track, | |
const SimProcess & | process, | |||
double | time, | |||
const Gaudi::XYZPoint & | position, | |||
double | totEnergy, | |||
const Gaudi::XYZVector & | momentum | |||
) | [inline] |
Create with data.
Definition at line 61 of file SimVertex.h.
00066 : m_track(track), 00067 m_process(process), 00068 m_time(time), 00069 m_position(position), 00070 m_totalEnergy(totEnergy), 00071 m_momentum(momentum), 00072 m_secondaries(0) {}
virtual DayaBay::SimVertex::~SimVertex | ( | ) | [inline, virtual] |
double SimVertex::mass | ( | ) | const |
Get the mass from energy+momentum. May not be exact due to rounding.
Get the mass from energy+momentum. May not be exact due to rounding
Definition at line 23 of file SimVertex.cc.
00024 { 00029 return sqrt(fabs(m_totalEnergy*m_totalEnergy - m_momentum.Mag2())); 00030 }
double SimVertex::kineticEnergy | ( | ) | const |
Get the mass from energy+momentum. May not be exact due to rounding.
Get the mass from energy+momentum. May not be exact due to rounding
Definition at line 32 of file SimVertex.cc.
00033 { 00038 return fabs(m_totalEnergy) - mass(); 00039 }
void DayaBay::SimVertex::addSecondary | ( | const SimTrackReference & | ref | ) | [inline] |
Add a secondary to the existing collection.
Definition at line 275 of file SimVertex.h.
00276 { 00277 00278 m_secondaries.push_back(ref); 00279 00280 }
std::ostream & DayaBay::SimVertex::fillStream | ( | std::ostream & | s | ) | const |
Serialize to an ostream.
Definition at line 10 of file SimVertex.cc.
00011 { 00012 s << "{ " 00013 << "track : " << m_track << std::endl 00014 << "process : " << m_process << std::endl 00015 << "time : " << (float)m_time << std::endl 00016 << "position : " << m_position << std::endl 00017 << "totalEnergy : " << (float)m_totalEnergy << std::endl 00018 << "momentum : " << m_momentum << std::endl 00019 << "secondaries : " << m_secondaries.size() << std::endl << " }"; 00020 return s; 00021 }
const DayaBay::SimTrackReference & DayaBay::SimVertex::track | ( | ) | const [inline] |
Retrieve const The parent track (or it's ancestor).
Definition at line 205 of file SimVertex.h.
00206 { 00207 return m_track; 00208 }
void DayaBay::SimVertex::setTrack | ( | const DayaBay::SimTrackReference & | value | ) | [inline] |
Update The parent track (or it's ancestor).
Definition at line 210 of file SimVertex.h.
00211 { 00212 m_track = value; 00213 }
const DayaBay::SimProcess & DayaBay::SimVertex::process | ( | ) | const [inline] |
Retrieve const Process at this vertex.
Definition at line 215 of file SimVertex.h.
00216 { 00217 return m_process; 00218 }
void DayaBay::SimVertex::setProcess | ( | const DayaBay::SimProcess & | value | ) | [inline] |
Update Process at this vertex.
Definition at line 220 of file SimVertex.h.
00221 { 00222 m_process = value; 00223 }
double DayaBay::SimVertex::time | ( | ) | const [inline] |
Retrieve const Simulation global time.
Definition at line 225 of file SimVertex.h.
00226 { 00227 return m_time; 00228 }
void DayaBay::SimVertex::setTime | ( | double | value | ) | [inline] |
Update Simulation global time.
Definition at line 230 of file SimVertex.h.
00231 { 00232 m_time = value; 00233 }
const Gaudi::XYZPoint & DayaBay::SimVertex::position | ( | ) | const [inline] |
Retrieve const Global XYZ coordinates.
Definition at line 235 of file SimVertex.h.
00236 { 00237 return m_position; 00238 }
void DayaBay::SimVertex::setPosition | ( | const Gaudi::XYZPoint & | value | ) | [inline] |
Update Global XYZ coordinates.
Definition at line 240 of file SimVertex.h.
00241 { 00242 m_position = value; 00243 }
double DayaBay::SimVertex::totalEnergy | ( | ) | const [inline] |
Retrieve const Total energy.
Definition at line 245 of file SimVertex.h.
00246 { 00247 return m_totalEnergy; 00248 }
void DayaBay::SimVertex::setTotalEnergy | ( | double | value | ) | [inline] |
Update Total energy.
Definition at line 250 of file SimVertex.h.
00251 { 00252 m_totalEnergy = value; 00253 }
const Gaudi::XYZVector & DayaBay::SimVertex::momentum | ( | ) | const [inline] |
Retrieve const Momentum vector.
Definition at line 255 of file SimVertex.h.
00256 { 00257 return m_momentum; 00258 }
void DayaBay::SimVertex::setMomentum | ( | const Gaudi::XYZVector & | value | ) | [inline] |
Update Momentum vector.
Definition at line 260 of file SimVertex.h.
00261 { 00262 m_momentum = value; 00263 }
const std::vector< DayaBay::SimTrackReference > & DayaBay::SimVertex::secondaries | ( | ) | const [inline] |
Retrieve const SimTracks origninating from here, including indirect ones.
Definition at line 265 of file SimVertex.h.
00266 { 00267 return m_secondaries; 00268 }
void DayaBay::SimVertex::setSecondaries | ( | const std::vector< DayaBay::SimTrackReference > & | value | ) | [inline] |
Update SimTracks origninating from here, including indirect ones.
Definition at line 270 of file SimVertex.h.
00271 { 00272 m_secondaries = value; 00273 }
static void* DayaBay::SimVertex::operator new | ( | size_t | size | ) | [inline, static] |
operator new
Definition at line 148 of file SimVertex.h.
00149 { 00150 return ( sizeof(SimVertex) == size ? 00151 boost::singleton_pool<SimVertex, sizeof(SimVertex)>::malloc() : 00152 ::operator new(size) ); 00153 }
static void* DayaBay::SimVertex::operator new | ( | size_t | size, | |
void * | pObj | |||
) | [inline, static] |
placement operator new it is needed by libstdc++ 3.2.3 (e.g.
in std::vector) it is not needed in libstdc++ >= 3.4
Definition at line 158 of file SimVertex.h.
static void DayaBay::SimVertex::operator delete | ( | void * | p | ) | [inline, static] |
static void DayaBay::SimVertex::operator delete | ( | void * | p, | |
void * | pObj | |||
) | [inline, static] |
placement operator delete not sure if really needed, but it does not harm
Definition at line 173 of file SimVertex.h.
00174 { 00175 ::operator delete (p, pObj); 00176 }
double DayaBay::SimVertex::m_time [private] |
double DayaBay::SimVertex::m_totalEnergy [private] |
std::vector<DayaBay::SimTrackReference> DayaBay::SimVertex::m_secondaries [private] |
SimTracks origninating from here, including indirect ones.
Definition at line 188 of file SimVertex.h.