9 : lheLabel_(iPSet.getParameter<
edm::
InputTag>(
"lheProduct")),
14 dumpLHEheader_(iPSet.getParameter<
bool>(
"dumpLHEheader")),
15 leadLepPtNbin_(iPSet.getParameter<
int>(
"leadLepPtNbin")),
16 rapidityNbin_(iPSet.getParameter<
int>(
"rapidityNbin")),
17 leadLepPtRange_(iPSet.getParameter<double>(
"leadLepPtRange")),
18 leadLepPtCut_(iPSet.getParameter<double>(
"leadLepPtCut")),
19 lepEtaCut_(iPSet.getParameter<double>(
"lepEtaCut")),
20 rapidityRange_(iPSet.getParameter<double>(
"rapidityRange")),
21 nJetsNbin_(iPSet.getParameter<
int>(
"nJetsNbin")),
22 jetPtNbin_(iPSet.getParameter<
int>(
"jetPtNbin")),
23 jetPtCut_(iPSet.getParameter<double>(
"jetPtCut")),
24 jetEtaCut_(iPSet.getParameter<double>(
"jetEtaCut")),
25 jetPtRange_(iPSet.getParameter<double>(
"jetPtRange")),
26 nScaleVar_(iPSet.getParameter<
int>(
"nScaleVar")),
27 idxPdfStart_(iPSet.getParameter<
int>(
"idxPdfStart")),
28 idxPdfEnd_(iPSet.getParameter<
int>(
"idxPdfEnd")),
29 nPdfVar_(idxPdfEnd_ - idxPdfStart_ + 1) {}
46 nEvt_ = aDqmHelper.
book1dHisto(
"nEvt",
"n analyzed Events", 1, 0., 1.,
"bin",
"Number of Events");
47 nlogWgt_ = aDqmHelper.
book1dHisto(
"nlogWgt",
"Log10(n weights)", 100, 0., 5.,
"log_{10}(nWgts)",
"Number of Events");
48 wgtVal_ = aDqmHelper.
book1dHisto(
"wgtVal",
"weights", 100, -1.5, 3.,
"weight",
"Number of Weights");
66 "leading lepton #eta",
77 "Gen jet multiplicity",
99 "leading Gen jet #eta",
112 std::vector<MonitorElement*>& tmps,
122 tmps.at(1)->getTH1()->Sumw2(
false);
124 tmps.at(2)->getTH1()->Sumw2(
false);
127 tmps.at(3)->setEfficiencyFlag();
130 tmps.at(4)->setEfficiencyFlag();
132 tmps.at(5)->getTH1()->Sumw2(
false);
134 tmps.at(6)->getTH1()->Sumw2(
false);
137 tmps.at(7)->setEfficiencyFlag();
140 tmps.at(8)->setEfficiencyFlag();
149 scaleVar.at(
idx)->Sumw2();
158 pdfVar.at(
idx)->Sumw2();
188 std::vector<reco::GenParticleRef>
leptons;
190 for (
unsigned iptc = 0; iptc < ptcls->size(); iptc++) {
192 if (ptc->status() == 1 && (
std::abs(ptc->pdgId()) == 11 ||
std::abs(ptc->pdgId()) == 13)) {
206 std::vector<reco::GenJetRef> genjetVec;
208 for (
unsigned igj = 0; igj < genjets->size(); igj++) {
212 genjetVec.push_back(genjet);
217 if (!genjetVec.empty()) {
218 std::sort(genjetVec.begin(), genjetVec.end(), HepMCValidationHelper::sortByPtRef<reco::GenJetRef>);
220 auto leadJet = genjetVec.at(0);
228 std::vector<MonitorElement*>& tmps,
230 tmps.at(0)->Fill(obs,
weight_);
238 for (
int iWgt = 0; iWgt <
nPdfVar_; iWgt++)
265 for (
auto it =
lheInfo->headers_begin(); it !=
lheInfo->headers_end(); it++) {
266 std::cout <<
"Header start" << std::endl;
267 std::cout <<
"Tag: " << it->tag() << std::endl;
268 for (
const auto&
l : it->lines()) {
280 for (
int b = 0;
b <
var.at(0)->GetNbinsX() + 2;
b++) {
281 float valU =
var.at(0)->GetBinContent(
b);
287 for (
unsigned v = 1;
v <
var.size();
v++) {
288 if (
var.at(
v)->GetEntries() == 0.)
294 tmps.at(1)->setBinContent(
b, valU);
295 tmps.at(2)->setBinContent(
b, valD);
298 tmps.at(1)->setEntries(
var.at(0)->GetEntries());
299 tmps.at(2)->setEntries(
var.at(0)->GetEntries());
300 tmps.at(1)->getTH1()->Sumw2(
true);
301 tmps.at(2)->getTH1()->Sumw2(
true);
311 for (
int b = 0;
b < tmps.at(0)->getNbinsX() + 2;
b++) {
312 float valNom = tmps.at(0)->getBinContent(
b);
317 for (
unsigned v = 0;
v <
var.size();
v++) {
318 if (
var.at(
v)->GetEntries() == 0.)
321 float dev = (
float)
var.at(
v)->GetBinContent(
b) - valNom;
326 float rmsup = valNom +
rms;
327 float rmsdn = valNom -
rms;
328 tmps.at(5)->setBinContent(
b, rmsup);
329 tmps.at(6)->setBinContent(
b, rmsdn);
332 tmps.at(5)->setEntries(tmps.at(0)->getTH1F()->GetEntries());
333 tmps.at(6)->setEntries(tmps.at(0)->getTH1F()->GetEntries());
334 tmps.at(5)->getTH1()->Sumw2(
true);
335 tmps.at(6)->getTH1()->Sumw2(
true);
const edm::InputTag lheLabel_
std::vector< GenParticle > GenParticleCollection
collection of GenParticles
void envelop(const std::vector< std::unique_ptr< TH1F >> &var, std::vector< MonitorElement *> &tmps)
void pdfRMS(const std::vector< std::unique_ptr< TH1F >> &var, std::vector< MonitorElement *> &tmps)
std::vector< MonitorElement * > leadLepPtTemp_
std::vector< LHEEventProduct::WGT > weights_
std::vector< MonitorElement * > leadJetPtTemp_
std::vector< std::unique_ptr< TH1F > > leadLepEtaScaleVar_
double originalXWGTUP() const
virtual void setCurrentFolder(std::string const &fullpath)
std::vector< GenJet > GenJetCollection
collection of GenJet objects
constexpr bool isUninitialized() const noexcept
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
std::string to_string(const V &value)
std::vector< std::unique_ptr< TH1F > > jetMultScaleVar_
void fillTemplates(std::vector< std::unique_ptr< TH1F >> &scaleVar, std::vector< std::unique_ptr< TH1F >> &pdfVar, std::vector< MonitorElement *> &tmps, float obs)
std::vector< std::unique_ptr< TH1F > > leadJetPtScaleVar_
std::vector< std::unique_ptr< TH1F > > leadJetEtaPdfVar_
std::vector< std::unique_ptr< TH1F > > leadLepPtScaleVar_
std::vector< std::unique_ptr< TH1F > > jetMultPdfVar_
const double leadLepPtCut_
LheWeightValidation(const edm::ParameterSet &)
void dqmBeginRun(const edm::Run &, const edm::EventSetup &) override
const edm::EDGetTokenT< reco::GenParticleCollection > genParticleToken_
MonitorElement * nlogWgt_
void analyze(const edm::Event &, const edm::EventSetup &) override
Abs< T >::type abs(const T &t)
bool getByLabel(std::string const &label, Handle< PROD > &result) const
const double rapidityRange_
void bookTemplates(DQMHelper &aDqmHelper, std::vector< std::unique_ptr< TH1F >> &scaleVar, std::vector< std::unique_ptr< TH1F >> &pdfVar, 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)
std::vector< MonitorElement * > jetMultTemp_
MonitorElement * book1dHisto(const std::string &name, const std::string &title, int n, double xmin, double xmax, const std::string &xaxis, const std::string &yaxis)
const edm::EDGetTokenT< LHEEventProduct > lheEvtToken_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::vector< MonitorElement * > leadLepEtaTemp_
const double leadLepPtRange_
std::vector< std::unique_ptr< TH1F > > leadLepEtaPdfVar_
const edm::EDGetTokenT< reco::GenJetCollection > genJetToken_
const edm::EDGetTokenT< LHERunInfoProduct > lheRunToken_
std::vector< std::unique_ptr< TH1F > > leadJetEtaScaleVar_
std::vector< std::unique_ptr< TH1F > > leadJetPtPdfVar_
void dqmEndRun(const edm::Run &, const edm::EventSetup &) override
const bool dumpLHEheader_
const std::vector< WGT > & weights() const
std::vector< MonitorElement * > leadJetEtaTemp_
std::vector< std::unique_ptr< TH1F > > leadLepPtPdfVar_