9#include "Identifier/Identifier.h"
62 m_tree =
new TTree(
"mytree",
"Calo Noise ntuple");
76 ATH_MSG_INFO (
" end of CaloRescaleNoise::initialize " );
77 return StatusCode::SUCCESS;
83 return StatusCode::SUCCESS;
89 const EventContext& ctx = Gaudi::Hive::currentContext();
94 return StatusCode::FAILURE;
97 FILE* fp = std::fopen(
"calonoise.txt",
"w");
102 scaleCorr = *scaleCorrHdl;
111 if( not caloSCMgrHandle.
isValid()){
113 ATH_MSG_ERROR(
"CaloRescaleNoise::stop: caloSCMgrHandle invalid.");
114 return StatusCode::FAILURE;
120 if( not caloMgrHandle.
isValid()){
122 ATH_MSG_ERROR(
"CaloRescaleNoise::stop: caloMgrHandle invalid.");
123 return StatusCode::FAILURE;
128 int ncell=
m_calo_id->calo_cell_hash_max();
129 ATH_MSG_INFO (
" start loop over Calo cells " << ncell );
130 for (
int i=0;i<ncell;i++) {
163 int ii = (int) (idSubHash);
168 m_OffId = (int)(
id.get_identifier32().get_compact());
176 else if (subCalo<3) ngain=3;
184 hvonline = onlineScaleCorr->HVScaleCorr(hwid);
187 for (
int igain=0;igain<ngain;igain++) {
209 if (iCool<48 && m_elecNoise>0. && hvonline > 1.) {
211 " layer/ieta/iphi " <<
m_calo_id->sampling(
id) <<
" " <<
m_calo_id->eta(
id) <<
" " <<
m_calo_id->phi(
id) <<
" OldNoise,NewNoise " <<
218 " layer/eta/phi " <<
m_layer <<
" " <<
m_eta <<
" " <<
m_phi <<
" OldNoise,NewNoise " <<
236 return StatusCode::SUCCESS;
241 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
Helper base class for offline cell identifiers.
Helper class for offline supercell identifiers.
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
const ServiceHandle< StoreGateSvc > & detStore() const
Helper base class for offline cell identifiers.
This class groups all DetDescr information related to a CaloCell.
float eta_raw() const
cell eta_raw
float phi_raw() const
cell phi_raw
const CaloDetDescrElement * get_element(const Identifier &cellId) const
get element by its identifier
This class initializes the Calo (LAr and Tile) offline identifiers.
const CaloCell_Base_ID * m_calo_id
virtual StatusCode stop() override
standard Athena-Algorithm method
virtual ~CaloRescaleNoise()
Default Destructor.
SG::ReadCondHandleKey< CaloNoise > m_elecNoiseKey
virtual StatusCode initialize() override
standard Athena-Algorithm method
SG::ReadCondHandleKey< CaloSuperCellDetDescrManager > m_caloSCMgrKey
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
virtual StatusCode finalize() override
standard Athena-Algorithm method
SG::ReadCondHandleKey< ILArHVScaleCorr > m_scaleCorrKey
SG::ReadCondHandleKey< CaloNoise > m_pileupNoiseKey
ServiceHandle< ITHistSvc > m_thistSvc
virtual StatusCode execute() override
standard Athena-Algorithm method
CaloRescaleNoise(const std::string &name, ISvcLocator *pSvcLocator)
Standard Athena-Algorithm Constructor.
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
float m_elecNoiseRescaled
SG::ReadCondHandleKey< ILArHVScaleCorr > m_onlineScaleCorrKey
virtual const float & HVScaleCorr(const HWIdentifier &id) const =0
This is a "hash" representation of an Identifier.