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;
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();
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();
edm::EDGetTokenT< std::vector< PileupSummaryInfo > > pileupSummaryInfoToken_
EventNumber_t event() const
EventAuxiliary const & eventAuxiliary() const override
bool getByToken(EDGetToken token, Handle< PROD > &result) const
bool accept() const
Has at least one path accepted the event?
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
unsigned int size() const
Get number of paths stored.
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
void Set(const edm::Event &e, const edm::EDGetTokenT< edm::TriggerResults > &hlt_)
std::string const & triggerName(unsigned int index) const
edm::LumiReWeighting lumiWeights_
bool isUninitialized() const
L1Analysis::L1AnalysisEventDataFormat event_
TimeValue_t value() const
edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const override
edm::Timestamp time() const