ATLAS Offline Software
Loading...
Searching...
No Matches
CaloScaleCluster Class Referenceabstract

EM calorimeter containment correction. More...

#include <CaloScaleCluster.h>

Inheritance diagram for CaloScaleCluster:
Collaboration diagram for CaloScaleCluster:

Public Types

enum  {
  EMB1 = 0 , EMB2 = 1 , EME1 = 2 , EME2 = 3 ,
  COMBINED2 = 4 , CLUSTER = 5 , NREGIONS = 6
}
 Region codes for m_region below. More...
typedef ToolWithConstants base_class
 Shorthand for derived classes.
using Context
 Convenient alias for the Context type.
using Constant
 Alias for the Constant type.

Public Member Functions

virtual void makeTheCorrection (const Context &myctx, xAOD::CaloCluster *cluster, const CaloDetDescrElement *elt, float eta, float adj_eta, float phi, float adj_phi, CaloSampling::CaloSample samp) const override
 Virtual function for the correction-specific code.
 CaloClusterCorrectionCommon (const std::string &type, const std::string &name, const IInterface *parent)
 Inherit constructor.
virtual void makeCorrection (const Context &myctx, xAOD::CaloCluster *cluster) const override
 Perform the correction.
virtual void makeCorrection (const Context &myctx, xAOD::CaloCluster *) const =0
virtual void makeTheCorrection (const Context &myctx, xAOD::CaloCluster *cluster, const CaloDetDescrElement *elt, float eta, float adj_eta, float phi, float adj_phi, CaloSampling::CaloSample samp) const =0
 Virtual function for the correction-specific code.
virtual StatusCode initialize () override
 Initialize method.
virtual void setsample (xAOD::CaloCluster *cluster, CaloSampling::CaloSample sampling, float em, float etam, float phim, float emax, float etamax, float phimax, float etas, float phis) const
virtual void setenergy (xAOD::CaloCluster *cluster, float energy) const
StatusCode execute (const EventContext &ctx, xAOD::CaloCluster *cluster) const override
virtual StatusCode execute (const EventContext &ctx, xAOD::CaloClusterContainer *collection) const
 Execute on an entire collection of clusters.
Context context (const EventContext &ctx) const
 Create a Context object.
virtual void writeConstants (std::ostream &stream, const std::string &name, const EventContext &ctx) const
 Dump method (for debugging)
virtual StatusCode mergeConstants (CaloRec::ToolConstants &out, const EventContext &ctx) const override
 Merge our constants into out with the proper prefix.
virtual int toolVersion () const
 Return the version number for this tool.
virtual const std::string & toolType () const
 Return the name of the type of this tool.

Static Public Member Functions

static float energy_interpolation (float energy, const TableBuilder &builder, const CaloRec::Array< 1 > &energies, int energy_degree)
 Many of the corrections use the same method for doing the final interpolation in energy.

Protected Attributes

SG::ReadCondHandleKey< CaloDetDescrManagerm_caloMgrKey {this,"CaloDetDescrManager", "CaloDetDescrManager"}

Private Member Functions

const CaloClusterCorr::DDHelperddhelper (const CaloDetDescrManager *dd_man) const
 Retrieve the detector description helper, creating it if needed.

Private Attributes

Constant< CxxUtils::Array< 2 > > m_correction { this, "correction", "Arrays of function parameters" }
 Calibration constant: tabulated arrays of function parameters.
Constant< int > m_degree { this, "degree", "Degree of the polynomial interpolation" }
 Calibration constant: degree of the polynomial interpolation.
Constant< float > m_etamax { this, "etamax", "Maximum eta for which this correction is defined" }
 Calibration constant: maximum eta for which this correction is defined.
Constant< int > m_region { this, "region", "Calorimeter region" }
 Calibration constant: The calorimeter region for which this correction is intended.
CxxUtils::CachedUniquePtr< const CaloClusterCorr::DDHelperm_ddhelper
 Helper for detector description lookup.
SG::ReadCondHandleKey< CaloRec::ToolConstantsm_DBHandle
 Handle to a ToolConstants conditions object.
StringProperty m_prefix
 Prefix for finding our constants within the ToolConstants object.
