134 tok_respCorr_ = esConsumes<HcalRespCorrs, HcalRespCorrsRcd>();
142 for (
int subd = 0; subd < 4; ++subd) {
143 sprintf(
name,
"Noise_%s", det[subd].c_str());
144 sprintf(
title,
"Energy Distribution for Noise in %s", det[subd].c_str());
146 sprintf(
name,
"Signal_%s", det[subd].c_str());
147 sprintf(
title,
"Energy Distribution for Signal in %s", det[subd].c_str());
152 myTree =
new TTree(
"RecJet",
"RecJet Tree");
187 edm::LogVerbatim(
"AnalyzerMB") <<
"Fired trigger bit number " << itr->first.first;
190 if (
info.theMB0 > 0) {
206 mysubd = itr->first.second.subdet();
207 depth = itr->first.second.depth();
208 ieta = itr->first.second.ieta();
209 iphi = itr->first.second.iphi();
229 for (
int i = 0;
i < 4;
i++) {
260 edm::LogWarning(
"AnalyzerMB") <<
"HcalCalibAlgos: Error! can't get hbheNoise product!";
273 edm::LogWarning(
"AnalyzerMB") <<
"HcalCalibAlgos: Error! can't get hbhe product!";
286 edm::LogWarning(
"AnalyzerMB") <<
"HcalCalibAlgos: Error! can't get hfNoise product!";
299 edm::LogWarning(
"AnalyzerMB") <<
"HcalCalibAlgos: Error! can't get hf product!";
310 analyzeHcal(myRecalib, HithbheNS, HithbheMB, HithfNS, HithfMB, 1,
true);
314 if (gtObjectMapRecord.
isValid()) {
315 const std::vector<L1GlobalTriggerObjectMap>& objMapVec = gtObjectMapRecord->
gtObjectMap();
317 bool ok(
false),
fill(
true);
318 for (std::vector<L1GlobalTriggerObjectMap>::const_iterator itMap = objMapVec.begin(); itMap != objMapVec.end();
320 bool resultGt = (*itMap).algoGtlResult();
323 int algoBit = (*itMap).algoBitNumber();
324 analyzeHcal(myRecalib, HithbheNS, HithbheMB, HithfNS, HithfMB, algoBit,
fill);
328 edm::LogVerbatim(
"AnalyzerMB") <<
"Trigger[" <<
ii <<
"] " << algoNameStr <<
" bit " << algoBit <<
" entered";
346 std::map<std::pair<int, HcalDetId>,
myInfo> tmpMap;
351 float icalconst = 1.;
356 HBHERecHit aHit(hbheItr->id(), hbheItr->energy() * icalconst, hbheItr->time());
357 double energyhit = aHit.
energy();
359 DetId id = (*hbheItr).detid();
361 std::map<std::pair<int, HcalDetId>,
myInfo>::iterator itr1 =
myMap_.find(std::pair<int, HcalDetId>(algoBit, hid));
362 if (itr1 ==
myMap_.end()) {
364 myMap_[std::pair<int, HcalDetId>(algoBit, hid)] =
info;
365 itr1 =
myMap_.find(std::pair<int, HcalDetId>(algoBit, hid));
367 itr1->second.theNS0++;
368 itr1->second.theNS1 += energyhit;
369 itr1->second.theNS2 += (energyhit * energyhit);
370 itr1->second.theNS3 += (energyhit * energyhit * energyhit);
371 itr1->second.theNS4 += (energyhit * energyhit * energyhit * energyhit);
372 itr1->second.runcheck =
rnnum;
376 std::map<std::pair<int, HcalDetId>,
myInfo>::iterator itr2 = tmpMap.find(std::pair<int, HcalDetId>(algoBit, hid));
377 if (itr2 == tmpMap.end()) {
379 tmpMap[std::pair<int, HcalDetId>(algoBit, hid)] =
info;
380 itr2 = tmpMap.find(std::pair<int, HcalDetId>(algoBit, hid));
382 itr2->second.theNS0++;
383 itr2->second.theNS1 += energyhit;
384 itr2->second.theNS2 += (energyhit * energyhit);
385 itr2->second.theNS3 += (energyhit * energyhit * energyhit);
386 itr2->second.theNS4 += (energyhit * energyhit * energyhit * energyhit);
387 itr2->second.runcheck =
rnnum;
395 float icalconst = 1.;
400 HBHERecHit aHit(hbheItr->id(), hbheItr->energy() * icalconst, hbheItr->time());
401 double energyhit = aHit.
energy();
403 DetId id = (*hbheItr).detid();
406 std::map<std::pair<int, HcalDetId>,
myInfo>::iterator itr1 =
myMap_.find(std::pair<int, HcalDetId>(algoBit, hid));
407 std::map<std::pair<int, HcalDetId>,
myInfo>::iterator itr2 = tmpMap.find(std::pair<int, HcalDetId>(algoBit, hid));
409 if (itr1 ==
myMap_.end()) {
411 myMap_[std::pair<int, HcalDetId>(algoBit, hid)] =
info;
412 itr1 =
myMap_.find(std::pair<int, HcalDetId>(algoBit, hid));
414 itr1->second.theMB0++;
415 itr1->second.theDif0 = 0;
416 itr1->second.theMB1 += energyhit;
417 itr1->second.theMB2 += (energyhit * energyhit);
418 itr1->second.theMB3 += (energyhit * energyhit * energyhit);
419 itr1->second.theMB4 += (energyhit * energyhit * energyhit * energyhit);
420 itr1->second.runcheck =
rnnum;
422 if (itr2 != tmpMap.end()) {
423 mydiff = energyhit - (itr2->second.theNS1);
424 itr1->second.theDif0++;
425 itr1->second.theDif1 += mydiff;
426 itr1->second.theDif2 += (mydiff * mydiff);
436 float icalconst = 1.;
441 HFRecHit aHit(hbheItr->id(), hbheItr->energy() * icalconst, hbheItr->time());
442 double energyhit = aHit.
energy();
444 if (fabs(energyhit) > 40.)
446 DetId id = (*hbheItr).detid();
449 std::map<std::pair<int, HcalDetId>,
myInfo>::iterator itr1 =
myMap_.find(std::pair<int, HcalDetId>(algoBit, hid));
451 if (itr1 ==
myMap_.end()) {
453 myMap_[std::pair<int, HcalDetId>(algoBit, hid)] =
info;
454 itr1 =
myMap_.find(std::pair<int, HcalDetId>(algoBit, hid));
456 itr1->second.theNS0++;
457 itr1->second.theNS1 += energyhit;
458 itr1->second.theNS2 += (energyhit * energyhit);
459 itr1->second.theNS3 += (energyhit * energyhit * energyhit);
460 itr1->second.theNS4 += (energyhit * energyhit * energyhit * energyhit);
461 itr1->second.runcheck =
rnnum;
465 std::map<std::pair<int, HcalDetId>,
myInfo>::iterator itr2 = tmpMap.find(std::pair<int, HcalDetId>(algoBit, hid));
466 if (itr2 == tmpMap.end()) {
468 tmpMap[std::pair<int, HcalDetId>(algoBit, hid)] =
info;
469 itr2 = tmpMap.find(std::pair<int, HcalDetId>(algoBit, hid));
471 itr2->second.theNS0++;
472 itr2->second.theNS1 += energyhit;
473 itr2->second.theNS2 += (energyhit * energyhit);
474 itr2->second.theNS3 += (energyhit * energyhit * energyhit);
475 itr2->second.theNS4 += (energyhit * energyhit * energyhit * energyhit);
476 itr2->second.runcheck =
rnnum;
484 float icalconst = 1.;
488 HFRecHit aHit(hbheItr->id(), hbheItr->energy() * icalconst, hbheItr->time());
490 double energyhit = aHit.
energy();
492 if (fabs(energyhit) > 40.)
495 DetId id = (*hbheItr).detid();
498 std::map<std::pair<int, HcalDetId>,
myInfo>::iterator itr1 =
myMap_.find(std::pair<int, HcalDetId>(algoBit, hid));
499 std::map<std::pair<int, HcalDetId>,
myInfo>::iterator itr2 = tmpMap.find(std::pair<int, HcalDetId>(algoBit, hid));
501 if (itr1 ==
myMap_.end()) {
503 myMap_[std::pair<int, HcalDetId>(algoBit, hid)] =
info;
504 itr1 =
myMap_.find(std::pair<int, HcalDetId>(algoBit, hid));
506 itr1->second.theMB0++;
507 itr1->second.theDif0 = 0;
508 itr1->second.theMB1 += energyhit;
509 itr1->second.theMB2 += (energyhit * energyhit);
510 itr1->second.theMB3 += (energyhit * energyhit * energyhit);
511 itr1->second.theMB4 += (energyhit * energyhit * energyhit * energyhit);
512 itr1->second.runcheck =
rnnum;
514 if (itr2 != tmpMap.end()) {
515 mydiff = energyhit - (itr2->second.theNS1);
516 itr1->second.theDif0++;
517 itr1->second.theDif1 += mydiff;
518 itr1->second.theDif2 += (mydiff * mydiff);