ATLAS Offline Software
TrigTauCluster.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TRIGTAUCLUSTER_H
6 #define TRIGTAUCLUSTER_H
7 
8 
9 /*******************************************************
10 
11 NAME: TrigTauCluster.h
12 PACKAGE: Trigger/TrigEvent/TrigCaloEvent
13 AUTHORS: Denis O. Damazio, Carlos Osuna, Xin Wu
14 
15 PURPOSE: Keep the important output variables
16  from the Calorimeter LVL2 Tau Trigger.
17  Optionally seed ID Trigger and EF.
18  Variables here should be corrected variables
19  not raw (in mother class).
20 INHERITSFROM: TrigCaloCluster
21 DATE: October 17th, 2005
22 
23 ******************************************************/
24 // includes section
25 #include <math.h>
26 #include "AthLinks/ElementLink.h"
29 
33 {
34 public:
36  TrigTauCluster(float energy = 0.0, float eta = -10.0,
37  float phi = -10.0, long roi_word = 0);
39  unsigned int details_index,
40  float energy = 0.0, float eta = -10.0,
41  float phi = -10.0, long roi_word = 0);
45  TrigTauCluster(const TrigTauCluster* trigemcluster) ;
46 
47  // Print out variables for Debug
49  void print(void) const;
51  void print(MsgStream& log) const;
52 
53  // set internal variables methods
55  inline void setEMenergy(float energy) { m_EMenergy = energy; };
57  inline void setHADenergy(float energy) { m_HADenergy = energy; };
59  inline void setEta(float eta) { setRawEta(eta); };
61  inline void setPhi(float phi) { setRawPhi(phi); };
63  inline void setEMRadius2(float emradius) { m_EMRadius2 = emradius; };
65  inline void setCaloRadius(float caloradius) { m_CaloRadius = caloradius; };
67  inline void setIsoFrac(float isofrac) { m_IsoFrac = isofrac; };
69  inline void setStripWidth(float stripwidth) { m_stripWidth = stripwidth; };
71  inline void setStripWidthOffline(float stripwidthOffline) { m_stripWidthOffline = stripwidthOffline; };
73  inline void setNumStripCells(int numstripcells) { m_numStripCells = numstripcells; };
75  inline void setNumTotCells(int numtotcells) { m_numTotCells = numtotcells; };
77  inline void setEnergyCalib(float e) { m_eCalib = e; };
79  inline void setEMRadius3S(float emradius3s) { m_EMRadius3S = emradius3s; };
81  inline void setCoreFrac(float coreFrac) { m_CoreFrac = coreFrac; };
83  inline void setEMFrac(float emFrac) { m_EMFrac = emFrac; };
85  inline void setHadRadius(float hadRadius) { m_HadRadius = hadRadius; };
86 
87  // get internal variables methods
89  inline float energy() const { return rawEnergy(); };
91  inline float et() const { return rawEnergy() / cosh(eta()); };
93  inline float EMCalibEnergy() const { return 0; };
95  inline float EMenergy() const { return m_EMenergy; };
97  inline float HADenergy() const { return m_HADenergy;};
99  inline float energy(CaloSampling::CaloSample /* sample */) const { return 0.; };
101  inline float energyInSample(CaloSampling::CaloSample /* sample */) const { return 0.; };
103  inline float eta() const { return rawEta(); };
105  inline float phi() const { return rawPhi(); };
107  inline float EMRadius2() const { return m_EMRadius2; };
109  inline float CaloRadius() const { return m_CaloRadius; };
111  inline float EMRadius(int samp) const { return m_clusterDetails.isValid() && clusterDetails() != 0 ? clusterDetails()->EMRadius(samp) : 0; };
113  inline float IsoFrac() const { return m_IsoFrac; };
115  inline float EMenergyWidth(int samp) const { return m_clusterDetails.isValid() && clusterDetails() != 0 ? clusterDetails()->EMenergyWidth(samp) : 0; };
117  inline float HADenergyWidth(int samp) const { return m_clusterDetails.isValid() && clusterDetails() != 0 ? clusterDetails()->HADenergyWidth(samp) : 0; };
119  inline int numStripCells() const { return m_numStripCells; };
121  inline int numTotCells() const { return m_numTotCells; };
123  inline float stripWidth() const { return m_stripWidth; };
125  inline float stripWidthOffline() const { return m_stripWidthOffline; };
127  inline float eCalib() const { return m_eCalib; };
129  inline float eEMCalib() const { return 0; };
131  inline float EMRadius3S() const { return m_EMRadius3S; };
133  inline float CoreFrac() const { return m_CoreFrac; };
135  inline float EMFrac() const { return m_EMFrac; };
137  inline float HadRadius() const { return m_HadRadius; };
138 
140  inline float EMenergyWide(int samp) const { return m_clusterDetails.isValid() && clusterDetails() != 0 ? clusterDetails()->EMenergyWide(samp) : 0; };
142  inline float EMenergyMedium(int samp) const { return m_clusterDetails.isValid() && clusterDetails() != 0 ? clusterDetails()->EMenergyMedium(samp) : 0; };
144  inline float EMenergyNarrow(int samp) const { return m_clusterDetails.isValid() && clusterDetails() != 0 ? clusterDetails()->EMenergyNarrow(samp) : 0; };
145 
147  inline float HADenergyWide(int samp) const { return m_clusterDetails.isValid() && clusterDetails() != 0 ? clusterDetails()->HADenergyWide(samp) : 0;};
149  inline float HADenergyMedium(int samp) const { return m_clusterDetails.isValid() && clusterDetails() != 0 ? clusterDetails()->HADenergyMedium(samp) : 0;};
151  inline float HADenergyNarrow(int samp) const { return m_clusterDetails.isValid() && clusterDetails() != 0 ? clusterDetails()->HADenergyNarrow(samp) : 0;};
152 
157 
158 
159 // internal variables must be private
160 private:
162  float m_EMenergy;
164  float m_HADenergy;
166  float m_eCalib;
168  float m_EMRadius2;
170  float m_CaloRadius;
172  float m_IsoFrac;
174  int m_numStripCells;
184  float m_CoreFrac;
186  float m_EMFrac;
188  float m_HadRadius;
189 
190  bool m_valid;
193 
194 };
195 
197 std::string str(const TrigTauCluster& tau);
198 
200 MsgStream& operator<< (MsgStream& m, const TrigTauCluster& tau);
201 
203 bool operator== (const TrigTauCluster& left, const TrigTauCluster& right);
205 inline bool operator!= (const TrigTauCluster& left, const TrigTauCluster& right)
206 {
207  return !(left == right);
208 }
209 
211 void diff(const TrigTauCluster& left, const TrigTauCluster& right, std::map<std::string, double>& varChange);
212 
213 
214 // CLIDSvc is already loaded in base class
215 CLASS_DEF ( TrigTauCluster, 213051884, 1)
216 
217 #include "TrigCaloEvent/TrigTauClusterContainer.h"
218 #endif
TrigTauCluster::setEMRadius3S
void setEMRadius3S(float emradius3s)
set EM Radius 3S
Definition: TrigTauCluster.h:93
TrigTauClusterDetails::EMRadius
float EMRadius(int samp) const
get EM Radius per sampling
Definition: TrigTauClusterDetails.h:80
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
TrigTauCluster::setPhi
void setPhi(float phi)
set Phi of the cluster
Definition: TrigTauCluster.h:75
TrigTauCluster::EMenergy
float EMenergy() const
get EM Energy
Definition: TrigTauCluster.h:109
TrigTauCluster::m_EMRadius3S
float m_EMRadius3S
EM Radius 3S.
Definition: TrigTauCluster.h:196
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
TrigTauClusterDetails::HADenergyWide
float HADenergyWide(int samp) const
get HAD Energy in the normalization region (0.3x0.3)
Definition: TrigTauClusterDetails.h:98
TrigTauCluster::HADenergyNarrow
float HADenergyNarrow(int samp) const
get HAD Energy in the narrow region (0.1x0.1)
Definition: TrigTauCluster.h:165
TrigTauCluster::phi
float phi() const
get Phi of the cluster
Definition: TrigTauCluster.h:119
TrigTauCluster::clusterDetails
const TrigTauClusterDetails * clusterDetails() const
accessor to TrigTauClusterDetails*
Definition: TrigTauCluster.cxx:156
TrigTauCluster::EMRadius3S
float EMRadius3S() const
get EM Radius 3S
Definition: TrigTauCluster.h:145
TrigTauCluster::IsoFrac
float IsoFrac() const
get Isolation Fraction
Definition: TrigTauCluster.h:127
TrigTauCluster::m_EMFrac
float m_EMFrac
EM Fraction.
Definition: TrigTauCluster.h:200
TrigTauCluster::setNumTotCells
void setNumTotCells(int numtotcells)
set Number of Cells in the cluster
Definition: TrigTauCluster.h:89
TrigTauCluster::m_stripWidth
float m_stripWidth
Width in the strip sampling.
Definition: TrigTauCluster.h:192
TrigTauCluster::HADenergyWidth
float HADenergyWidth(int samp) const
get Width in HAD samplings
Definition: TrigTauCluster.h:131
TrigTauClusterDetails::EMenergyWide
float EMenergyWide(int samp) const
get EM Energy in the mormalization region (0.3x0.3)
Definition: TrigTauClusterDetails.h:91
operator<<
MsgStream & operator<<(MsgStream &m, const TrigTauCluster &tau)
Helper operator for printing the object.
Definition: TrigTauCluster.cxx:239
TrigTauClusterDetails::EMenergyNarrow
float EMenergyNarrow(int samp) const
get EM Energy in the narrow region (0.1x0.1)
Definition: TrigTauClusterDetails.h:95
TrigCaloCluster::rawPhi
float rawPhi() const
get Raw Phi (no calibration)
Definition: Trigger/TrigEvent/TrigCaloEvent/TrigCaloEvent/TrigCaloCluster.h:112
TrigTauCluster::energyInSample
float energyInSample(CaloSampling::CaloSample) const
get Energy per sampling
Definition: TrigTauCluster.h:115
TrigTauCluster::m_CaloRadius
float m_CaloRadius
Total Calo Radius.
Definition: TrigTauCluster.h:184
TrigTauCluster::CaloRadius
float CaloRadius() const
get Total Calo Radius
Definition: TrigTauCluster.h:123
TrigTauCluster::setNumStripCells
void setNumStripCells(int numstripcells)
set Number of fired strips
Definition: TrigTauCluster.h:87
TrigTauCluster::m_valid
bool m_valid
Definition: TrigTauCluster.h:204
TrigTauCluster::stripWidth
float stripWidth() const
get Width in the strip sampling
Definition: TrigTauCluster.h:137
TrigTauCluster
Class with calibrated variables for tau clustering.
Definition: TrigTauCluster.h:33
xAOD::TauJetParameters::hadRadius
@ hadRadius
Get hadron calorimeter radius.
Definition: TauDefs.h:192
TrigTauCluster::m_IsoFrac
float m_IsoFrac
Isolation Fraction.
Definition: TrigTauCluster.h:186
TrigTauClusterDetails::HADenergyMedium
float HADenergyMedium(int samp) const
get HAD Energy in the wide region (0.2x0.2)
Definition: TrigTauClusterDetails.h:100
TrigTauClusterDetailsContainer
Container from TrigTauClusterDetails type objects.
Definition: TrigTauClusterDetailsContainer.h:28
TrigTauCluster::m_EMRadius2
float m_EMRadius2
EM Radius.
Definition: TrigTauCluster.h:182
TrigTauCluster::m_eCalib
float m_eCalib
Calibrated Energy.
Definition: TrigTauCluster.h:180
TrigTauCluster::HADenergyMedium
float HADenergyMedium(int samp) const
get HAD Energy in the medium region (0.2x0.2)
Definition: TrigTauCluster.h:163
TrigTauCluster::setEMenergy
void setEMenergy(float energy)
set EM Energy
Definition: TrigTauCluster.h:69
TrigTauCluster::TrigTauCluster
TrigTauCluster(float energy=0.0, float eta=-10.0, float phi=-10.0, long roi_word=0)
Constructors, please note the default values
Definition: TrigTauCluster.cxx:25
TrigTauCluster::print
void print(void) const
Prints out cluster variables to std::cout
Definition: TrigTauCluster.cxx:115
TrigTauCluster::~TrigTauCluster
~TrigTauCluster()
Destructor
Definition: TrigTauCluster.cxx:81
CaloSampling::CaloSample
CaloSample
Definition: Calorimeter/CaloGeoHelpers/CaloGeoHelpers/CaloSampling.h:22
TrigTauCluster::numTotCells
int numTotCells() const
get Number of total cells in the cluster
Definition: TrigTauCluster.h:135
TrigTauCluster::setStripWidth
void setStripWidth(float stripwidth)
set Width in the strip sampling
Definition: TrigTauCluster.h:83
TrigTauCluster::EMenergyMedium
float EMenergyMedium(int samp) const
get EM Energy in the medium region (0.2x0.2)
Definition: TrigTauCluster.h:156
TrigTauCluster::m_CoreFrac
float m_CoreFrac
Core Fraction.
Definition: TrigTauCluster.h:198
TrigCaloCluster
Base Cluster Class.
Definition: Trigger/TrigEvent/TrigCaloEvent/TrigCaloEvent/TrigCaloCluster.h:39
TrigTauCluster::setClusterDetails
void setClusterDetails(const ElementLink< TrigTauClusterDetailsContainer > &clusterDetailsLink)
Definition: TrigTauCluster.cxx:174
TrigTauCluster::m_HADenergy
float m_HADenergy
HAD Energy.
Definition: TrigTauCluster.h:178
TrigTauCluster::m_numStripCells
int m_numStripCells
Number of fired strips.
Definition: TrigTauCluster.h:188
TrigTauCluster::m_stripWidthOffline
float m_stripWidthOffline
Width calculated as in Offline tauRec.
Definition: TrigTauCluster.h:194
TrigTauCluster::EMFrac
float EMFrac() const
get EM Fraction
Definition: TrigTauCluster.h:149
TrigCaloCluster::rawEta
float rawEta() const
get Raw Eta (no calibration)
Definition: Trigger/TrigEvent/TrigCaloEvent/TrigCaloEvent/TrigCaloCluster.h:109
TrigTauCluster::HadRadius
float HadRadius() const
get Hadronic Radius
Definition: TrigTauCluster.h:151
TrigTauCluster::setEnergyCalib
void setEnergyCalib(float e)
set Calibrated Energy
Definition: TrigTauCluster.h:91
TrigTauCluster::m_HadRadius
float m_HadRadius
Hadronic Radius.
Definition: TrigTauCluster.h:202
TrigTauCluster::eta
float eta() const
get Eta of the cluster
Definition: TrigTauCluster.h:117
TrigTauCluster::setEta
void setEta(float eta)
set Eta of the cluster
Definition: TrigTauCluster.h:73
TrigTauClusterDetails::HADenergyWidth
float HADenergyWidth(int samp) const
get Width in HAD samplings
Definition: TrigTauClusterDetails.h:87
TrigTauCluster::EMCalibEnergy
float EMCalibEnergy() const
get EM calibrated Energy
Definition: TrigTauCluster.h:107
TrigCaloCluster::setRawPhi
void setRawPhi(float phi)
set Raw Phi (no calibration)
Definition: Trigger/TrigEvent/TrigCaloEvent/TrigCaloEvent/TrigCaloCluster.h:78
TrigTauCluster::EMenergyWidth
float EMenergyWidth(int samp) const
get Width in EM samplings
Definition: TrigTauCluster.h:129
TrigCaloCluster::setRawEta
void setRawEta(float eta)
set Raw Eta (no calibration)
Definition: Trigger/TrigEvent/TrigCaloEvent/TrigCaloEvent/TrigCaloCluster.h:75
TrigTauCluster::EMenergyWide
float EMenergyWide(int samp) const
get EM Energy in the wide region (0.3x0.3)
Definition: TrigTauCluster.h:154
diff
void diff(const TrigTauCluster &left, const TrigTauCluster &right, std::map< std::string, double > &varChange)
Comparison with feedback.
Definition: TrigTauCluster.cxx:245
TrigTauCluster::setEMRadius2
void setEMRadius2(float emradius)
set EM Radius
Definition: TrigTauCluster.h:77
TrigTauClusterDetails::EMenergyWidth
float EMenergyWidth(int samp) const
get Width in EM samplings
Definition: TrigTauClusterDetails.h:84
TrigTauCluster::eCalib
float eCalib() const
get Calibrated Energy
Definition: TrigTauCluster.h:141
operator==
bool operator==(const TrigTauCluster &left, const TrigTauCluster &right)
Operator comparing two TrigTauCluster objects for equality.
Definition: TrigTauCluster.cxx:180
TrigTauCluster::HADenergyWide
float HADenergyWide(int samp) const
get HAD Energy in the wide region (0.3x0.3)
Definition: TrigTauCluster.h:161
TrigTauCluster::EMRadius2
float EMRadius2() const
get EM Radius
Definition: TrigTauCluster.h:121
TrigTauClusterDetailsContainer.h
TrigTauCluster::setCaloRadius
void setCaloRadius(float caloradius)
set Total Calo Radius
Definition: TrigTauCluster.h:79
TrigTauCluster::stripWidthOffline
float stripWidthOffline() const
get Width as in offline
Definition: TrigTauCluster.h:139
CLASS_DEF
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Definition: Control/AthenaKernel/AthenaKernel/CLASS_DEF.h:64
TrigCaloCluster.h
TrigTauCluster::HADenergy
float HADenergy() const
get HAD Energy
Definition: TrigTauCluster.h:111
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
TrigTauCluster::m_clusterDetails
ElementLink< TrigTauClusterDetailsContainer > m_clusterDetails
ElementLink to TrigTauClusterDetailsContainer.
Definition: TrigTauCluster.h:206
TrigTauCluster::eEMCalib
float eEMCalib() const
get EM calibrated Energy
Definition: TrigTauCluster.h:143
TrigTauClusterDetails
Definition: TrigTauClusterDetails.h:30
TrigTauCluster::numStripCells
int numStripCells() const
get Number of fired strips
Definition: TrigTauCluster.h:133
TrigTauCluster::setStripWidthOffline
void setStripWidthOffline(float stripwidthOffline)
set strip Width as in offline
Definition: TrigTauCluster.h:85
str
std::string str(const TrigTauCluster &tau)
Helper function for printing the object.
Definition: TrigTauCluster.cxx:213
TrigTauCluster::EMenergyNarrow
float EMenergyNarrow(int samp) const
get EM Energy in the narrow region (0.1x0.1)
Definition: TrigTauCluster.h:158
operator!=
bool operator!=(const TrigTauCluster &left, const TrigTauCluster &right)
Operator comparing two TrigTauCluster objects for inequality.
Definition: TrigTauCluster.h:205
TrigTauClusterDetails::HADenergyNarrow
float HADenergyNarrow(int samp) const
get HAD Energy in the narrow region (0.1x0.1)
Definition: TrigTauClusterDetails.h:102
TrigTauCluster::setHadRadius
void setHadRadius(float hadRadius)
set Hadronic Radius
Definition: TrigTauCluster.h:99
TrigTauCluster::clusterDetailsLink
const ElementLink< TrigTauClusterDetailsContainer > & clusterDetailsLink() const
Definition: TrigTauCluster.cxx:169
TrigTauCluster::setIsoFrac
void setIsoFrac(float isofrac)
set Isolation Fraction
Definition: TrigTauCluster.h:81
TrigTauClusterDetails::EMenergyMedium
float EMenergyMedium(int samp) const
get EM Energy in the wide region (0.2x0.2)
Definition: TrigTauClusterDetails.h:93
TrigTauCluster::CoreFrac
float CoreFrac() const
get Core Fraction
Definition: TrigTauCluster.h:147
TrigTauCluster::m_numTotCells
int m_numTotCells
Total number of cells in the cluster.
Definition: TrigTauCluster.h:190
TrigTauCluster::EMRadius
float EMRadius(int samp) const
get EM Radius per sampling
Definition: TrigTauCluster.h:125
TrigTauCluster::energy
float energy() const
get Raw Energy
Definition: TrigTauCluster.h:103
TrigCaloCluster::rawEnergy
float rawEnergy() const
get Raw Energy (no calibration)
Definition: Trigger/TrigEvent/TrigCaloEvent/TrigCaloEvent/TrigCaloCluster.h:92
TrigTauCluster::m_EMenergy
float m_EMenergy
EM Energy.
Definition: TrigTauCluster.h:176
TrigTauCluster::setEMFrac
void setEMFrac(float emFrac)
set EM Fraction
Definition: TrigTauCluster.h:97
TrigTauCluster::setCoreFrac
void setCoreFrac(float coreFrac)
set Core Fraction
Definition: TrigTauCluster.h:95
TrigTauCluster::et
float et() const
get Raw Et
Definition: TrigTauCluster.h:105
TrigTauCluster::setHADenergy
void setHADenergy(float energy)
set HAD Energy
Definition: TrigTauCluster.h:71