ATLAS Offline Software
Loading...
Searching...
No Matches
TauConstituent.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef PANTAUALGS_TAUCONSTITUENT_H
6#define PANTAUALGS_TAUCONSTITUENT_H
7
8#include <string>
9#include <vector>
10
11#include "xAODBase/IParticle.h"
12#include "xAODPFlow/PFO.h"
13#include <TLorentzVector.h>
14
15
16namespace PanTau {
17
24
26
27 public:
28
42 enum Type {
47 //t_OutChrg = 4,
48 //t_OutNeut = 5,
49 //t_NeutLowA = 6,
50 //t_NeutLowB = 7,
52 };
53
54 static double DefaultBDTValue() {return -4711.1337;}
55 static double DefaultCharge() {return -47111337;}
56 static std::string AllConstituentsName() {return "All";}
57
58 static std::string getTypeName(PanTau::TauConstituent::Type aType);
59 static bool isNeutralType(int tauConstituentType);
60
61
64
70 TauConstituent(const TLorentzVector& itsMomentum,
71 int itsCharge,
72 const std::vector<int>& itsType,
73 double itsBDTValue,
74 const xAOD::PFO* itsPFO);
75
76
78 virtual ~TauConstituent();
79
80
83
85 TauConstituent& operator=(const TauConstituent& tauConst);
86
90
92 virtual double pt() const;
93
95 virtual double eta() const;
96
98 virtual double phi() const;
99
101 virtual double m() const;
102
104 virtual double e() const;
105
107 virtual double rapidity() const;
108
110 typedef IParticle::FourMom_t FourMom_t;
111
113 virtual FourMom_t p4() const;
114
116 virtual xAOD::Type::ObjectType type() const;
117
118
120 void setP4(float pt, float eta, float phi, float m);
121
123 void setPt(float pt);
124
126 void setEta(float eta);
127
129 void setPhi(float phi);
130
132 void setM(float m);
133
134
135 //no setter functions needed as all properties are set in constructor
137
138 //Getter functions
139 std::vector<std::string> getTypeName() const;
140 std::string getTypeNameString() const;
141 const std::vector<int>& getTypeFlags() const;
142 bool isOfType(TauConstituent::Type aType) const;
143 double getBDTValue() const;
144 int getCharge() const;
145 const xAOD::PFO* getPFO() const;
146
147 void addShot(TauConstituent* shot);
148 const std::vector<TauConstituent*>& getShots() const;
149 unsigned int getNShots() const;
150
151 void setNPhotonsInShot(int nPhotons);
152 int getNPhotonsInShot() const;
153
154 private:
155
158
159
160 protected:
161
162 std::vector<int> m_TypeFlags;
165
167
168 // the constituents in there are owned by this! delete them!
169 std::vector<TauConstituent*> m_Shots;
171
172 };
173
174
175} //end namespace
176#endif // PANTAUALGS_TAUCONSTITUENT_H
const xAOD::PFO * m_PFO
void setM(float m)
set the Mass
std::vector< std::string > getTypeName() const
const std::vector< TauConstituent * > & getShots() const
virtual double pt() const
The transverse momentum ( ) of the particle.
void addShot(TauConstituent *shot)
unsigned int getNShots() const
virtual double eta() const
The pseudorapidity ( ) of the particle.
static double DefaultCharge()
virtual double phi() const
The azimuthal angle ( ) of the particle.
TauConstituent & operator=(const TauConstituent &tauConst)
Assignment operator.
IParticle::FourMom_t FourMom_t
Definition of the 4-momentum type.
static bool isNeutralType(int tauConstituentType)
std::vector< TauConstituent * > m_Shots
void setPt(float pt)
set the Pt
virtual FourMom_t p4() const
The full 4-momentum of the particle as a TLorentzVector.
TauConstituent(const TauConstituent &tauConst)
Copy Constructor.
void setEta(float eta)
set the eta
const xAOD::PFO * getPFO() const
FourMom_t m_p4
4-momentum object
std::string getTypeNameString() const
std::vector< int > m_TypeFlags
void setPhi(float phi)
set the phi
static std::string AllConstituentsName()
virtual double e() const
The total energy of the particle.
bool isOfType(TauConstituent::Type aType) const
TauConstituent()
Default Constructor for POOL.
virtual ~TauConstituent()
Destructor.
void setP4(float pt, float eta, float phi, float m)
set the 4-vec
const std::vector< int > & getTypeFlags() const
static double DefaultBDTValue()
Type
Type enumeration to specify type of this tau constituent.
virtual double rapidity() const
The true rapidity (y) of the particle.
virtual xAOD::Type::ObjectType type() const
The type of the object as a simple enumeration, remains pure virtual in e/gamma.
virtual double m() const
The invariant mass of the particle.
void setNPhotonsInShot(int nPhotons)
void removeTypeFlag(TauConstituent::Type aType)
Class providing the definition of the 4-vector interface.
ObjectType
Type of objects that have a representation in the xAOD EDM.
Definition ObjectType.h:32
PFO_v1 PFO
Definition of the current "pfo version".
Definition PFO.h:17