145 for (
int subd = 0; subd < 4; ++subd) {
146 sprintf(
name,
"Noise_%s", det[subd].c_str());
147 sprintf(
title,
"Energy Distribution for Noise in %s", det[subd].c_str());
149 sprintf(
name,
"Signal_%s", det[subd].c_str());
150 sprintf(
title,
"Energy Distribution for Signal in %s", det[subd].c_str());
155 myTree =
new TTree(
"RecJet",
"RecJet Tree");
189 LogDebug(
"AnalyzerMB") <<
"Fired trigger bit number " <<
itr->first.first;
191 if (
info.theMB0 > 0) {
209 ieta =
itr->first.second.ieta();
210 iphi =
itr->first.second.iphi();
228 for (
int i = 0;
i < 4;
i++) {
247 myRecalib = recalibCorrs.
product();
255 edm::LogInfo(
"AnalyzerMB") <<
" The size of the normal collection " << hbheNormal->
size();
261 edm::LogWarning(
"AnalyzerMB") <<
"HcalCalibAlgos: Error! can't get hbheNoise product!";
265 edm::LogInfo(
"AnalyzerMB") <<
"HBHE NS size of collection " << HithbheNS.
size();
274 edm::LogWarning(
"AnalyzerMB") <<
"HcalCalibAlgos: Error! can't get hbhe product!";
278 edm::LogInfo(
"AnalyzerMB") <<
"HBHE MB size of collection " << HithbheMB.
size();
287 edm::LogWarning(
"AnalyzerMB") <<
"HcalCalibAlgos: Error! can't get hfNoise product!";
291 edm::LogInfo(
"AnalyzerMB") <<
"HF NS size of collection " << HithfNS.
size();
300 edm::LogWarning(
"AnalyzerMB") <<
"HcalCalibAlgos: Error! can't get hf product!";
304 edm::LogInfo(
"AnalyzerMB") <<
"HF MB size of collection " << HithfMB.
size();
311 analyzeHcal(myRecalib, HithbheNS, HithbheMB, HithfNS, HithfMB, 1,
true);
315 if (gtObjectMapRecord.
isValid()) {
316 const std::vector<L1GlobalTriggerObjectMap>& objMapVec = gtObjectMapRecord->
gtObjectMap();
318 bool ok(
false),
fill(
true);
319 for (std::vector<L1GlobalTriggerObjectMap>::const_iterator itMap = objMapVec.begin(); itMap != objMapVec.end();
321 bool resultGt = (*itMap).algoGtlResult();
324 int algoBit = (*itMap).algoBitNumber();
325 analyzeHcal(myRecalib, HithbheNS, HithbheMB, HithfNS, HithfMB, algoBit,
fill);
328 LogDebug(
"AnalyzerMB") <<
"Trigger[" <<
ii <<
"] " << algoNameStr <<
" bit " << algoBit <<
" entered";
345 std::map<std::pair<int, HcalDetId>,
myInfo> tmpMap;
350 float icalconst = 1.;
355 HBHERecHit aHit(hbheItr->id(), hbheItr->energy() * icalconst, hbheItr->time());
356 double energyhit = aHit.
energy();
358 DetId id = (*hbheItr).detid();
360 std::map<std::pair<int, HcalDetId>,
myInfo>::iterator itr1 =
myMap_.find(std::pair<int, HcalDetId>(algoBit, hid));
361 if (itr1 ==
myMap_.end()) {
363 myMap_[std::pair<int, HcalDetId>(algoBit, hid)] =
info;
364 itr1 =
myMap_.find(std::pair<int, HcalDetId>(algoBit, hid));
366 itr1->second.theNS0++;
367 itr1->second.theNS1 += energyhit;
368 itr1->second.theNS2 += (energyhit * energyhit);
369 itr1->second.theNS3 += (energyhit * energyhit * energyhit);
370 itr1->second.theNS4 += (energyhit * energyhit * energyhit * energyhit);
371 itr1->second.runcheck =
rnnum;
375 std::map<std::pair<int, HcalDetId>,
myInfo>::iterator itr2 = tmpMap.find(std::pair<int, HcalDetId>(algoBit, hid));
376 if (itr2 == tmpMap.end()) {
378 tmpMap[std::pair<int, HcalDetId>(algoBit, hid)] =
info;
379 itr2 = tmpMap.find(std::pair<int, HcalDetId>(algoBit, hid));
381 itr2->second.theNS0++;
382 itr2->second.theNS1 += energyhit;
383 itr2->second.theNS2 += (energyhit * energyhit);
384 itr2->second.theNS3 += (energyhit * energyhit * energyhit);
385 itr2->second.theNS4 += (energyhit * energyhit * energyhit * energyhit);
386 itr2->second.runcheck =
rnnum;
394 float icalconst = 1.;
399 HBHERecHit aHit(hbheItr->id(), hbheItr->energy() * icalconst, hbheItr->time());
400 double energyhit = aHit.
energy();
402 DetId id = (*hbheItr).detid();
405 std::map<std::pair<int, HcalDetId>,
myInfo>::iterator itr1 =
myMap_.find(std::pair<int, HcalDetId>(algoBit, hid));
406 std::map<std::pair<int, HcalDetId>,
myInfo>::iterator itr2 = tmpMap.find(std::pair<int, HcalDetId>(algoBit, hid));
408 if (itr1 ==
myMap_.end()) {
410 myMap_[std::pair<int, HcalDetId>(algoBit, hid)] =
info;
411 itr1 =
myMap_.find(std::pair<int, HcalDetId>(algoBit, hid));
413 itr1->second.theMB0++;
414 itr1->second.theDif0 = 0;
415 itr1->second.theMB1 += energyhit;
416 itr1->second.theMB2 += (energyhit * energyhit);
417 itr1->second.theMB3 += (energyhit * energyhit * energyhit);
418 itr1->second.theMB4 += (energyhit * energyhit * energyhit * energyhit);
419 itr1->second.runcheck =
rnnum;
421 if (itr2 != tmpMap.end()) {
422 mydiff = energyhit - (itr2->second.theNS1);
423 itr1->second.theDif0++;
424 itr1->second.theDif1 += mydiff;
425 itr1->second.theDif2 += (mydiff * mydiff);
435 float icalconst = 1.;
440 HFRecHit aHit(hbheItr->id(), hbheItr->energy() * icalconst, hbheItr->time());
441 double energyhit = aHit.
energy();
443 if (fabs(energyhit) > 40.)
445 DetId id = (*hbheItr).detid();
448 std::map<std::pair<int, HcalDetId>,
myInfo>::iterator itr1 =
myMap_.find(std::pair<int, HcalDetId>(algoBit, hid));
450 if (itr1 ==
myMap_.end()) {
452 myMap_[std::pair<int, HcalDetId>(algoBit, hid)] =
info;
453 itr1 =
myMap_.find(std::pair<int, HcalDetId>(algoBit, hid));
455 itr1->second.theNS0++;
456 itr1->second.theNS1 += energyhit;
457 itr1->second.theNS2 += (energyhit * energyhit);
458 itr1->second.theNS3 += (energyhit * energyhit * energyhit);
459 itr1->second.theNS4 += (energyhit * energyhit * energyhit * energyhit);
460 itr1->second.runcheck =
rnnum;
464 std::map<std::pair<int, HcalDetId>,
myInfo>::iterator itr2 = tmpMap.find(std::pair<int, HcalDetId>(algoBit, hid));
465 if (itr2 == tmpMap.end()) {
467 tmpMap[std::pair<int, HcalDetId>(algoBit, hid)] =
info;
468 itr2 = tmpMap.find(std::pair<int, HcalDetId>(algoBit, hid));
470 itr2->second.theNS0++;
471 itr2->second.theNS1 += energyhit;
472 itr2->second.theNS2 += (energyhit * energyhit);
473 itr2->second.theNS3 += (energyhit * energyhit * energyhit);
474 itr2->second.theNS4 += (energyhit * energyhit * energyhit * energyhit);
475 itr2->second.runcheck =
rnnum;
483 float icalconst = 1.;
487 HFRecHit aHit(hbheItr->id(), hbheItr->energy() * icalconst, hbheItr->time());
489 double energyhit = aHit.
energy();
491 if (fabs(energyhit) > 40.)
494 DetId id = (*hbheItr).detid();
497 std::map<std::pair<int, HcalDetId>,
myInfo>::iterator itr1 =
myMap_.find(std::pair<int, HcalDetId>(algoBit, hid));
498 std::map<std::pair<int, HcalDetId>,
myInfo>::iterator itr2 = tmpMap.find(std::pair<int, HcalDetId>(algoBit, hid));
500 if (itr1 ==
myMap_.end()) {
502 myMap_[std::pair<int, HcalDetId>(algoBit, hid)] =
info;
503 itr1 =
myMap_.find(std::pair<int, HcalDetId>(algoBit, hid));
505 itr1->second.theMB0++;
506 itr1->second.theDif0 = 0;
507 itr1->second.theMB1 += energyhit;
508 itr1->second.theMB2 += (energyhit * energyhit);
509 itr1->second.theMB3 += (energyhit * energyhit * energyhit);
510 itr1->second.theMB4 += (energyhit * energyhit * energyhit * energyhit);
511 itr1->second.runcheck =
rnnum;
513 if (itr2 != tmpMap.end()) {
514 mydiff = energyhit - (itr2->second.theNS1);
515 itr1->second.theDif0++;
516 itr1->second.theDif1 += mydiff;
517 itr1->second.theDif2 += (mydiff * mydiff);