1 #ifndef _TauolaHepMCParticle_h_included_
2 #define _TauolaHepMCParticle_h_included_
5 * @class TauolaHepMCParticle
7 * @brief Interface to HepMC::GenParticle objects
9 * This class implements the virtual methods of
10 * TauolaParticle. In this way it provides an
11 * interface between the generic TauolaParticle class
12 * and a HepMC::GenParticle object.
14 * @author Nadia Davidson
17 * This code is licensed under GNU General Public Licence.
18 * For more informations, see: http://www.gnu.org/licenses/
24 #include "HepMC/GenParticle.h"
25 #include "HepMC/SimpleVector.h"
26 #include "HepMC/GenEvent.h"
28 //#include "DecayList.h"
29 #include "TauolaParticle.h"
35 class TauolaHepMCParticle: public TauolaParticle{
38 /** General constructor */
39 TauolaHepMCParticle();
41 ~TauolaHepMCParticle();
43 /** Constructor which keeps a pointer to the HepMC::GenParticle*/
44 TauolaHepMCParticle(HepMC::GenParticle * particle);
46 /** Constructor which creates a new HepMC::GenParticle and
47 sets the properties pdg_id, statu and mass. */
48 TauolaHepMCParticle(int pdg_id, int status, double mass);
50 /** Returns the HepMC::GenParticle */
51 HepMC::GenParticle * getHepMC();
53 /** Remove the decay branch from the event record and reset the particle status code to stable. */
56 /** Set the mothers of this particle via a vector of TauolaParticle*/
57 void setMothers(std::vector<TauolaParticle*> mothers);
59 /** Set the daughters of this particle via a vector of TauolaParticle*/
60 void setDaughters(std::vector<TauolaParticle*> daughters);
62 /** Returns the mothers of this particle via a vector of TauolaParticle */
63 std::vector<TauolaParticle*> getMothers();
65 /** Returns the daughters of this particle via a vector of TauolaParticle */
66 std::vector<TauolaParticle*> getDaughters();
68 /** Set the PDG ID code of this particle */
69 void setPdgID(int pdg_id);
71 /** Set the status of this particle */
72 void setStatus(int statu);
74 /** Set the mass of this particle */
75 void setMass(double mass);
77 /** Get the PDG ID code of this particle */
80 /** Get the status of this particle */
83 /** Get the barcode of this particle */
86 /** Check that the 4 momentum in conserved at the vertices producing
87 and ending this particle */
88 void checkMomentumConservation();
90 /** Overriding of TauolaParticle decayEndgame method.
91 Converts the momentum and length units
92 and sets the vector (X,T) position */
95 /** Create a new particle of type TauolaHepMCParticle, with the given
96 properties. The new particle bares no relations to this
97 particle, but it provides a way of creating a instance of
98 this derived class. eg. createNewParticle() is used inside
99 filhep_() so that a TauolaHepMCParticle can be created without
100 the method having explicit knowledge of the TauolaHepMCParticle
102 TauolaHepMCParticle * createNewParticle(int pdg_id, int status, double mass,
103 double px, double py,
104 double pz, double e);
106 /** Print some information about this particle to standard output */
109 /** Returns the px component of the four vector*/
112 /** Returns the py component of the four vector */
115 /** Returns the pz component of the four vector */
118 /** Returns the energy component of the four vector */
121 /** Set the px component of the four vector */
122 void setPx( double px );
124 /** Set the px component of the four vector */
125 void setPy( double py );
127 /** Set the pz component of the four vector */
128 void setPz( double pz );
130 /** Set the energy component of the four vector */
131 void setE( double e );
136 /** Sets the position for whole decay tree starting from given particle */
137 void recursiveSetPosition(HepMC::GenParticle *p,HepMC::FourVector pos);
139 /** A pointer to the HepMC::GenParticle particle */
140 HepMC::GenParticle * m_particle;
142 /** A list of mothers */
143 std::vector<TauolaParticle*> m_mothers;
145 /** A list of daughters */
146 std::vector<TauolaParticle*> m_daughters;
148 /** List to keep track of new particles which have been
149 created from this one, so we can call their destructor later */
150 std::vector<TauolaParticle*> m_created_particles;
154 } // namespace Tauolapp