Class Reference for E1039 Core & Analysis Software
PHG4InEvent.h
Go to the documentation of this file.
1 #ifndef PHG4InEvent_H__
2 #define PHG4InEvent_H__
3 
4 #include <phool/PHObject.h>
5 
6 #include <map>
7 #include <set>
8 
9 class PHG4Particle;
10 class PHG4VtxPoint;
11 
12 class PHG4InEvent: public PHObject
13 {
14  public:
16  virtual ~PHG4InEvent();
17 
18  virtual void identify(std::ostream& os = std::cout) const;
19  void Reset();
20  // this one is for HepMC records where we want to keep the HepMC vertex numbering
21  int AddVtxHepMC(const int id, const double x, const double y, const double z, const double t);
22  int AddVtx(const double x, const double y, const double z, const double t);
23  int AddVtx(const int id,const PHG4VtxPoint &);
24  int AddParticle(const int vtxid, PHG4Particle *particle);
25  void AddEmbeddedParticle(PHG4Particle *particle, int flag) {embedded_particlelist.insert(std::make_pair(particle,flag));}
26 
27  // PHG4VtxPoint *GetVtx() {return vtxlist.begin()->second;}
28  std::pair< std::map<int, PHG4VtxPoint *>::const_iterator, std::map<int, PHG4VtxPoint *>::const_iterator > GetVertices() const;
29  std::pair< std::multimap<int,PHG4Particle *>::const_iterator, std::multimap<int,PHG4Particle *>::const_iterator > GetParticles(const int vtxid) const;
30  std::pair< std::multimap<int,PHG4Particle *>::const_iterator, std::multimap<int,PHG4Particle *>::const_iterator > GetParticles() const;
31  std::pair< std::multimap<int,PHG4Particle *>::iterator, std::multimap<int,PHG4Particle *>::iterator > GetParticles_Modify();
32  std::pair< std::map<PHG4Particle *,int>::const_iterator, std::map<PHG4Particle *,int>::const_iterator> GetEmbeddedParticles() const
33  {return std::make_pair(embedded_particlelist.begin(), embedded_particlelist.end());}
34  int isEmbeded(PHG4Particle *) const;
35  int GetNEmbedded() const {return embedded_particlelist.size();}
36  int GetNVtx() const {return vtxlist.size();}
37  void DeleteParticle(std::multimap<int,PHG4Particle *>::iterator &iter);
38 
39  protected:
40 
41  int AddVtxCommon(PHG4VtxPoint *newvtx);
42  std::map<int,PHG4VtxPoint *> vtxlist;
43  std::multimap<int,PHG4Particle *> particlelist;
44  std::map<PHG4Particle *,int> embedded_particlelist;
45 
46  ClassDef(PHG4InEvent,1)
47 };
48 
49 #endif
std::multimap< int, PHG4Particle * > particlelist
Definition: PHG4InEvent.h:43
int AddParticle(const int vtxid, PHG4Particle *particle)
Definition: PHG4InEvent.cc:63
std::pair< std::multimap< int, PHG4Particle * >::const_iterator, std::multimap< int, PHG4Particle * >::const_iterator > GetParticles() const
Definition: PHG4InEvent.cc:120
int AddVtx(const double x, const double y, const double z, const double t)
Definition: PHG4InEvent.cc:38
void DeleteParticle(std::multimap< int, PHG4Particle * >::iterator &iter)
Definition: PHG4InEvent.cc:176
int GetNVtx() const
Definition: PHG4InEvent.h:36
int AddVtxHepMC(const int id, const double x, const double y, const double z, const double t)
Definition: PHG4InEvent.cc:30
virtual ~PHG4InEvent()
std::pair< std::map< int, PHG4VtxPoint * >::const_iterator, std::map< int, PHG4VtxPoint * >::const_iterator > GetVertices() const
Definition: PHG4InEvent.cc:105
void Reset()
Clear Event.
Definition: PHG4InEvent.cc:88
int GetNEmbedded() const
Definition: PHG4InEvent.h:35
std::pair< std::multimap< int, PHG4Particle * >::iterator, std::multimap< int, PHG4Particle * >::iterator > GetParticles_Modify()
Definition: PHG4InEvent.cc:127
virtual void identify(std::ostream &os=std::cout) const
Definition: PHG4InEvent.cc:134
int isEmbeded(PHG4Particle *) const
Definition: PHG4InEvent.cc:165
int AddVtxCommon(PHG4VtxPoint *newvtx)
Definition: PHG4InEvent.cc:46
std::pair< std::map< PHG4Particle *, int >::const_iterator, std::map< PHG4Particle *, int >::const_iterator > GetEmbeddedParticles() const
Definition: PHG4InEvent.h:32
std::map< PHG4Particle *, int > embedded_particlelist
Definition: PHG4InEvent.h:44
void AddEmbeddedParticle(PHG4Particle *particle, int flag)
Definition: PHG4InEvent.h:25
std::map< int, PHG4VtxPoint * > vtxlist
Definition: PHG4InEvent.h:42