9 using std::setprecision;
59 #ifdef THIS_IS_AN_EVENT_EXAMPLE 64 #ifdef THIS_IS_AN_EVENTSETUP_EXAMPLE 66 iSetup.
get<SetupRecord>().
get(pSetup);
79 bool ecalIsConsistent =
true;
80 bool hcalIsConsistent =
true;
94 for (
unsigned short absIeta = 1; absIeta <= 17; absIeta++) {
97 ecal2 = caloEcalScale->
et(input, absIeta, 1);
99 if (!(ecal1 == ecal2)) {
100 ecalIsConsistent =
false;
110 ecal2 = caloEcalScale->
et(input, absIeta, -1);
112 if (!(ecal1 == ecal2)) {
113 ecalIsConsistent =
false;
122 for (
unsigned short absIeta = 18; absIeta <= 28; absIeta++) {
125 ecal2 = caloEcalScale->
et(input, absIeta, 1);
127 if (!(ecal1 == ecal2)) {
128 ecalIsConsistent =
false;
138 ecal2 = caloEcalScale->
et(input, absIeta, -1);
140 if (!(ecal1 == ecal2)) {
141 ecalIsConsistent =
false;
151 if (!ecalIsConsistent) {
154 LogWarning(
"InconsistentData") <<
"ECAL scales not consistent!";
164 for (
unsigned short absIeta = 1; absIeta <= 32; absIeta++) {
166 hcal2 = caloHcalScale->
et(
input, absIeta, 1);
168 hcal4 = caloHcalScale->
et(
input, absIeta, -1);
170 if ((!(hcal1 == hcal2)) || (!(hcal3 == hcal4))) {
171 hcalIsConsistent =
false;
179 if (!hcalIsConsistent) {
182 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