ToolWithConstantsImpl m_impl
 Internal implementation object.
Constant< int > m_order
 Used to fix the ordering of tools when we're initializing from COOL based on a hierarchical tag.
Constant< bool > m_isdummy
 If true, then this is a dummy tool that should not be executed.

Detailed Description

EM calorimeter containment correction.

This correction scales the total cluster energy by a factor that depends on eta (but not on energy). Note that only the total energy is changed; the individual sampling energies are not changed.

Definition at line 35 of file CaloScaleCluster.h.

Member Typedef Documentation

◆ base_class

typedef ToolWithConstants CaloUtils::ToolWithConstants< BASE >::base_class
inherited

Shorthand for derived classes.

Definition at line 450 of file ToolWithConstants.h.

◆ Constant

using CaloUtils::ToolWithConstants< BASE >::Constant
inherited

Alias for the Constant type.

Definition at line 463 of file ToolWithConstants.h.

◆ Context

using CaloUtils::ToolWithConstants< BASE >::Context
inherited

Convenient alias for the Context type.

Definition at line 458 of file ToolWithConstants.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
inherited

Region codes for m_region below.

This is used to decide how to report the position of the cluster. Note: This numbering is also used in the job options files.

Enumerator
EMB1 
EMB2 
EME1 
EME2 
COMBINED2 
CLUSTER 
NREGIONS 

Definition at line 100 of file CaloClusterCorrectionCommon.h.

Member Function Documentation

◆ CaloClusterCorrectionCommon()

CaloClusterCorrectionCommon::CaloClusterCorrectionCommon ( const std::string & type,
const std::string & name,
const IInterface * parent )

Inherit constructor.

Definition at line 46 of file CaloClusterCorrectionCommon.cxx.

◆ context()

Context CaloUtils::ToolWithConstants< BASE >::context ( const EventContext & ctx) const
inherited

Create a Context object.

This can then be passed to Constant::operator().

◆ ddhelper()

const CaloClusterCorr::DDHelper & CaloClusterCorrectionCommon::ddhelper ( const CaloDetDescrManager * dd_man) const
privateinherited

Retrieve the detector description helper, creating it if needed.

Definition at line 640 of file CaloClusterCorrectionCommon.cxx.

◆ energy_interpolation()

float CaloClusterCorrectionCommon::energy_interpolation ( float energy,
const TableBuilder & builder,
const CaloRec::Array< 1 > & energies,
int energy_degree )
staticinherited

Many of the corrections use the same method for doing the final interpolation in energy.

Perform energy interpolation.

We factor out this common code here. builder is used to construct the interpolation table; energy is the energy value for the interpolation. energies is the list of energies at which we have tabulated values, and energy_degree is the degree of the polynomial interpolation in energy.

Parameters
energyThe energy value for the interpolation.
builderHelper to construct the interpolation table.
energiesThe energy interpolation table.
energy_degreeThe polynomial interpolation degree for the energy interpolation.

Many of the corrections use the same method for doing the final interpolation in energy. We factor out this common code here.

Definition at line 575 of file CaloClusterCorrectionCommon.cxx.

◆ execute() [1/2]

StatusCode CaloClusterCorrection::execute ( const EventContext & ctx,
xAOD::CaloCluster * cluster ) const
overrideinherited

Definition at line 53 of file CaloClusterCorrection.cxx.

◆ execute() [2/2]

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

Execute on an entire collection of clusters.

Parameters
collectionThe container of clusters.

This will iterate over all the clusters in collection and call execute on each one individually.

Parameters
collectionThe container of clusters.
ctxThe event context.

This will iterate over all the clusters in collection and call execute on each one individually.

Definition at line 65 of file CaloClusterProcessor.cxx.

◆ initialize()

StatusCode CaloClusterCorrection::initialize ( )
overridevirtualinherited

◆ makeCorrection() [1/2]

virtual void CaloClusterCorrection::makeCorrection ( const Context & myctx,
xAOD::CaloCluster *  ) const
pure virtualinherited

◆ makeCorrection() [2/2]

void CaloClusterCorrectionCommon::makeCorrection ( const Context & myctx,
xAOD::CaloCluster * cluster ) const
overridevirtualinherited

