ATLAS Offline Software
Loading...
Searching...
No Matches
CaloClusterCellWeightCalib Class Reference

Tool calculates alternative cluster calibration using an external cell weight tool with interface ICellWeightTool . More...

#include <CaloClusterCellWeightCalib.h>

Inheritance diagram for CaloClusterCellWeightCalib:
Collaboration diagram for CaloClusterCellWeightCalib:

Public Member Functions

 CaloClusterCellWeightCalib (const std::string &type, const std::string &name, const IInterface *pParent)
 Algorithm tool constructor.
virtual ~CaloClusterCellWeightCalib () override
 Base tool destructor.
virtual StatusCode initialize () override
 Tool initialization.
virtual StatusCode execute (const EventContext &ctx, xAOD::CaloCluster *theCluster) const override
 Execute on a single cluster.
virtual StatusCode execute (const EventContext &ctx, xAOD::CaloClusterContainer *collection) const
 Tool execution.
virtual StatusCode execute (xAOD::CaloClusterContainer *collection) final
 Execute on an entire collection of clusters.
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const
 DeclareInterfaceID (CaloClusterCollectionProcessor, 1, 0)

Static Public Member Functions

static const InterfaceID & interfaceID ()
 Standard Gaudi interface ID method.

Protected Types

typedef StatusCode(CaloClusterCellWeightCalib::* CALCULATOR) (xAOD::CaloCluster *pClus) const
 Processor type for cluster calibration.

Protected Member Functions

StatusCode f_dirRaw (xAOD::CaloCluster *pClus) const
 Calculator implementation for energy only update.
StatusCode f_dirRawNW (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 f_dirPosNW (xAOD::CaloCluster *pClus) const
 Calculator implementation for direction from positive signal.
StatusCode f_dirAbs (xAOD::CaloCluster *pClus) const
 Calculator implementation for direction from absolute signal.
StatusCode f_dirAbsNW (xAOD::CaloCluster *pClus) const
 Calculator implementation for direction from absolute signal.
StatusCode setupAll (MsgStream &report)
 Setup for calculation for all or non-noise clusters.
StatusCode setupSpc (MsgStream &report)
 Setup for different calculation for noise clusters.
bool setup (const std::string &name, const std::string &tag, CALCULATOR &calc, std::string &conf, MsgStream &report)
 Common setup function.
void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Static Protected Member Functions

static bool cmpNoCase (const std::string &a, const std::string &b)
 Helper for non-case sensitive string comparison.

Protected Attributes

Gaudi::Property< std::string > m_directionCalculation {this, "Direction", s_defName}
 Property controlling negative signal handling.
Gaudi::Property< bool > m_calibNoiseLikeAll {this, "BelowThresholdLikeAll", true}
 Property controlling calibration of noise clusters.
Gaudi::Property< std::string > m_noiseDirectionCalculation {this, "BelowThresholdDirection", s_defName}
 Property controlling calibration method for noise clusters.
Gaudi::Property< double > m_eThreshold {this, "EnergyThreshold", 0.}
 Energy threshold for direction calculation.
Gaudi::Property< bool > m_ignoreGeoWghts {this, "IgnoreGeoWeights", false}
 Flag to ignore geometrical cell weights in clusters.
ToolHandle< ICellWeightToolm_cellWeight {this, "CellSignalWeightTool", {}}
 Handle for cell weight tool.
CALCULATOR m_calc {nullptr}
 Pointer to direction calculation implementation.
CALCULATOR m_calc_noise {nullptr}
 Pointer to direction calculation for noise clusters.

Static Protected Attributes

static constexpr std::string s_posName = "Signal"
 Negative signal handling: positive signal tag.
static constexpr std::string s_absName = "AbsSignal"
 Negative signal handling: absolute signal tag.
static constexpr std::string s_rawName = "RawSignal"
 Negative signal handling: raw signal tag.
static constexpr std::string s_defName = s_absName
 Negative signal handling: default tag.

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default)
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Tool calculates alternative cluster calibration using an external cell weight tool with interface ICellWeightTool .

