17 : fillHLT_(
true), doPUWeights_(
false), useAvgVtx_(useAvgVtx), maxAllowedWeight_(maxWeight), lumiWeights_() {
21 if ((
stat(puMCFile.c_str(), &buf) != -1) && (
stat(puDataFile.c_str(), &buf) != -1)) {
25 edm::LogWarning(
"L1Prompt") <<
"No PU reweighting inputs - not going to calculate weights" << std::endl;
43 const int ntrigs = hltresults->
size();
45 for (
int itr = 0; itr < ntrigs; itr++) {
47 if (!hltresults->
accept(itr))
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();
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();
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