Class Reference for E1039 Core & Analysis Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PHHepMCGenEvent.h
Go to the documentation of this file.
1 #ifndef __PHHEPMCGENEVENT__
2 #define __PHHEPMCGENEVENT__
3 
4 #include <phool/PHObject.h>
5 #include <phool/phool.h>
6 
7 #include <HepMC/GenEvent.h>
8 #include <HepMC/GenParticle.h>
9 #include <HepMC/GenVertex.h>
10 #include <HepMC/SimpleVector.h>
11 
12 namespace HepMC
13 {
14 class GenEvent;
15 };
16 
17 class PHHepMCGenEvent : public PHObject
18 {
19  public:
21 
22  PHHepMCGenEvent(const PHHepMCGenEvent& event);
24  virtual ~PHHepMCGenEvent();
25 
26  virtual void identify(std::ostream& os = std::cout) const;
27  virtual void Reset();
28  virtual int isValid() const
29  {
31  return 0;
32  }
33  PHHepMCGenEvent* Clone() const { return new PHHepMCGenEvent(*this); }
34  virtual HepMC::GenEvent* getEvent();
35  virtual const HepMC::GenEvent* getEvent() const;
36 
41  int get_embedding_id() const { return _embedding_id; }
42 
47  void set_embedding_id(int id) { _embedding_id = id; }
48 
50  bool is_simulated() const { return _isSimulated; }
51 
53  void is_simulated(bool v) { _isSimulated = v; }
54 
56  const HepMC::FourVector& get_collision_vertex() const { return _collisionVertex; }
57 
59  void set_collision_vertex(const HepMC::FourVector& v) { _collisionVertex = v; }
60 
62  bool addEvent(HepMC::GenEvent* evt);
63  bool addEvent(HepMC::GenEvent& evt);
64  bool swapEvent(HepMC::GenEvent* & evt);
65  void clearEvent();
66 
68  virtual void moveVertex(double x, double y, double z, double t = 0);
69 
70  // the number of entries in the array of particles
71  virtual int size(void) const;
72  virtual int vertexSize(void) const;
73 
74  virtual void print(std::ostream& os = std::cout) const;
75 
76  void PrintEvent();
77 
78  protected:
84 
87 
89  HepMC::FourVector _collisionVertex;
90 
92  HepMC::GenEvent* _theEvt;
93 
94  ClassDef(PHHepMCGenEvent, 5)
95 };
96 
97 #endif // __PHHEPMCEVENT__
int get_embedding_id() const
virtual int isValid() const
isValid returns non zero if object contains vailid data
void set_embedding_id(int id)
bool swapEvent(HepMC::GenEvent *&evt)
bool addEvent(HepMC::GenEvent *evt)
host an HepMC event
HepMC::GenEvent * _theEvt
The HEP MC record from event generator. Note the units are recorded in GenEvent.
virtual void print(std::ostream &os=std::cout) const
virtual void moveVertex(double x, double y, double z, double t=0)
move the collision vertex position in the Hall coordinate system, use PHENIX units of cm...
virtual HepMC::GenEvent * getEvent()
void is_simulated(bool v)
whether this event has been processed in Geant4 simulation
const HepMC::FourVector & get_collision_vertex() const
collision vertex position in the Hall coordinate system, use PHENIX units of cm, ns ...
virtual int size(void) const
PHHepMCGenEvent * Clone() const
bool is_simulated() const
whether this event has been processed in Geant4 simulation
virtual ~PHHepMCGenEvent()
virtual void Reset()
Clear Event.
bool _isSimulated
whether this event has been processed in Geant4 simulation
virtual int vertexSize(void) const
int _embedding_id
Embedding ID for this generated event positive ID is the embedded event of interest, e.g. jetty event from pythia negative IDs are backgrounds, .e.g out of time pile up collisions Usually, ID = 0 means the primary Au+Au collision background.
HepMC::FourVector _collisionVertex
collision vertex position in the Hall coordinate system, use PHENIX units of cm, ns ...
#define PHOOL_VIRTUAL_WARNING
Definition: phool.h:25
PHHepMCGenEvent & operator=(const PHHepMCGenEvent &event)
virtual void identify(std::ostream &os=std::cout) const
void set_collision_vertex(const HepMC::FourVector &v)
collision vertex position in the Hall coordinate system, use PHENIX units of cm, ns ...