It only modifies the cluster 4-vector from alternative calibration, i.e. it switches the CaloCluster to signal state P4SignalState::ALTCALIBRATED and puts the result of the cell weight calibration into this state. Previously set alternative calibrations are overwritten, but the basic (P4SignalState::UNCALIBRATED ) and (local hadronic) calibrated (P4SignalState::CALIBRATED ) are not changed. The cluster is returned to the signal state it has been received in. Even though with this behaviour the tool could run at any time in the cluster algorithm, it should run right after the cluster formation, i.e. it should be the first calibration/correction tool, as it is using the geometrical weights, which are lost in local hadronic calibration. Note that the tool can be configured to ignore these weights, but this can lead to unexpected signal calibrations.

Definition at line 16 of file CaloClusterCellWeightCalib.h.

Member Typedef Documentation

◆ CALCULATOR

typedef StatusCode(CaloClusterCellWeightCalib::* CaloClusterCellWeightCalib::CALCULATOR) (xAOD::CaloCluster *pClus) const
protected

Processor type for cluster calibration.

Processor implementation for all clusters

Processor implementation for dedicated noise cluster treatment

Pointer to cluster processor

Calculator type for direction calculation

Definition at line 115 of file CaloClusterCellWeightCalib.h.

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ CaloClusterCellWeightCalib()

CaloClusterCellWeightCalib::CaloClusterCellWeightCalib ( const std::string & type,
const std::string & name,
const IInterface * pParent )

Algorithm tool constructor.

Definition at line 25 of file CaloClusterCellWeightCalib.cxx.

29 : CaloClusterProcessor(type,name,pParent)
30{
31}
CaloClusterProcessor(const std::string &type, const std::string &name, const IInterface *parent)
Constructor.

◆ ~CaloClusterCellWeightCalib()

CaloClusterCellWeightCalib::~CaloClusterCellWeightCalib ( )
overridevirtualdefault

Base tool destructor.

Member Function Documentation

◆ cmpNoCase()

bool CaloClusterCellWeightCalib::cmpNoCase ( const std::string & a,
const std::string & b )
staticprotected

Helper for non-case sensitive string comparison.

Definition at line 210 of file CaloClusterCellWeightCalib.cxx.

212{
213 // same length required
214 if ( a.length() != b.length() ) return false;
215 // adapted from Stroustrup, The C++ Programming Language, Special
216 // Edition, (2001 printing), p 591.
217 std::string::const_iterator p1(a.begin());
218 std::string::const_iterator p2(b.begin());
219 while ( p1 != a.end() && p2 != b.end() )
220 {
221 if ( std::toupper(*p1) != std::toupper(*p2) ) return false;
222 ++p1;
223 ++p2;
224 }
225 return true;
226}
static Double_t a

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ DeclareInterfaceID()

CaloClusterCollectionProcessor::DeclareInterfaceID ( CaloClusterCollectionProcessor ,
1 ,
0  )
inherited

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ execute() [1/3]

StatusCode CaloClusterCellWeightCalib::execute ( const EventContext & ctx,
xAOD::CaloCluster * cluster ) const
overridevirtual

Execute on a single cluster.

Parameters
clusterThe cluster to process.
ctxThe event context.

Implements CaloClusterProcessor.

Definition at line 75 of file CaloClusterCellWeightCalib.cxx.