Perform the correction.

Called by the tool

Parameters
myctxToolWithConstants context.
clusterThe cluster to correct. It is updated in place.

Called by the tool.

Parameters
myctxToolWithConstants context.
clusterThe cluster to correct. It is updated in place.

Does the following:

  • Checks whether the cluster is present in the given calorimeter and sampling. If not, do nothing.
  • Computes quantities to pass to makeTheCorrection.
  • Calls makeTheCorrection.

Definition at line 436 of file CaloClusterCorrectionCommon.cxx.

◆ makeTheCorrection() [1/2]

virtual void CaloClusterCorrectionCommon::makeTheCorrection ( const Context & myctx,
xAOD::CaloCluster * cluster,
const CaloDetDescrElement * elt,
float eta,
float adj_eta,
float phi,
float adj_phi,
CaloSampling::CaloSample samp ) const
pure virtualinherited

Virtual function for the correction-specific code.

Parameters
myctxToolWithConstants context.
clusterThe cluster to correct. It is updated in place.
eltThe detector description element corresponding to the cluster location.
etaThe \(\eta\) coordinate of the cluster.
adj_etaThe \(\eta\) adjusted for any shift between the actual and nominal coordinates. (This is shifted back to the nominal coordinate system.)
phiThe \(\phi\) coordinate of the cluster.
adj_phiThe \(\phi\) adjusted for any shift between the actual and nominal coordinates. (This is shifted back to the nominal coordinate system.)
sampIf we're looking at a particular sampling, this is the calorimeter sampling we're examining. It is a sampling code as defined by CaloSampling::CaloSample; i.e., it has both the calorimeter region and sampling encoded. Otherwise, this is Unknown.

Implemented in CaloLongWeights_v2.

◆ makeTheCorrection() [2/2]

void CaloScaleCluster::makeTheCorrection ( const Context & myctx,
xAOD::CaloCluster * cluster,
const CaloDetDescrElement * elt,
float eta,
float adj_eta,
float phi,
float adj_phi,
CaloSampling::CaloSample samp ) const
overridevirtual

Virtual function for the correction-specific code.

Parameters
myctxToolWithConstants context.
clusterThe cluster to correct. It is updated in place.
eltThe detector description element corresponding to the cluster location.
etaThe \(\eta\) coordinate of the cluster, in this sampling.
adj_etaThe \(\eta\) adjusted for any shift between the actual and nominal coordinates. (This is shifted back to the nominal coordinate system.)
phiThe \(\phi\) coordinate of the cluster, in this sampling.
adj_phiThe \(\phi\) adjusted for any shift between the actual and nominal coordinates. (This is shifted back to the nominal coordinate system.)
sampThe calorimeter sampling we're examining. This is a sampling code as defined by CaloSampling::CaloSample; i.e., it has both the calorimeter region and sampling encoded.

Definition at line 41 of file CaloScaleCluster.cxx.

◆ mergeConstants()

virtual StatusCode CaloUtils::ToolWithConstants< BASE >::mergeConstants ( CaloRec::ToolConstants & out,
const EventContext & ctx ) const
overridevirtualinherited

Merge our constants into out with the proper prefix.

Parameters
[out]outObject to receive our constants.
ctxEvent context.

◆ setenergy()

void CaloClusterCorrection::setenergy ( xAOD::CaloCluster * cluster,
float energy ) const
virtualinherited

Definition at line 94 of file CaloClusterCorrection.cxx.

◆ setsample()

void CaloClusterCorrection::setsample ( xAOD::CaloCluster * cluster,
CaloSampling::CaloSample sampling,
float em,
float etam,
float phim,
float emax,
float etamax,
float phimax,
float etas,
float phis ) const
virtualinherited

Definition at line 74 of file CaloClusterCorrection.cxx.

◆ toolType()

virtual const std::string & CaloUtils::ToolWithConstants< BASE >::toolType ( ) const
virtualinherited

Return the name of the type of this tool.

A saved set of constants includes both the C++ class name and a version number. Normally, the class name is taken from the Gaudi type() method, but that may be changed by overriding this method. This can be used, for example, when there are tools with distinct C++ classes but which are yet similar enough to combine together.

