1 #ifndef _PhotosHEPEVTParticle_h_included_
2 #define _PhotosHEPEVTParticle_h_included_
5 * @class PhotosHEPEVTParticle
7 * @brief Single particle of HEPEVT event record
9 * This class implements the virtual methods of
10 * PhotosParticle. In this way it provides an
11 * interface between the generic PhotosParticle class
12 * and information stored in HEPEVT event record.
14 * @author Tomasz Przedzinski
15 * @date 24 November 2011
24 #include "PhotosParticle.h"
25 #include "PhotosHEPEVTEvent.h"
30 class PhotosHEPEVTEvent;
32 class PhotosHEPEVTParticle: public PhotosParticle {
35 /** Default destructor */
36 ~PhotosHEPEVTParticle();
38 /** Default constructor */
39 PhotosHEPEVTParticle(int pdgid, int status, double px, double py, double pz, double e, double m, int ms, int me, int ds, int de);
41 /** Add a new daughter to this particle */
42 void addDaughter(PhotosParticle* daughter);
44 /** Set the mothers of this particle via a vector of PhotosParticle*/
45 void setMothers(std::vector<PhotosParticle*> mothers);
47 /** Set the daughters of this particle via a vector of PhotosParticle*/
48 void setDaughters(std::vector<PhotosParticle*> daughters);
50 /** Returns the mothers of this particle via a vector of PhotosParticle */
51 std::vector<PhotosParticle*> getMothers();
53 /** Returns the daughters of this particle via a vector of PhotosParticle */
54 std::vector<PhotosParticle*> getDaughters();
56 /** Returns all particles in the decay tree of this particle
57 via a vector of PhotosParticle */
58 std::vector<PhotosParticle*> getAllDecayProducts();
60 /** Check that the 4 momentum in conserved in the decay of this particle */
61 bool checkMomentumConservation();
63 /** Creates a new particle of type PhotosHEPEVTParticle, with the given
64 properties. The new particle bares no relations to this
65 particle, but `this particle' provides only a way of creating an instance of
66 this derived class. eg. createNewParticle() is used inside
67 filhep_() so that a PhotosHEPEVTParticle can be created without
68 the method having explicit knowledge of the PhotosHEPEVTParticle
70 PhotosHEPEVTParticle * createNewParticle(int pdg_id, int status, double mass,
74 /** Creating history entries not implemented in HEPEVT */
75 void createHistoryEntry();
77 /** Create a self-decay vertex for this particle
78 with 'out' being the outgoing particle in new vertex */
79 void createSelfDecayVertex(PhotosParticle *out);
81 /** Check if particle 'p' is daughter of this particle */
82 bool isDaughterOf(PhotosHEPEVTParticle *p);
84 /** Check if particle 'p' is mother of this particle */
85 bool isMotherOf (PhotosHEPEVTParticle *p);
87 /** Print information on this particle into standard output */
90 /** Set the PDG ID code of this particle */
91 void setPdgID(int pdg_id);
93 /** Set the status of this particle */
94 void setStatus(int statu);
96 /** Set the mass of this particle */
97 void setMass(double mass);
99 /** Get the PDG ID code of this particle */
102 /** Get the status of this particle */
105 /** Get the mass stored (i.e. not calculated from four vector) at generation step */
108 /** Returns the px component of the four vector*/
111 /** Returns the py component of the four vector */
114 /** Returns the pz component of the four vector */
117 /** Returns the energy component of the four vector */
120 /** Set the px component of the four vector */
121 void setPx( double px );
123 /** Set the px component of the four vector */
124 void setPy( double py );
126 /** Set the pz component of the four vector */
127 void setPz( double pz );
129 /** Set the energy component of the four vector */
130 void setE( double e );
132 /** Get the barcode (position in list) of this particle */
135 /** Set barcode (position in list) of this particle */
136 void setBarcode(int barcode);
138 /** Set event of this particle */
139 void setEvent(PhotosHEPEVTEvent *event);
141 /** Get index of first mother */
142 int getFirstMotherIndex();
144 /** Get index of second mother */
145 int getSecondMotherIndex();
147 /** Get index of first daughter */
148 int getDaughterRangeStart();
150 /** Get index of last daughter */
151 int getDaughterRangeEnd();
155 /** Set index of first daughter */
156 void setDaughterRangeStart(int i) { m_daughter_start=i; }
158 /** Set index of last daughter */
159 void setDaughterRangeEnd(int i) { m_daughter_end =i; }
161 /** Event from which this particle is taken */
162 PhotosHEPEVTEvent *m_event;
164 /** Position in the event record */
167 /** Indexes of mothers (-1 if do not have mothers) */
168 int m_first_mother, m_second_mother;
170 /** Range of indexes of daughters (-1 if do not have daughters) */
171 int m_daughter_start, m_daughter_end;
176 /** Status (stable, decayed) */
180 double m_px, m_py, m_pz, m_e;
182 /** Mass saved at generation step */
183 double m_generated_mass;
185 /** List of created particles - if they are not in the event, they
186 will be deleted when no longer needed */
187 vector<PhotosHEPEVTParticle*> cache;
190 } // namespace Photospp