77{
78
79 // retrieve raw cluster signals
80 double clusterE(pClus->rawE());
81 double clusterEta(pClus->rawEta());
82 double clusterPhi(pClus->rawPhi());
83
84 // report << MSG::INFO << "<UNCALIBRATED> cluster kinematics ("
85 // << pClus->e() << ","
86 // << pClus->eta() << ","
87 // << pClus->phi() << ")" << endmsg;
88
89 CaloClusterChangeSignalState chss(pClus,xAOD::CaloCluster::ALTCALIBRATED);
90
91 pClus->setE(clusterE);
92 pClus->setEta(clusterEta);
93 pClus->setPhi(clusterPhi);
94
95 // report << MSG::INFO << "<ALTCALIBRATED> cluster kinematics, initial ("
96 // << pClus->e() << "/" << clusterE << ","
97 // << pClus->eta() << "/" << clusterEta << ","
98 // << pClus->phi() << "/" << clusterPhi << ")" << endmsg;
99
100 // calculate new 4-vector
101 StatusCode checkOut(StatusCode::SUCCESS);
102 if ( m_calibNoiseLikeAll )
103 {
104 checkOut = (this->*m_calc)(pClus);
105 }
106 else
107 {
108 checkOut = pClus->e() > 0.
109 ? (this->*m_calc)(pClus) : (this->*m_calc_noise)(pClus);
110 }
111
112 // report << MSG::INFO << "<ALTCALIBRATED> cluster kinematics, final ("
113 // << pClus->e() << ","
114 // << pClus->eta() << ","
115 // << pClus->phi() << ")" << endmsg;
116
117 // check result
118 if ( checkOut.isFailure() )
119 {
120 msg(MSG::WARNING)
121 << "problem in calculation of cell weighted signal state"
122 << endmsg;
123 return StatusCode::SUCCESS;
124 }
125 else
126 {
127 // change reco status
128 pClus->recoStatus().setStatus(CaloRecoStatus::CALIBRATEDALT);
129 return checkOut;
130 }
131}
#define endmsg
Gaudi::Property< bool > m_calibNoiseLikeAll
Property controlling calibration of noise clusters.
CALCULATOR m_calc_noise
Pointer to direction calculation for noise clusters.
CALCULATOR m_calc
Pointer to direction calculation implementation.
::StatusCode StatusCode
StatusCode definition for legacy code.
MsgStream & msg
Definition testRead.cxx:32

◆ execute() [2/3]

StatusCode CaloClusterProcessor::execute ( const EventContext & ctx,
xAOD::CaloClusterContainer * collection ) const
virtual

Tool execution.

Reimplemented from CaloClusterProcessor.

Definition at line 65 of file CaloClusterProcessor.cxx.

47{
48 for (xAOD::CaloCluster* clu : *collection) {
49 ATH_CHECK( execute (ctx, clu) );
50 }
51 return StatusCode::SUCCESS;
52}
#define ATH_CHECK
Evaluate an expression and check for errors.
virtual StatusCode execute(const EventContext &ctx, xAOD::CaloCluster *theCluster) const override
Execute on a single cluster.
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.

◆ execute() [3/3]

virtual StatusCode CaloClusterCollectionProcessor::execute ( xAOD::CaloClusterContainer * collection)
inlinefinalvirtualinherited

Execute on an entire collection of clusters.

Parameters
collectionThe container of clusters. (deprecated)

Reimplemented from CaloClusterCollectionProcessor.

Definition at line 50 of file CaloClusterCollectionProcessor.h.

51 {
52 return execute (Gaudi::Hive::currentContext(), collection);
53 }
virtual StatusCode execute(const EventContext &ctx, xAOD::CaloCluster *cluster) const =0
Execute on a single cluster.

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ f_dirAbs()

StatusCode CaloClusterCellWeightCalib::f_dirAbs ( xAOD::CaloCluster * pClus) const
protected

Calculator implementation for direction from absolute signal.

The absolute signal is used to re-calculate the cluster direction. This is stable for all clusters but changes the direction with respect to the fixed scenario somewhat.

Definition at line 342 of file CaloClusterCellWeightCalib.cxx.

