351 std::map<std::pair<int, HcalDetId>, myInfo> tmpMap;
356 float icalconst = 1.;
361 HBHERecHit aHit(hbheItr->id(), hbheItr->energy() * icalconst, hbheItr->time());
362 double energyhit = aHit.
energy();
364 DetId id = (*hbheItr).detid();
366 std::map<std::pair<int, HcalDetId>, myInfo>::iterator itr1 =
myMap_.find(std::pair<int, HcalDetId>(algoBit, hid));
367 if (itr1 ==
myMap_.end()) {
369 myMap_[std::pair<int, HcalDetId>(algoBit, hid)] = info;
370 itr1 =
myMap_.find(std::pair<int, HcalDetId>(algoBit, hid));
372 itr1->second.theNS0++;
373 itr1->second.theNS1 += energyhit;
374 itr1->second.theNS2 += (energyhit * energyhit);
375 itr1->second.theNS3 += (energyhit * energyhit * energyhit);
376 itr1->second.theNS4 += (energyhit * energyhit * energyhit * energyhit);
377 itr1->second.runcheck =
rnnum;
381 std::map<std::pair<int, HcalDetId>, myInfo>::iterator itr2 = tmpMap.find(std::pair<int, HcalDetId>(algoBit, hid));
382 if (itr2 == tmpMap.end()) {
384 tmpMap[std::pair<int, HcalDetId>(algoBit, hid)] = info;
385 itr2 = tmpMap.find(std::pair<int, HcalDetId>(algoBit, hid));
387 itr2->second.theNS0++;
388 itr2->second.theNS1 += energyhit;
389 itr2->second.theNS2 += (energyhit * energyhit);
390 itr2->second.theNS3 += (energyhit * energyhit * energyhit);
391 itr2->second.theNS4 += (energyhit * energyhit * energyhit * energyhit);
392 itr2->second.runcheck =
rnnum;
400 float icalconst = 1.;
405 HBHERecHit aHit(hbheItr->id(), hbheItr->energy() * icalconst, hbheItr->time());
406 double energyhit = aHit.
energy();
408 DetId id = (*hbheItr).detid();
411 std::map<std::pair<int, HcalDetId>, myInfo>::iterator itr1 =
myMap_.find(std::pair<int, HcalDetId>(algoBit, hid));
412 std::map<std::pair<int, HcalDetId>, myInfo>::iterator itr2 = tmpMap.find(std::pair<int, HcalDetId>(algoBit, hid));
414 if (itr1 ==
myMap_.end()) {
416 myMap_[std::pair<int, HcalDetId>(algoBit, hid)] = info;
417 itr1 =
myMap_.find(std::pair<int, HcalDetId>(algoBit, hid));
419 itr1->second.theMB0++;
420 itr1->second.theDif0 = 0;
421 itr1->second.theMB1 += energyhit;
422 itr1->second.theMB2 += (energyhit * energyhit);
423 itr1->second.theMB3 += (energyhit * energyhit * energyhit);
424 itr1->second.theMB4 += (energyhit * energyhit * energyhit * energyhit);
425 itr1->second.runcheck =
rnnum;
427 if (itr2 != tmpMap.end()) {
428 mydiff = energyhit - (itr2->second.theNS1);
429 itr1->second.theDif0++;
430 itr1->second.theDif1 += mydiff;
431 itr1->second.theDif2 += (mydiff * mydiff);
441 float icalconst = 1.;
446 HFRecHit aHit(hbheItr->id(), hbheItr->energy() * icalconst, hbheItr->time());
447 double energyhit = aHit.
energy();
449 if (fabs(energyhit) > 40.)
451 DetId id = (*hbheItr).detid();
454 std::map<std::pair<int, HcalDetId>, myInfo>::iterator itr1 =
myMap_.find(std::pair<int, HcalDetId>(algoBit, hid));
456 if (itr1 ==
myMap_.end()) {
458 myMap_[std::pair<int, HcalDetId>(algoBit, hid)] = info;
459 itr1 =
myMap_.find(std::pair<int, HcalDetId>(algoBit, hid));
461 itr1->second.theNS0++;
462 itr1->second.theNS1 += energyhit;
463 itr1->second.theNS2 += (energyhit * energyhit);
464 itr1->second.theNS3 += (energyhit * energyhit * energyhit);
465 itr1->second.theNS4 += (energyhit * energyhit * energyhit * energyhit);
466 itr1->second.runcheck =
rnnum;
470 std::map<std::pair<int, HcalDetId>, myInfo>::iterator itr2 = tmpMap.find(std::pair<int, HcalDetId>(algoBit, hid));
471 if (itr2 == tmpMap.end()) {
473 tmpMap[std::pair<int, HcalDetId>(algoBit, hid)] = info;
474 itr2 = tmpMap.find(std::pair<int, HcalDetId>(algoBit, hid));
476 itr2->second.theNS0++;
477 itr2->second.theNS1 += energyhit;
478 itr2->second.theNS2 += (energyhit * energyhit);
479 itr2->second.theNS3 += (energyhit * energyhit * energyhit);
480 itr2->second.theNS4 += (energyhit * energyhit * energyhit * energyhit);
481 itr2->second.runcheck =
rnnum;
489 float icalconst = 1.;
493 HFRecHit aHit(hbheItr->id(), hbheItr->energy() * icalconst, hbheItr->time());
495 double energyhit = aHit.
energy();
497 if (fabs(energyhit) > 40.)
500 DetId id = (*hbheItr).detid();
503 std::map<std::pair<int, HcalDetId>, myInfo>::iterator itr1 =
myMap_.find(std::pair<int, HcalDetId>(algoBit, hid));
504 std::map<std::pair<int, HcalDetId>, myInfo>::iterator itr2 = tmpMap.find(std::pair<int, HcalDetId>(algoBit, hid));
506 if (itr1 ==
myMap_.end()) {
508 myMap_[std::pair<int, HcalDetId>(algoBit, hid)] = info;
509 itr1 =
myMap_.find(std::pair<int, HcalDetId>(algoBit, hid));
511 itr1->second.theMB0++;
512 itr1->second.theDif0 = 0;
513 itr1->second.theMB1 += energyhit;
514 itr1->second.theMB2 += (energyhit * energyhit);
515 itr1->second.theMB3 += (energyhit * energyhit * energyhit);
516 itr1->second.theMB4 += (energyhit * energyhit * energyhit * energyhit);
517 itr1->second.runcheck =
rnnum;
519 if (itr2 != tmpMap.end()) {
520 mydiff = energyhit - (itr2->second.theNS1);
521 itr1->second.theDif0++;
522 itr1->second.theDif1 += mydiff;
523 itr1->second.theDif2 += (mydiff * mydiff);
constexpr float energy() const
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
constexpr HcalSubdetector subdet() const
get the subdetector
const_iterator end() const
void fill(std::map< std::string, TH1 * > &h, const std::string &s, double x)
std::map< std::pair< int, HcalDetId >, myInfo > myMap_
const_iterator begin() const