79 std::vector<double> TS4TS5UpperThresholdTemp = iConfig.
getParameter<std::vector<double>>(
"TS4TS5UpperThreshold");
80 std::vector<double> TS4TS5UpperCutTemp = iConfig.
getParameter<std::vector<double>>(
"TS4TS5UpperCut");
81 std::vector<double> TS4TS5LowerThresholdTemp = iConfig.
getParameter<std::vector<double>>(
"TS4TS5LowerThreshold");
82 std::vector<double> TS4TS5LowerCutTemp = iConfig.
getParameter<std::vector<double>>(
"TS4TS5LowerCut");
84 for (
int i = 0;
i < (
int)TS4TS5UpperThresholdTemp.size() &&
i < (
int)TS4TS5UpperCutTemp.size();
i++)
85 TS4TS5UpperCut_.push_back(std::pair<double, double>(TS4TS5UpperThresholdTemp[
i], TS4TS5UpperCutTemp[
i]));
88 for (
int i = 0;
i < (
int)TS4TS5LowerThresholdTemp.size() &&
i < (
int)TS4TS5LowerCutTemp.size();
i++)
89 TS4TS5LowerCut_.push_back(std::pair<double, double>(TS4TS5LowerThresholdTemp[
i], TS4TS5LowerCutTemp[
i]));
95 edm::LogWarning(
"HCalNoiseInfoProducer") <<
" forcing fillRecHits to be true if fillDigis is true.\n";
107 edm::LogWarning(
"MisConfiguration") <<
"Must provide equally sized lists for laserMonCBoxList, laserMonIEtaList, "
108 "and laserMonIPhiList. Will not fill LaserMon\n";
117 adc2fC = std::vector<float>{
118 -0.5, 0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5, 9.5, 10.5, 11.5,
119 12.5, 13.5, 15., 17., 19., 21., 23., 25., 27., 29.5, 32.5, 35.5, 38.5,
120 42., 46., 50., 54.5, 59.5, 64.5, 59.5, 64.5, 69.5, 74.5, 79.5, 84.5, 89.5,
121 94.5, 99.5, 104.5, 109.5, 114.5, 119.5, 124.5, 129.5, 137., 147., 157., 167., 177.,
122 187., 197., 209.5, 224.5, 239.5, 254.5, 272., 292., 312., 334.5, 359.5, 384.5, 359.5,
123 384.5, 409.5, 434.5, 459.5, 484.5, 509.5, 534.5, 559.5, 584.5, 609.5, 634.5, 659.5, 684.5,
124 709.5, 747., 797., 847., 897., 947., 997., 1047., 1109.5, 1184.5, 1259.5, 1334.5, 1422.,
125 1522., 1622., 1734.5, 1859.5, 1984.5, 1859.5, 1984.5, 2109.5, 2234.5, 2359.5, 2484.5, 2609.5, 2734.5,
126 2859.5, 2984.5, 3109.5, 3234.5, 3359.5, 3484.5, 3609.5, 3797., 4047., 4297., 4547., 4797., 5047.,
127 5297., 5609.5, 5984.5, 6359.5, 6734.5, 7172., 7672., 8172., 8734.5, 9359.5, 9984.5};
420 produces<HcalNoiseRBXCollection>();
422 produces<HcalNoiseSummary>();
430 desc.
add<
double>(
"minRecHitE", 1.5);
431 desc.
add<
double>(
"minLowHitE", 10.0);
432 desc.
add<
double>(
"minHighHitE", 25.0);
433 desc.
add<
double>(
"minR45HitE", 5.0);
436 desc.
add<
double>(
"pMinERatio", 25.0);
437 desc.
add<
double>(
"pMinEZeros", 5.0);
438 desc.
add<
double>(
"pMinEEMF", 10.0);
441 desc.
add<
double>(
"minERatio", 50.0);
442 desc.
add<
double>(
"minEZeros", 10.0);
443 desc.
add<
double>(
"minEEMF", 50.0);
446 desc.
add<
double>(
"pMinE", 40.0);
447 desc.
add<
double>(
"pMinRatio", 0.75);
448 desc.
add<
double>(
"pMaxRatio", 0.85);
449 desc.
add<
int>(
"pMinHPDHits", 10);
450 desc.
add<
int>(
"pMinRBXHits", 20);
451 desc.
add<
int>(
"pMinHPDNoOtherHits", 7);
452 desc.
add<
int>(
"pMinZeros", 4);
453 desc.
add<
double>(
"pMinLowEHitTime", -6.0);
454 desc.
add<
double>(
"pMaxLowEHitTime", 6.0);
455 desc.
add<
double>(
"pMinHighEHitTime", -4.0);
456 desc.
add<
double>(
"pMaxHighEHitTime", 5.0);
457 desc.
add<
double>(
"pMaxHPDEMF", -0.02);
458 desc.
add<
double>(
"pMaxRBXEMF", 0.02);
459 desc.
add<
int>(
"pMinRBXRechitR45Count", 1);
460 desc.
add<
double>(
"pMinRBXRechitR45Fraction", 0.1);
461 desc.
add<
double>(
"pMinRBXRechitR45EnergyFraction", 0.1);
464 desc.
add<
double>(
"lMinRatio", -999.0);
465 desc.
add<
double>(
"lMaxRatio", 999.0);
466 desc.
add<
int>(
"lMinHPDHits", 17);
467 desc.
add<
int>(
"lMinRBXHits", 999);
468 desc.
add<
int>(
"lMinHPDNoOtherHits", 10);
469 desc.
add<
int>(
"lMinZeros", 10);
470 desc.
add<
double>(
"lMinLowEHitTime", -9999.0);
471 desc.
add<
double>(
"lMaxLowEHitTime", 9999.0);
472 desc.
add<
double>(
"lMinHighEHitTime", -9999.0);
473 desc.
add<
double>(
"lMaxHighEHitTime", 9999.0);
476 desc.
add<
double>(
"tMinRatio", -999.0);
477 desc.
add<
double>(
"tMaxRatio", 999.0);
478 desc.
add<
int>(
"tMinHPDHits", 16);
479 desc.
add<
int>(
"tMinRBXHits", 50);
480 desc.
add<
int>(
"tMinHPDNoOtherHits", 9);
481 desc.
add<
int>(
"tMinZeros", 8);
482 desc.
add<
double>(
"tMinLowEHitTime", -9999.0);
483 desc.
add<
double>(
"tMaxLowEHitTime", 9999.0);
484 desc.
add<
double>(
"tMinHighEHitTime", -7.0);
485 desc.
add<
double>(
"tMaxHighEHitTime", 6.0);
488 desc.
add<
double>(
"hlMaxHPDEMF", -9999.0);
489 desc.
add<
double>(
"hlMaxRBXEMF", 0.01);
492 desc.
add<
double>(
"calibdigiHBHEthreshold", 15)
494 "minimum threshold in fC of any HBHE \
495 calib digi to be counted in summary");
496 desc.
add<std::vector<int>>(
"calibdigiHBHEtimeslices",
503 ->setComment(
"time slices to use when determining charge of HBHE calib digis");
504 desc.
add<
double>(
"calibdigiHFthreshold", -999)
505 ->setComment(
"minimum threshold in fC of any HF calib digi to be counted in summary");
506 desc.
add<std::vector<int>>(
"calibdigiHFtimeslices",
519 ->setComment(
"time slices to use when determining charge of HF calib digis");
522 desc.
add<
double>(
"TS4TS5EnergyThreshold", 50);
523 desc.
add<std::vector<double>>(
"TS4TS5UpperThreshold",
531 desc.
add<std::vector<double>>(
"TS4TS5UpperCut",
539 desc.
add<std::vector<double>>(
"TS4TS5LowerThreshold",
549 desc.
add<std::vector<double>>(
"TS4TS5LowerCut",
563 desc.
add<std::vector<double>>(
"lRBXRecHitR45Cuts",
575 "first 4 entries : equivalent to 'fraction > 0.5' \
576 last 4 entries : equivalent to 'energy fraction > 0.5'");
577 desc.
add<std::vector<double>>(
"tRBXRecHitR45Cuts",
589 "first 4 entries : equivalent to 'fraction > 0.2' \
590 last 4 entries : equivalent to 'energy fraction > 0.2'");
595 desc.
add<std::vector<int>>(
"laserMonCBoxList",
597 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
599 ->setComment(
"time ordered list of the cBox values of laser monitor channels");
600 desc.
add<std::vector<int>>(
"laserMonIPhiList",
601 {23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0})
602 ->setComment(
"time ordered list of the iPhi values of laser monitor channels");
603 desc.
add<std::vector<int>>(
"laserMonIEtaList",
605 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
607 ->setComment(
"time ordered list of the iEta values of laser monitor channels");
610 desc.
add<
int>(
"laserMonTSStart", 0)->setComment(
"lower bound of laser monitor charge integration window");
611 desc.
add<
int>(
"laserMonTSEnd", -1)
612 ->setComment(
"upper bound of laser monitor charge integration window (-1 = no bound)");
613 desc.
add<
unsigned>(
"laserMonSamples", 4)->setComment(
"Number of laser monitor samples to take per channel");
616 desc.
add<
bool>(
"fillDigis",
true);
617 desc.
add<
bool>(
"fillRecHits",
true);
618 desc.
add<
bool>(
"fillCaloTowers",
true);
619 desc.
add<
bool>(
"fillTracks",
true);
620 desc.
add<
bool>(
"fillLaserMonitor",
true);
625 desc.
add<
int>(
"maxProblemRBXs", 72)
627 "maximum number of RBXs to fill. if you want to record \
628 all RBXs above some energy threshold,change maxProblemRBXs to \
629 999 and pMinE (above) to the threshold you want");
633 desc.
add<
int>(
"maxCaloTowerIEta", 20);
634 desc.
add<
double>(
"maxTrackEta", 2.0);
635 desc.
add<
double>(
"minTrackPt", 1.0);
636 desc.
add<
double>(
"maxNHF", 0.9);
637 desc.
add<
int>(
"maxjetindex", 0);
648 desc.
add<
unsigned int>(
"HcalAcceptSeverityLevel", 9);
653 desc.
add<std::vector<int>>(
"HcalRecHitFlagsToBeExcluded",
663 "which hcal calo flags to mask (HBHEIsolatedNoise=11, \
664 HBHEFlatNoise=12, HBHESpikeNoise=13, \
665 HBHETriangleNoise=14, HBHETS4TS5Noise=15, HBHENegativeNoise=27)");
668 descriptions.
add(
"hcalnoise", desc);
678 auto result1 = std::make_unique<HcalNoiseRBXCollection>();
679 auto result2 = std::make_unique<HcalNoiseSummary>();
705 HcalNoiseRBXArray::iterator maxit = rbxarray.begin();
706 double maxenergy = -999;
707 bool maxwritten =
false;
708 for (HcalNoiseRBXArray::iterator rit = rbxarray.begin(); rit != rbxarray.end(); ++rit) {
720 if (
data.energy() > maxenergy) {
721 maxenergy =
data.energy();
736 result1->push_back(rbx);
748 result1->push_back(rbx);
787 if (
data.numHPDNoOtherHits() >
summary.maxHPDNoOtherHits()) {
788 summary.maxhpdhitsnoother_ =
data.numHPDNoOtherHits();
792 if (
data.PassTS4TS5() ==
false)
793 summary.hasBadRBXTS4TS5_ =
true;
796 summary.hasBadRBXRechitR45Loose_ =
true;
798 summary.hasBadRBXRechitR45Tight_ =
true;
801 if (
data.minLowEHitTime() <
summary.min10GeVHitTime()) {
804 if (
data.maxLowEHitTime() >
summary.max10GeVHitTime()) {
809 if (
data.minHighEHitTime() <
summary.min25GeVHitTime()) {
812 if (
data.maxHighEHitTime() >
summary.max25GeVHitTime()) {
839 summary.filterstatus_ |= 0x100;
841 summary.filterstatus_ |= 0x200;
843 summary.filterstatus_ |= 0x400;
845 summary.filterstatus_ |= 0x800;
848 summary.filterstatus_ |= 0x10000;
873 int NcalibTS45gt15 = 0;
876 double chargecalibTS45 = 0;
877 double chargecalibgt15TS45 = 0;
896 <<
" could not find HBHEDigiCollection named " <<
digiCollName_ <<
"\n.";
928 bool isBig =
false, isBig5 =
false, isRBX =
false;
933 const HcalDetId& detid = (*rit)->idFront();
934 if (
DetId(detid) == digi.
id()) {
936 isBig = isBig5 =
true;
947 for (
int ts = 0; ts < tool.
size(); ++ts) {
949 if (digi[ts].
adc() == 0) {
955 double corrfc = tool[ts] -
calibrations.pedestal(digi[ts].capid());
981 if (hCalib.
isValid() ==
true) {
983 if (digi->id().hcalSubdet() == 0)
986 for (
unsigned i = 0;
i < (unsigned)digi->size();
i++)
992 if (digi->zsMarkAndPass())
997 double sumChargeHF = 0;
1009 double sumChargeHBHE = 0;
1017 chargecalibTS45 += sumChargeHBHE;
1020 chargecalibgt15TS45 += sumChargeHBHE;
1028 float max_charge = 0;
1030 std::vector<float> comb_charge;
1034 for (
unsigned ich = 0; ich < nch; ++ich) {
1044 int ch_iphi = calibId.iphi();
1045 int ch_ieta = calibId.ieta();
1047 if (cboxch == ch_cboxch &&
iphi == ch_iphi &&
ieta == ch_ieta) {
1048 unsigned ts_size = df.samples();
1051 for (
unsigned its = 0; its < ts_size; ++its) {
1057 bool ok = df[its].ok();
1058 int adc = df[its].adc();
1067 if (
ok &&
adc >= 0) {
1070 if (
charge > max_charge) {
1075 comb_charge.push_back(
charge);
1084 if (comb_charge.empty()) {
1089 int start_ts = max_ts - 3;
1090 int end_ts = max_ts + 3;
1096 if (end_ts >=
int(comb_charge.size()))
1097 end_ts = comb_charge.size() - 1;
1107 summary.calibCountTS45_ = NcalibTS45;
1108 summary.calibCountgt15TS45_ = NcalibTS45gt15;
1109 summary.calibChargeTS45_ = chargecalibTS45;
1110 summary.calibChargegt15TS45_ = chargecalibgt15TS45;
1111 summary.calibCountHF_ = NcalibHFgtX;
1143 <<
" could not find HBHERecHitCollection named " <<
recHitCollName_ <<
"\n.";
1152 summary.hitsInLaserRegion_ = 0;
1153 summary.hitsInNonLaserRegion_ = 0;
1154 summary.energyInLaserRegion_ = 0;
1155 summary.energyInNonLaserRegion_ = 0;
1164 uint32_t recHitFlag = rechit.
flags();
1173 recHitFlag = (recHitFlag & bitset) ? recHitFlag - bitset : recHitFlag;
1182 bool isRecovered = hcalSevLvlComputer->
recoveredRecHit(
id, recHitFlag);
1191 HcalBadLaserSignal))
1193 ++
summary.hitsInNonLaserRegion_;
1201 if (rechit.
eraw() > 1.5) {
1212 if (rechit.
flags() & isolbitset) {
1216 double et = rechit.
eraw() *
gp.perp() /
gp.mag();
1220 if (rechit.
flags() & flatbitset) {
1224 double et = rechit.
eraw() *
gp.perp() /
gp.mag();
1228 if (rechit.
flags() & spikebitset) {
1232 double et = rechit.
eraw() *
gp.perp() /
gp.mag();
1236 if (rechit.
flags() & trianglebitset) {
1240 double et = rechit.
eraw() *
gp.perp() /
gp.mag();
1244 if (rechit.
flags() & ts4ts5bitset) {
1250 double et = rechit.
eraw() *
gp.perp() /
gp.mag();
1255 if (rechit.
flags() & negativebitset) {
1259 double et = rechit.
eraw() *
gp.perp() /
gp.mag();
1275 for (HcalNoiseRBXArray::iterator rbxit =
array.begin(); rbxit !=
array.end(); ++rbxit) {
1276 for (std::vector<HcalNoiseHPD>::iterator hpdit = rbxit->hpds_.begin(); hpdit != rbxit->hpds_.end(); ++hpdit) {
1279 hpdit->refrechitset_.begin();
1280 it != hpdit->refrechitset_.end();
1282 hpdit->rechits_.push_back(*it);
1317 std::vector<std::vector<HcalNoiseHPD>::iterator> hpditervec;
1318 array.findHPD(twr, hpditervec);
1321 for (std::vector<std::vector<HcalNoiseHPD>::iterator>::iterator it = hpditervec.begin(); it != hpditervec.end();
1323 (*it)->calotowers_.push_back(myRef);
1339 bool goodJetFoundInLowBVRegion =
false;
1348 for (reco::PFJetCollection::const_iterator
jet = pfjet_h->begin();
jet != pfjet_h->end(); ++
jet) {
1354 if (
jet->eta() > 0.0 &&
jet->eta() < 1.4 &&
jet->phi() > -1.8 &&
jet->phi() < -1.4) {
1358 goodJetFoundInLowBVRegion =
true;
1367 summary.goodJetFoundInLowBVRegion_ = goodJetFoundInLowBVRegion;
1386 for (reco::TrackCollection::const_iterator iTrack =
handle->begin(); iTrack !=
handle->end(); ++iTrack) {