343{
344 // loop cells in clusters
345 double eCal(0.);
346 double eRef(0.);
347 double etaRef(0.);
348 double phiRef(0.);
351 for ( ; fCell != lCell; fCell++ )
352 {
353 const CaloCell* cell = *fCell;
354 //
355 double eWght(fCell.weight() *
356 cell->e() *
357 m_cellWeight->wtCell(cell));
358 double phiCell(proxim(cell->phi(),phiRef));
359 //
360 eCal += eWght;
361 eWght = fabs(eWght);
362 etaRef += cell->eta() * eWght;
363 phiRef = CaloPhiRange::fix((phiCell * eWght + eRef * phiRef)/(eRef+eWght));
364 eRef += eWght;
365 }
366 // set cluster kinematics
367 pClus->setE(eCal);
368 if ( eRef > 0. )
369 {
370 pClus->setEta(etaRef/eRef);
371 pClus->setPhi(phiRef);
372 }
373 //
374 return StatusCode::SUCCESS;
375}
ToolHandle< ICellWeightTool > m_cellWeight
Handle for cell weight tool.
static double fix(double phi)
bool setPhi(const CaloSample sampling, const float phi)
Set in a given sampling. Returns false if the sample isn't part of the cluster.
CaloClusterCellLink::iterator cell_iterator
Iterator of the underlying CaloClusterCellLink (non-const version)
const_cell_iterator cell_end() const
bool setEta(const CaloSample sampling, const float eta)
Set in a given sampling. Returns false if the sample isn't part of the cluster.
const_cell_iterator cell_begin() const
Iterator of the underlying CaloClusterCellLink (const version)
double proxim(double b, double a)
Definition proxim.h:17

◆ f_dirAbsNW()

StatusCode CaloClusterCellWeightCalib::f_dirAbsNW ( xAOD::CaloCluster * pClus) const
protected

Calculator implementation for direction from absolute signal.

The absolute signal is used to re-calculate the cluster direction. This is stable for all clusters but changes the direction with respect to the fixed scenario somewhat. Geometrical weights are ignored.

Definition at line 377 of file CaloClusterCellWeightCalib.cxx.

378{
379 // loop cells in clusters
380 double eCal(0.);
381 double eRef(0.);
382 double etaRef(0.);
383 double phiRef(0.);
384 for (const CaloCell* cell : *pClus)
385 {
386 //
387 double eWght(cell->e() * m_cellWeight->wtCell(cell));
388 double phiCell(proxim(cell->phi(),phiRef));
389 //
390 eCal += eWght;
391 eWght = fabs(eWght);
392 etaRef += cell->eta() * eWght;
393 phiRef = CaloPhiRange::fix((phiCell * eWght + eRef * phiRef)/(eRef+eWght));
394 eRef += eWght;
395 }
396 // set cluster kinematics
397 pClus->setE(eCal);
398 if ( eRef > 0. )
399 {
400 pClus->setEta(etaRef/eRef);
401 pClus->setPhi(phiRef);
402 }
403 //
404 return StatusCode::SUCCESS;
405}

◆ f_dirPos()

StatusCode CaloClusterCellWeightCalib::f_dirPos ( xAOD::CaloCluster * pClus) const
protected

Calculator implementation for direction from positive signal.

Direction is calculated using E>0 cell signals only. This may be highly fluctuating for noise clusters.

Definition at line 272 of file CaloClusterCellWeightCalib.cxx.

273{
274 // loop cells in clusters
275 double eCal(0.);
276 double eRef(0.);
277 double etaRef(0.);
278 double phiRef(0.);
281 for ( ; fCell != lCell; fCell++ )
282 {
283 const CaloCell* cell = *fCell;
284 //
285 double eWght(fCell.weight() *
286 cell->e() *
287 m_cellWeight->wtCell(cell));
288 eCal += eWght;
289 //
290 if ( eWght > m_eThreshold )
291 {
292 double phiCell(proxim(cell->phi(),phiRef));
293 etaRef += cell->eta() * eWght;
294 phiRef = CaloPhiRange::fix((phiCell * eWght + eRef * phiRef)/(eRef+eWght));
295 eRef += eWght;
296 }
297 }
298 // set cluster kinematics
299 pClus->setE(eCal);
300 if ( eRef > 0. )
301 {
302 pClus->setEta(etaRef/eRef);
303 pClus->setPhi(phiRef);
304 }
305 //
306 return StatusCode::SUCCESS;
307}
Gaudi::Property< double > m_eThreshold
Energy threshold for direction calculation.

