9 : wmanager_(iPSet, consumesCollector()),
12 idxGenEvtInfo_(iPSet.getParameter<int>(
"whichGenEventInfo")),
13 idxFSRup_(iPSet.getParameter<int>(
"idxFSRup")),
14 idxFSRdown_(iPSet.getParameter<int>(
"idxFSRdown")),
15 idxISRup_(iPSet.getParameter<int>(
"idxISRup")),
16 idxISRdown_(iPSet.getParameter<int>(
"idxISRdown")),
17 leadLepPtNbin_(iPSet.getParameter<int>(
"leadLepPtNbin")),
18 rapidityNbin_(iPSet.getParameter<int>(
"rapidityNbin")),
19 leadLepPtRange_(iPSet.getParameter<double>(
"leadLepPtRange")),
20 leadLepPtCut_(iPSet.getParameter<double>(
"leadLepPtCut")),
21 lepEtaCut_(iPSet.getParameter<double>(
"lepEtaCut")),
22 rapidityRange_(iPSet.getParameter<double>(
"rapidityRange")),
23 nJetsNbin_(iPSet.getParameter<int>(
"nJetsNbin")),
24 jetPtNbin_(iPSet.getParameter<int>(
"jetPtNbin")),
25 jetPtCut_(iPSet.getParameter<double>(
"jetPtCut")),
26 jetEtaCut_(iPSet.getParameter<double>(
"jetEtaCut")),
27 jetPtRange_(iPSet.getParameter<double>(
"jetPtRange")) {
29 std::sort(idxs.begin(), idxs.end(), std::greater<int>());
40 nEvt_ = aDqmHelper.
book1dHisto(
"nEvt",
"n analyzed Events", 1, 0., 1.,
"bin",
"Number of Events");
41 nlogWgt_ = aDqmHelper.
book1dHisto(
"nlogWgt",
"Log10(n weights)", 100, 0., 3.,
"log_{10}(nWgts)",
"Number of Events");
42 wgtVal_ = aDqmHelper.
book1dHisto(
"wgtVal",
"weights", 100, -1.5, 3.,
"weight",
"Number of Weights");
55 "leading lepton #eta",
64 "Gen jet multiplicity",
82 "leading Gen jet #eta",
93 std::vector<MonitorElement*>& tmps,
101 tmps.push_back(aDqmHelper.
book1dHisto(name, title, nbin, low, high, xtitle, ytitle));
102 tmps.push_back(aDqmHelper.
book1dHisto(name +
"FSRup", title +
" FSR up", nbin, low, high, xtitle, ytitle));
103 tmps.push_back(aDqmHelper.
book1dHisto(name +
"FSRdn", title +
" FSR down", nbin, low, high, xtitle, ytitle));
105 name +
"FSRup_ratio",
"Ratio of " + title +
" FSR up / Nominal", nbin, low, high, xtitle, ytitle));
106 tmps.at(3)->setEfficiencyFlag();
108 name +
"FSRdn_ratio",
"Ratio of " + title +
" FSR down / Nominal", nbin, low, high, xtitle, ytitle));
109 tmps.at(4)->setEfficiencyFlag();
110 tmps.push_back(aDqmHelper.
book1dHisto(name +
"ISRup", title +
" ISR up", nbin, low, high, xtitle, ytitle));
111 tmps.push_back(aDqmHelper.
book1dHisto(name +
"ISRdn", title +
" ISR down", nbin, low, high, xtitle, ytitle));
113 name +
"ISRup_ratio",
"Ratio of " + title +
" ISR up / Nominal", nbin, low, high, xtitle, ytitle));
114 tmps.at(7)->setEfficiencyFlag();
116 name +
"ISRdn_ratio",
"Ratio of " + title +
" ISR down / Nominal", nbin, low, high, xtitle, ytitle));
117 tmps.at(8)->setEfficiencyFlag();
133 for (
unsigned idx = 0; idx < weightsSize; idx++)
136 if ((
int)weightsSize <=
idxMax_)
144 std::vector<reco::GenParticleRef>
leptons;
146 for (
unsigned iptc = 0; iptc < ptcls->size(); iptc++) {
148 if (ptc->status() == 1 && (
std::abs(ptc->pdgId()) == 11 ||
std::abs(ptc->pdgId()) == 13)) {
150 leptons.push_back(ptc);
154 std::sort(leptons.begin(), leptons.end(), HepMCValidationHelper::sortByPtRef<reco::GenParticleRef>);
156 if (!leptons.empty()) {
162 std::vector<reco::GenJetRef> genjetVec;
164 for (
unsigned igj = 0; igj < genjets->size(); igj++) {
168 genjetVec.push_back(genjet);
173 if (!genjetVec.empty()) {
174 std::sort(genjetVec.begin(), genjetVec.end(), HepMCValidationHelper::sortByPtRef<reco::GenJetRef>);
176 auto leadJet = genjetVec.at(0);
183 tmps.at(0)->Fill(obs,
weight_);
const double leadLepPtRange_
std::vector< MonitorElement * > leadLepEtaTemp_
std::vector< GenParticle > GenParticleCollection
collection of GenParticles
const edm::EDGetTokenT< reco::GenParticleCollection > genParticleToken_
virtual void setCurrentFolder(std::string const &fullpath)
void analyze(const edm::Event &, const edm::EventSetup &) override
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::vector< GenJet > GenJetCollection
collection of GenJet objects
const double rapidityRange_
void dqmBeginRun(const edm::Run &, const edm::EventSetup &) override
std::vector< MonitorElement * > jetMultTemp_
GenWeightValidation(const edm::ParameterSet &)
void fillTemplates(std::vector< MonitorElement * > &tmps, float obs)
MonitorElement * nlogWgt_
std::vector< MonitorElement * > leadJetEtaTemp_
Abs< T >::type abs(const T &t)
std::vector< MonitorElement * > leadJetPtTemp_
std::vector< MonitorElement * > leadLepPtTemp_
MonitorElement * book1dHisto(const std::string &name, const std::string &title, int n, double xmin, double xmax, const std::string &xaxis, const std::string &yaxis)
void bookTemplates(DQMHelper &aDqmHelper, std::vector< MonitorElement * > &tmps, const std::string &name, const std::string &title, int nbin, float low, float high, const std::string &xtitle, const std::string &ytitle)
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
const edm::EDGetTokenT< reco::GenJetCollection > genJetToken_
const double leadLepPtCut_
std::vector< std::vector< double > > weightsCollection(const edm::Event &)
std::vector< std::vector< double > > weights_