9 using std::setprecision;
68 #ifdef THIS_IS_AN_EVENT_EXAMPLE 73 #ifdef THIS_IS_AN_EVENTSETUP_EXAMPLE 75 iSetup.
get<SetupRecord>().
get(pSetup);
88 bool ecalIsConsistent =
true;
89 bool hcalIsConsistent =
true;
105 for (
unsigned short absIeta = 1; absIeta <= 17; absIeta++)
112 ecal2 = caloEcalScale->
et(input, absIeta, 1);
114 if ( !(ecal1 == ecal2) )
116 ecalIsConsistent =
false;
125 ecal1 = ecalTPGScale->
128 ecal2 = caloEcalScale->
et(input, absIeta, -1);
130 if ( !(ecal1 == ecal2) )
132 ecalIsConsistent =
false;
141 for (
unsigned short absIeta = 18; absIeta <= 28; absIeta++)
145 ecal1 = ecalTPGScale->
148 ecal2 = caloEcalScale->
et(input, absIeta, 1);
150 if ( !(ecal1 == ecal2) )
152 ecalIsConsistent =
false;
161 ecal1 = ecalTPGScale->
164 ecal2 = caloEcalScale->
et(input, absIeta, -1);
166 if ( !(ecal1 == ecal2) )
168 ecalIsConsistent =
false;
178 if (!ecalIsConsistent)
182 LogWarning(
"InconsistentData") <<
"ECAL scales not consistent!";
195 for (
unsigned short absIeta = 1; absIeta <= 32; absIeta++)
198 hcal2 = caloHcalScale->
et(
input, absIeta, 1);
200 hcal4 = caloHcalScale->
et(
input, absIeta,-1);
204 if ( (!(hcal1 == hcal2))||(!(hcal3==hcal4)))
206 hcalIsConsistent =
false;
214 if (!hcalIsConsistent)
218 LogWarning(
"InconsistentData") <<
"HCAL scales not consistent!";
void setEventSetup(const edm::EventSetup &evtSetup)
double getTPGInGeV(const EcalTriggerPrimitiveDigi &tpDigi)
double et(unsigned short rank, unsigned short eta, short etaSign) const
convert from rank to physically meaningful quantity
static std::string const input
double et(unsigned short rank, unsigned short eta, short etaSign) const
convert from rank to physically meaningful quantity
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
virtual double hcaletValue(const int &ieta, const int &iphi, const int &version, const int &compressedValue) const =0