Belle II Software  release-05-02-19
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 
Photospp::PhotosHEPEVTParticle::~PhotosHEPEVTParticle
~PhotosHEPEVTParticle()
Default destructor.
Definition: PhotosHEPEVTParticle.cc:6
Photospp::PhotosHEPEVTParticle::setMass
void setMass(double mass)
Set the mass of this particle.
Definition: PhotosHEPEVTParticle.cc:347
Photospp::PhotosHEPEVTParticle::getMothers
std::vector< PhotosParticle * > getMothers()
Returns the mothers of this particle via a vector of PhotosParticle.
Definition: PhotosHEPEVTParticle.cc:131
Photospp::PhotosHEPEVTParticle::setEvent
void setEvent(PhotosHEPEVTEvent *event)
Set event of this particle.
Definition: PhotosHEPEVTParticle.cc:418
Photospp::PhotosHEPEVTParticle::getAllDecayProducts
std::vector< PhotosParticle * > getAllDecayProducts()
Returns all particles in the decay tree of this particle via a vector of PhotosParticle.
Definition: PhotosHEPEVTParticle.cc:194
Photospp::PhotosHEPEVTParticle::getPdgID
int getPdgID()
Get the PDG ID code of this particle.
Definition: PhotosHEPEVTParticle.cc:352
Photospp::PhotosHEPEVTParticle::setDaughters
void setDaughters(std::vector< PhotosParticle * > daughters)
Set the daughters of this particle via a vector of PhotosParticle.
Definition: PhotosHEPEVTParticle.cc:111
Photospp::PhotosHEPEVTParticle::setPdgID
void setPdgID(int pdg_id)
Set the PDG ID code of this particle.
Definition: PhotosHEPEVTParticle.cc:337
Photospp::PhotosHEPEVTParticle::setPz
void setPz(double pz)
Set the pz component of the four vector.
Definition: PhotosHEPEVTParticle.cc:398
Photospp::PhotosHEPEVTParticle::m_status
int m_status
Status (stable, decayed)
Definition: PhotosHEPEVTParticle.h:176
Photospp::PhotosHEPEVTEvent
Definition: PhotosHEPEVTEvent.h:27
Photospp::PhotosHEPEVTParticle::getFirstMotherIndex
int getFirstMotherIndex()
Get index of first mother.
Definition: PhotosHEPEVTParticle.cc:423
Photospp::PhotosHEPEVTParticle::m_event
PhotosHEPEVTEvent * m_event
Event from which this particle is taken.
Definition: PhotosHEPEVTParticle.h:161
Photospp::PhotosHEPEVTParticle::setStatus
void setStatus(int statu)
Set the status of this particle.
Definition: PhotosHEPEVTParticle.cc:342
Photospp::PhotosHEPEVTParticle::isMotherOf
bool isMotherOf(PhotosHEPEVTParticle *p)
Check if particle 'p' is mother of this particle.
Definition: PhotosHEPEVTParticle.cc:317
Photospp::PhotosHEPEVTParticle::setDaughterRangeStart
void setDaughterRangeStart(int i)
Set index of first daughter.
Definition: PhotosHEPEVTParticle.h:155
Photospp::PhotosHEPEVTParticle::createSelfDecayVertex
void createSelfDecayVertex(PhotosParticle *out)
Create a self-decay vertex for this particle with 'out' being the outgoing particle in new vertex.
Definition: PhotosHEPEVTParticle.cc:304
Photospp::PhotosHEPEVTParticle::getBarcode
int getBarcode()
Get the barcode (position in list) of this particle.
Definition: PhotosHEPEVTParticle.cc:408
Photospp::PhotosParticle
Definition: PhotosParticle.h:24
Photospp::PhotosHEPEVTParticle::checkMomentumConservation
bool checkMomentumConservation()
Check that the 4 momentum in conserved in the decay of this particle.
Definition: PhotosHEPEVTParticle.cc:231
Photospp::PhotosHEPEVTParticle::m_first_mother
int m_first_mother
Indexes of mothers (-1 if do not have mothers)
Definition: PhotosHEPEVTParticle.h:167
Photospp::PhotosHEPEVTParticle::addDaughter
void addDaughter(PhotosParticle *daughter)
Add a new daughter to this particle.
Definition: PhotosHEPEVTParticle.cc:36
Photospp::PhotosHEPEVTParticle
Definition: PhotosHEPEVTParticle.h:31
Photospp::PhotosHEPEVTParticle::m_px
double m_px
Momentum.
Definition: PhotosHEPEVTParticle.h:179
Photospp::PhotosHEPEVTParticle::getSecondMotherIndex
int getSecondMotherIndex()
Get index of second mother.
Definition: PhotosHEPEVTParticle.cc:428
Photospp::PhotosHEPEVTParticle::setDaughterRangeEnd
void setDaughterRangeEnd(int i)
Set index of last daughter.
Definition: PhotosHEPEVTParticle.h:158
Photospp::PhotosHEPEVTParticle::print
void print()
Print information on this particle into standard output.
Definition: PhotosHEPEVTParticle.cc:325
Photospp::PhotosHEPEVTParticle::cache
vector< PhotosHEPEVTParticle * > cache
List of created particles - if they are not in the event, they will be deleted when no longer needed.
Definition: PhotosHEPEVTParticle.h:186
Photospp::PhotosHEPEVTParticle::getPz
double getPz()
Returns the pz component of the four vector.
Definition: PhotosHEPEVTParticle.cc:377
Photospp::PhotosHEPEVTParticle::getPx
double getPx()
Returns the px component of the four vector.
Definition: PhotosHEPEVTParticle.cc:367
Photospp::PhotosHEPEVTParticle::getStatus
int getStatus()
Get the status of this particle.
Definition: PhotosHEPEVTParticle.cc:357
Photospp::PhotosHEPEVTParticle::m_generated_mass
double m_generated_mass
Mass saved at generation step.
Definition: PhotosHEPEVTParticle.h:182
Photospp::PhotosHEPEVTParticle::isDaughterOf
bool isDaughterOf(PhotosHEPEVTParticle *p)
Check if particle 'p' is daughter of this particle.
Definition: PhotosHEPEVTParticle.cc:309
Photospp::PhotosHEPEVTParticle::createHistoryEntry
void createHistoryEntry()
Creating history entries not implemented in HEPEVT.
Definition: PhotosHEPEVTParticle.cc:299
Photospp::PhotosHEPEVTParticle::PhotosHEPEVTParticle
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.
Definition: PhotosHEPEVTParticle.cc:14
Photospp::PhotosHEPEVTParticle::getMass
double getMass()
Get the mass stored (i.e.
Definition: PhotosHEPEVTParticle.cc:362
Photospp::PhotosHEPEVTParticle::setMothers
void setMothers(std::vector< PhotosParticle * > mothers)
Set the mothers of this particle via a vector of PhotosParticle.
Definition: PhotosHEPEVTParticle.cc:95
Photospp::PhotosHEPEVTParticle::setPx
void setPx(double px)
Set the px component of the four vector.
Definition: PhotosHEPEVTParticle.cc:387
Photospp::PhotosHEPEVTParticle::getE
double getE()
Returns the energy component of the four vector.
Definition: PhotosHEPEVTParticle.cc:382
Photospp::PhotosHEPEVTParticle::getPy
double getPy()
Returns the py component of the four vector.
Definition: PhotosHEPEVTParticle.cc:372
Photospp::PhotosHEPEVTParticle::getDaughters
std::vector< PhotosParticle * > getDaughters()
Returns the daughters of this particle via a vector of PhotosParticle.
Definition: PhotosHEPEVTParticle.cc:153
Photospp::PhotosHEPEVTParticle::createNewParticle
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.
Definition: PhotosHEPEVTParticle.cc:287
Photospp::PhotosHEPEVTParticle::setBarcode
void setBarcode(int barcode)
Set barcode (position in list) of this particle.
Definition: PhotosHEPEVTParticle.cc:413
Photospp::PhotosHEPEVTParticle::getDaughterRangeStart
int getDaughterRangeStart()
Get index of first daughter.
Definition: PhotosHEPEVTParticle.cc:433
Photospp::PhotosHEPEVTParticle::m_pdgid
int m_pdgid
PDG ID.
Definition: PhotosHEPEVTParticle.h:173
Photospp::PhotosHEPEVTParticle::setE
void setE(double e)
Set the energy component of the four vector.
Definition: PhotosHEPEVTParticle.cc:403
Photospp::PhotosHEPEVTParticle::getDaughterRangeEnd
int getDaughterRangeEnd()
Get index of last daughter.
Definition: PhotosHEPEVTParticle.cc:438
Photospp::PhotosHEPEVTParticle::setPy
void setPy(double py)
Set the px component of the four vector.
Definition: PhotosHEPEVTParticle.cc:392
Photospp::PhotosHEPEVTParticle::m_barcode
int m_barcode
Position in the event record.
Definition: PhotosHEPEVTParticle.h:164
Photospp::PhotosHEPEVTParticle::m_daughter_start
int m_daughter_start
Range of indexes of daughters (-1 if do not have daughters)
Definition: PhotosHEPEVTParticle.h:170