136 tok_respCorr_ = esConsumes<HcalRespCorrs, HcalRespCorrsRcd>();
144 for (
int subd = 0; subd < 4; ++subd) {
145 sprintf(
name,
"Noise_%s", det[subd].c_str());
146 sprintf(
title,
"Energy Distribution for Noise in %s", det[subd].c_str());
148 sprintf(
name,
"Signal_%s", det[subd].c_str());
149 sprintf(
title,
"Energy Distribution for Signal in %s", det[subd].c_str());
154 myTree =
new TTree(
"RecJet",
"RecJet Tree");
189 edm::LogVerbatim(
"AnalyzerMB") <<
"Fired trigger bit number " << itr->first.first;
192 if (
info.theMB0 > 0) {
208 mysubd = itr->first.second.subdet();
209 depth = itr->first.second.depth();
210 ieta = itr->first.second.ieta();
211 iphi = itr->first.second.iphi();
231 for (
int i = 0;
i < 4;
i++) {
262 edm::LogWarning(
"AnalyzerMB") <<
"HcalCalibAlgos: Error! can't get hbheNoise product!";
275 edm::LogWarning(
"AnalyzerMB") <<
"HcalCalibAlgos: Error! can't get hbhe product!";
288 edm::LogWarning(
"AnalyzerMB") <<
"HcalCalibAlgos: Error! can't get hfNoise product!";
301 edm::LogWarning(
"AnalyzerMB") <<
"HcalCalibAlgos: Error! can't get hf product!";
312 analyzeHcal(myRecalib, HithbheNS, HithbheMB, HithfNS, HithfMB, 1,
true);
316 if (gtObjectMapRecord.
isValid()) {
317 const std::vector<L1GlobalTriggerObjectMap>& objMapVec = gtObjectMapRecord->
gtObjectMap();
319 bool ok(
false),
fill(
true);
320 for (std::vector<L1GlobalTriggerObjectMap>::const_iterator itMap = objMapVec.begin(); itMap != objMapVec.end();
322 bool resultGt = (*itMap).algoGtlResult();
325 int algoBit = (*itMap).algoBitNumber();
326 analyzeHcal(myRecalib, HithbheNS, HithbheMB, HithfNS, HithfMB, algoBit,
fill);
330 edm::LogVerbatim(
"AnalyzerMB") <<
"Trigger[" <<
ii <<
"] " << algoNameStr <<
" bit " << algoBit <<
" entered";
348 std::map<std::pair<int, HcalDetId>,
myInfo> tmpMap;
353 float icalconst = 1.;
358 HBHERecHit aHit(hbheItr->id(), hbheItr->energy() * icalconst, hbheItr->time());
359 double energyhit = aHit.
energy();
361 DetId id = (*hbheItr).detid();
363 std::map<std::pair<int, HcalDetId>,
myInfo>::iterator itr1 =
myMap_.find(std::pair<int, HcalDetId>(algoBit, hid));
364 if (itr1 ==
myMap_.end()) {
366 myMap_[std::pair<int, HcalDetId>(algoBit, hid)] =
info;
367 itr1 =
myMap_.find(std::pair<int, HcalDetId>(algoBit, hid));
369 itr1->second.theNS0++;
370 itr1->second.theNS1 += energyhit;
371 itr1->second.theNS2 += (energyhit * energyhit);
372 itr1->second.theNS3 += (energyhit * energyhit * energyhit);
373 itr1->second.theNS4 += (energyhit * energyhit * energyhit * energyhit);
374 itr1->second.runcheck =
rnnum;
378 std::map<std::pair<int, HcalDetId>,
myInfo>::iterator itr2 = tmpMap.find(std::pair<int, HcalDetId>(algoBit, hid));
379 if (itr2 == tmpMap.end()) {
381 tmpMap[std::pair<int, HcalDetId>(algoBit, hid)] =
info;
382 itr2 = tmpMap.find(std::pair<int, HcalDetId>(algoBit, hid));
384 itr2->second.theNS0++;
385 itr2->second.theNS1 += energyhit;
386 itr2->second.theNS2 += (energyhit * energyhit);
387 itr2->second.theNS3 += (energyhit * energyhit * energyhit);
388 itr2->second.theNS4 += (energyhit * energyhit * energyhit * energyhit);
389 itr2->second.runcheck =
rnnum;
397 float icalconst = 1.;
402 HBHERecHit aHit(hbheItr->id(), hbheItr->energy() * icalconst, hbheItr->time());
403 double energyhit = aHit.
energy();
405 DetId id = (*hbheItr).detid();
408 std::map<std::pair<int, HcalDetId>,
myInfo>::iterator itr1 =
myMap_.find(std::pair<int, HcalDetId>(algoBit, hid));
409 std::map<std::pair<int, HcalDetId>,
myInfo>::iterator itr2 = tmpMap.find(std::pair<int, HcalDetId>(algoBit, hid));
411 if (itr1 ==
myMap_.end()) {
413 myMap_[std::pair<int, HcalDetId>(algoBit, hid)] =
info;
414 itr1 =
myMap_.find(std::pair<int, HcalDetId>(algoBit, hid));
416 itr1->second.theMB0++;
417 itr1->second.theDif0 = 0;
418 itr1->second.theMB1 += energyhit;
419 itr1->second.theMB2 += (energyhit * energyhit);
420 itr1->second.theMB3 += (energyhit * energyhit * energyhit);
421 itr1->second.theMB4 += (energyhit * energyhit * energyhit * energyhit);
422 itr1->second.runcheck =
rnnum;
424 if (itr2 != tmpMap.end()) {
425 mydiff = energyhit - (itr2->second.theNS1);
426 itr1->second.theDif0++;
427 itr1->second.theDif1 += mydiff;
428 itr1->second.theDif2 += (mydiff * mydiff);
438 float icalconst = 1.;
443 HFRecHit aHit(hbheItr->id(), hbheItr->energy() * icalconst, hbheItr->time());
444 double energyhit = aHit.
energy();
446 if (fabs(energyhit) > 40.)
448 DetId id = (*hbheItr).detid();
451 std::map<std::pair<int, HcalDetId>,
myInfo>::iterator itr1 =
myMap_.find(std::pair<int, HcalDetId>(algoBit, hid));
453 if (itr1 ==
myMap_.end()) {
455 myMap_[std::pair<int, HcalDetId>(algoBit, hid)] =
info;
456 itr1 =
myMap_.find(std::pair<int, HcalDetId>(algoBit, hid));
458 itr1->second.theNS0++;
459 itr1->second.theNS1 += energyhit;
460 itr1->second.theNS2 += (energyhit * energyhit);
461 itr1->second.theNS3 += (energyhit * energyhit * energyhit);
462 itr1->second.theNS4 += (energyhit * energyhit * energyhit * energyhit);
463 itr1->second.runcheck =
rnnum;
467 std::map<std::pair<int, HcalDetId>,
myInfo>::iterator itr2 = tmpMap.find(std::pair<int, HcalDetId>(algoBit, hid));
468 if (itr2 == tmpMap.end()) {
470 tmpMap[std::pair<int, HcalDetId>(algoBit, hid)] =
info;
471 itr2 = tmpMap.find(std::pair<int, HcalDetId>(algoBit, hid));
473 itr2->second.theNS0++;
474 itr2->second.theNS1 += energyhit;
475 itr2->second.theNS2 += (energyhit * energyhit);
476 itr2->second.theNS3 += (energyhit * energyhit * energyhit);
477 itr2->second.theNS4 += (energyhit * energyhit * energyhit * energyhit);
478 itr2->second.runcheck =
rnnum;
486 float icalconst = 1.;
490 HFRecHit aHit(hbheItr->id(), hbheItr->energy() * icalconst, hbheItr->time());
492 double energyhit = aHit.
energy();
494 if (fabs(energyhit) > 40.)
497 DetId id = (*hbheItr).detid();
500 std::map<std::pair<int, HcalDetId>,
myInfo>::iterator itr1 =
myMap_.find(std::pair<int, HcalDetId>(algoBit, hid));
501 std::map<std::pair<int, HcalDetId>,
myInfo>::iterator itr2 = tmpMap.find(std::pair<int, HcalDetId>(algoBit, hid));
503 if (itr1 ==
myMap_.end()) {
505 myMap_[std::pair<int, HcalDetId>(algoBit, hid)] =
info;
506 itr1 =
myMap_.find(std::pair<int, HcalDetId>(algoBit, hid));
508 itr1->second.theMB0++;
509 itr1->second.theDif0 = 0;
510 itr1->second.theMB1 += energyhit;
511 itr1->second.theMB2 += (energyhit * energyhit);
512 itr1->second.theMB3 += (energyhit * energyhit * energyhit);
513 itr1->second.theMB4 += (energyhit * energyhit * energyhit * energyhit);
514 itr1->second.runcheck =
rnnum;
516 if (itr2 != tmpMap.end()) {
517 mydiff = energyhit - (itr2->second.theNS1);
518 itr1->second.theDif0++;
519 itr1->second.theDif1 += mydiff;
520 itr1->second.theDif2 += (mydiff * mydiff);