ATLAS Offline Software
Loading...
Searching...
No Matches
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
7NAME: CaloSwClcon_g3.cxx
8PACKAGE: offline/Calorimeter/CaloClusterCorrection
9
10AUTHORS: S. Rajagopalan
11CREATED: Dec. 15, 1999
12
13PURPOSE: 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
18Atrecon Orig: emrecon/qclcon.F
19
20Updated: May 10, 2000 (SR, HM)
21 Migrated to Athena Framework from PASO
22
23Updated: Jan 5, 2001 (HM)
24 QA.
25
26Updated: Feb 2003 (LC)
27 New corrections for DC1 geometry
28
29Updated: May 5, 2004 (Sven Menke)
30 base class changed from algo to tool
31
32Updated: June, 2004 (sss)
33 Use ToolWithConstants to get correction constants.
34********************************************************************/
35
36
37#include "CaloSwClcon_g3.h"
39#include "GaudiKernel/MsgStream.h"
40#include <cmath>
41
42
44
45// apply correction to one cluster.
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
71{
72 return 1;
73}
Scalar eta() const
pseudorapidity method
Helpers for checking error return status codes and reporting errors.
virtual void setenergy(xAOD::CaloCluster *cluster, float energy) const
Principal data class for CaloCell clusters.
virtual double e() const
Retrieve energy independent of signal state.
virtual double eta() const
Retrieve eta independent of signal state.
Constant< float > m_etamax
Constant< float > m_etamin
virtual int version() const
Currently at version==1.
Constant< CxxUtils::Array< 1 > > m_correction
virtual void makeCorrection(const Context &myctx, xAOD::CaloCluster *cluster) const override
Read-only multidimensional array.
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.