1 #ifndef _TauolaHEPEVTParticle_h_included_
2 #define _TauolaHEPEVTParticle_h_included_
5 * @class TauolaHEPEVTParticle
7 * @brief Single particle of HEPEVT event record
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 information stored in HEPEVT event record.
14 * @author Tomasz Przedzinski
15 * @date 24 November 2011
22 #include "TauolaParticle.h"
23 #include "TauolaHEPEVTEvent.h"
28 class TauolaHEPEVTEvent;
30 class TauolaHEPEVTParticle: public TauolaParticle {
33 /** Default destructor */
34 ~TauolaHEPEVTParticle();
36 /** Default constructor */
37 TauolaHEPEVTParticle(int pdgid, int status, double px, double py, double pz, double e, double m, int ms, int me, int ds, int de);
39 /** Remove the decay branch from the event record and reset the particle status code to stable.
40 WARNING: not implemented for HEPEVT. */
43 /** Set the mothers of this particle via a vector of TauolaParticle*/
44 void setMothers(std::vector<TauolaParticle*> mothers);
46 /** Set the daughters of this particle via a vector of TauolaParticle*/
47 void setDaughters(std::vector<TauolaParticle*> daughters);
49 /** Returns the mothers of this particle via a vector of TauolaParticle */
50 std::vector<TauolaParticle*> getMothers();
52 /** Returns the daughters of this particle via a vector of TauolaParticle */
53 std::vector<TauolaParticle*> getDaughters();
55 /** Check that the 4 momentum in conserved in the decay of this particle */
56 void checkMomentumConservation();
58 /** Creates a new particle of type TauolaHEPEVTParticle, with the given
59 properties. The new particle bares no relations to this
60 particle, but `this particle' provides only a way of creating an instance of
61 this derived class. eg. createNewParticle() is used inside
62 filhep_() so that a TauolaHEPEVTParticle can be created without
63 the method having explicit knowledge of the TauolaHEPEVTParticle
65 TauolaHEPEVTParticle * createNewParticle(int pdg_id, int status, double mass,
69 /** Check if particle 'p' is daughter of this particle */
70 bool isDaughterOf(TauolaHEPEVTParticle *p);
72 /** Check if particle 'p' is mother of this particle */
73 bool isMotherOf (TauolaHEPEVTParticle *p);
75 /** Print information on this particle into standard output */
78 /** Set the PDG ID code of this particle */
79 void setPdgID(int pdg_id);
81 /** Set the status of this particle */
82 void setStatus(int statu);
84 /** Set the mass of this particle */
85 void setMass(double mass);
87 /** Get the PDG ID code of this particle */
90 /** Get the status of this particle */
93 /** Get the mass stored (i.e. not calculated from four vector) at generation step */
96 /** Returns the px component of the four vector*/
99 /** Returns the py component of the four vector */
102 /** Returns the pz component of the four vector */
105 /** Returns the energy component of the four vector */
108 /** Set the px component of the four vector */
109 void setPx( double px );
111 /** Set the px component of the four vector */
112 void setPy( double py );
114 /** Set the pz component of the four vector */
115 void setPz( double pz );
117 /** Set the energy component of the four vector */
118 void setE( double e );
120 /** Get the barcode (position in list) of this particle */
123 /** Set barcode (position in list) of this particle */
124 void setBarcode(int barcode);
126 /** Set event of this particle */
127 void setEvent(TauolaHEPEVTEvent *event);
129 /** Get index of first mother */
130 int getFirstMotherIndex();
132 /** Get index of second mother */
133 int getSecondMotherIndex();
135 /** Get index of first daughter */
136 int getDaughterRangeStart();
138 /** Get index of last daughter */
139 int getDaughterRangeEnd();
143 /** Event from which this particle is taken */
144 TauolaHEPEVTEvent *m_event;
146 /** Position in the event record */
149 /** Indexes of mothers (-1 if do not have mothers) */
150 int m_first_mother, m_second_mother;
152 /** Range of indexes of daughters (-1 if do not have daughters) */
153 int m_daughter_start, m_daughter_end;
158 /** Status (stable, decayed) */
162 double m_px, m_py, m_pz, m_e;
164 /** Mass saved at generation step */
165 double m_generated_mass;
167 /** List of created particles - if they are not in the event, they
168 will be deleted when no longer needed */
169 vector<TauolaHEPEVTParticle*> cache;
172 } // namespace Tauolapp