ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Calorimeter
CaloClusterCorrection
src
CaloSwClcon_g3.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
/********************************************************************
6
7
NAME: CaloSwClcon_g3.cxx
8
PACKAGE: offline/Calorimeter/CaloClusterCorrection
9
10
AUTHORS: S. Rajagopalan
11
CREATED: Dec. 15, 1999
12
13
PURPOSE: correction for the finite containment for a given cluster size
14
(Tuned using 50 GeV Et photons)
15
Base class: CaloClusterCorrection
16
Correction tuned on G3 samples.
17
18
Atrecon Orig: emrecon/qclcon.F
19
20
Updated: May 10, 2000 (SR, HM)
21
Migrated to Athena Framework from PASO
22
23
Updated: Jan 5, 2001 (HM)
24
QA.
25
26
Updated: Feb 2003 (LC)
27
New corrections for DC1 geometry
28
29
Updated: May 5, 2004 (Sven Menke)
30
base class changed from algo to tool
31
32
Updated: June, 2004 (sss)
33
Use ToolWithConstants to get correction constants.
34
********************************************************************/
35
36
37
#include "
CaloSwClcon_g3.h
"
38
#include "
AthenaKernel/errorcheck.h
"
39
#include "GaudiKernel/MsgStream.h"
40
#include <cmath>
41
42
43
using
xAOD::CaloCluster
;
44
45
// apply correction to one cluster.
46
void
CaloSwClcon_g3::makeCorrection
(
const
Context& myctx,
47
CaloCluster
* cluster)
const
48
{
49
const
float
etamin =
m_etamin
(myctx);
50
const
float
etamax =
m_etamax
(myctx);
51
52
float
eta
= cluster->
eta
();
53
float
aeta = fabs(
eta
);
54
if
(aeta < etamin || aeta >= etamax)
return
;
55
56
const
CxxUtils::Array<1>
correction =
m_correction
(myctx);
57
if
(correction.size() == 0)
return
;
58
59
// Determine the correction
60
double
granularity = (etamax - etamin) / correction.size();
61
int
i =
static_cast<
int
>
((aeta - etamin)/granularity);
62
float
qclcon = correction[i];
63
64
// Do the Correction
65
setenergy
(cluster, qclcon * cluster->
e
());
66
}
67
68
70
int
CaloSwClcon_g3::version
()
const
71
{
72
return
1;
73
}
eta
Scalar eta() const
pseudorapidity method
Definition
AmgMatrixBasePlugin.h:83
CaloSwClcon_g3.h
m_correction
Constant< CxxUtils::Array< 2 > > m_correction
Calibration constant: tabulated arrays of function parameters.
Definition
CaloSwEtamod_v2.h:142
errorcheck.h
Helpers for checking error return status codes and reporting errors.
CaloClusterCorrection::setenergy
virtual void setenergy(xAOD::CaloCluster *cluster, float energy) const
Definition
CaloClusterCorrection.cxx:93
CaloCluster
Principal data class for CaloCell clusters.
Definition
Calorimeter/CaloEvent/CaloEvent/CaloCluster.h:79
CaloCluster::e
virtual double e() const
Retrieve energy independent of signal state.
Definition
Calorimeter/CaloEvent/CaloEvent/CaloCluster.h:753
CaloCluster::eta
virtual double eta() const
Retrieve eta independent of signal state.
Definition
Calorimeter/CaloEvent/CaloEvent/CaloCluster.h:755
CaloSwClcon_g3::m_etamax
Constant< float > m_etamax
Definition
CaloSwClcon_g3.h:63
CaloSwClcon_g3::m_etamin
Constant< float > m_etamin
Definition
CaloSwClcon_g3.h:62
CaloSwClcon_g3::version
virtual int version() const
Currently at version==1.
Definition
CaloSwClcon_g3.cxx:70
CaloSwClcon_g3::makeCorrection
virtual void makeCorrection(const Context &myctx, xAOD::CaloCluster *cluster) const override
Definition
CaloSwClcon_g3.cxx:46
CxxUtils::Array
Read-only multidimensional array.
Definition
Control/CxxUtils/CxxUtils/Array.h:135
xAOD::CaloCluster
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
Definition
Event/xAOD/xAODCaloEvent/xAODCaloEvent/CaloCluster.h:19
Generated on
for ATLAS Offline Software by
1.17.0