◆ f_dirPosNW()

StatusCode CaloClusterCellWeightCalib::f_dirPosNW ( xAOD::CaloCluster * pClus) const
protected

Calculator implementation for direction from positive signal.

Direction is calculated using E>0 cell signals only. This may be highly fluctuating for noise clusters. Geometrical weights are ignored.

Definition at line 309 of file CaloClusterCellWeightCalib.cxx.

310{
311 // loop cells in clusters
312 double eCal(0.);
313 double eRef(0.);
314 double etaRef(0.);
315 double phiRef(0.);
316 for (const CaloCell* cell : *pClus)
317 {
318 //
319 double eWght(cell->e() *
320 m_cellWeight->wtCell(cell));
321 eCal += eWght;
322 //
323 if ( eWght > m_eThreshold )
324 {
325 double phiCell(proxim(cell->phi(),phiRef));
326 etaRef += cell->eta() * eWght;
327 phiRef = CaloPhiRange::fix((phiCell * eWght + eRef * phiRef)/(eRef+eWght));
328 eRef += eWght;
329 }
330 }
331 // set cluster kinematics
332 pClus->setE(eCal);
333 if ( eRef > 0. )
334 {
335 pClus->setEta(etaRef/eRef);
336 pClus->setPhi(phiRef);
337 }
338 //
339 return StatusCode::SUCCESS;
340}

◆ f_dirRaw()

StatusCode CaloClusterCellWeightCalib::f_dirRaw ( xAOD::CaloCluster * pClus) const
protected

Calculator implementation for energy only update.

Direction is taken from electromagnetic scale. This is safe for all clusters.

Definition at line 233 of file CaloClusterCellWeightCalib.cxx.

234{
235 // loop cells in clusters
236 double eCal(0.);
239 for ( ; fCell != lCell; fCell++ )
240 {
241 const CaloCell* cell = *fCell;
242 //
243 eCal +=
244 fCell.weight() *
245 cell->e() *
246 m_cellWeight->wtCell(cell);
247 }
248 // set cluster kinematics (cluster is in ALTCALIBRATED state
249 pClus->setE(eCal);
250 //
251 return StatusCode::SUCCESS;
252}

◆ f_dirRawNW()

StatusCode CaloClusterCellWeightCalib::f_dirRawNW ( xAOD::CaloCluster * pClus) const
protected

Calculator implementation for energy only update.

Direction is taken from electromagnetic scale. This is safe for all clusters. The energy calculation ignores geometrical weights.

Definition at line 254 of file CaloClusterCellWeightCalib.cxx.

255{
256 // loop cells in clusters
257 double eCal(0.);
258 for (const CaloCell* cell : *pClus)
259 {
260 //
261 eCal +=
262 cell->e() *
263 m_cellWeight->wtCell(cell);
264 }
265 // set cluster kinematics (cluster is in ALTCALIBRATED state
266 pClus->setE(eCal);
267 //
268 return StatusCode::SUCCESS;
269}

◆ initialize()

StatusCode CaloClusterCellWeightCalib::initialize ( )
overridevirtual

Tool initialization.

Definition at line 40 of file CaloClusterCellWeightCalib.cxx.

41{
42 MsgStream report(msgSvc(),name());
43
44 // configure direction calculations
46 ? this->setupAll(report) // all clusters the same
47 : this->setupSpc(report); // dedicated noise cluster treatment
48 if ( checkOut.isFailure() )
49 {
50 report << MSG::ERROR
51 << "failed to configure direction calculations."
52 << endmsg;
53 return StatusCode::FAILURE;
54 }
55
56 // retrieve tool
57 if ( m_cellWeight.empty() || (m_cellWeight.retrieve()).isFailure() )
58 {
59 report << MSG::ERROR
60 << "*** configuration insufficient *** "
61 << "no hadronic cell calibration tool configured"
62 << endmsg;
63 return StatusCode::FAILURE;
64 }
65
66 //
67 return StatusCode::SUCCESS;
68}
StatusCode setupAll(MsgStream &report)
Setup for calculation for all or non-noise clusters.
StatusCode setupSpc(MsgStream &report)
Setup for different calculation for noise clusters.
list report
Definition checkTP.py:125

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ interfaceID()

