ATLAS Offline Software
Loading...
Searching...
No Matches
CaloClusterCellWeightCalib.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef CALOUTILS_CALOCLUSTERCELLWEIGHTCALIB_H
6#define CALOUTILS_CALOCLUSTERCELLWEIGHTCALIB_H
7
8#include "GaudiKernel/ToolHandle.h"
9
11
13
14class CaloCluster;
15
17{
18public:
19
21 CaloClusterCellWeightCalib(const std::string& type,
22 const std::string& name,
23 const IInterface* pParent);
25 virtual ~CaloClusterCellWeightCalib() override;
26
28 virtual StatusCode initialize() override;
29
32 virtual StatusCode execute(const EventContext& ctx,
33 xAOD::CaloCluster* theCluster) const override;
34
35protected:
36
38 static constexpr std::string s_posName = "Signal";
40 static constexpr std::string s_absName = "AbsSignal";
42 static constexpr std::string s_rawName = "RawSignal";
44 static constexpr std::string s_defName = s_absName;
45
46protected:
60 Gaudi::Property<std::string> m_directionCalculation{this, "Direction", s_defName};
61
69 Gaudi::Property<bool> m_calibNoiseLikeAll{this, "BelowThresholdLikeAll", true};
70
80 Gaudi::Property<std::string> m_noiseDirectionCalculation{this, "BelowThresholdDirection", s_defName};
81
83 Gaudi::Property<double> m_eThreshold{this, "EnergyThreshold", 0.};
84
95 Gaudi::Property<bool> m_ignoreGeoWghts{this, "IgnoreGeoWeights", false};
96
98 ToolHandle<ICellWeightTool> m_cellWeight{this, "CellSignalWeightTool", {}};
99
100protected:
101
102// /*! @brief Processor type for cluster calibration */
103// typedef StatusCode
104// (CaloClusterCellWeightCalib::*PROCESSOR)(const xAOD::CaloCluster* pClus) const;
105
106// /*! @brief Processor implementation for all clusters */
107// StatusCode p_execAll(const xAOD::CaloCluster* pClus) const;
108// /*! @brief Processor implementation for dedicated noise cluster treatment */
109// StatusCode p_execSpc(const xAOD::CaloCluster* pClus) const;
110
111// /*! @brief Pointer to cluster processor */
112// PROCESSOR p_execute;
113
115 typedef StatusCode
117
123 StatusCode f_dirRaw(xAOD::CaloCluster* pClus) const;
129 StatusCode f_dirRawNW(xAOD::CaloCluster* pClus) const;
135 StatusCode f_dirPos(xAOD::CaloCluster* pClus) const;
142 StatusCode f_dirPosNW(xAOD::CaloCluster* pClus) const;
149 StatusCode f_dirAbs(xAOD::CaloCluster* pClus) const;
157 StatusCode f_dirAbsNW(xAOD::CaloCluster* pClus) const;
158
161
164
165protected:
166
168 StatusCode setupAll(MsgStream& report);
169
171 StatusCode setupSpc(MsgStream& report);
172
174 bool setup(const std::string& name,const std::string& tag,
175 CALCULATOR& calc,std::string& conf,MsgStream& report);
176
178 static bool cmpNoCase(const std::string& a,const std::string& b);
179};
180
199#endif
Base class for cluster processing tools called from CaloClusterMaker that operate on individual clust...
static Double_t a
StatusCode f_dirAbs(xAOD::CaloCluster *pClus) const
Calculator implementation for direction from absolute signal.
StatusCode f_dirRaw(xAOD::CaloCluster *pClus) const
Calculator implementation for energy only update.
StatusCode f_dirPos(xAOD::CaloCluster *pClus) const
Calculator implementation for direction from positive signal.
StatusCode(CaloClusterCellWeightCalib::* CALCULATOR)(xAOD::CaloCluster *pClus) const
Processor type for cluster calibration.
StatusCode f_dirPosNW(xAOD::CaloCluster *pClus) const
Calculator implementation for direction from positive signal.
StatusCode setupAll(MsgStream &report)
Setup for calculation for all or non-noise clusters.
Gaudi::Property< double > m_eThreshold
Energy threshold for direction calculation.
Gaudi::Property< std::string > m_directionCalculation
Property controlling negative signal handling.
StatusCode f_dirRawNW(xAOD::CaloCluster *pClus) const
Calculator implementation for energy only update.
virtual StatusCode initialize() override
Tool initialization.
StatusCode f_dirAbsNW(xAOD::CaloCluster *pClus) const
Calculator implementation for direction from absolute signal.
static constexpr std::string s_posName
Negative signal handling: positive signal tag.
Gaudi::Property< bool > m_ignoreGeoWghts
Flag to ignore geometrical cell weights in clusters.
CaloClusterCellWeightCalib(const std::string &type, const std::string &name, const IInterface *pParent)
Algorithm tool constructor.
bool setup(const std::string &name, const std::string &tag, CALCULATOR &calc, std::string &conf, MsgStream &report)
Common setup function.
static constexpr std::string s_defName
Negative signal handling: default tag.
static constexpr std::string s_absName
Negative signal handling: absolute signal tag.
Gaudi::Property< bool > m_calibNoiseLikeAll
Property controlling calibration of noise clusters.
ToolHandle< ICellWeightTool > m_cellWeight
Handle for cell weight tool.
StatusCode setupSpc(MsgStream &report)
Setup for different calculation for noise clusters.
Gaudi::Property< std::string > m_noiseDirectionCalculation
Property controlling calibration method for noise clusters.
CALCULATOR m_calc_noise
Pointer to direction calculation for noise clusters.
static bool cmpNoCase(const std::string &a, const std::string &b)
Helper for non-case sensitive string comparison.
CALCULATOR m_calc
Pointer to direction calculation implementation.
virtual StatusCode execute(const EventContext &ctx, xAOD::CaloCluster *theCluster) const override
Execute on a single cluster.
static constexpr std::string s_rawName
Negative signal handling: raw signal tag.
virtual ~CaloClusterCellWeightCalib() override
Base tool destructor.
CaloClusterProcessor(const std::string &type, const std::string &name, const IInterface *parent)
Constructor.
virtual StatusCode execute(const EventContext &ctx, xAOD::CaloCluster *cluster) const =0
Execute on a single cluster.
Principal data class for CaloCell clusters.
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.