C++ Interface to Tauola
include/Tauola/TauolaHepMC3Particle.h
1#ifndef _TauolaHepMC3Particle_h_included_
2#define _TauolaHepMC3Particle_h_included_
3
4/**
5 * @class TauolaHepMC3Particle
6 *
7 * @brief Interface to GenParticle objects
8 *
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 a GenParticle object.
13 *
14 * This code is licensed under GNU General Public Licence.
15 * For more informations, see: http://www.gnu.org/licenses/
16 */
17
18#include <iostream>
19#include <vector>
20
21#include "HepMC3/GenParticle.h"
22#include "HepMC3/FourVector.h"
23#include "HepMC3/GenEvent.h"
24
25//#include "DecayList.h"
26#include "TauolaParticle.h"
27#include "f_Decay.h"
28namespace Tauolapp
29{
30using namespace HepMC3;
31
33
34 public:
35 /** General constructor */
37
39
40 /** Constructor which keeps a pointer to the GenParticle*/
41 TauolaHepMC3Particle(GenParticlePtr particle);
42
43 /** Constructor which creates a new GenParticle and
44 sets the properties pdg_id, statu and mass. */
45 TauolaHepMC3Particle(int pdg_id, int status, double mass);
46
47 /** Returns the GenParticlePtr */
48 GenParticlePtr getHepMC3();
49
50 /** Remove the decay branch from the event record and reset the particle status code to stable. */
51 void undecay();
52
53 /** Set the mothers of this particle via a vector of TauolaParticle*/
54 void setMothers(std::vector<TauolaParticle*> mothers);
55
56 /** Set the daughters of this particle via a vector of TauolaParticle*/
57 void setDaughters(std::vector<TauolaParticle*> daughters);
58
59 /** Returns the mothers of this particle via a vector of TauolaParticle */
60 std::vector<TauolaParticle*> getMothers();
61
62 /** Returns the daughters of this particle via a vector of TauolaParticle */
63 std::vector<TauolaParticle*> getDaughters();
64
65 /** Set the PDG ID code of this particle */
66 void setPdgID(int pdg_id);
67
68 /** Set the status of this particle */
69 void setStatus(int statu);
70
71 /** Set the mass of this particle */
72 void setMass(double mass);
73
74 /** Get the PDG ID code of this particle */
75 int getPdgID();
76
77 /** Get the status of this particle */
78 int getStatus();
79
80 /** Get the barcode of this particle */
81 int getBarcode();
82
83 /** Check that the 4 momentum in conserved at the vertices producing
84 and ending this particle */
86
87 /** Overriding of TauolaParticle decayEndgame method.
88 Converts the momentum and length units
89 and sets the vector (X,T) position */
90 void decayEndgame();
91
92 /** Create a new particle of type TauolaHepMC3Particle, with the given
93 properties. The new particle bares no relations to this
94 particle, but it provides a way of creating a instance of
95 this derived class. eg. createNewParticle() is used inside
96 filhep_() so that a TauolaHepMC3Particle can be created without
97 the method having explicit knowledge of the TauolaHepMC3Particle
98 class */
99 TauolaHepMC3Particle * createNewParticle(int pdg_id, int status, double mass,
100 double px, double py,
101 double pz, double e);
102
103 /** Print some information about this particle to standard output */
104 void print();
105
106 /** Returns the px component of the four vector*/
107 double getPx();
108
109 /** Returns the py component of the four vector */
110 double getPy();
111
112 /** Returns the pz component of the four vector */
113 double getPz();
114
115 /** Returns the energy component of the four vector */
116 double getE();
117
118 /** Set the px component of the four vector */
119 void setPx( double px );
120
121 /** Set the px component of the four vector */
122 void setPy( double py );
123
124 /** Set the pz component of the four vector */
125 void setPz( double pz );
126
127 /** Set the energy component of the four vector */
128 void setE( double e );
129
130
131private:
132
133 /** Sets the position for whole decay tree starting from given particle */
134 void recursiveSetPosition(GenParticlePtr p,FourVector pos);
135
136 /** A pointer to the GenParticle particle */
137 GenParticlePtr m_particle;
138
139 /** A list of mothers */
140 std::vector<TauolaParticle*> m_mothers;
141
142 /** A list of daughters */
143 std::vector<TauolaParticle*> m_daughters;
144
145 /** List to keep track of new particles which have been
146 created from this one, so we can call their destructor later */
147 std::vector<TauolaParticle*> m_created_particles;
148
149};
150
151} // namespace Tauolapp
152#endif
Interface to GenParticle objects.
Abstract base class for particle in the event. This class also handles boosting.
std::vector< TauolaParticle * > getDaughters()
void setMothers(std::vector< TauolaParticle * > mothers)
std::vector< TauolaParticle * > m_created_particles
void setDaughters(std::vector< TauolaParticle * > daughters)
void recursiveSetPosition(GenParticlePtr p, FourVector pos)
std::vector< TauolaParticle * > getMothers()
TauolaHepMC3Particle * createNewParticle(int pdg_id, int status, double mass, double px, double py, double pz, double e)