ATLAS Offline Software
|
EM calorimeter eta offset (S-shape) corrections. More...
#include <CaloSwEtaoff_v2.h>
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. More... | |
using | Context = CaloUtils::ToolConstantsContext |
Convenient alias for the Context type. More... | |
using | Constant = ToolConstant< T > |
Alias for the Constant type. More... | |
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. More... | |
CaloClusterCorrectionCommon (const std::string &type, const std::string &name, const IInterface *parent) | |
Inherit constructor. More... | |
virtual void | makeCorrection (const Context &myctx, xAOD::CaloCluster *cluster) const override |
Perform the correction. More... | |
virtual StatusCode | initialize () override |
Initialize method. More... | |
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::CaloCluster *cluster) const=0 |
Execute on a single cluster. More... | |
virtual StatusCode | execute (xAOD::CaloCluster *cluster) final |
Execute on a single cluster. More... | |
virtual StatusCode | execute (const EventContext &ctx, xAOD::CaloClusterContainer *collection) const |
Execute on an entire collection of clusters. More... | |
Context | context (const EventContext &ctx) const |
Create a Context object. More... | |
virtual void | writeConstants (std::ostream &stream, const std::string &name, const EventContext &ctx) const |
Dump method (for debugging) More... | |
virtual StatusCode | mergeConstants (CaloRec::ToolConstants &out, const EventContext &ctx) const override |
Merge our constants into out with the proper prefix. More... | |
virtual int | toolVersion () const |
Return the version number for this tool. More... | |
virtual const std::string & | toolType () const |
Return the name of the type of this tool. More... | |
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. More... | |
Public Attributes | |
list | CaloSw_sample_energies = [50*GeV, 100*GeV, 200*GeV] |
dictionary | CaloSwEtaoff_v2_parms |
Protected Attributes | |
SG::ReadCondHandleKey< CaloDetDescrManager > | m_caloMgrKey {this,"CaloDetDescrManager", "CaloDetDescrManager"} |
Private Member Functions | |
const CaloClusterCorr::DDHelper & | ddhelper (const CaloDetDescrManager *dd_man) const |
Retrieve the detector description helper, creating it if needed. More... | |
Private Attributes | |
Constant< CxxUtils::Array< 3 > > | m_correction { this, "correction", "Tabulated arrays of function parameters." } |
Calibration constant: tabulated arrays of function parameters. More... | |
Constant< CxxUtils::Array< 1 > > | m_interp_barriers { this, "interp_barriers", "Allow breaking up the interpolation into independent regions." } |
Calibration constant: allow breaking up the interpolation into independent regions. More... | |
Constant< int > | m_degree { this, "degree", "Degree of the polynomial interpolation." } |
Calibration constant: degree of the polynomial interpolation. More... | |
Constant< CxxUtils::Array< 1 > > | m_energies { this, "energies", "Table of energies at which the correction was tabulated." } |
Calibration constant: table of energies at which the correction was tabulated. More... | |
Constant< int > | m_energy_degree { this, "energy_degree", "Degree of the polynomial interpolation in energy." } |
Calibration constant: degree of the polynomial interpolation in energy. More... | |
Constant< int > | m_region { this, "region", "Calorimeter region" } |
Calibration constant: The calorimeter region for which this correction is intended. More... | |
CxxUtils::CachedUniquePtr< const CaloClusterCorr::DDHelper > | m_ddhelper |
Helper for detector description lookup. More... | |
SG::ReadCondHandleKey< CaloRec::ToolConstants > | m_DBHandle |
Handle to a ToolConstants conditions object. More... | |
StringProperty | m_prefix |
Prefix for finding our constants within the ToolConstants object. More... | |
ToolWithConstantsImpl | m_impl |
Internal implementation object. More... | |
Constant< int > | m_order |
Used to fix the ordering of tools when we're initializing from COOL based on a hierarchical tag. More... | |
Constant< bool > | m_isdummy |
If true, then this is a dummy tool that should not be executed. More... | |
EM calorimeter eta offset (S-shape) corrections.
The measured cluster eta positions are biased towards the centers of the cells. This correction attempts to remove this bias.
If you plot \(\Delta\eta = \eta_{\rm true} - \eta_{\rm measured}\) as a function of \(\eta\), the result is nearly periodic in the cell structure. We model this by binning the plots in \(|\eta|\), fitting an empirical function to the bins, and then interpolating the fit parameters in \(|\eta|\) in order to extend the function over the entire range.
The function that is fit derives from a form suggested by Nicolas Kerschen. Let the offset of the cluster within the cell be \(u\), where \(u=0\) is at the center, and \(u=\pm 1\) are the edges. Then,
\[ f(u) = A\tan^{-1} Bu + Cu + D|u| + E. \]
We modify this function to ensure continuity by requiring that \(f(-1)=f(1)=0\). We also redefine the variables in order to remove correlations between them that cause the fit to behave poorly. ( \(A\) and \(B\) are highly correlated in the above, since they both strongly affect the total amplitude of the function. We take the terms involving \(A\) and \(B\), find the \(u\) positions where this part of the function are at extrema, and divide these terms by their value at these points, with \(A\) factored out.) Signs are also adjusted so that they are usually all positive. After the constraints are imposed, there are three parameters remaining:
\[ f(u) = A\left[{u\tan^{-1} B - \tan^{-1} Bu \over (Z/B)\tan^{-1} B - \tan^{-1} Z} + C(1-|u|)\right], \]
where
\[ Z = \sqrt{B\over \tan^{-1} B - 1}. \]
This is the form that we fit.
The parameters are tabulated as a function of energy; a second interpolation in energy is done on the parameters.
Definition at line 70 of file CaloSwEtaoff_v2.h.
|
inherited |
Shorthand for derived classes.
Definition at line 443 of file ToolWithConstants.h.
|
inherited |
Alias for the Constant type.
Definition at line 456 of file ToolWithConstants.h.
|
inherited |
Convenient alias for the Context type.
Definition at line 451 of file ToolWithConstants.h.
|
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.
CaloClusterCorrectionCommon::CaloClusterCorrectionCommon |
Inherit constructor.
Definition at line 46 of file CaloClusterCorrectionCommon.cxx.
|
inherited |
Create a Context
object.
This can then be passed to Constant::operator()
.
|
privateinherited |
Retrieve the detector description helper, creating it if needed.
Definition at line 640 of file CaloClusterCorrectionCommon.cxx.
|
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.
energy | The energy value for the interpolation. |
builder | Helper to construct the interpolation table. |
energies | The energy interpolation table. |
energy_degree | The 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.
|
overrideinherited |
Definition at line 53 of file CaloClusterCorrection.cxx.
|
inherited |
Execute on a single cluster.
cluster | The cluster to process. |
ctx | The event context. |
|
inherited |
Execute on an entire collection of clusters.
collection | The container of clusters. |
This will iterate over all the clusters in collection
and call execute
on each one individually.
collection | The container of clusters. |
ctx | The event context. |
This will iterate over all the clusters in collection
and call execute
on each one individually.
Definition at line 73 of file CaloClusterProcessor.cxx.
|
finalinherited |
Execute on a single cluster.
cluster | The cluster to process. (deprecated) |
Definition at line 63 of file CaloClusterProcessor.cxx.
|
overridevirtualinherited |
Initialize method.
Derived classes must call this.
Reimplemented from CaloUtils::ToolWithConstants< CaloClusterProcessor >.
Reimplemented in CaloSwGap_v2, CaloFillRectangularCluster, CaloTopoEMlayers, CaloSwGap_v3, CaloSwDeadOTX_back, CaloSwDeadOTX_ps, CaloSwGap_g3, CaloClusterBadChannelList, CaloDummyCorrection, and CaloTopoEMGap.
Definition at line 47 of file CaloClusterCorrection.cxx.
|
overridevirtualinherited |
Perform the correction.
Called by the tool
myctx | ToolWithConstants context. |
cluster | The cluster to correct. It is updated in place. |
Called by the tool.
myctx | ToolWithConstants context. |
cluster | The cluster to correct. It is updated in place. |
Does the following:
makeTheCorrection
.makeTheCorrection
. Implements CaloClusterCorrection.
Definition at line 436 of file CaloClusterCorrectionCommon.cxx.
|
overridevirtual |
Virtual function for the correction-specific code.
myctx | ToolWithConstants context. |
cluster | The cluster to correct. It is updated in place. |
elt | The detector description element corresponding to the cluster location. |
eta | The \(\eta\) coordinate of the cluster, in this sampling. |
adj_eta | The \(\eta\) adjusted for any shift between the actual and nominal coordinates. (This is shifted back to the nominal coordinate system.) |
phi | The \(\phi\) coordinate of the cluster, in this sampling. |
adj_phi | The \(\phi\) adjusted for any shift between the actual and nominal coordinates. (This is shifted back to the nominal coordinate system.) |
samp | The 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. |
Implements CaloClusterCorrectionCommon.
Definition at line 45 of file CaloSwEtaoff_v2.cxx.
|
overridevirtualinherited |
Merge our constants into out
with the proper prefix.
[out] | out | Object to receive our constants. |
ctx | Event context. |
|
virtualinherited |
Definition at line 94 of file CaloClusterCorrection.cxx.
|
virtualinherited |
Definition at line 74 of file CaloClusterCorrection.cxx.
|
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.
|
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.
|
virtualinherited |
Dump method (for debugging)
stream | Ostream to which to write. |
name | Name to go in output |
ctx | Event context. |
Definition at line 24 of file CaloSwEtaoff_v2.py.
dictionary CaloSwEtaoff_v2.CaloSwEtaoff_v2_parms |
Definition at line 254 of file CaloSwEtaoff_v2.py.
|
protectedinherited |
Definition at line 119 of file CaloClusterCorrection.h.
|
private |
Calibration constant: tabulated arrays of function parameters.
Definition at line 109 of file CaloSwEtaoff_v2.h.
|
privateinherited |
Handle to a ToolConstants conditions object.
Definition at line 527 of file ToolWithConstants.h.
|
privateinherited |
Helper for detector description lookup.
Definition at line 165 of file CaloClusterCorrectionCommon.h.
|
private |
Calibration constant: degree of the polynomial interpolation.
Definition at line 118 of file CaloSwEtaoff_v2.h.
|
private |
Calibration constant: table of energies at which the correction was tabulated.
Definition at line 123 of file CaloSwEtaoff_v2.h.
|
private |
Calibration constant: degree of the polynomial interpolation in energy.
Definition at line 127 of file CaloSwEtaoff_v2.h.
|
privateinherited |
Internal implementation object.
Definition at line 535 of file ToolWithConstants.h.
|
private |
Calibration constant: allow breaking up the interpolation into independent regions.
Definition at line 114 of file CaloSwEtaoff_v2.h.
|
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 553 of file ToolWithConstants.h.
|
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 540 of file ToolWithConstants.h.
|
privateinherited |
Prefix for finding our constants within the ToolConstants object.
Definition at line 531 of file ToolWithConstants.h.
|
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.