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);
constexpr float energy() const
HcalSubdetector subdet() const
get the subdetector
constexpr uint32_t rawId() const
get the raw id
std::vector< T >::const_iterator const_iterator
const Item * getValues(DetId fId, bool throwOnFail=true) const
const_iterator end() const
std::map< std::pair< int, HcalDetId >, myInfo > myMap_
const_iterator begin() const