From 93dea1be6d37a7a36e0e9fb8ea8dece50adf75de Mon Sep 17 00:00:00 2001 From: Fabio Cossutti Date: Tue, 7 Apr 2009 09:00:25 +0000 Subject: [PATCH] modify the intercalibration CondFormat used, move to the specific MC one --- SimCalorimetry/EcalSimAlgos/interface/EcalCoder.h | 8 ++++---- SimCalorimetry/EcalSimAlgos/src/EcalCoder.cc | 8 ++++---- .../EcalSimProducers/plugins/EcalDigiProducer.cc | 10 +++++----- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/SimCalorimetry/EcalSimAlgos/interface/EcalCoder.h b/SimCalorimetry/EcalSimAlgos/interface/EcalCoder.h index f92c2f46fbc21..f9f560cac7c46 100644 --- a/SimCalorimetry/EcalSimAlgos/interface/EcalCoder.h +++ b/SimCalorimetry/EcalSimAlgos/interface/EcalCoder.h @@ -13,7 +13,7 @@ #include "CalibFormats/CaloObjects/interface/CaloSamples.h" #include "SimGeneral/NoiseGenerators/interface/CorrelatedNoisifier.h" #include "SimCalorimetry/EcalSimAlgos/interface/EcalCorrelatedNoiseMatrix.h" -#include "CondFormats/EcalObjects/interface/EcalIntercalibConstants.h" +#include "CondFormats/EcalObjects/interface/EcalIntercalibConstantsMC.h" #include "CondFormats/EcalObjects/interface/EcalPedestals.h" #include "CondFormats/EcalObjects/interface/EcalGainRatios.h" @@ -54,7 +54,7 @@ class EcalCoder void setFullScaleEnergy(const double EBscale , const double EEscale) {m_maxEneEB = EBscale; m_maxEneEE = EEscale; } - void setIntercalibConstants(const EcalIntercalibConstants * ical); + void setIntercalibConstants(const EcalIntercalibConstantsMC * ical); /// from EBDataFrame to CaloSamples virtual void digitalToAnalog(const EBDataFrame& df, CaloSamples& lf) const; @@ -93,8 +93,8 @@ class EcalCoder const EcalPedestals * thePedestals; /// the electronics gains const EcalGainRatios * theGainRatios; - /// the intercalibration constants - const EcalIntercalibConstants * theIntercalibConstants; + /// the intercalibration constants, record specific for simulation of gain variation in MC + const EcalIntercalibConstantsMC * theIntercalibConstants; /// max attainable energy in the ecal barrel double m_maxEneEB ; /// max attainable energy in the ecal endcap diff --git a/SimCalorimetry/EcalSimAlgos/src/EcalCoder.cc b/SimCalorimetry/EcalSimAlgos/src/EcalCoder.cc index 2bca8cea3629b..cbfa7132c9dc9 100644 --- a/SimCalorimetry/EcalSimAlgos/src/EcalCoder.cc +++ b/SimCalorimetry/EcalSimAlgos/src/EcalCoder.cc @@ -31,7 +31,7 @@ void EcalCoder::setGainRatios(const EcalGainRatios * gainRatios) { theGainRatios = gainRatios; } -void EcalCoder::setIntercalibConstants(const EcalIntercalibConstants * ical) { +void EcalCoder::setIntercalibConstants(const EcalIntercalibConstantsMC * ical) { theIntercalibConstants = ical; } @@ -271,10 +271,10 @@ void EcalCoder::findGains(const DetId & detId, double Gains[]) const void EcalCoder::findIntercalibConstant(const DetId & detId, double & icalconst) const { - EcalIntercalibConstant thisconst = 1.; + EcalIntercalibConstantMC thisconst = 1.; // find intercalib constant for this xtal - const EcalIntercalibConstantMap &icalMap = theIntercalibConstants->getMap(); - EcalIntercalibConstantMap::const_iterator icalit = icalMap.find(detId); + const EcalIntercalibConstantMCMap &icalMap = theIntercalibConstants->getMap(); + EcalIntercalibConstantMCMap::const_iterator icalit = icalMap.find(detId); if( icalit!=icalMap.end() ){ thisconst = (*icalit); if ( icalconst == 0. ) { thisconst = 1.; } diff --git a/SimCalorimetry/EcalSimProducers/plugins/EcalDigiProducer.cc b/SimCalorimetry/EcalSimProducers/plugins/EcalDigiProducer.cc index 84acb911e52dd..b5ee1dd333ec9 100644 --- a/SimCalorimetry/EcalSimProducers/plugins/EcalDigiProducer.cc +++ b/SimCalorimetry/EcalSimProducers/plugins/EcalDigiProducer.cc @@ -11,8 +11,8 @@ #include "Geometry/Records/interface/CaloGeometryRecord.h" #include "CondFormats/EcalObjects/interface/EcalPedestals.h" #include "CondFormats/DataRecord/interface/EcalPedestalsRcd.h" -#include "CondFormats/EcalObjects/interface/EcalIntercalibConstants.h" -#include "CondFormats/DataRecord/interface/EcalIntercalibConstantsRcd.h" +#include "CondFormats/EcalObjects/interface/EcalIntercalibConstantsMC.h" +#include "CondFormats/DataRecord/interface/EcalIntercalibConstantsMCRcd.h" #include "CondFormats/EcalObjects/interface/EcalADCToGeVConstant.h" #include "CondFormats/DataRecord/interface/EcalADCToGeVConstantRcd.h" #include "CondFormats/EcalObjects/interface/EcalGainRatios.h" @@ -272,9 +272,9 @@ void EcalDigiProducer::checkCalibrations(const edm::EventSetup & eventSetup) theCoder->setPedestals( thePedestals ); // Ecal Intercalibration Constants - edm::ESHandle pIcal; - eventSetup.get().get(pIcal); - const EcalIntercalibConstants *ical = pIcal.product(); + edm::ESHandle pIcal; + eventSetup.get().get(pIcal); + const EcalIntercalibConstantsMC *ical = pIcal.product(); theCoder->setIntercalibConstants( ical );