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

std::string m_directionCalculation
 Property controlling negative signal handling.
bool m_calibNoiseLikeAll
 Property controlling calibration of noise clusters.
std::string m_noiseDirectionCalculation
 Property controlling calibration method for noise clusters.
double m_eThreshold
 Energy threshold for direction calculation.
bool m_ignoreGeoWghts
 Flag to ignore geometrical cell weights in clusters.
ToolHandle< ICellWeightToolm_cellWeight
 Handle for cell weight tool.
CALCULATOR m_calc
 Pointer to direction calculation implementation.
CALCULATOR m_calc_noise
 Pointer to direction calculation for noise clusters.

Static Protected Attributes

static const std::string m_defName = m_absName
 Negative signal handling: default tag.
static const std::string m_posName = "Signal"
 Negative signal handling: positive signal tag.
static const std::string m_absName = "AbsSignal"
 Negative signal handling: absolute signal tag.
static const std::string m_rawName = "RawSignal"
 Negative signal handling: raw signal 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 116 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 31 of file CaloClusterCellWeightCalib.cxx.

35 : CaloClusterProcessor(type,name,pParent)
39 , m_eThreshold(0.)
40 , m_ignoreGeoWghts(false)
41 , m_cellWeight(this)
42 , m_calc(nullptr)
43 , m_calc_noise(nullptr)
44{
46 declareProperty("BelowThresholdLikeAll", m_calibNoiseLikeAll);
47 declareProperty("BelowThresholdDirection", m_noiseDirectionCalculation);
48 declareProperty("EnergyThreshold", m_eThreshold);
49 declareProperty("IgnoreGeoWeights", m_ignoreGeoWghts);
50 declareProperty("CellSignalWeightTool", m_cellWeight);
51}
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
bool m_ignoreGeoWghts
Flag to ignore geometrical cell weights in clusters.
static const std::string m_defName
Negative signal handling: default tag.
ToolHandle< ICellWeightTool > m_cellWeight
Handle for cell weight tool.
double m_eThreshold
Energy threshold for direction calculation.
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.
std::string m_noiseDirectionCalculation
Property controlling calibration method for noise clusters.
std::string m_directionCalculation
Property controlling negative signal handling.
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 230 of file CaloClusterCellWeightCalib.cxx.

232{
233 // same length required
234 if ( a.length() != b.length() ) return false;
235 // adapted from Stroustrup, The C++ Programming Language, Special
236 // Edition, (2001 printing), p 591.
237 std::string::const_iterator p1(a.begin());
238 std::string::const_iterator p2(b.begin());
239 while ( p1 != a.end() && p2 != b.end() )
240 {
241 if ( std::toupper(*p1) != std::toupper(*p2) ) return false;
242 ++p1;
243 ++p2;
244 }
245 return true;
246}
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 }

◆ 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 95 of file CaloClusterCellWeightCalib.cxx.

97{
98
99 // retrieve raw cluster signals
100 double clusterE(pClus->rawE());
101 double clusterEta(pClus->rawEta());
102 double clusterPhi(pClus->rawPhi());
103
104 // report << MSG::INFO << "<UNCALIBRATED> cluster kinematics ("
105 // << pClus->e() << ","
106 // << pClus->eta() << ","
107 // << pClus->phi() << ")" << endmsg;
108
109 CaloClusterChangeSignalState chss(pClus,xAOD::CaloCluster::ALTCALIBRATED);
110
111 pClus->setE(clusterE);
112 pClus->setEta(clusterEta);
113 pClus->setPhi(clusterPhi);
114
115 // report << MSG::INFO << "<ALTCALIBRATED> cluster kinematics, initial ("
116 // << pClus->e() << "/" << clusterE << ","
117 // << pClus->eta() << "/" << clusterEta << ","
118 // << pClus->phi() << "/" << clusterPhi << ")" << endmsg;
119
120 // calculate new 4-vector
121 StatusCode checkOut(StatusCode::SUCCESS);
122 if ( m_calibNoiseLikeAll )
123 {
124 checkOut = (this->*m_calc)(pClus);
125 }
126 else
127 {
128 checkOut = pClus->e() > 0.
129 ? (this->*m_calc)(pClus) : (this->*m_calc_noise)(pClus);
130 }
131
132 // report << MSG::INFO << "<ALTCALIBRATED> cluster kinematics, final ("
133 // << pClus->e() << ","
134 // << pClus->eta() << ","
135 // << pClus->phi() << ")" << endmsg;
136
137 // check result
138 if ( checkOut.isFailure() )
139 {
140 msg(MSG::WARNING)
141 << "problem in calculation of cell weighted signal state"
142 << endmsg;
143 return StatusCode::SUCCESS;
144 }
145 else
146 {
147 // change reco status
148 pClus->recoStatus().setStatus(CaloRecoStatus::CALIBRATEDALT);
149 return checkOut;
150 }
151}
#define endmsg
::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 362 of file CaloClusterCellWeightCalib.cxx.

