Belle II Software  release-06-01-15
PhotosHEPEVTParticle.h
1 #ifndef _PhotosHEPEVTParticle_h_included_
2 #define _PhotosHEPEVTParticle_h_included_
3 
18 #include <iostream>
19 #include <vector>
20 #include <cmath>
21 #include <cstdio>
22 
23 #include "Photos.h"
24 #include "PhotosParticle.h"
25 #include "PhotosHEPEVTEvent.h"
26 
27 namespace Photospp {
28 
29  class PhotosHEPEVTEvent;
30 
32 
33  public:
36 
38  PhotosHEPEVTParticle(int pdgid, int status, double px, double py, double pz, double e, double m, int ms, int me, int ds, int de);
39 
41  void addDaughter(PhotosParticle* daughter);
42 
44  void setMothers(std::vector<PhotosParticle*> mothers);
45 
47  void setDaughters(std::vector<PhotosParticle*> daughters);
48 
50  std::vector<PhotosParticle*> getMothers();
51 
53  std::vector<PhotosParticle*> getDaughters();
54 
57  std::vector<PhotosParticle*> getAllDecayProducts();
58 
61 
69  PhotosHEPEVTParticle* createNewParticle(int pdg_id, int status, double mass,
70  double px, double py,
71  double pz, double e);
72 
74  void createHistoryEntry();
75 
79 
82 
85 
87  void print();
88 
90  void setPdgID(int pdg_id);
91 
93  void setStatus(int statu);
94 
96  void setMass(double mass);
97 
99  int getPdgID();
100 
102  int getStatus();
103 
105  double getMass();
106 
108  double getPx();
109 
111  double getPy();
112 
114  double getPz();
115 
117  double getE();
118 
120  void setPx(double px);
121 
123  void setPy(double py);
124 
126  void setPz(double pz);
127 
129  void setE(double e);
130 
132  int getBarcode();
133 
135  void setBarcode(int barcode);
136 
138  void setEvent(PhotosHEPEVTEvent* event);
139 
141  int getFirstMotherIndex();
142 
144  int getSecondMotherIndex();
145 
147  int getDaughterRangeStart();
148 
150  int getDaughterRangeEnd();
151 
152  private:
153 
156 
158  void setDaughterRangeEnd(int i) { m_daughter_end = i; }
159 
162 
165 
167  int m_first_mother, m_second_mother;
168 
170  int m_daughter_start, m_daughter_end;
171 
173  int m_pdgid;
174 
176  int m_status;
177 
179  double m_px, m_py, m_pz, m_e;
180 
183 
186  vector<PhotosHEPEVTParticle*> cache;
187  };
188 
189 } // namespace Photospp
190 #endif
191 
int m_first_mother
Indexes of mothers (-1 if do not have mothers)
void setDaughterRangeEnd(int i)
Set index of last daughter.
double getPx()
Returns the px component of the four vector.
void setMothers(std::vector< PhotosParticle * > mothers)
Set the mothers of this particle via a vector of PhotosParticle.
void setE(double e)
Set the energy component of the four vector.
void setDaughters(std::vector< PhotosParticle * > daughters)
Set the daughters of this particle via a vector of PhotosParticle.
bool checkMomentumConservation()
Check that the 4 momentum in conserved in the decay of this particle.
bool isMotherOf(PhotosHEPEVTParticle *p)
Check if particle 'p' is mother of this particle.
void setStatus(int statu)
Set the status of this particle.
int getDaughterRangeStart()
Get index of first daughter.
int getBarcode()
Get the barcode (position in list) of this particle.
PhotosHEPEVTParticle(int pdgid, int status, double px, double py, double pz, double e, double m, int ms, int me, int ds, int de)
Default constructor.
double getPy()
Returns the py component of the four vector.
void print()
Print information on this particle into standard output.
int getFirstMotherIndex()
Get index of first mother.
std::vector< PhotosParticle * > getAllDecayProducts()
Returns all particles in the decay tree of this particle via a vector of PhotosParticle.
void setEvent(PhotosHEPEVTEvent *event)
Set event of this particle.
double getMass()
Get the mass stored (i.e.
void setPy(double py)
Set the px component of the four vector.
PhotosHEPEVTEvent * m_event
Event from which this particle is taken.
int m_daughter_start
Range of indexes of daughters (-1 if do not have daughters)
double getPz()
Returns the pz component of the four vector.
std::vector< PhotosParticle * > getDaughters()
Returns the daughters of this particle via a vector of PhotosParticle.
void createSelfDecayVertex(PhotosParticle *out)
Create a self-decay vertex for this particle with 'out' being the outgoing particle in new vertex.
vector< PhotosHEPEVTParticle * > cache
List of created particles - if they are not in the event, they will be deleted when no longer needed.
void setDaughterRangeStart(int i)
Set index of first daughter.
void addDaughter(PhotosParticle *daughter)
Add a new daughter to this particle.
void setBarcode(int barcode)
Set barcode (position in list) of this particle.
int getSecondMotherIndex()
Get index of second mother.
double getE()
Returns the energy component of the four vector.
bool isDaughterOf(PhotosHEPEVTParticle *p)
Check if particle 'p' is daughter of this particle.
void setPx(double px)
Set the px component of the four vector.
int getDaughterRangeEnd()
Get index of last daughter.
int m_status
Status (stable, decayed)
void setMass(double mass)
Set the mass of this particle.
int m_barcode
Position in the event record.
void createHistoryEntry()
Creating history entries not implemented in HEPEVT.
int getPdgID()
Get the PDG ID code of this particle.
double m_generated_mass
Mass saved at generation step.
void setPz(double pz)
Set the pz component of the four vector.
PhotosHEPEVTParticle * createNewParticle(int pdg_id, int status, double mass, double px, double py, double pz, double e)
Creates a new particle of type PhotosHEPEVTParticle, with the given properties.
int getStatus()
Get the status of this particle.
~PhotosHEPEVTParticle()
Default destructor.
std::vector< PhotosParticle * > getMothers()
Returns the mothers of this particle via a vector of PhotosParticle.
void setPdgID(int pdg_id)
Set the PDG ID code of this particle.