LArSoft
v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
|
#include "EveIdCalculator.h"
Public Member Functions | |
EveIdCalculator () | |
Constructor and destructor. More... | |
virtual | ~EveIdCalculator () |
void | Init (const sim::ParticleList *list) |
Initialize this calculator for a particular ParticleList. More... | |
const sim::ParticleList * | ParticleList () const |
int | CalculateEveId (const int trackID) |
Protected Member Functions | |
virtual int | DoCalculateEveId (const int trackID) |
Protected Attributes | |
const sim::ParticleList * | m_particleList |
Private Types | |
typedef std::map< int, int > | m_previousList_t |
More... | |
typedef m_previousList_t::const_iterator | m_previousList_ptr |
Private Attributes | |
m_previousList_t | m_previousList |
Definition at line 83 of file EveIdCalculator.h.
Definition at line 123 of file EveIdCalculator.h.
|
private |
The ParticleList associated with the eve ID calculation.
Keep track of the previous eve IDs for the current ParticleList.
Definition at line 122 of file EveIdCalculator.h.
sim::EveIdCalculator::EveIdCalculator | ( | ) |
|
virtual |
Definition at line 25 of file EveIdCalculator.cxx.
int sim::EveIdCalculator::CalculateEveId | ( | const int | trackID | ) |
The main eve ID calculation method. This is the reason why we use the Template Method for this class: because no matter what the core eve ID calculation is, we want to perform the following an additional task: The eve ID calculation can be lengthy. If the user is going through a LArVoxelList and trying to figuring out the eve ID associated with each voxel, this routine may be called many times. To save on time, keep the results of previous eve ID calculations for the current particle list. Only do the complete eve ID calculation if we haven't done it already for a given track ID.
Definition at line 42 of file EveIdCalculator.cxx.
References DoCalculateEveId(), and m_previousList.
Referenced by ParticleList().
|
protectedvirtual |
This is the core method to calculate the eve ID. If another class is going to override the default calculation, this the method that must be implemented.
Reimplemented in sim::EmEveIdCalculator.
Definition at line 64 of file EveIdCalculator.cxx.
References m_particleList, and simb::MCParticle::TrackId().
Referenced by CalculateEveId(), and ParticleList().
void sim::EveIdCalculator::Init | ( | const sim::ParticleList * | list | ) |
Initialize this calculator for a particular ParticleList.
Definition at line 31 of file EveIdCalculator.cxx.
References m_particleList, and m_previousList.
|
inline |
Accessor: For which ParticleList does this calculator generate results?
Definition at line 96 of file EveIdCalculator.h.
References CalculateEveId(), DoCalculateEveId(), and m_particleList.
|
protected |
Definition at line 118 of file EveIdCalculator.h.
Referenced by sim::EmEveIdCalculator::DoCalculateEveId(), DoCalculateEveId(), Init(), and ParticleList().
|
private |
Definition at line 124 of file EveIdCalculator.h.
Referenced by CalculateEveId(), and Init().