1 #ifndef PHG4TRUTHINFOCONTAINER_H__
2 #define PHG4TRUTHINFOCONTAINER_H__
17 typedef std::map<int,PHG4Particle *>
Map;
20 typedef std::pair<Iterator, Iterator>
Range;
21 typedef std::pair<ConstIterator, ConstIterator>
ConstRange;
23 typedef std::map<int,PHG4VtxPoint *>
VtxMap;
26 typedef std::pair<VtxIterator, VtxIterator>
VtxRange;
32 typedef std::pair<ShowerIterator, ShowerIterator>
ShowerRange;
39 void identify(std::ostream& os = std::cout)
const;
63 unsigned int size(
void )
const {
return particlemap.size();}
65 return std::distance(particlemap.upper_bound(0),particlemap.end());
78 std::pair< std::map<int,int>::const_iterator,
80 return std::make_pair(particle_embed_flags.begin(), particle_embed_flags.end());
88 particle_embed_flags.insert(std::make_pair(
id,flag));
135 std::pair< std::map<int,int>::const_iterator,
137 return std::make_pair(vertex_embed_flags.begin(), vertex_embed_flags.end());
145 vertex_embed_flags.insert(std::make_pair(
id,flag));
217 std::map< int, int> particle_embed_flags;
218 std::map< int, int> vertex_embed_flags;
std::pair< ConstShowerIterator, ConstShowerIterator > ConstShowerRange
Map::const_iterator ConstIterator
const VtxMap & GetVtxMap() const
Get the Vertex Map storage.
int isEmbeded(const int trackid) const
VtxRange GetSecondaryVtxRange()
std::map< int, PHG4Particle * > Map
std::pair< Iterator, Iterator > Range
bool is_primary_vtx(const PHG4VtxPoint *v) const
ConstVtxIterator AddVertex(const int vtxid, PHG4VtxPoint *vertex)
Add a vertex and return an iterator to the user.
ConstRange GetPrimaryParticleRange() const
std::map< int, PHG4Shower * > ShowerMap
bool is_primary(const PHG4Particle *p) const
virtual ~PHG4TruthInfoContainer()
std::pair< ConstVtxIterator, ConstVtxIterator > ConstVtxRange
std::map< int, PHG4VtxPoint * > VtxMap
VtxRange GetVtxRange()
Get a range of iterators covering the entire vertex container.
Range GetParticleRange()
Get a range of iterators covering the entire container.
int isEmbededVtx(const int vtxid) const
void delete_vtx(VtxIterator viter)
ShowerRange GetShowerRange()
Get a range of iterators covering the entire container.
ConstShowerIterator AddShower(const int showerid, PHG4Shower *newshower)
Add a shower that the user has created.
ConstShowerRange GetSecondaryShowerRange() const
int minshowerindex() const
unsigned int size(void) const
particle size
int maxshowerindex() const
void AddEmbededTrkId(const int id, const int flag)
const ShowerMap & GetShowerMap() const
Get the Shower Map storage.
unsigned int GetNumVertices() const
Get the number of vertices stored.
PHG4Shower * GetPrimaryShower(const int showerid)
VtxMap::iterator VtxIterator
ConstVtxRange GetPrimaryVtxRange() const
ShowerMap::iterator ShowerIterator
ShowerMap::const_iterator ConstShowerIterator
PHG4Shower * GetShower(const int showerid)
std::pair< ConstIterator, ConstIterator > ConstRange
ConstRange GetSecondaryParticleRange() const
Range GetPrimaryParticleRange()
PHG4VtxPoint * GetPrimaryVtx(const int vtxid)
std::pair< std::map< int, int >::const_iterator, std::map< int, int >::const_iterator > GetEmbeddedTrkIds() const
const Map & GetMap() const
Get the Particle Map storage.
ConstRange GetParticleRange() const
void AddEmbededVtxId(const int id, const int flag)
PHG4Particle * GetParticle(const int particleid)
ConstVtxRange GetVtxRange() const
Range GetSecondaryParticleRange()
std::pair< std::map< int, int >::const_iterator, std::map< int, int >::const_iterator > GetEmbeddedVtxIds() const
ConstVtxRange GetSecondaryVtxRange() const
ShowerRange GetSecondaryShowerRange()
void delete_shower(ShowerIterator piter)
ConstShowerRange GetPrimaryShowerRange() const
ConstShowerRange GetShowerRange() const
unsigned int shower_size(void) const
shower size
std::pair< ShowerIterator, ShowerIterator > ShowerRange
ConstIterator AddParticle(const int particleid, PHG4Particle *newparticle)
Add a particle that the user has created.
int GetPrimaryVertexIndex() const
PHG4Particle * GetPrimaryParticle(const int particleid)
void delete_particle(Iterator piter)
std::pair< VtxIterator, VtxIterator > VtxRange
PHG4VtxPoint * GetVtx(const int vtxid)
VtxMap::const_iterator ConstVtxIterator
void identify(std::ostream &os=std::cout) const
int GetNumPrimaryVertexParticles()
ShowerRange GetPrimaryShowerRange()
VtxRange GetPrimaryVtxRange()