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