363{
364 // loop cells in clusters
365 double eCal(0.);
366 double eRef(0.);
367 double etaRef(0.);
368 double phiRef(0.);
371 for ( ; fCell != lCell; fCell++ )
372 {
373 const CaloCell* cell = *fCell;
374 //
375 double eWght(fCell.weight() *
376 cell->e() *
377 m_cellWeight->wtCell(cell));
378 double phiCell(proxim(cell->phi(),phiRef));
379 //
380 eCal += eWght;
381 eWght = fabs(eWght);
382 etaRef += cell->eta() * eWght;
383 phiRef = CaloPhiRange::fix((phiCell * eWght + eRef * phiRef)/(eRef+eWght));
384 eRef += eWght;
385 }
386 // set cluster kinematics
387 pClus->setE(eCal);
388 if ( eRef > 0. )
389 {
390 pClus->setEta(etaRef/eRef);
391 pClus->setPhi(phiRef);
392 }
393 //
394 return StatusCode::SUCCESS;
395}
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 397 of file CaloClusterCellWeightCalib.cxx.

398{
399 // loop cells in clusters
400 double eCal(0.);
401 double eRef(0.);
402 double etaRef(0.);
403 double phiRef(0.);
404 for (const CaloCell* cell : *pClus)
405 {
406 //
407 double eWght(cell->e() * m_cellWeight->wtCell(cell));
408 double phiCell(proxim(cell->phi(),phiRef));
409 //
410 eCal += eWght;
411 eWght = fabs(eWght);
412 etaRef += cell->eta() * eWght;
413 phiRef = CaloPhiRange::fix((phiCell * eWght + eRef * phiRef)/(eRef+eWght));
414 eRef += eWght;
415 }
416 // set cluster kinematics
417 pClus->setE(eCal);
418 if ( eRef > 0. )
419 {
420 pClus->setEta(etaRef/eRef);
421 pClus->setPhi(phiRef);
422 }
423 //
424 return StatusCode::SUCCESS;
425}

◆ 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 292 of file CaloClusterCellWeightCalib.cxx.

293{
294 // loop cells in clusters
295 double eCal(0.);
296 double eRef(0.);
297 double etaRef(0.);
298 double phiRef(0.);
301 for ( ; fCell != lCell; fCell++ )
302 {
303 const CaloCell* cell = *fCell;
304 //
305 double eWght(fCell.weight() *
306 cell->e() *
307 m_cellWeight->wtCell(cell));
308 eCal += eWght;
309 //
310 if ( eWght > m_eThreshold )
311 {
312 double phiCell(proxim(cell->phi(),phiRef));
313 etaRef += cell->eta() * eWght;
314 phiRef = CaloPhiRange::fix((phiCell * eWght + eRef * phiRef)/(eRef+eWght));
315 eRef += eWght;
316 }
317 }
318 // set cluster kinematics
319 pClus->setE(eCal);
320 if ( eRef > 0. )
321 {
322 pClus->setEta(etaRef/eRef);
323 pClus->setPhi(phiRef);
324 }
325 //
326 return StatusCode::SUCCESS;
327}

