9 using std::setprecision;
68 #ifdef THIS_IS_AN_EVENT_EXAMPLE
73 #ifdef THIS_IS_AN_EVENTSETUP_EXAMPLE
75 iSetup.
get<SetupRecord>().
get(pSetup);
86 ecalTPGScale->setEventSetup(iSetup);
88 bool ecalIsConsistent =
true;
89 bool hcalIsConsistent =
true;
105 for (
unsigned short absIeta = 1; absIeta <= 17; absIeta++)
109 ecal1 = ecalTPGScale->getTPGInGeV( (
unsigned int)
input,
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++)
197 hcal1 = caloTPGTranscoder->hcaletValue(absIeta,
input);
198 hcal2 = caloHcalScale->et(
input, absIeta, 1);
199 hcal3 = caloTPGTranscoder->hcaletValue(-absIeta,
input);
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!";
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const