18 useAvgVtx_(useAvgVtx),
19 maxAllowedWeight_(maxWeight),
25 if ((stat(puMCFile.c_str(), &buf) != -1) && (stat(puDataFile.c_str(), &buf) != -1)) {
33 edm::LogWarning(
"L1Prompt") <<
"No PU reweighting inputs - not going to calculate weights"<<std::endl;
59 const int ntrigs = hltresults->size();
61 for (
int itr=0; itr<ntrigs; itr++){
63 if (!hltresults->accept(itr))
continue;
64 event_.hlt.push_back(trigName);
77 std::vector<PileupSummaryInfo>::const_iterator pvi;
80 for(pvi = puInfo->begin(); pvi != puInfo->end(); ++pvi) {
82 int bx = pvi->getBunchCrossing();
85 npv = useAvgVtx_ ? pvi->getTrueNumInteractions() :
86 pvi->getPU_NumInteractions();
92 weight = lumiWeights_.weight( npv );
93 if (maxAllowedWeight_ > 0. && weight > maxAllowedWeight_)
94 weight = maxAllowedWeight_;
EventNumber_t event() const
virtual edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const
L1AnalysisEvent(std::string puMCFile, std::string puMCHist, std::string puDataFile, std::string puDataHist, bool useAvgVtx, double maxWeight)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
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