Reimplemented in CaloSwEta1b_g3, CaloSwEta1e_g3, CaloSwEta2b_g3, and CaloSwEta2e_g3.

◆ toolVersion()

virtual int CaloUtils::ToolWithConstants< BASE >::toolVersion ( ) const
virtualinherited

Return the version number for this tool.

A saved set of constants includes both the C++ class name and a version number. The idea is that the version number can be bumped whenever there's a backwards-incompatible change; this gives some protection against trying to use an old version of a tool with an incompatible newer set of constants.

If you want a tool to have a version number, override this method. Otherwise, it will default to a version number of 0.

◆ writeConstants()

virtual void CaloUtils::ToolWithConstants< BASE >::writeConstants ( std::ostream & stream,
const std::string & name,
const EventContext & ctx ) const
virtualinherited

Dump method (for debugging)

Parameters
streamOstream to which to write.
nameName to go in output
ctxEvent context.

Member Data Documentation

◆ m_caloMgrKey

SG::ReadCondHandleKey<CaloDetDescrManager> CaloClusterCorrection::m_caloMgrKey {this,"CaloDetDescrManager", "CaloDetDescrManager"}
protectedinherited

Definition at line 83 of file CaloClusterCorrection.h.

◆ m_correction

Constant<CxxUtils::Array<2> > CaloScaleCluster::m_correction { this, "correction", "Arrays of function parameters" }
private

Calibration constant: tabulated arrays of function parameters.

Definition at line 75 of file CaloScaleCluster.h.

◆ m_DBHandle

Handle to a ToolConstants conditions object.

Definition at line 534 of file ToolWithConstants.h.

◆ m_ddhelper

CxxUtils::CachedUniquePtr<const CaloClusterCorr::DDHelper> CaloClusterCorrectionCommon::m_ddhelper
privateinherited

Helper for detector description lookup.

Definition at line 165 of file CaloClusterCorrectionCommon.h.

◆ m_degree

Constant<int> CaloScaleCluster::m_degree { this, "degree", "Degree of the polynomial interpolation" }
private

Calibration constant: degree of the polynomial interpolation.

Definition at line 79 of file CaloScaleCluster.h.

◆ m_etamax

Constant<float> CaloScaleCluster::m_etamax { this, "etamax", "Maximum eta for which this correction is defined" }
private

Calibration constant: maximum eta for which this correction is defined.

Definition at line 83 of file CaloScaleCluster.h.

◆ m_impl

ToolWithConstantsImpl CaloUtils::ToolWithConstants< BASE >::m_impl
privateinherited

Internal implementation object.

Definition at line 542 of file ToolWithConstants.h.

◆ m_isdummy

Constant<bool> CaloUtils::ToolWithConstants< BASE >::m_isdummy
privateinherited

If true, then this is a dummy tool that should not be executed.

This is used for the case of reading from COOL using hierarchical tags: we need to have such tags associated with some object in each folder, regardless of whether or not the correction from that folder is actually used. [Every folder that IOVDbSvc knows about at configuration time needs to have a valid object for the configured tag, else IOVDbSvc will raise a fatal error. But we don't know at configuration time which folders we're actually going to need, so we gotta configure all of them.]

Definition at line 560 of file ToolWithConstants.h.

◆ m_order

Constant<int> CaloUtils::ToolWithConstants< BASE >::m_order
privateinherited

Used to fix the ordering of tools when we're initializing from COOL based on a hierarchical tag.

Tools should be executed in order of increasing m_order.

Definition at line 547 of file ToolWithConstants.h.

◆ m_prefix

StringProperty CaloUtils::ToolWithConstants< BASE >::m_prefix
privateinherited

Prefix for finding our constants within the ToolConstants object.

Definition at line 538 of file ToolWithConstants.h.

◆ m_region

Constant<int> CaloClusterCorrectionCommon::m_region { this, "region", "Calorimeter region" }
privateinherited

Calibration constant: The calorimeter region for which this correction is intended.

This should be one of the constants above. This affects the meaning of the eta and phi arguments passed to makeTheCorrection, as well as the samp argument.

Definition at line 161 of file CaloClusterCorrectionCommon.h.


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