19 useAvgVtx_(useAvgVtx),
20 maxAllowedWeight_(maxWeight),
27 if ((stat(puMCFile.c_str(), &buf) != -1) && (stat(puDataFile.c_str(), &buf) != -1)) {
35 edm::LogWarning(
"L1Prompt") <<
"No PU reweighting inputs - not going to calculate weights"<<std::endl;
61 const int ntrigs = hltresults->size();
63 for (
int itr=0; itr<ntrigs; itr++){
65 if (!hltresults->accept(itr))
continue;
66 event_.hlt.push_back(trigName);
79 std::vector<PileupSummaryInfo>::const_iterator pvi;
82 for(pvi = puInfo->begin(); pvi != puInfo->end(); ++pvi) {
84 int bx = pvi->getBunchCrossing();
87 npv = useAvgVtx_ ? pvi->getTrueNumInteractions() :
88 pvi->getPU_NumInteractions();
94 weight = lumiWeights_.weight( npv );
95 if (maxAllowedWeight_ > 0. && weight > maxAllowedWeight_)
96 weight = maxAllowedWeight_;
103 e.
getByToken(pileupSummaryInfoToken_, puInfo);
105 for(std::vector<PileupSummaryInfo>::const_iterator pvi=puInfo->begin();pvi!=puInfo->end();pvi++){
106 int bx = pvi->getBunchCrossing();
108 event_.nPV = pvi->getPU_NumInteractions();
109 event_.nPV_True = pvi->getTrueNumInteractions();
edm::EDGetTokenT< std::vector< PileupSummaryInfo > > pileupSummaryInfoToken_
EventNumber_t event() const
virtual edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
L1AnalysisEvent(std::string puMCFile, std::string puMCHist, std::string puDataFile, std::string puDataHist, bool useAvgVtx, double maxWeight, edm::ConsumesCollector &&)
int bunchCrossing() const
edm::LuminosityBlockNumber_t luminosityBlock() const
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
void Set(const edm::Event &e, const edm::EDGetTokenT< edm::TriggerResults > &hlt_)
EventAuxiliary const & eventAuxiliary() const
std::string const & triggerName(unsigned int index) const
edm::LumiReWeighting lumiWeights_
bool isUninitialized() const
volatile std::atomic< bool > shutdown_flag false
TimeValue_t value() const
edm::Timestamp time() const