17 : fillHLT_(
true), doPUWeights_(
false), useAvgVtx_(
useAvgVtx), maxAllowedWeight_(maxWeight), lumiWeights_() {
25 edm::LogWarning(
"L1Prompt") <<
"No PU reweighting inputs - not going to calculate weights" << std::endl;
36 event_.lumi =
e.luminosityBlock();
45 for (
int itr = 0; itr < ntrigs; itr++) {
56 if (doPUWeights_ && (!
e.eventAuxiliary().isRealData())) {
61 std::vector<PileupSummaryInfo>::const_iterator pvi;
64 for (pvi = puInfo->begin(); pvi != puInfo->end(); ++pvi) {
65 int bx = pvi->getBunchCrossing();
68 npv = useAvgVtx_ ? pvi->getTrueNumInteractions() : pvi->getPU_NumInteractions();
73 weight = lumiWeights_.weight(npv);
74 if (maxAllowedWeight_ > 0. &&
weight > maxAllowedWeight_)
75 weight = maxAllowedWeight_;
79 if (!
e.eventAuxiliary().isRealData()) {
81 e.getByToken(pileupSummaryInfoToken_, puInfo);
83 for (std::vector<PileupSummaryInfo>::const_iterator pvi = puInfo->begin(); pvi != puInfo->end(); pvi++) {
84 int bx = pvi->getBunchCrossing();
86 event_.nPV = pvi->getPU_NumInteractions();
87 event_.nPV_True = pvi->getTrueNumInteractions();