ATLAS Offline Software
Loading...
Searching...
No Matches
EFexEMClusterTool.h
Go to the documentation of this file.
1// Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
2
9
10#ifndef LVL1__EFEXEMCLUSTERTOOL
11#define LVL1__EFEXEMCLUSTERTOOL
12
18
19
20#include <string>
21#include <vector>
22
23
24namespace LVL1
25{
27 {
28 public:
29
30 struct AlgResult {
31 float eta{0}; // cluster eta
32 float phi{0}; // cluster phi
33 float clusterET{0}; // cluster transverse energy
34 float rEta{0}; // R_eta
35 float rHad{0}; // R_had
36 float l1Width{0}; // Wstot
37 float hadET{0}; // hadronic ET
38 float l2ClusterET33{0}; // cluster ET (3x3)
39 float l2ClusterET37{0}; // cluster ET (3x7)
40 float rEtaL12{0}; // R_eta (layers 1+2)
41 bool passClusterEnergy{false}; // passes energy cut of baseline selection
42 bool passRHad{false}; // passes R_had cut of baseline selection
43 bool passREta{false}; // passes R_eta cut of baseline selection
44 bool passWstot{false}; // passes Wstot cut of baseline selection
45 };
46
47 EFexEMClusterTool(const std::string& type, const std::string& name, const IInterface* parent);
48
50 std::vector<AlgResult> clusterAlg( bool applyBaselineCuts,
52 const CaloCell_SuperCell_ID* idHelper, const TileID* m_tileIDHelper,
53 const CaloConstCellContainer* tileCellCon ) const;
54
55 private:
60 std::vector<AlgResult> looseAlg( const CaloConstCellContainer* SCs, const xAOD::TriggerTowerContainer* TTs,
61 const CaloCell_SuperCell_ID* idHelper, const TileID* m_tileIDHelper,
62 const CaloConstCellContainer* tileCellCon) const;
63
64
65 /* calculate the ET of an input cell */
66 float CaloCellET(const CaloCell* const &inputCell, float digitScale, float digitThreshold) const;
67
69 bool localMax( const CaloConstCellContainer* &inputContainer, const CaloCell* inputCell,
70 const CaloCell_SuperCell_ID* &idHelper, float digitScale, float digitThreshold) const;
71
73 bool localMax( const CaloConstCellContainer* &inputContainer, const CaloCell* inputCell,
74 int numOthers, const CaloCell_SuperCell_ID* &idHelper, float digitScale, float digitThreshold) const;
75
77 bool SameTT( const CaloCell* inputCell1, const CaloCell* inputCell2, const CaloCell_SuperCell_ID* &idHelper) const;
78
80 double EMClusET( const CaloCell* centreCell, int etaWidth, int phiWidth,
81 const CaloConstCellContainer* scells, const CaloCell_SuperCell_ID* idHelper, float digitScale, float digitThresh) const;
82
84 double REta( const CaloCell* centreCell, int etaWidth1, int phiWidth1, int etaWidth2, int phiWidth2,
85 const CaloConstCellContainer* scells, const CaloCell_SuperCell_ID* idHelper, float digitScale, float digitThresh) const;
86
88 double RHad( const CaloCell* centreCell, int etaWidth, int phiWidth,
89 const CaloConstCellContainer* scells, const xAOD::TriggerTowerContainer* &TTContainer,
90 const CaloCell_SuperCell_ID* idHelper, float digitScale , float digitThresh, float &HadronicET) const;
91
93 double RHadTile( const CaloCell* centreCell, int etaWidth, int phiWidth,
94 const CaloConstCellContainer* scells, const CaloCell_SuperCell_ID* idHelper, float digitScale, float digitThresh,
95 const TileID* m_tileIDHelper, const CaloConstCellContainer* tileCellCon, float tileNoiseThresh, float &HadronicET) const;
96
98 double L2clusET( const CaloCell* centreCell, int etaWidth, int phiWidth,
99 const CaloConstCellContainer* scells, const CaloCell_SuperCell_ID* idHelper, float digitScale , float digitThresh) const;
100
102 double REtaL12( const CaloCell* centreCell, int etaWidth1, int phiWidth1, int etaWidth2, int phiWidth2,
103 const CaloConstCellContainer* scells, const CaloCell_SuperCell_ID* idHelper, float digitScale, float digitThresh) const;
104
106 double L1Width( const CaloCell* centreCell, int etaWidth, int phiWidth,
107 const CaloConstCellContainer* scells, const CaloCell_SuperCell_ID* idHelper, float digitScale , float digitThresh) const;
108
110 double TT_phi(const xAOD::TriggerTower* &inputTower) const;
111
113 double dR(double eta1, double phi1, double eta2, double phi2) const;
114
116 const xAOD::TriggerTower* matchingHCAL_TT( const CaloCell* &inputCell, const xAOD::TriggerTowerContainer* &TTContainer) const;
117
119 std::vector<const CaloCell*> TDR_Clus( const CaloCell* centreCell, int etaWidth, int phiWidth, const CaloConstCellContainer* scells,
120 const CaloCell_SuperCell_ID* idHelper, float digitScale, float digitThresh) const;
121
123 double sumVectorET( const std::vector<const CaloCell*> &inputVector, float digitScale = 0.,float digitThreshold = 0.) const;
124
126 bool checkDig(float EM_ET, float digitScale,float digitThresh) const;
127
129 std::vector<const CaloCell*> L2cluster( const CaloCell* centreCell, int etaWidth, int phiWidth, const CaloConstCellContainer* scells,
130 const CaloCell_SuperCell_ID* idHelper, float digitScale , float digitThresh ) const;
131
133 double TT_ET(const xAOD::TriggerTower* &inputTower) const;
134
136 double HadronicET( const std::vector<const CaloCell*> & inputVector, const CaloConstCellContainer* scells,
137 const xAOD::TriggerTowerContainer* &TTContainer, const CaloCell_SuperCell_ID* idHelper,
138 float digitScale, float digitThresh) const;
139
141 void fromLayer2toLayer1( const CaloConstCellContainer* &inputContainer, const CaloCell* inputCell,
142 std::vector<const CaloCell*> &outputVector, const CaloCell_SuperCell_ID* &idHelper) const;
143
145 const CaloCell* fromLayer2toPS(const CaloConstCellContainer* &inputContainer, const CaloCell* inputCell,
146 const CaloCell_SuperCell_ID* &idHelper) const;
147
149 const CaloCell* fromLayer2toLayer3(const CaloConstCellContainer* &inputContainer, const CaloCell* inputCell,
150 const CaloCell_SuperCell_ID* &idHelper) const;
151
153 void addOnce(const CaloCell* inputCell, std::vector<const CaloCell*> &outputVector) const;
154
156 std::vector<double> EnergyPerTileLayer(const std::vector<const CaloCell*> & inputSCVector, const CaloConstCellContainer* CellCon,
157 const TileID* tileIDHelper, bool isOW, float tileNoiseThresh) const;
158
160 const CaloCell* matchingHCAL_LAr(const CaloCell* &inputCell, const CaloConstCellContainer* &SCContainer,
161 const CaloCell_SuperCell_ID* &idHelper) const;
162
164 void checkTileCell(const TileCell* &inputCell, std::vector<const TileCell*> &tileCellVector, bool &isAlreadyThere) const;
165
167 double tileCellEnergyCalib(float eIn, float etaIn, float tileNoiseThresh) const;
168
170 int detRelPos(const float inEta) const;
171
176 const CaloCell* returnCellFromCont(Identifier inputID, const CaloConstCellContainer* &cellContainer, const CaloCell_SuperCell_ID* &idHelper) const;
177
179 const CaloCell* NextEtaCell( const CaloCell* inputCell, bool upwards, const CaloConstCellContainer* &cellContainer, const CaloCell_SuperCell_ID* &idHelper) const;
180
182 const CaloCell* NextEtaCell_Barrel (const CaloCell* inputCell, bool upwards, const CaloConstCellContainer* &cellContainer, const CaloCell_SuperCell_ID* &idHelper) const;
183
185 const CaloCell* NextEtaCell_OW (const CaloCell* inputCell, bool upwards, const CaloConstCellContainer* &cellContainer, const CaloCell_SuperCell_ID* &idHelper) const;
186
188 const CaloCell* NextEtaCell_IW(const CaloCell* inputCell, bool upwards, const CaloConstCellContainer* &cellContainer, const CaloCell_SuperCell_ID* &idHelper) const;
189
191 int restrictPhiIndex(int input_index, bool is64) const;
192
194 const CaloCell* NextPhiCell ( const CaloCell* inputCell, bool upwards,
195 const CaloConstCellContainer* &cellContainer, const CaloCell_SuperCell_ID* &idHelper) const;
196
197
198
199
200
206
207 // baseline selection properties
214
215 // loose selection properties
216 bool m_use_REtaL12 = false;
234
235 };
236}
237
238#endif
Helper class for offline supercell identifiers.
CaloCellContainer that can accept const cell pointers.
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Helper class for offline supercell identifiers.
Data object for each calorimeter readout cell.
Definition CaloCell.h:57
CaloCellContainer that can accept const cell pointers.
void checkTileCell(const TileCell *&inputCell, std::vector< const TileCell * > &tileCellVector, bool &isAlreadyThere) const
determine if Tile cell has already been taken into account
double RHadTile(const CaloCell *centreCell, int etaWidth, int phiWidth, const CaloConstCellContainer *scells, const CaloCell_SuperCell_ID *idHelper, float digitScale, float digitThresh, const TileID *m_tileIDHelper, const CaloConstCellContainer *tileCellCon, float tileNoiseThresh, float &HadronicET) const
calculate the hadronic isolation for a seed cell using TileCal cells
int m_etaWidth_TDRCluster
eta width of the TDR cluster formation given in number of SCs (including the central cell),...
int detRelPos(const float inEta) const
determine the PMT position of the Tile cell to be matched
float m_clustET_looseAlg_thresh
threshold for minimum cluster energy for the loose eFEX algorithm
float m_nominalNoise_thresh
noise threshold
float m_eta_dropL1Width
max eta for applying cut on L1Width (baseline selection)
int m_etaWidth_REtaIsolation_den
eta width for REta isolation given in number of SCs (denominator of fraction)
double HadronicET(const std::vector< const CaloCell * > &inputVector, const CaloConstCellContainer *scells, const xAOD::TriggerTowerContainer *&TTContainer, const CaloCell_SuperCell_ID *idHelper, float digitScale, float digitThresh) const
calculate the energy in the HCAL (LAr + Tile) for SC/TT that match the EM cluster cells of L2
const CaloCell * NextEtaCell_IW(const CaloCell *inputCell, bool upwards, const CaloConstCellContainer *&cellContainer, const CaloCell_SuperCell_ID *&idHelper) const
returns the SC left/right to the input cell for the IW
void fromLayer2toLayer1(const CaloConstCellContainer *&inputContainer, const CaloCell *inputCell, std::vector< const CaloCell * > &outputVector, const CaloCell_SuperCell_ID *&idHelper) const
match SCs from the cluster in L2 to L1
const CaloCell * NextEtaCell_OW(const CaloCell *inputCell, bool upwards, const CaloConstCellContainer *&cellContainer, const CaloCell_SuperCell_ID *&idHelper) const
returns the SC left/right to the input cell for the OW
double TT_ET(const xAOD::TriggerTower *&inputTower) const
calculate the energy of an input TT
double L1Width(const CaloCell *centreCell, int etaWidth, int phiWidth, const CaloConstCellContainer *scells, const CaloCell_SuperCell_ID *idHelper, float digitScale, float digitThresh) const
calculate the lateral isolation aorund the central cell
double sumVectorET(const std::vector< const CaloCell * > &inputVector, float digitScale=0., float digitThreshold=0.) const
calculate cluster energy from all SCs in PS, L1, L2, L3
std::vector< const CaloCell * > TDR_Clus(const CaloCell *centreCell, int etaWidth, int phiWidth, const CaloConstCellContainer *scells, const CaloCell_SuperCell_ID *idHelper, float digitScale, float digitThresh) const
form the cluster around the central SC
float m_clustET_thresh
threshold for minimum cluster energy (baseline selection)
int m_etaHadWidth_RHadIsolation
hadronic eta width for RHad isolation given in number of SCs
int m_etaEMWidth_RHadIsolation
EM eta width for RHad isolation given in number of SCs.
double tileCellEnergyCalib(float eIn, float etaIn, float tileNoiseThresh) const
determine transverse energy and apply noise threshold to Tile cells
int m_phiWidth_wstotIsolation
phi width for wstot isolation given in number of SCs
const CaloCell * fromLayer2toPS(const CaloConstCellContainer *&inputContainer, const CaloCell *inputCell, const CaloCell_SuperCell_ID *&idHelper) const
match SCs from the cluster in L2 to one cell of PS
EFexEMClusterTool(const std::string &type, const std::string &name, const IInterface *parent)
Name : EFexEMClusterTool.cxx PACKAGE : Trigger/TrigT1/TrigT1CaloFexPerf AUTHOR : Denis Oliveira Damaz...
int m_phiEMWidth_RHadIsolation
EM phi width for RHad isolation given in number of SCs.
std::vector< AlgResult > clusterAlg(bool applyBaselineCuts, const CaloConstCellContainer *scells, const xAOD::TriggerTowerContainer *TTs, const CaloCell_SuperCell_ID *idHelper, const TileID *m_tileIDHelper, const CaloConstCellContainer *tileCellCon) const
find cluster and associated variables using a user defined selection
const CaloCell * NextEtaCell_Barrel(const CaloCell *inputCell, bool upwards, const CaloConstCellContainer *&cellContainer, const CaloCell_SuperCell_ID *&idHelper) const
returns the SC left/right to the input cell for the barrel
bool checkDig(float EM_ET, float digitScale, float digitThresh) const
check if conversion from ET to energy after digitization was performed successfully
double EMClusET(const CaloCell *centreCell, int etaWidth, int phiWidth, const CaloConstCellContainer *scells, const CaloCell_SuperCell_ID *idHelper, float digitScale, float digitThresh) const
calculate cluster energy
std::vector< double > EnergyPerTileLayer(const std::vector< const CaloCell * > &inputSCVector, const CaloConstCellContainer *CellCon, const TileID *tileIDHelper, bool isOW, float tileNoiseThresh) const
match all Tile cells to a given L2Cluster and determine the summed energy per Tile layer
double RHad(const CaloCell *centreCell, int etaWidth, int phiWidth, const CaloConstCellContainer *scells, const xAOD::TriggerTowerContainer *&TTContainer, const CaloCell_SuperCell_ID *idHelper, float digitScale, float digitThresh, float &HadronicET) const
calculate the hadronic isolation of the central cell
int m_qualBitMask
Configurable quality bitmask.
const CaloCell * matchingHCAL_LAr(const CaloCell *&inputCell, const CaloConstCellContainer *&SCContainer, const CaloCell_SuperCell_ID *&idHelper) const
Match each SC from L2 to one corresponding HCAL SC.
float m_tileNoise_tresh
TileCal cell noise threshold.
int m_phiHadWidth_RHadIsolation
hadronic phi width for RHad isolation given in number of SCs
float m_REta_thresh
threshold for isolation REta (baseline selection)
int m_phiWidth_REtaIsolation_num
phi width for REta isolation given in number of SCs (numerator of fraction)
float m_L1Width_thresh
threshold for isolation L1Width (wstot) (baseline selection)
bool localMax(const CaloConstCellContainer *&inputContainer, const CaloCell *inputCell, const CaloCell_SuperCell_ID *&idHelper, float digitScale, float digitThreshold) const
helper function calling localMax()
int restrictPhiIndex(int input_index, bool is64) const
manager function for the phi index
const CaloCell * NextEtaCell(const CaloCell *inputCell, bool upwards, const CaloConstCellContainer *&cellContainer, const CaloCell_SuperCell_ID *&idHelper) const
helper function calling NextEtaCell_Barrel(), NextEtaCell_OW(), NextEtaCell_IW() according to positio...
double dR(double eta1, double phi1, double eta2, double phi2) const
calculate deltaR between two points in eta/phi space
float m_nominalDigitization
value of nominal digitisation
double REtaL12(const CaloCell *centreCell, int etaWidth1, int phiWidth1, int etaWidth2, int phiWidth2, const CaloConstCellContainer *scells, const CaloCell_SuperCell_ID *idHelper, float digitScale, float digitThresh) const
calculate the energy isolation of the central cell along eta using Layer 1 and Layer 2
const xAOD::TriggerTower * matchingHCAL_TT(const CaloCell *&inputCell, const xAOD::TriggerTowerContainer *&TTContainer) const
Match each SC from L2 to one corresponding TT.
float m_RHad_thresh
threshold for isolation RHad (baseline selection)
int m_etaWidth_REtaIsolation_num
eta width for REta isolation given in number of SCs (numerator of fraction)
bool SameTT(const CaloCell *inputCell1, const CaloCell *inputCell2, const CaloCell_SuperCell_ID *&idHelper) const
check if both input cells belong to the same TT
const CaloCell * fromLayer2toLayer3(const CaloConstCellContainer *&inputContainer, const CaloCell *inputCell, const CaloCell_SuperCell_ID *&idHelper) const
match SCs from the cluster in L2 to one cell of L3
float CaloCellET(const CaloCell *const &inputCell, float digitScale, float digitThreshold) const
private algorithms
double REta(const CaloCell *centreCell, int etaWidth1, int phiWidth1, int etaWidth2, int phiWidth2, const CaloConstCellContainer *scells, const CaloCell_SuperCell_ID *idHelper, float digitScale, float digitThresh) const
calculate the energy isolation of the central cell along eta
const CaloCell * returnCellFromCont(Identifier inputID, const CaloConstCellContainer *&cellContainer, const CaloCell_SuperCell_ID *&idHelper) const
helper functions to find neighbouring cells
std::vector< const CaloCell * > L2cluster(const CaloCell *centreCell, int etaWidth, int phiWidth, const CaloConstCellContainer *scells, const CaloCell_SuperCell_ID *idHelper, float digitScale, float digitThresh) const
form the cluster from cells of the second layer L2
bool m_use_tileCells
boolean for using Tile cells instead of Tile TT
int m_etaWidth_wstotIsolation
eta width for wstot isolation given in number of SCs
bool m_use_REtaL12
boolean for caluclating REta using Layer 1 in addition to Layer 2
float m_clustET_NoIso_thresh
threshold for applying cluster isolation cuts (baseline selection)
int m_phiWidth_TDRCluster
phi width of the TDR cluster formation given in number of SCs (including the central cell),...
const CaloCell * NextPhiCell(const CaloCell *inputCell, bool upwards, const CaloConstCellContainer *&cellContainer, const CaloCell_SuperCell_ID *&idHelper) const
returns the SC above/below the input cell
int m_phiWidth_REtaIsolation_den
phi width for REta isolation given in number of SCs (denominator of fraction)
void addOnce(const CaloCell *inputCell, std::vector< const CaloCell * > &outputVector) const
adds SC to vector if the SC is not part of this vector yet
double TT_phi(const xAOD::TriggerTower *&inputTower) const
convert the TT phi to match the definition of SC phi
double L2clusET(const CaloCell *centreCell, int etaWidth, int phiWidth, const CaloConstCellContainer *scells, const CaloCell_SuperCell_ID *idHelper, float digitScale, float digitThresh) const
calculate cluster energy of cells in L2 around the central cell in a given eta/phi width
std::vector< AlgResult > looseAlg(const CaloConstCellContainer *SCs, const xAOD::TriggerTowerContainer *TTs, const CaloCell_SuperCell_ID *idHelper, const TileID *m_tileIDHelper, const CaloConstCellContainer *tileCellCon) const
algorithm fors cluster building
Helper class for TileCal offline identifiers.
Definition TileID.h:67
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
TriggerTowerContainer_v2 TriggerTowerContainer
Define the latest version of the TriggerTower container.
TriggerTower_v2 TriggerTower
Define the latest version of the TriggerTower class.