◆ 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 329 of file CaloClusterCellWeightCalib.cxx.

330{
331 // loop cells in clusters
332 double eCal(0.);
333 double eRef(0.);
334 double etaRef(0.);
335 double phiRef(0.);
336 for (const CaloCell* cell : *pClus)
337 {
338 //
339 double eWght(cell->e() *
340 m_cellWeight->wtCell(cell));
341 eCal += eWght;
342 //
343 if ( eWght > m_eThreshold )
344 {
345 double phiCell(proxim(cell->phi(),phiRef));
346 etaRef += cell->eta() * eWght;
347 phiRef = CaloPhiRange::fix((phiCell * eWght + eRef * phiRef)/(eRef+eWght));
348 eRef += eWght;
349 }
350 }
351 // set cluster kinematics
352 pClus->setE(eCal);
353 if ( eRef > 0. )
354 {
355 pClus->setEta(etaRef/eRef);
356 pClus->setPhi(phiRef);
357 }
358 //
359 return StatusCode::SUCCESS;
360}

◆ 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 253 of file CaloClusterCellWeightCalib.cxx.

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

◆ 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 274 of file CaloClusterCellWeightCalib.cxx.

275{
276 // loop cells in clusters
277 double eCal(0.);
278 for (const CaloCell* cell : *pClus)
279 {
280 //
281 eCal +=
282 cell->e() *
283 m_cellWeight->wtCell(cell);
284 }
285 // set cluster kinematics (cluster is in ALTCALIBRATED state
286 pClus->setE(eCal);
287 //
288 return StatusCode::SUCCESS;
289}

◆ initialize()

StatusCode CaloClusterCellWeightCalib::initialize ( )
overridevirtual

Tool initialization.

Definition at line 60 of file CaloClusterCellWeightCalib.cxx.

61{
62 MsgStream report(msgSvc(),name());
63
64 // configure direction calculations
66 ? this->setupAll(report) // all clusters the same
67 : this->setupSpc(report); // dedicated noise cluster treatment
68 if ( checkOut.isFailure() )
69 {
70 report << MSG::ERROR
71 << "failed to configure direction calculations."
72 << endmsg;
73 return StatusCode::FAILURE;
74 }
75
76 // retrieve tool
77 if ( m_cellWeight.empty() || (m_cellWeight.retrieve()).isFailure() )
78 {
79 report << MSG::ERROR
80 << "*** configuration insufficient *** "
81 << "no hadronic cell calibration tool configured"
82 << endmsg;
83 return StatusCode::FAILURE;
84 }
85
86 //
87 return StatusCode::SUCCESS;
88}
if(febId1==febId2)
StatusCode setupAll(MsgStream &report)
Setup for calculation for all or non-noise clusters.
StatusCode setupSpc(MsgStream &report)
Setup for different calculation for noise clusters.
msgSvc
Provide convenience handles for various services.
Definition StdJOSetup.py:36
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 176 of file CaloClusterCellWeightCalib.cxx.

181{
183 {
184 report << MSG::INFO
185 << "cluster direction ("
186 << tag
187 << ") from positive cells only"
188 << endmsg;
189 conf = name;
193 return true;
194 }
196 {
197 report << MSG::INFO
198 << "cluster direction ("
199 << tag
200 << ") from absolute cell signals"
201 << endmsg;
202 conf = name;
206 return true;
207 }
209 {
210 report << MSG::INFO
211 << "cluster direction ("
212 << tag
213 << ") from raw signals (unchanged by this tool)"
214 << endmsg;
215 conf = name;
219 return true;
220 }
221 else
222 {
223 report << MSG::WARNING
224 << "invalid configuration, use default!"
225 << endmsg;
226 return this->setup(m_defName,tag,calc,conf,report);
227 }
228}
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 const std::string m_posName
Negative signal handling: positive signal tag.
bool setup(const std::string &name, const std::string &tag, CALCULATOR &calc, std::string &conf, MsgStream &report)
Common setup function.
static const std::string m_rawName
Negative signal handling: raw signal tag.
static bool cmpNoCase(const std::string &a, const std::string &b)
Helper for non-case sensitive string comparison.
static const std::string m_absName
Negative signal handling: absolute signal tag.

