ATLAS Offline Software
Loading...
Searching...
No Matches
CaloSwECcrack_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: CaloSwECcrack_g3.cxx
8PACKAGE: offline/Calorimeter/CaloClusterCorrection
9
10AUTHORS: H. Ma, S. Rajagopalan
11CREATED: Dec. 15, 1999
12
13PURPOSE: correction for the cracks (for the time being only barrel - endcap)
14 Tuned using 50 GeV Et photons
15 Correction tuned on G3 samples.
16
17atrecon Orig: emreco/qecrack.F
18
19Updated: May 10, 2000 (SR, HM)
20 Migrated to Athena Framework from PASO
21
22Updated: Jan 5, 2001 (HM)
23 QA.
24
25Updated: May 5, 2004 (Sven Menke)
26 base class changed from algo to tool
27
28
29********************************************************************/
30
31#include "CaloSwECcrack_g3.h"
32
33// constants from atrecon/emreco/qecrack.F
35const float CaloSwECcrack_g3::P0[3] = {116.8, 169.77, 62.224};
36const float CaloSwECcrack_g3::P1[1] = {1.614};
37const float CaloSwECcrack_g3::P2[3] = {188.1, 242.89, 78.836};
38
39
41 CaloCluster* cluster) const
42{
43
44 float eta = cluster->etaBE(2); // use second sampling
45
46 float aeta = fabs(eta);
47
48 float qECcrack = 1.;
49 if (aeta > 1.35 && aeta < 1.46)
50 qECcrack = P0[0] - P0[1]*aeta + P0[2]*aeta*aeta;
51 else if (aeta >= 1.46 && aeta < 1.475)
52 qECcrack = P1[0];
53 else if (aeta >= 1.475 && aeta < 1.55)
54 qECcrack = P2[0] - P2[1]*aeta + P2[2]*aeta*aeta;
55 else
56 return; // No correction required
57
58 // make the correction
59
60 float energy = cluster->e();
61 // set the energy, and rescale each sampling.
62 setenergy(cluster, energy*qECcrack);
63
64}
Scalar eta() const
pseudorapidity method
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.
double etaBE(int sampling) const
EMB/EMEC combined barycenter .
static const float P0[3]
static const float P1[1]
virtual void makeCorrection(const Context &myctx, xAOD::CaloCluster *cluster) const override
static const float P2[3]
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.