const InterfaceID & CaloClusterProcessor::interfaceID ( )
inlinestaticinherited

Standard Gaudi interface ID method.

Definition at line 72 of file CaloClusterProcessor.h.

static const InterfaceID IID_CaloClusterProcessor("CaloClusterProcessor", 1, 0)

◆ msg()

MsgStream & AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ setup()

bool CaloClusterCellWeightCalib::setup ( const std::string & name,
const std::string & tag,
CALCULATOR & calc,
std::string & conf,
MsgStream & report )
protected

Common setup function.

Definition at line 156 of file CaloClusterCellWeightCalib.cxx.

161{
163 {
164 report << MSG::INFO
165 << "cluster direction ("
166 << tag
167 << ") from positive cells only"
168 << endmsg;
169 conf = name;
173 return true;
174 }
176 {
177 report << MSG::INFO
178 << "cluster direction ("
179 << tag
180 << ") from absolute cell signals"
181 << endmsg;
182 conf = name;
186 return true;
187 }
189 {
190 report << MSG::INFO
191 << "cluster direction ("
192 << tag
193 << ") from raw signals (unchanged by this tool)"
194 << endmsg;
195 conf = name;
199 return true;
200 }
201 else
202 {
203 report << MSG::WARNING
204 << "invalid configuration, use default!"
205 << endmsg;
206 return this->setup(s_defName,tag,calc,conf,report);
207 }
208}
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 f_dirPosNW(xAOD::CaloCluster *pClus) const
Calculator implementation for direction from positive signal.
StatusCode f_dirRawNW(xAOD::CaloCluster *pClus) const
Calculator implementation for energy only update.
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.
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.
static bool cmpNoCase(const std::string &a, const std::string &b)
Helper for non-case sensitive string comparison.
static constexpr std::string s_rawName
Negative signal handling: raw signal tag.

◆ setupAll()

StatusCode CaloClusterCellWeightCalib::setupAll ( MsgStream & report)
protected

Setup for calculation for all or non-noise clusters.

Definition at line 137 of file CaloClusterCellWeightCalib.cxx.

138{
139 std::string conf;
140 std::string tag("all");
141 return this->setup(m_directionCalculation,tag,m_calc,conf,report)
142 ? StatusCode::SUCCESS : StatusCode::FAILURE;
143}
Gaudi::Property< std::string > m_directionCalculation
Property controlling negative signal handling.

◆ setupSpc()

StatusCode CaloClusterCellWeightCalib::setupSpc ( MsgStream & report)
protected

Setup for different calculation for noise clusters.

Definition at line 145 of file CaloClusterCellWeightCalib.cxx.

146{
147 std::string conf;
148 std::string aboveTag("above threshold");
149 std::string belowTag("below threshold");
150 return
151 this->setup(m_directionCalculation,aboveTag,m_calc,conf,report) &&
152 this->setup(m_noiseDirectionCalculation,belowTag,m_calc_noise,conf,report)
153 ? StatusCode::SUCCESS : StatusCode::FAILURE;
154}
Gaudi::Property< std::string > m_noiseDirectionCalculation
Property controlling calibration method for noise clusters.

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in asg::AsgMetadataTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and DerivationFramework::CfAthAlgTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka

Member Data Documentation

◆ m_calc

CALCULATOR CaloClusterCellWeightCalib::m_calc {nullptr}
protected

Pointer to direction calculation implementation.

Definition at line 160 of file CaloClusterCellWeightCalib.h.

160{nullptr};

◆ m_calc_noise

CALCULATOR CaloClusterCellWeightCalib::m_calc_noise {nullptr}
protected

Pointer to direction calculation for noise clusters.

Definition at line 163 of file CaloClusterCellWeightCalib.h.

