1 #ifndef _TauolaParticle_h_included_
2 #define _TauolaParticle_h_included_
5 * @class TauolaParticle
7 * @brief Abstract base class for particle in the event. This class also
10 * TauolaParticle is a Tauola representation of a particle. It has virtual
11 * getter and setter methods that need to be implemented by a derived class.
12 * An example of this is TauolaHepMCParticle. In this way it provides an
13 * interface to the information in the Event Record.
15 * The class is also responsible for decays and contains the polarimetric
16 * vector returned from tauola. All boosting is also done here.
18 * @author Nadia Davidson
26 #include "DecayList.h"
37 virtual ~TauolaParticle(){};
39 /** The same sign as decaying particle pdg ID code
40 given to Tauola object (only meaningful for taus). */
41 static const int SAME_SIGN=1;
43 /** The opposite sign to decaying particle pdg ID code
44 given to Tauola object (only meaningful for taus). */
45 static const int OPPOSITE_SIGN=2;
47 /** Sign type is not applicable for this particle
48 (probably it's not a tau). */
49 static const int NA_SIGN=3;
51 /** Stable particle status */
52 static const int STABLE=1;
54 /** Decayed particle status */
55 static const int DECAYED=2;
57 /** History particle status */
58 static const int HISTORY=3;
61 static const int X_AXIS=1;
64 static const int Y_AXIS=2;
67 static const int Z_AXIS=3;
70 static const int Z0 = 23;
73 static const int HIGGS = 25;
76 static const int HIGGS_A = 36;
79 static const int HIGGS_PLUS = 37;
82 static const int HIGGS_MINUS = -37;
86 static const int W_PLUS = 24;
89 static const int W_MINUS = -24;
92 static const int GAMMA = 22;
95 static const int TAU_PLUS = -15;
98 static const int TAU_MINUS = 15;
100 /** tau neutrino particle */
101 static const int TAU_NEUTRINO = 16;
103 /** tau antineutrino particle */
104 static const int TAU_ANTINEUTRINO = -16;
107 /** muon+ particle */
108 static const int MUON_PLUS = -13;
110 /** muon- particle */
111 static const int MUON_MINUS = 13;
113 /** muon neutrino particle */
114 static const int MUON_NEUTRINO = 14;
116 /** muon antineutrino particle */
117 static const int MUON_ANTINEUTRINO = -14;
121 static const int POSITRON = -11;
124 static const int ELECTRON = 11;
126 /** e neutrino particle */
127 static const int ELECTRON_NEUTRINO = 12;
129 /** e antineutrino particle */
130 static const int ELECTRON_ANTINEUTRINO = -12;
133 static const int UP = 2;
136 static const int ANTIUP = -2;
139 static const int DOWN = 1;
141 /** anti-down quark */
142 static const int ANTIDOWN = -1;
144 static const int GLUON = 21;
145 static const int CHARM = 4;
146 static const int TOP = 6;
147 static const int STRANGE = 3;
148 static const int BOTTOM = 5;
150 /** All other particle types*/
151 static const int OTHER = 0;
153 /** Create a new particle with the same properties as this one.
154 Mothers and daughters will not be linked. */
155 TauolaParticle * clone();
157 /** Get the angle between this particle and another particle */
158 double getAngle(TauolaParticle *);
160 /** Add the 4 momentum of another particle to this particle */
161 void add(TauolaParticle *);
163 /** Subtract the 4 momentum of another particle from this particle */
164 void subtract(TauolaParticle *);
166 /** Decay the particle. This calls the decay methods in the
167 interface to (FORTRAN) tauola. */
170 /** Invokes TAUOLA FORTRAN routine DEKAY retrieving the daughters of
172 void addDecayToEventRecord();
174 /** Get whether this particle has the same or opposite sign
175 to the pdg code given to the Tauola object. (Only relevant
176 for tau particles).*/
179 /** Get the polarimetric vector of this particle in the direction X.
180 (Only relevant for tau particles).*/
181 double getPolarimetricX();
183 /** Get the polarimetric vector of this particle in the direction Y.
184 (Only relevant for tau particles).*/
185 double getPolarimetricY();
187 /** Get the polarimetric vector of this particle in the direction Z.
188 (Only relevant for tau particles).*/
189 double getPolarimetricZ();
191 /** Return whether the particle has any chidren */
194 /** Traverse the event structure and find the final version
195 of this particle which does not have a particle of it's own type
196 as it's daughter. eg. Generally the final stable copy */
197 TauolaParticle * findLastSelf();
199 /** Traverse the event structure and find the first set of mothers
200 which are not of the same type as this particle. */
201 std::vector<TauolaParticle *> findProductionMothers();
203 /** Transform this particles four momentum from the lab frome
204 into the rest frame of the paramter TauolaParticle. **/
205 void boostToRestFrame(TauolaParticle * boost);
207 /** Transform the four momentum of all the daughters recursively
208 into the frame of the "particle" TauolaParticle. **/
209 void boostDaughtersToRestFrame(TauolaParticle * boost);
212 /** Transform this particles four momentum from the rest frame of
213 the paramter TauolaParticle, back into the lab frame. **/
214 void boostFromRestFrame(TauolaParticle * boost);
216 void boostDaughtersFromRestFrame(TauolaParticle * boost);
218 /** Do a Lorenz transformation along the Z axis. */
219 void boostAlongZ(double pz, double e);
221 /** rotate this particles 4-momentum by an angle phi from
222 the axisis "axis" towards the axis "second_axis". */
223 void rotate(int axis, double phi, int second_axis=Z_AXIS);
225 void rotateDaughters(int axis, double phi, int second_axis=Z_AXIS);
227 /** Returns the angle around the axis "axis" needed to rotate
228 the four momenum is such a way that the non-Z component
229 disappears and Z>0. This is used to rotating the coordinate
230 system into a frame with only a Z component before calling
232 double getRotationAngle(int axis, int second_axis=Z_AXIS);
234 /** Get scalar momentum */
237 /** Get momentum component in the direction of "axis" (x,y,z) */
238 double getP(int axis);
240 /** Set momentum component in the direction of "axis" (x,y,z) */
241 void setP(int axis, double p_component);
243 /** Get the invariant mass from the four momentum*/
248 /**********************************************
249 Beginning of virtual methods
251 ********************************************/
253 /** remove the ougoing branch from this particles and reset its status to stable */
254 virtual void undecay(){};
256 /** check that the 4 momentum in conserved at the vertices producing
257 and ending this particle */
258 virtual void checkMomentumConservation(){};
260 /** Optional. Modify particle or decay tree if needed. */
261 virtual void decayEndgame(){};
263 /** Returns the px component of the four vector*/
264 virtual double getPx()=0;
266 /** Returns the py component of the four vector */
267 virtual double getPy()=0;
269 /** Returns the pz component of the four vector */
270 virtual double getPz()=0;
272 /** Returns the energy component of the four vector */
273 virtual double getE()=0;
275 /** Set the px component of the four vector */
276 virtual void setPx( double px )=0;
278 /** Set the px component of the four vector */
279 virtual void setPy( double py )=0;
281 /** Set the pz component of the four vector */
282 virtual void setPz( double pz )=0;
284 /** Set the energy component of the four vector */
285 virtual void setE( double e )=0;
287 /** Set the mothers of this particle via a vector of TauolaParticle */
288 virtual void setMothers(std::vector<TauolaParticle*> mothers)=0;
290 /** Set the daughters of this particle via a vector of TauolaParticle */
291 virtual void setDaughters(std::vector<TauolaParticle*> daughters)=0;
293 /** Returns the mothers of this particle via a vector of TauolaParticle */
294 virtual std::vector<TauolaParticle*> getMothers()=0;
296 /** Returns the daughters of this particle via a vector of TauolaParticle */
297 virtual std::vector<TauolaParticle*> getDaughters()=0;
299 /** Set the PDG ID code of this particle */
300 virtual void setPdgID(int pdg_id)=0;
302 /** Set the mass of this particle */
303 virtual void setMass(double mass)=0;
305 /** Set the status of this particle */
306 virtual void setStatus(int status)=0;
308 /** Get the PDG ID code of this particle */
309 virtual int getPdgID()=0;
311 /** Get the status of this particle */
312 virtual int getStatus()=0;
314 /** Get the barcode of this particle */
315 virtual int getBarcode()=0;
317 /** Create a new particle of the same type, with the given
318 properties. The new particle bares no relations to this
319 particle, but it provides a way of creating a intance of
320 the derived class. eg. createNewParticle() is used inside
321 filhep_() so that an eg. TauolaHepMCParticle is created without
322 the method having explicit knowledge of the TauolaHepMCParticle
324 virtual TauolaParticle * createNewParticle(int pdg_id, int status,
325 double mass, double px,
326 double py, double pz,
329 /** Print some information about this particle to standard output */
330 virtual void print()=0;
334 /** The polarimetric vector of this particle in the direction X.
335 (Only relevant for tau particles). */
338 /** The polarimetric vector of this particle in the direction Y.
339 (Only relevant for tau particles). */
342 /** The polarimetric vector of this particle in the direction Z.
343 (Only relevant for tau particles). */
346 /** Fourth component of the polarimetric vector. Should be the
347 normalisation (1). (Only relevant for tau particles). */
351 } // namespace Tauolapp