340 std::map<std::pair<int, HcalDetId>, myInfo> tmpMap;
345 float icalconst = 1.;
350 HBHERecHit aHit(hbheItr->id(), hbheItr->energy() * icalconst, hbheItr->time());
351 double energyhit = aHit.
energy();
353 DetId id = (*hbheItr).detid();
355 std::map<std::pair<int, HcalDetId>, myInfo>::iterator itr1 =
myMap_.find(std::pair<int, HcalDetId>(algoBit, hid));
356 if (itr1 ==
myMap_.end()) {
358 myMap_[std::pair<int, HcalDetId>(algoBit, hid)] =
info;
359 itr1 =
myMap_.find(std::pair<int, HcalDetId>(algoBit, hid));
361 itr1->second.theNS0++;
362 itr1->second.theNS1 += energyhit;
363 itr1->second.theNS2 += (energyhit * energyhit);
364 itr1->second.theNS3 += (energyhit * energyhit * energyhit);
365 itr1->second.theNS4 += (energyhit * energyhit * energyhit * energyhit);
366 itr1->second.runcheck =
rnnum_;
370 std::map<std::pair<int, HcalDetId>, myInfo>::iterator itr2 = tmpMap.find(std::pair<int, HcalDetId>(algoBit, hid));
371 if (itr2 == tmpMap.end()) {
373 tmpMap[std::pair<int, HcalDetId>(algoBit, hid)] =
info;
374 itr2 = tmpMap.find(std::pair<int, HcalDetId>(algoBit, hid));
376 itr2->second.theNS0++;
377 itr2->second.theNS1 += energyhit;
378 itr2->second.theNS2 += (energyhit * energyhit);
379 itr2->second.theNS3 += (energyhit * energyhit * energyhit);
380 itr2->second.theNS4 += (energyhit * energyhit * energyhit * energyhit);
381 itr2->second.runcheck =
rnnum_;
389 float icalconst = 1.;
394 HBHERecHit aHit(hbheItr->id(), hbheItr->energy() * icalconst, hbheItr->time());
395 double energyhit = aHit.
energy();
397 DetId id = (*hbheItr).detid();
400 std::map<std::pair<int, HcalDetId>, myInfo>::iterator itr1 =
myMap_.find(std::pair<int, HcalDetId>(algoBit, hid));
401 std::map<std::pair<int, HcalDetId>, myInfo>::iterator itr2 = tmpMap.find(std::pair<int, HcalDetId>(algoBit, hid));
403 if (itr1 ==
myMap_.end()) {
405 myMap_[std::pair<int, HcalDetId>(algoBit, hid)] =
info;
406 itr1 =
myMap_.find(std::pair<int, HcalDetId>(algoBit, hid));
408 itr1->second.theMB0++;
409 itr1->second.theDif0 = 0;
410 itr1->second.theMB1 += energyhit;
411 itr1->second.theMB2 += (energyhit * energyhit);
412 itr1->second.theMB3 += (energyhit * energyhit * energyhit);
413 itr1->second.theMB4 += (energyhit * energyhit * energyhit * energyhit);
414 itr1->second.runcheck =
rnnum_;
416 if (itr2 != tmpMap.end()) {
417 mydiff = energyhit - (itr2->second.theNS1);
418 itr1->second.theDif0++;
419 itr1->second.theDif1 += mydiff;
420 itr1->second.theDif2 += (mydiff * mydiff);
430 float icalconst = 1.;
435 HFRecHit aHit(hbheItr->id(), hbheItr->energy() * icalconst, hbheItr->time());
436 double energyhit = aHit.
energy();
438 if (fabs(energyhit) > 40.)
440 DetId id = (*hbheItr).detid();
443 std::map<std::pair<int, HcalDetId>, myInfo>::iterator itr1 =
myMap_.find(std::pair<int, HcalDetId>(algoBit, hid));
445 if (itr1 ==
myMap_.end()) {
447 myMap_[std::pair<int, HcalDetId>(algoBit, hid)] =
info;
448 itr1 =
myMap_.find(std::pair<int, HcalDetId>(algoBit, hid));
450 itr1->second.theNS0++;
451 itr1->second.theNS1 += energyhit;
452 itr1->second.theNS2 += (energyhit * energyhit);
453 itr1->second.theNS3 += (energyhit * energyhit * energyhit);
454 itr1->second.theNS4 += (energyhit * energyhit * energyhit * energyhit);
455 itr1->second.runcheck =
rnnum_;
459 std::map<std::pair<int, HcalDetId>, myInfo>::iterator itr2 = tmpMap.find(std::pair<int, HcalDetId>(algoBit, hid));
460 if (itr2 == tmpMap.end()) {
462 tmpMap[std::pair<int, HcalDetId>(algoBit, hid)] =
info;
463 itr2 = tmpMap.find(std::pair<int, HcalDetId>(algoBit, hid));
465 itr2->second.theNS0++;
466 itr2->second.theNS1 += energyhit;
467 itr2->second.theNS2 += (energyhit * energyhit);
468 itr2->second.theNS3 += (energyhit * energyhit * energyhit);
469 itr2->second.theNS4 += (energyhit * energyhit * energyhit * energyhit);
470 itr2->second.runcheck =
rnnum_;
478 float icalconst = 1.;
482 HFRecHit aHit(hbheItr->id(), hbheItr->energy() * icalconst, hbheItr->time());
484 double energyhit = aHit.
energy();
486 if (fabs(energyhit) > 40.)
489 DetId id = (*hbheItr).detid();
492 std::map<std::pair<int, HcalDetId>, myInfo>::iterator itr1 =
myMap_.find(std::pair<int, HcalDetId>(algoBit, hid));
493 std::map<std::pair<int, HcalDetId>, myInfo>::iterator itr2 = tmpMap.find(std::pair<int, HcalDetId>(algoBit, hid));
495 if (itr1 ==
myMap_.end()) {
497 myMap_[std::pair<int, HcalDetId>(algoBit, hid)] =
info;
498 itr1 =
myMap_.find(std::pair<int, HcalDetId>(algoBit, hid));
500 itr1->second.theMB0++;
501 itr1->second.theDif0 = 0;
502 itr1->second.theMB1 += energyhit;
503 itr1->second.theMB2 += (energyhit * energyhit);
504 itr1->second.theMB3 += (energyhit * energyhit * energyhit);
505 itr1->second.theMB4 += (energyhit * energyhit * energyhit * energyhit);
506 itr1->second.runcheck =
rnnum_;
508 if (itr2 != tmpMap.end()) {
509 mydiff = energyhit - (itr2->second.theNS1);
510 itr1->second.theDif0++;
511 itr1->second.theDif1 += mydiff;
512 itr1->second.theDif2 += (mydiff * mydiff);
std::vector< T >::const_iterator const_iterator
const Item * getValues(DetId fId, bool throwOnFail=true) const
constexpr float energy() const
constexpr HcalSubdetector subdet() const
get the subdetector
const_iterator begin() const
const_iterator end() const
constexpr uint32_t rawId() const
get the raw id
std::map< std::pair< int, HcalDetId >, myInfo > myMap_