Belle II Software  release-05-02-19
PhotosParticle.h
1 #ifndef _PhotosParticle_h_included_
2 #define _PhotosParticle_h_included_
3 
19 #include <vector>
20 #include "Photos.h"
21 
22 namespace Photospp {
23 
25  public:
27  static const int STABLE = 1;
28 
30  static const int DECAYED = 2;
31 
33  static const int HISTORY = 3;
34 
36  static const int X_AXIS = 1;
37 
39  static const int Y_AXIS = 2;
40 
42  static const int Z_AXIS = 3;
43 
45  static const int Z0 = 23;
46 
48  static const int HIGGS = 25;
49 
51  static const int HIGGS_H = 35;
52 
54  static const int HIGGS_A = 36;
55 
57  static const int HIGGS_PLUS = 37;
58 
60  static const int HIGGS_MINUS = -37;
61 
63  static const int W_PLUS = 24;
64 
66  static const int W_MINUS = -24;
67 
69  static const int GAMMA = 22;
70 
72  static const int TAU_PLUS = -15;
73 
75  static const int TAU_MINUS = 15;
76 
78  static const int TAU_NEUTRINO = 16;
79 
81  static const int TAU_ANTINEUTRINO = -16;
82 
84  static const int MUON_PLUS = -13;
85 
87  static const int MUON_MINUS = 13;
88 
90  static const int MUON_NEUTRINO = 14;
91 
93  static const int MUON_ANTINEUTRINO = -14;
94 
96  static const int POSITRON = -11;
97 
99  static const int ELECTRON = 11;
100 
102  static const int ELECTRON_NEUTRINO = 12;
103 
105  static const int ELECTRON_ANTINEUTRINO = -12;
106 
108  static const int UP = 2;
109 
111  static const int ANTIUP = -2;
112 
114  static const int DOWN = 1;
115 
117  static const int ANTIDOWN = -1;
118 
120  static const int OTHER = 0;
121 
122  public:
123  virtual ~PhotosParticle() {};
124 
126  bool hasDaughters();
127 
132 
135  std::vector<PhotosParticle*> findProductionMothers();
136 
138  std::vector<PhotosParticle*> getDecayTree();
139 
142  void boostToRestFrame(PhotosParticle* boost);
143 
147 
150  void boostFromRestFrame(PhotosParticle* boost);
151 
155 
157  void boostAlongZ(double pz, double e);
158 
161  void rotate(int axis, double phi, int second_axis = Z_AXIS);
162 
165  void rotateDaughters(int axis, double phi, int second_axis = Z_AXIS);
166 
172  double getRotationAngle(int axis, int second_axis = Z_AXIS);
173 
175  double getP();
176 
178  double getP(int axis);
179 
181  void setP(int axis, double p_component);
182 
184  virtual double getVirtuality();
185 
186  public:
189  virtual bool checkMomentumConservation() = 0;
190 
192  virtual double getPx() = 0;
193 
195  virtual double getPy() = 0;
196 
198  virtual double getPz() = 0;
199 
201  virtual double getE() = 0;
202 
204  virtual double getMass() = 0;
205 
207  virtual void setPx(double px) = 0;
208 
210  virtual void setPy(double py) = 0;
211 
213  virtual void setPz(double pz) = 0;
214 
216  virtual void setE(double e) = 0;
217 
219  virtual void setMothers(std::vector<PhotosParticle*> mothers) = 0;
220 
222  virtual void setDaughters(std::vector<PhotosParticle*> daughters) = 0;
223 
225  virtual void addDaughter(PhotosParticle* daughter) = 0;
226 
228  virtual std::vector<PhotosParticle*> getMothers() = 0;
229 
231  virtual std::vector<PhotosParticle*> getDaughters() = 0;
232 
235  virtual std::vector<PhotosParticle*> getAllDecayProducts() = 0;
236 
238  virtual void setPdgID(int pdg_id) = 0;
239 
241  virtual void setMass(double mass) = 0;
242 
244  virtual void setStatus(int status) = 0;
245 
247  virtual int getPdgID() = 0;
248 
250  virtual int getStatus() = 0;
251 
253  virtual int getBarcode() = 0;
254 
262  virtual PhotosParticle* createNewParticle(int pdg_id, int status,
263  double mass, double px,
264  double py, double pz,
265  double e) = 0;
266 
270  virtual void createHistoryEntry() = 0;
271 
274  virtual void createSelfDecayVertex(PhotosParticle* out) = 0;
275 
277  virtual void print() = 0;
278  };
279 
280 } // namespace Photospp
281 #endif
Photospp::PhotosParticle::HIGGS_PLUS
static const int HIGGS_PLUS
H+ particle.
Definition: PhotosParticle.h:57
Photospp::PhotosParticle::DOWN
static const int DOWN
down quark
Definition: PhotosParticle.h:114
Photospp::PhotosParticle::ELECTRON
static const int ELECTRON
e- particle
Definition: PhotosParticle.h:99
Photospp::PhotosParticle::TAU_ANTINEUTRINO
static const int TAU_ANTINEUTRINO
tau antineutrino particle
Definition: PhotosParticle.h:81
Photospp::PhotosParticle::getRotationAngle
double getRotationAngle(int axis, int second_axis=Z_AXIS)
Returns the angle around the axis "axis" needed to rotate the four momenum is such a way that the non...
Definition: PhotosParticle.cc:129
Photospp::PhotosParticle::getDaughters
virtual std::vector< PhotosParticle * > getDaughters()=0
Returns the daughters of this particle via a vector of PhotosParticle.
Photospp::PhotosParticle::MUON_PLUS
static const int MUON_PLUS
muon+ particle
Definition: PhotosParticle.h:84
Photospp::PhotosParticle::Y_AXIS
static const int Y_AXIS
Y Axis.
Definition: PhotosParticle.h:39
Photospp::PhotosParticle::getE
virtual double getE()=0
Returns the energy component of the four vector.
Photospp::PhotosParticle::checkMomentumConservation
virtual bool checkMomentumConservation()=0
check that the 4 momentum in conserved at the vertices producing and ending this particle
Photospp::PhotosParticle::STABLE
static const int STABLE
Stable particle status.
Definition: PhotosParticle.h:27
Photospp::PhotosParticle::Z_AXIS
static const int Z_AXIS
Z Axis.
Definition: PhotosParticle.h:42
Photospp::PhotosParticle::HISTORY
static const int HISTORY
History particle status.
Definition: PhotosParticle.h:33
Photospp::PhotosParticle::W_PLUS
static const int W_PLUS
W+ particle.
Definition: PhotosParticle.h:63
Photospp::PhotosParticle::UP
static const int UP
up quark
Definition: PhotosParticle.h:108
Photospp::PhotosParticle::getPx
virtual double getPx()=0
Returns the px component of the four vector.
Photospp::PhotosParticle::boostToRestFrame
void boostToRestFrame(PhotosParticle *boost)
Transform this particles four momentum from the lab frome into the rest frame of the paramter PhotosP...
Definition: PhotosParticle.cc:92
Photospp::PhotosParticle::getMothers
virtual std::vector< PhotosParticle * > getMothers()=0
Returns the mothers of this particle via a vector of PhotosParticle.
Photospp::PhotosParticle::getPy
virtual double getPy()=0
Returns the py component of the four vector.
Photospp::PhotosParticle::MUON_NEUTRINO
static const int MUON_NEUTRINO
muon neutrino particle
Definition: PhotosParticle.h:90
Photospp::PhotosParticle::getMass
virtual double getMass()=0
Get the invariant mass from the event record.
Photospp::PhotosParticle::OTHER
static const int OTHER
All other particle types.
Definition: PhotosParticle.h:120
Photospp::PhotosParticle::ANTIDOWN
static const int ANTIDOWN
anti-down quark
Definition: PhotosParticle.h:117
Photospp::PhotosParticle
Definition: PhotosParticle.h:24
Photospp::PhotosParticle::DECAYED
static const int DECAYED
Decayed particle status.
Definition: PhotosParticle.h:30
Photospp::PhotosParticle::HIGGS
static const int HIGGS
H particle.
Definition: PhotosParticle.h:48
Photospp::PhotosParticle::MUON_MINUS
static const int MUON_MINUS
muon- particle
Definition: PhotosParticle.h:87
Photospp::PhotosParticle::boostDaughtersFromRestFrame
void boostDaughtersFromRestFrame(PhotosParticle *boost)
Transform this particles four momentum from the lab frame to the rest frame of the parameter PhotosPa...
Definition: PhotosParticle.cc:59
Photospp::PhotosParticle::ELECTRON_NEUTRINO
static const int ELECTRON_NEUTRINO
e neutrino particle
Definition: PhotosParticle.h:102
Photospp::PhotosParticle::boostAlongZ
void boostAlongZ(double pz, double e)
Do a Lorenz transformation along the Z axis.
Definition: PhotosParticle.cc:148
Photospp::PhotosParticle::GAMMA
static const int GAMMA
photon
Definition: PhotosParticle.h:69
Photospp::PhotosParticle::findProductionMothers
std::vector< PhotosParticle * > findProductionMothers()
Traverse the event structure and find the first set of mothers which are not of the same type as this...
Definition: PhotosParticle.cc:29
Photospp::PhotosParticle::MUON_ANTINEUTRINO
static const int MUON_ANTINEUTRINO
muon antineutrino particle
Definition: PhotosParticle.h:93
Photospp::PhotosParticle::addDaughter
virtual void addDaughter(PhotosParticle *daughter)=0
Add a new daughter to this particle.
Photospp::PhotosParticle::findLastSelf
PhotosParticle * findLastSelf()
Traverse the event structure and find the final version of this particle which does not have a partic...
Definition: PhotosParticle.cc:15
Photospp::PhotosParticle::getDecayTree
std::vector< PhotosParticle * > getDecayTree()
Return whole decay tree starting from this particle.
Definition: PhotosParticle.cc:42
Photospp::PhotosParticle::getPz
virtual double getPz()=0
Returns the pz component of the four vector.
Photospp::PhotosParticle::setMothers
virtual void setMothers(std::vector< PhotosParticle * > mothers)=0
Set the mothers of this particle via a vector of PhotosParticle.
Photospp::PhotosParticle::setStatus
virtual void setStatus(int status)=0
Set the status of this particle.
Photospp::PhotosParticle::Z0
static const int Z0
Z0 particle.
Definition: PhotosParticle.h:45
Photospp::PhotosParticle::getStatus
virtual int getStatus()=0
Get the status of this particle.
Photospp::PhotosParticle::rotate
void rotate(int axis, double phi, int second_axis=Z_AXIS)
rotate this particles 4-momentum by an angle phi from the axisis "axis" towards the axis "second_axis...
Definition: PhotosParticle.cc:161
Photospp::PhotosParticle::boostDaughtersToRestFrame
void boostDaughtersToRestFrame(PhotosParticle *boost)
Transform the four momentum of all the daughters recursively into the frame of the "particle" PhotosP...
Definition: PhotosParticle.cc:75
Photospp::PhotosParticle::ELECTRON_ANTINEUTRINO
static const int ELECTRON_ANTINEUTRINO
e antineutrino particle
Definition: PhotosParticle.h:105
Photospp::PhotosParticle::HIGGS_MINUS
static const int HIGGS_MINUS
H- particle.
Definition: PhotosParticle.h:60
Photospp::PhotosParticle::createSelfDecayVertex
virtual void createSelfDecayVertex(PhotosParticle *out)=0
Create a self-decay vertex for this particle with 'out' being the outgoing particle in new vertex.
Photospp::PhotosParticle::getP
double getP()
Get scalar momentum.
Definition: PhotosParticle.cc:194
Photospp::PhotosParticle::setE
virtual void setE(double e)=0
Set the energy component of the four vector.
Photospp::PhotosParticle::getBarcode
virtual int getBarcode()=0
Get the barcode of this particle.
Photospp::PhotosParticle::boostFromRestFrame
void boostFromRestFrame(PhotosParticle *boost)
Transform this particles four momentum from the rest frame of the paramter PhotosParticle,...
Definition: PhotosParticle.cc:108
Photospp::PhotosParticle::setPx
virtual void setPx(double px)=0
Set the px component of the four vector.
Photospp::PhotosParticle::HIGGS_H
static const int HIGGS_H
H0 particle.
Definition: PhotosParticle.h:51
Photospp::PhotosParticle::POSITRON
static const int POSITRON
e+ particle
Definition: PhotosParticle.h:96
Photospp::PhotosParticle::setPdgID
virtual void setPdgID(int pdg_id)=0
Set the PDG ID code of this particle.
Photospp::PhotosParticle::TAU_MINUS
static const int TAU_MINUS
tau- particle
Definition: PhotosParticle.h:75
Photospp::PhotosParticle::hasDaughters
bool hasDaughters()
Return whether the particle has any chidren.
Definition: PhotosParticle.cc:9
Photospp::PhotosParticle::createNewParticle
virtual PhotosParticle * createNewParticle(int pdg_id, int status, double mass, double px, double py, double pz, double e)=0
Create a new particle of the same type, with the given properties.
Photospp::PhotosParticle::setPy
virtual void setPy(double py)=0
Set the px component of the four vector.
Photospp::PhotosParticle::X_AXIS
static const int X_AXIS
X Axis.
Definition: PhotosParticle.h:36
Photospp::PhotosParticle::setP
void setP(int axis, double p_component)
Set momentum component in the direction of "axis" (x,y,z)
Definition: PhotosParticle.cc:207
Photospp::PhotosParticle::ANTIUP
static const int ANTIUP
anti-up quark
Definition: PhotosParticle.h:111
Photospp::PhotosParticle::getAllDecayProducts
virtual std::vector< PhotosParticle * > getAllDecayProducts()=0
Returns all particles in the decay tree of this particle via a vector of PhotosParticle.
Photospp::PhotosParticle::setDaughters
virtual void setDaughters(std::vector< PhotosParticle * > daughters)=0
Set the daughters of this particle via a vector of PhotosParticle.
Photospp::PhotosParticle::print
virtual void print()=0
Print some information about this particle to standard output.
Photospp::PhotosParticle::setPz
virtual void setPz(double pz)=0
Set the pz component of the four vector.
Photospp::PhotosParticle::TAU_NEUTRINO
static const int TAU_NEUTRINO
tau neutrino particle
Definition: PhotosParticle.h:78
Photospp::PhotosParticle::W_MINUS
static const int W_MINUS
W- particle.
Definition: PhotosParticle.h:66
Photospp::PhotosParticle::getVirtuality
virtual double getVirtuality()
Get sqrt(e^2-p^2)
Definition: PhotosParticle.cc:185
Photospp::PhotosParticle::createHistoryEntry
virtual void createHistoryEntry()=0
Create history entry of this particle before modifications of PHOTOS.
Photospp::PhotosParticle::getPdgID
virtual int getPdgID()=0
Get the PDG ID code of this particle.
Photospp::PhotosParticle::rotateDaughters
void rotateDaughters(int axis, double phi, int second_axis=Z_AXIS)
rotate 4-momentum of daughters of this particle by an angle phi from the axisis "axis" towards the ax...
Definition: PhotosParticle.cc:169
Photospp::PhotosParticle::TAU_PLUS
static const int TAU_PLUS
tau+ particle
Definition: PhotosParticle.h:72
Photospp::PhotosParticle::setMass
virtual void setMass(double mass)=0
Set the mass of this particle.
Photospp::PhotosParticle::HIGGS_A
static const int HIGGS_A
A0 particle.
Definition: PhotosParticle.h:54