9 #include "CLHEP/Units/defs.h"
10 #include "CLHEP/Units/PhysicalConstants.h"
15 : wmanager_(iPSet, consumesCollector()), hepmcCollection_(iPSet.getParameter<edm::
InputTag>(
"hepmcCollection")) {
28 constexpr
double logPdfMax = 3.0;
29 constexpr
double logPdfMin = -3.0;
30 constexpr
int logPdfNbin = 150;
31 constexpr
double logPdfBinsize = (logPdfMax - logPdfMin) / (
double)logPdfNbin;
32 constexpr
double logQScaleMax = 4.0;
33 constexpr
double logQScaleMin = -1.0;
34 constexpr
int logQScaleNbin = 500;
35 constexpr
double logQScaleBinsize = (logQScaleMax - logQScaleMin) / (
double)logQScaleNbin;
116 "otherPtclNumber",
"Log10(No. other ptcls)", 60, -1, 5,
"log_{10}(No. other ptcls)",
"Number of Events");
118 "Log10(p) other ptcls",
122 "log10(P^{other ptcls}) (log_{10}(GeV))",
127 "genPtclNumber",
"Log10(No. all particles)", 60, -1, 5,
"log10(No. all particles)",
"Number of Events");
129 "genVrtxNumber",
"Log10(No. all vertexs)", 60, -1, 5,
"log10(No. all vertexs)",
"Number of Events");
132 "Log10(No. stable particles)",
136 "log10(No. stable particles)",
139 "stablePtclPhi",
"stable Ptcl Phi", 360, -180, 180,
"#phi^{stable Ptcl} (rad)",
"Number of Events");
141 "stablePtclEta",
"stable Ptcl Eta (pseudo rapidity)", 220, -11, 11,
"#eta^{stable Ptcl}",
"Number of Events");
143 dqm.
book1dHisto(
"stablePtclCharge",
"stablePtclCharge", 5, -2, 2,
"Charge^{stable ptcls}",
"Number of Events");
145 "Log10(No. stable charged particles)",
149 "log_{10}(No. stable charged particles)",
152 "Log10(p) stable ptcl p",
156 "log_{10}(P^{stable ptcl}) (log_{10}(GeV))",
159 "Log10(pT) stable ptcl pT",
163 "log_{10}(P_{t}^{stable ptcl}) (log_{10}(GeV))",
166 dqm.
book1dHisto(
"partonNumber",
"number of partons", 100, 0, 100,
"number of partons",
"Number of Events");
168 dqm.
book1dHisto(
"partonpT",
"Log10(pT) parton pT", 80, -4, 4,
"Log10(P_{t}^{parton})",
"Number of Events");
170 "No. outgoing stable ptcls from vrtx",
174 "No. outgoing stable ptcls from vrtx",
178 "No. outgoing ptcls from vrtx",
182 "No. outgoing ptcls from vrtx",
184 vrtxZ = dqm.
book1dHisto(
"VrtxZ",
"VrtxZ", 50, -250, 250,
"Z_{Vtx}",
"Number of Events");
188 "Log10(No. unknown ptcls PDT)",
192 "log_{10}(No. unknown ptcls PDT)",
196 Bjorken_x = dqm.
book1dHisto(
"Bjorken_x",
"Bjorken_x", 1000, 0.0, 1.0,
"Bjorken_{x}",
"Number of Events");
198 "pdf_u",
"Log10(PDF(u,x,Q))", logPdfNbin, logPdfMin, logPdfMax,
"log_{10}(x*f(x))",
"Number of Events");
200 "Log10(PDF(ubar,x,Q))",
207 "pdf_d",
"Log10(PDF(d,x,Q))", logPdfNbin, logPdfMin, logPdfMax,
"log_{10}(x*f(x))",
"Number of Events");
209 "Log10(PDF(dbar,x,Q))",
216 "Log10(PDF(ssbar,x,Q))",
223 "Log10(PDF(ccbar,x,Q))",
230 "Log10(PDF(bbbar,x,Q))",
237 "pdf_g",
"Log10(PDF(g,x,Q))", logPdfNbin, logPdfMin, logPdfMax,
"log_{10}(x*f(x))",
"Number of Events");
239 "Log10(Q-scale(GeV))",
243 "log_{10}(Q-scale(GeV))",
245 parton1Id = dqm.
book1dHisto(
"parton1Id",
"ID of parton 1", 45, -14.5, 30.5,
"ID",
"Number of Events");
246 parton2Id = dqm.
book1dHisto(
"parton2Id",
"ID of parton 2", 45, -14.5, 30.5,
"ID",
"Number of Events");
262 "log_{10} of deviation from nominal Ecms",
266 "log_{10}(#DeltaE) (log_{10}(GeV))",
269 dqm.
book1dHisto(
"DeltaEcms1",
"deviation from nominal Ecms", 200, -1., 1.,
"#DeltaE (GeV)",
"Number of Events");
271 dqm.
book1dHisto(
"DeltaPx1",
"deviation from nominal Px", 200, -1., 1.,
"#DeltaP_{x} (GeV)",
"Number of Events");
273 dqm.
book1dHisto(
"DeltaPy1",
"deviation from nominal Py", 200, -1., 1.,
"#DeltaP_{y} (GeV)",
"Number of Events");
275 dqm.
book1dHisto(
"DeltaPz1",
"deviation from nominal Pz", 200, -1., 1.,
"#DeltaP_{z} (GeV)",
"Number of Events");
283 int outVrtxStablePtclNum = 0;
284 int stablePtclNum = 0;
285 int otherPtclNum = 0;
286 int unknownPDTNum = 0;
287 int stableChaNum = 0;
292 double logQScale = 0.;
314 HepMC::PdfInfo
const *pdf = myGenEvent->pdf_info();
316 bjorken = ((pdf->x1()) / ((pdf->x1()) + (pdf->x2())));
317 logQScale = log10(pdf->scalePDF());
318 if (logQScale > logQScaleMax)
319 logQScale = logQScaleMax - 0.5 * logQScaleBinsize;
320 if (logQScale < logQScaleMin)
321 logQScale = logQScaleMin + 0.5 * logQScaleBinsize;
322 logPdf1 = log10(pdf->pdf1());
323 if (logPdf1 > logPdfMax)
324 logPdf1 = logPdfMax - 0.5 * logPdfBinsize;
325 if (logPdf1 < logPdfMin)
326 logPdf1 = logPdfMin + 0.5 * logPdfBinsize;
327 logPdf2 = log10(pdf->pdf2());
328 if (logPdf2 > logPdfMax)
329 logPdf2 = logPdfMax - 0.5 * logPdfBinsize;
330 if (logPdf2 < logPdfMin)
331 logPdf2 = logPdfMin + 0.5 * logPdfBinsize;
340 if (pdf->id1() == -2)
342 if (pdf->id2() == -2)
348 if (pdf->id1() == -1)
350 if (pdf->id2() == -1)
371 HepMC::GenEvent::vertex_const_iterator vrtxBegin = myGenEvent->vertices_begin();
372 HepMC::GenEvent::vertex_const_iterator vrtxEnd = myGenEvent->vertices_end();
373 unsigned int nvtx(0);
374 for (HepMC::GenEvent::vertex_const_iterator vrtxIt = vrtxBegin; vrtxIt != vrtxEnd; ++vrtxIt) {
376 HepMC::GenVertex
const *vrtx = *vrtxIt;
385 HepMC::GenVertex::particles_out_const_iterator vrtxPtclBegin = vrtx->particles_out_const_begin();
386 HepMC::GenVertex::particles_out_const_iterator vrtxPtclEnd = vrtx->particles_out_const_end();
387 outVrtxStablePtclNum = 0;
388 for (HepMC::GenVertex::particles_out_const_iterator vrtxPtclIt = vrtxPtclBegin; vrtxPtclIt != vrtxPtclEnd;
391 if (vrtxPtcl->status() == 1) {
392 ++outVrtxStablePtclNum;
401 HepMC::GenEvent::particle_const_iterator ptclBegin = myGenEvent->particles_begin();
402 HepMC::GenEvent::particle_const_iterator ptclEnd = myGenEvent->particles_end();
403 for (HepMC::GenEvent::particle_const_iterator ptclIt = ptclBegin; ptclIt != ptclEnd; ++ptclIt) {
406 int Id = ptcl->pdg_id();
407 float Log_p = log10(ptcl->momentum().rho());
409 int status = ptcl->status();
411 if (PData ==
nullptr) {
415 charge = PData->charge();
421 if (ptcl->status() == 1) {
429 if (charge != 0. && charge != 999.)
453 etotal += ptcl->momentum().e();
454 pxtotal += ptcl->momentum().px();
455 pytotal += ptcl->momentum().py();
456 pztotal += ptcl->momentum().pz();
459 if (
abs(Id) < 6 ||
abs(Id) == 22) {
464 bool indentified =
false;
478 double ecms = 13000.;
479 if (myGenEvent->valid_beam_particles()) {
480 ecms = myGenEvent->beam_particles().first->momentum().e() + myGenEvent->beam_particles().second->momentum().e();
MonitorElement * genPtclStatus
MonitorElement * DeltaEcms
MonitorElement * genVrtxNumber
const edm::EventSetup & c
MonitorElement * unknownPDTNumber
MonitorElement * pdf_bbbar
MonitorElement * outVrtxPtclNumber
virtual void setCurrentFolder(std::string const &fullpath)
MonitorElement * pdf_dbar
MonitorElement * pdf_ccbar
bool getByToken(EDGetToken token, Handle< PROD > &result) const
MonitorElement * Bjorken_x
MonitorElement * otherPtclNumber
other ME's
void dqmBeginRun(const edm::Run &r, const edm::EventSetup &c) override
BasicHepMCValidation(const edm::ParameterSet &)
MonitorElement * parton2Id
MonitorElement * otherPtclMomentum
MonitorElement * stablePtclCharge
MonitorElement * partonNumber
edm::EDGetTokenT< edm::HepMCProduct > hepmcCollectionToken_
MonitorElement * vrtxRadius
~BasicHepMCValidation() override
MonitorElement * pdf_ubar
edm::ESHandle< HepPDT::ParticleDataTable > fPDGTable
PDT table.
void bookHistograms(DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override
MonitorElement * scalePDF
Abs< T >::type abs(const T &t)
MonitorElement * log10DeltaEcms
MonitorElement * partonpT
MonitorElement * stablePtclPhi
MonitorElement * stablePtclEta
virtual void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
HepPDT::ParticleData ParticleData
void analyze(edm::Event const &, edm::EventSetup const &) override
MonitorElement * stablePtclp
MonitorElement * book1dHisto(const std::string &name, const std::string &title, int n, double xmin, double xmax, const std::string &xaxis, const std::string &yaxis)
MonitorElement * status1ShortLived
MonitorElement * stablePtclpT
MonitorElement * stableChaNumber
MonitorElement * stablePtclNumber
edm::ESGetToken< HepPDT::ParticleDataTable, edm::DefaultRecord > fPDGTableToken
MonitorElement * genPtclNumber
edm::InputTag hepmcCollection_
MonitorElement * outVrtxStablePtclNumber
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
double weight(const edm::Event &)
std::vector< ParticleMonitor > particles
MonitorElement * pdf_ssbar
MonitorElement * parton1Id