◆ setupAll()

StatusCode CaloClusterCellWeightCalib::setupAll ( MsgStream & report)
protected

Setup for calculation for all or non-noise clusters.

Definition at line 157 of file CaloClusterCellWeightCalib.cxx.

158{
159 std::string conf;
160 std::string tag("all");
161 return this->setup(m_directionCalculation,tag,m_calc,conf,report)
162 ? StatusCode::SUCCESS : StatusCode::FAILURE;
163}

◆ setupSpc()

StatusCode CaloClusterCellWeightCalib::setupSpc ( MsgStream & report)
protected

Setup for different calculation for noise clusters.

Definition at line 165 of file CaloClusterCellWeightCalib.cxx.

166{
167 std::string conf;
168 std::string aboveTag("above threshold");
169 std::string belowTag("below threshold");
170 return
171 this->setup(m_directionCalculation,aboveTag,m_calc,conf,report) &&
172 this->setup(m_noiseDirectionCalculation,belowTag,m_calc_noise,conf,report)
173 ? StatusCode::SUCCESS : StatusCode::FAILURE;
174}

◆ 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_absName

std::string const CaloClusterCellWeightCalib::m_absName = "AbsSignal"
staticprotected

Negative signal handling: absolute signal tag.

Definition at line 96 of file CaloClusterCellWeightCalib.h.

◆ m_calc

CALCULATOR CaloClusterCellWeightCalib::m_calc
protected

Pointer to direction calculation implementation.

Definition at line 161 of file CaloClusterCellWeightCalib.h.

◆ m_calc_noise

CALCULATOR CaloClusterCellWeightCalib::m_calc_noise
protected

Pointer to direction calculation for noise clusters.

Definition at line 164 of file CaloClusterCellWeightCalib.h.

◆ m_calibNoiseLikeAll

bool CaloClusterCellWeightCalib::m_calibNoiseLikeAll
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 58 of file CaloClusterCellWeightCalib.h.

◆ m_cellWeight

ToolHandle<ICellWeightTool> CaloClusterCellWeightCalib::m_cellWeight
protected

Handle for cell weight tool.

Definition at line 87 of file CaloClusterCellWeightCalib.h.

◆ m_defName

std::string const CaloClusterCellWeightCalib::m_defName = m_absName
staticprotected

Negative signal handling: default tag.

Definition at line 92 of file CaloClusterCellWeightCalib.h.

◆ 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

std::string CaloClusterCellWeightCalib::m_directionCalculation
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 49 of file CaloClusterCellWeightCalib.h.

◆ m_eThreshold

double CaloClusterCellWeightCalib::m_eThreshold
protected

Energy threshold for direction calculation.

Definition at line 72 of file CaloClusterCellWeightCalib.h.

◆ 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

bool CaloClusterCellWeightCalib::m_ignoreGeoWghts
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 84 of file CaloClusterCellWeightCalib.h.

◆ m_noiseDirectionCalculation

std::string CaloClusterCellWeightCalib::m_noiseDirectionCalculation
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 69 of file CaloClusterCellWeightCalib.h.

◆ m_posName

std::string const CaloClusterCellWeightCalib::m_posName = "Signal"
staticprotected

Negative signal handling: positive signal tag.

Definition at line 94 of file CaloClusterCellWeightCalib.h.

◆ m_rawName

std::string const CaloClusterCellWeightCalib::m_rawName = "RawSignal"
staticprotected

Negative signal handling: raw signal tag.

Definition at line 98 of file CaloClusterCellWeightCalib.h.

◆ 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.


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