ATLAS Offline Software
Loading...
Searching...
No Matches
CaloCellRescaler.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
4
5#include "CaloCellRescaler.h"
7#include "CaloDetDescr/CaloDetDescrElement.h"
8
10 const std::string& name,
11 const IInterface* parent) :
12 CaloCellCorrection(type, name, parent) {
13 declareInterface<CaloCellCorrection>(this);
14 declareProperty("FactorToCellsEMB0", m_factorToCells[CaloCell_ID::PreSamplerB] = 1.0, "cells in emb0 are scaled by FactorToCellsEMB0");
15 declareProperty("FactorToCellsEMB1", m_factorToCells[CaloCell_ID::EMB1] = 1.0, "cells in emb1 are scaled by FactorToCellsEMB1");
16 declareProperty("FactorToCellsEMB2", m_factorToCells[CaloCell_ID::EMB2] = 1.0, "cells in emb2 are scaled by FactorToCellsEMB2");
17 declareProperty("FactorToCellsEMB3", m_factorToCells[CaloCell_ID::EMB3] = 1.0, "cells in emb3 are scaled by FactorToCellsEMB3");
18 declareProperty("FactorToCellsEME0", m_factorToCells[CaloCell_ID::PreSamplerE] = 1.0, "cells in eme0 are scaled by FactorToCellsEME0");
19 declareProperty("FactorToCellsEME1", m_factorToCells[CaloCell_ID::EME1] = 1.0, "cells in eme1 are scaled by FactorToCellsEME1");
20 declareProperty("FactorToCellsEME2", m_factorToCells[CaloCell_ID::EME2] = 1.0, "cells in eme2 are scaled by FactorToCellsEME2");
21 declareProperty("FactorToCellsEME3", m_factorToCells[CaloCell_ID::EME3] = 1.0, "cells in eme3 are scaled by FactorToCellsEME3");
22 declareProperty("FactorToCellsHEC0", m_factorToCells[CaloCell_ID::HEC0] = 1.0, "cells in hec0 are scaled by FactorToCellsHEC0");
23 declareProperty("FactorToCellsHEC1", m_factorToCells[CaloCell_ID::HEC1] = 1.0, "cells in hec1 are scaled by FactorToCellsHEC1");
24 declareProperty("FactorToCellsHEC2", m_factorToCells[CaloCell_ID::HEC2] = 1.0, "cells in hec2 are scaled by FactorToCellsHEC2");
25 declareProperty("FactorToCellsHEC3", m_factorToCells[CaloCell_ID::HEC3] = 1.0, "cells in hec3 are scaled by FactorToCellsHEC3");
26 declareProperty("FactorToCellsTILEB0",m_factorToCells[CaloCell_ID::TileBar0] = 1.0,"cells in tilebar0 are scaled by FactorToCellsTILEB0");
27 declareProperty("FactorToCellsTILEB1",m_factorToCells[CaloCell_ID::TileBar1] = 1.0,"cells in tilebar1 are scaled by FactorToCellsTILEB1");
28 declareProperty("FactorToCellsTILEB2",m_factorToCells[CaloCell_ID::TileBar2] = 1.0,"cells in tilebar2 are scaled by FactorToCellsTILEB2");
29 declareProperty("FactorToCellsTILEG1",m_factorToCells[CaloCell_ID::TileGap1] = 1.0,"cells in tilegap1 are scaled by FactorToCellsTILEG1");
30 declareProperty("FactorToCellsTILEG2",m_factorToCells[CaloCell_ID::TileGap2] = 1.0,"cells in tilegap2 are scaled by FactorToCellsTILEG2");
31 declareProperty("FactorToCellsTILEG3",m_factorToCells[CaloCell_ID::TileGap3] = 1.0,"cells in tilegap3 are scaled by FactorToCellsTILEG3");
32 declareProperty("FactorToCellsTILEE0",m_factorToCells[CaloCell_ID::TileExt0] = 1.0,"cells in tileext0 are scaled by FactorToCellsTILEE0");
33 declareProperty("FactorToCellsTILEE1",m_factorToCells[CaloCell_ID::TileExt1] = 1.0,"cells in tileext1 are scaled by FactorToCellsTILEE1");
34 declareProperty("FactorToCellsTILEE2",m_factorToCells[CaloCell_ID::TileExt2] = 1.0,"cells in tileext2 are scaled by FactorToCellsTILEE2");
35 declareProperty("FactorToCellsFCAL0", m_factorToCells[CaloCell_ID::FCAL0] = 1.0, "cells in fcal0 are scaled by FactorToCellsFCAL0");
36 declareProperty("FactorToCellsFCAL1", m_factorToCells[CaloCell_ID::FCAL1] = 1.0, "cells in fcal1 are scaled by FactorToCellsFCAL1");
37 declareProperty("FactorToCellsFCAL2", m_factorToCells[CaloCell_ID::FCAL2] = 1.0, "cells in fcal2 are scaled by FactorToCellsFCAl2");
38 declareProperty("FactorToCellsMBTS", m_factorToCells[CaloCell_ID::Unknown] = 1.0, "cells in MBTS are scaled by FactorToCellsMBTS");
39}
40
41
43
44
46 ATH_MSG_INFO( " initialization " );
47 return StatusCode::SUCCESS;
48}
49
50
52 const EventContext& /*ctx*/) const
53{
54 const CaloDetDescrElement* caloDDE = theCell->caloDDE();
55 if (caloDDE) {
56 theCell->scaleEnergy( m_factorToCells[caloDDE->getSampling()] );
57 }
58 }
#define ATH_MSG_INFO(x)
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
CaloCellRescaler(const std::string &type, const std::string &name, const IInterface *parent)
virtual StatusCode initialize() override
float m_factorToCells[CaloCell_ID::Unknown+1]
virtual void MakeCorrection(CaloCell *theCell, const EventContext &ctx) const override
Data object for each calorimeter readout cell.
Definition CaloCell.h:57
const CaloDetDescrElement * caloDDE() const
get pointer to CaloDetDescrElement (data member)
Definition CaloCell.h:321
virtual void scaleEnergy(float scale)
scale energy
Definition CaloCell.h:478
This class groups all DetDescr information related to a CaloCell.
CaloCell_ID::CaloSample getSampling() const
cell sampling