360 std::map<std::pair<int,HcalDetId>,myInfo> tmpMap;
364 hbheItr!=HithbheNS.
end(); hbheItr++) {
371 HBHERecHit aHit(hbheItr->id(),hbheItr->energy()*icalconst,hbheItr->time());
372 double energyhit = aHit.
energy();
374 DetId id = (*hbheItr).detid();
376 std::map<std::pair<int,HcalDetId>,myInfo>::iterator itr1 =
myMap_.find(std::pair<int,HcalDetId>(algoBit,hid));
377 if (itr1 ==
myMap_.end()) {
379 myMap_[std::pair<int,HcalDetId>(algoBit,hid)] = info;
380 itr1 =
myMap_.find(std::pair<int,HcalDetId>(algoBit,hid));
382 itr1->second.theNS0++;
383 itr1->second.theNS1 += energyhit;
384 itr1->second.theNS2 += (energyhit*energyhit);
385 itr1->second.theNS3 += (energyhit*energyhit*energyhit);
386 itr1->second.theNS4 += (energyhit*energyhit*energyhit*energyhit);
387 itr1->second.runcheck =
rnnum;
390 std::map<std::pair<int,HcalDetId>,myInfo>::iterator itr2 = tmpMap.find(std::pair<int,HcalDetId>(algoBit,hid));
391 if (itr2 == tmpMap.end()) {
393 tmpMap[std::pair<int,HcalDetId>(algoBit,hid)] = info;
394 itr2 = tmpMap.find(std::pair<int,HcalDetId>(algoBit,hid));
396 itr2->second.theNS0++;
397 itr2->second.theNS1 += energyhit;
398 itr2->second.theNS2 += (energyhit*energyhit);
399 itr2->second.theNS3 += (energyhit*energyhit*energyhit);
400 itr2->second.theNS4 += (energyhit*energyhit*energyhit*energyhit);
401 itr2->second.runcheck =
rnnum;
408 hbheItr!=HithbheMB.
end(); hbheItr++) {
414 HBHERecHit aHit(hbheItr->id(),hbheItr->energy()*icalconst,hbheItr->time());
415 double energyhit = aHit.
energy();
417 DetId id = (*hbheItr).detid();
420 std::map<std::pair<int,HcalDetId>,myInfo>::iterator itr1 =
myMap_.find(std::pair<int,HcalDetId>(algoBit,hid));
421 std::map<std::pair<int,HcalDetId>,myInfo>::iterator itr2 = tmpMap.find(std::pair<int,HcalDetId>(algoBit,hid));
423 if (itr1 ==
myMap_.end()) {
425 myMap_[std::pair<int,HcalDetId>(algoBit,hid)] = info;
426 itr1 =
myMap_.find(std::pair<int,HcalDetId>(algoBit,hid));
428 itr1->second.theMB0++;
429 itr1->second.theDif0 = 0;
430 itr1->second.theMB1 += energyhit;
431 itr1->second.theMB2 += (energyhit*energyhit);
432 itr1->second.theMB3 += (energyhit*energyhit*energyhit);
433 itr1->second.theMB4 += (energyhit*energyhit*energyhit*energyhit);
434 itr1->second.runcheck =
rnnum;
436 if (itr2 !=tmpMap.end()) {
437 mydiff = energyhit - (itr2->second.theNS1);
438 itr1->second.theDif0++;
439 itr1->second.theDif1 += mydiff;
440 itr1->second.theDif2 += (mydiff*mydiff);
448 hbheItr!=HithfNS.
end(); hbheItr++) {
454 HFRecHit aHit(hbheItr->id(),hbheItr->energy()*icalconst,hbheItr->time());
455 double energyhit = aHit.
energy();
457 if(fabs(energyhit) > 40. )
continue;
458 DetId id = (*hbheItr).detid();
461 std::map<std::pair<int,HcalDetId>,myInfo>::iterator itr1 =
myMap_.find(std::pair<int,HcalDetId>(algoBit,hid));
463 if (itr1 ==
myMap_.end()) {
465 myMap_[std::pair<int,HcalDetId>(algoBit,hid)] = info;
466 itr1 =
myMap_.find(std::pair<int,HcalDetId>(algoBit,hid));
468 itr1->second.theNS0++;
469 itr1->second.theNS1 += energyhit;
470 itr1->second.theNS2 += (energyhit*energyhit);
471 itr1->second.theNS3 += (energyhit*energyhit*energyhit);
472 itr1->second.theNS4 += (energyhit*energyhit*energyhit*energyhit);
473 itr1->second.runcheck =
rnnum;
476 std::map<std::pair<int,HcalDetId>,myInfo>::iterator itr2 = tmpMap.find(std::pair<int,HcalDetId>(algoBit,hid));
477 if (itr2 == tmpMap.end()) {
479 tmpMap[std::pair<int,HcalDetId>(algoBit,hid)] = info;
480 itr2 = tmpMap.find(std::pair<int,HcalDetId>(algoBit,hid));
482 itr2->second.theNS0++;
483 itr2->second.theNS1 += energyhit;
484 itr2->second.theNS2 += (energyhit*energyhit);
485 itr2->second.theNS3 += (energyhit*energyhit*energyhit);
486 itr2->second.theNS4 += (energyhit*energyhit*energyhit*energyhit);
487 itr2->second.runcheck =
rnnum;
495 hbheItr!=HithfMB.
end(); hbheItr++) {
500 HFRecHit aHit(hbheItr->id(),hbheItr->energy()*icalconst,hbheItr->time());
502 double energyhit = aHit.
energy();
504 if(fabs(energyhit) > 40. )
continue;
506 DetId id = (*hbheItr).detid();
509 std::map<std::pair<int,HcalDetId>,myInfo>::iterator itr1 =
myMap_.find(std::pair<int,HcalDetId>(algoBit,hid));
510 std::map<std::pair<int,HcalDetId>,myInfo>::iterator itr2 = tmpMap.find(std::pair<int,HcalDetId>(algoBit,hid));
512 if (itr1 ==
myMap_.end()) {
514 myMap_[std::pair<int,HcalDetId>(algoBit,hid)] = info;
515 itr1 =
myMap_.find(std::pair<int,HcalDetId>(algoBit,hid));
517 itr1->second.theMB0++;
518 itr1->second.theDif0 = 0;
519 itr1->second.theMB1 += energyhit;
520 itr1->second.theMB2 += (energyhit*energyhit);
521 itr1->second.theMB3 += (energyhit*energyhit*energyhit);
522 itr1->second.theMB4 += (energyhit*energyhit*energyhit*energyhit);
523 itr1->second.runcheck =
rnnum;
525 if (itr2 !=tmpMap.end()) {
526 mydiff = energyhit - (itr2->second.theNS1);
527 itr1->second.theDif0++;
528 itr1->second.theDif1 += mydiff;
529 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< HBHERecHit >::const_iterator const_iterator
const Item * getValues(DetId fId, bool throwOnFail=true) const
std::map< std::pair< int, HcalDetId >, myInfo > myMap_
const_iterator end() const
const_iterator begin() const