163{nullptr};

◆ m_calibNoiseLikeAll

Gaudi::Property<bool> CaloClusterCellWeightCalib::m_calibNoiseLikeAll {this, "BelowThresholdLikeAll", true}
protected

Property controlling calibration of noise clusters.

Flags calibration of noise (E<0) clusters:

Parameters
true(default) means noise clusters are treated as all others
falsemeans noise clusters are not calibrated at all

Definition at line 69 of file CaloClusterCellWeightCalib.h.

69{this, "BelowThresholdLikeAll", true};

◆ m_cellWeight

ToolHandle<ICellWeightTool> CaloClusterCellWeightCalib::m_cellWeight {this, "CellSignalWeightTool", {}}
protected

Handle for cell weight tool.

Definition at line 98 of file CaloClusterCellWeightCalib.h.

98{this, "CellSignalWeightTool", {}};

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_directionCalculation

Gaudi::Property<std::string> CaloClusterCellWeightCalib::m_directionCalculation {this, "Direction", s_defName}
protected

Property controlling negative signal handling.

Negative cell signals are problematic for the direction calculation from cells:

Parameters
Signaluse only E>0 cells for direction
AbsSignal(default) use w*|E| for direction
RawSignaldo not recalculate direction at all

The property is not case sensitive. The default is AbsSignal, i.e. following a strategy very similar to the direction calculation performed during cluster formation.

Definition at line 60 of file CaloClusterCellWeightCalib.h.

60{this, "Direction", s_defName};

◆ m_eThreshold

Gaudi::Property<double> CaloClusterCellWeightCalib::m_eThreshold {this, "EnergyThreshold", 0.}
protected

Energy threshold for direction calculation.

Definition at line 83 of file CaloClusterCellWeightCalib.h.

83{this, "EnergyThreshold", 0.};

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_ignoreGeoWghts

Gaudi::Property<bool> CaloClusterCellWeightCalib::m_ignoreGeoWghts {this, "IgnoreGeoWeights", false}
protected

Flag to ignore geometrical cell weights in clusters.

This flags controls the use of geometrical cell weights in clusters:

Parameters
false(default) geometrical weights are used
truegeometrical weights are ignored

Note that using the geometrical weights requires this tool to run before the Local Hadronic calibration tools.

Definition at line 95 of file CaloClusterCellWeightCalib.h.

95{this, "IgnoreGeoWeights", false};

◆ m_noiseDirectionCalculation

Gaudi::Property<std::string> CaloClusterCellWeightCalib::m_noiseDirectionCalculation {this, "BelowThresholdDirection", s_defName}
protected

Property controlling calibration method for noise clusters.

Tags calibration method for noise (E<0) clusters. Only effective if these clusters are calibrated at all, i.e. m_calibNoise is true :

Parameters
true(default) uses same direction correction as all other clusters
falseuses AbsSignal calibration for noise clusters.

Definition at line 80 of file CaloClusterCellWeightCalib.h.

80{this, "BelowThresholdDirection", s_defName};

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.

◆ s_absName

std::string CaloClusterCellWeightCalib::s_absName = "AbsSignal"
staticconstexprprotected

Negative signal handling: absolute signal tag.

Definition at line 40 of file CaloClusterCellWeightCalib.h.

◆ s_defName

std::string CaloClusterCellWeightCalib::s_defName = s_absName
staticconstexprprotected

Negative signal handling: default tag.

Definition at line 44 of file CaloClusterCellWeightCalib.h.

◆ s_posName

std::string CaloClusterCellWeightCalib::s_posName = "Signal"
staticconstexprprotected

Negative signal handling: positive signal tag.

Definition at line 38 of file CaloClusterCellWeightCalib.h.

◆ s_rawName

std::string CaloClusterCellWeightCalib::s_rawName = "RawSignal"
staticconstexprprotected

Negative signal handling: raw signal tag.

Definition at line 42 of file CaloClusterCellWeightCalib.h.


The documentation for this class was generated from the following files: