CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Private Attributes
BasicHepMCValidation Class Reference

#include <BasicHepMCValidation.h>

Inheritance diagram for BasicHepMCValidation:
DQMEDAnalyzer edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >

Classes

class  ParticleMonitor
 

Public Member Functions

void analyze (edm::Event const &, edm::EventSetup const &) override
 
 BasicHepMCValidation (const edm::ParameterSet &)
 
void bookHistograms (DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override
 
void dqmBeginRun (const edm::Run &r, const edm::EventSetup &c) override
 
 ~BasicHepMCValidation () override
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &event, edm::EventSetup const &setup) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
void beginStream (edm::StreamID id) final
 
 DQMEDAnalyzer ()
 
void endLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

Private Attributes

MonitorElementBjorken_x
 
MonitorElementDeltaEcms
 
MonitorElementDeltaPx
 
MonitorElementDeltaPy
 
MonitorElementDeltaPz
 
edm::ESHandle< HepPDT::ParticleDataTablefPDGTable
 PDT table. More...
 
MonitorElementgenPtclNumber
 
MonitorElementgenPtclStatus
 
MonitorElementgenVrtxNumber
 
edm::InputTag hepmcCollection_
 
edm::EDGetTokenT< edm::HepMCProducthepmcCollectionToken_
 
MonitorElementlog10DeltaEcms
 
MonitorElementnEvt
 
MonitorElementotherPtclMomentum
 
MonitorElementotherPtclNumber
 other ME's More...
 
MonitorElementoutVrtxPtclNumber
 
MonitorElementoutVrtxStablePtclNumber
 
std::vector< ParticleMonitorparticles
 
MonitorElementparton1Id
 
MonitorElementparton2Id
 
MonitorElementpartonNumber
 
MonitorElementpartonpT
 
MonitorElementpdf_bbbar
 
MonitorElementpdf_ccbar
 
MonitorElementpdf_d
 
MonitorElementpdf_dbar
 
MonitorElementpdf_g
 
MonitorElementpdf_ssbar
 
MonitorElementpdf_u
 
MonitorElementpdf_ubar
 
MonitorElementscalePDF
 
MonitorElementstableChaNumber
 
MonitorElementstablePtclCharge
 
MonitorElementstablePtclEta
 
MonitorElementstablePtclNumber
 
MonitorElementstablePtclp
 
MonitorElementstablePtclPhi
 
MonitorElementstablePtclpT
 
MonitorElementstatus1ShortLived
 
MonitorElementunknownPDTNumber
 
MonitorElementvrtxRadius
 
MonitorElementvrtxZ
 
WeightManager wmanager_
 

Additional Inherited Members

- Public Types inherited from DQMEDAnalyzer
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static void globalEndJob (DQMEDAnalyzerGlobalCache const *)
 
static void globalEndLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup, LuminosityBlockContext const *context)
 
static void globalEndRunProduce (edm::Run &run, edm::EventSetup const &setup, RunContext const *context)
 
static std::unique_ptr< DQMEDAnalyzerGlobalCacheinitializeGlobalCache (edm::ParameterSet const &)
 
- Protected Member Functions inherited from DQMEDAnalyzer
uint64_t meId () const
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 
unsigned int streamId_
 

Detailed Description

Definition at line 34 of file BasicHepMCValidation.h.

Constructor & Destructor Documentation

◆ BasicHepMCValidation()

BasicHepMCValidation::BasicHepMCValidation ( const edm::ParameterSet iPSet)
explicit

Definition at line 14 of file BasicHepMCValidation.cc.

15  : wmanager_(iPSet, consumesCollector()), hepmcCollection_(iPSet.getParameter<edm::InputTag>("hepmcCollection")) {
16  hepmcCollectionToken_ = consumes<HepMCProduct>(hepmcCollection_);
17 }

References hepmcCollection_, and hepmcCollectionToken_.

◆ ~BasicHepMCValidation()

BasicHepMCValidation::~BasicHepMCValidation ( )
override

Definition at line 19 of file BasicHepMCValidation.cc.

19 {}

Member Function Documentation

◆ analyze()

void BasicHepMCValidation::analyze ( edm::Event const &  iEvent,
edm::EventSetup const &  iSetup 
)
overridevirtual

counters to zero for every event

Gathering the HepMCProduct information

PDF informations

Vertices

loop on vertex particles

Looping through the PARTICLES in the event

Particles

Status statistics

Stable particles

filling multiplicity ME's

Reimplemented from DQMEDAnalyzer.

Definition at line 276 of file BasicHepMCValidation.cc.

276  {
278  int partonNum = 0;
279  //
280  int outVrtxStablePtclNum = 0;
281  int stablePtclNum = 0;
282  int otherPtclNum = 0;
283  int unknownPDTNum = 0;
284  int stableChaNum = 0;
285  //
286  double bjorken = 0.;
287  double logPdf1 = 0.;
288  double logPdf2 = 0.;
289  double logQScale = 0.;
290  //
291  double etotal = 0.;
292  double pxtotal = 0.;
293  double pytotal = 0.;
294  double pztotal = 0.;
295 
298  iEvent.getByToken(hepmcCollectionToken_, evt);
299 
300  //Get EVENT
301  HepMC::GenEvent const *myGenEvent = evt->GetEvent();
302 
303  double weight = wmanager_.weight(iEvent);
304 
305  nEvt->Fill(0.5, weight);
306 
307  genPtclNumber->Fill(log10(myGenEvent->particles_size()), weight);
308  genVrtxNumber->Fill(log10(myGenEvent->vertices_size()), weight);
309 
311  HepMC::PdfInfo const *pdf = myGenEvent->pdf_info();
312  if (pdf) {
313  bjorken = ((pdf->x1()) / ((pdf->x1()) + (pdf->x2())));
314  logQScale = log10(pdf->scalePDF());
315  if (logQScale > logQScaleMax)
316  logQScale = logQScaleMax - 0.5 * logQScaleBinsize; // visualize overflow & underflow in the histograms
317  if (logQScale < logQScaleMin)
318  logQScale = logQScaleMin + 0.5 * logQScaleBinsize;
319  logPdf1 = log10(pdf->pdf1());
320  if (logPdf1 > logPdfMax)
321  logPdf1 = logPdfMax - 0.5 * logPdfBinsize;
322  if (logPdf1 < logPdfMin)
323  logPdf1 = logPdfMin + 0.5 * logPdfBinsize;
324  logPdf2 = log10(pdf->pdf2());
325  if (logPdf2 > logPdfMax)
326  logPdf2 = logPdfMax - 0.5 * logPdfBinsize;
327  if (logPdf2 < logPdfMin)
328  logPdf2 = logPdfMin + 0.5 * logPdfBinsize;
329  Bjorken_x->Fill(bjorken, weight);
330  scalePDF->Fill(logQScale, weight);
331  parton1Id->Fill((double)pdf->id1(), weight);
332  parton2Id->Fill((double)pdf->id2(), weight);
333  if (pdf->id1() == 2)
334  pdf_u->Fill(logPdf1, weight);
335  if (pdf->id2() == 2)
336  pdf_u->Fill(logPdf2, weight);
337  if (pdf->id1() == -2)
338  pdf_ubar->Fill(logPdf1, weight);
339  if (pdf->id2() == -2)
340  pdf_ubar->Fill(logPdf2, weight);
341  if (pdf->id1() == 1)
342  pdf_d->Fill(logPdf1, weight);
343  if (pdf->id2() == 1)
344  pdf_d->Fill(logPdf2, weight);
345  if (pdf->id1() == -1)
346  pdf_dbar->Fill(logPdf1, weight);
347  if (pdf->id2() == -1)
348  pdf_dbar->Fill(logPdf2, weight);
349  if (std::abs(pdf->id1()) == 3)
350  pdf_ssbar->Fill(logPdf1, weight);
351  if (std::abs(pdf->id2()) == 3)
352  pdf_ssbar->Fill(logPdf2, weight);
353  if (std::abs(pdf->id1()) == 4)
354  pdf_ccbar->Fill(logPdf1, weight);
355  if (std::abs(pdf->id2()) == 4)
356  pdf_ccbar->Fill(logPdf2, weight);
357  if (std::abs(pdf->id1()) == 5)
358  pdf_bbbar->Fill(logPdf1, weight);
359  if (std::abs(pdf->id2()) == 5)
360  pdf_bbbar->Fill(logPdf2, weight);
361  if (std::abs(pdf->id1()) == 21)
362  pdf_g->Fill(logPdf1, weight);
363  if (std::abs(pdf->id2()) == 21)
364  pdf_g->Fill(logPdf2, weight);
365  }
366 
367  //Looping through the VERTICES in the event
368  HepMC::GenEvent::vertex_const_iterator vrtxBegin = myGenEvent->vertices_begin();
369  HepMC::GenEvent::vertex_const_iterator vrtxEnd = myGenEvent->vertices_end();
370  unsigned int nvtx(0);
371  for (HepMC::GenEvent::vertex_const_iterator vrtxIt = vrtxBegin; vrtxIt != vrtxEnd; ++vrtxIt) {
373  HepMC::GenVertex const *vrtx = *vrtxIt;
374  outVrtxPtclNumber->Fill(vrtx->particles_out_size(), weight);
375  //std::cout << "all " << vrtx->particles_out_size() << '\n';
376 
377  if (nvtx == 0) {
378  vrtxZ->Fill(vrtx->point3d().z(), weight);
379  vrtxRadius->Fill(vrtx->point3d().perp(), weight);
380  }
382  HepMC::GenVertex::particles_out_const_iterator vrtxPtclBegin = vrtx->particles_out_const_begin();
383  HepMC::GenVertex::particles_out_const_iterator vrtxPtclEnd = vrtx->particles_out_const_end();
384  outVrtxStablePtclNum = 0;
385  for (HepMC::GenVertex::particles_out_const_iterator vrtxPtclIt = vrtxPtclBegin; vrtxPtclIt != vrtxPtclEnd;
386  ++vrtxPtclIt) {
387  HepMC::GenParticle const *vrtxPtcl = *vrtxPtclIt;
388  if (vrtxPtcl->status() == 1) {
389  ++outVrtxStablePtclNum;
390  //std::cout << "stable " << outVrtxStablePtclNum << '\n';
391  }
392  }
393  outVrtxStablePtclNumber->Fill(outVrtxStablePtclNum, weight);
394  nvtx++;
395  } //vertices
396 
398  HepMC::GenEvent::particle_const_iterator ptclBegin = myGenEvent->particles_begin();
399  HepMC::GenEvent::particle_const_iterator ptclEnd = myGenEvent->particles_end();
400  for (HepMC::GenEvent::particle_const_iterator ptclIt = ptclBegin; ptclIt != ptclEnd; ++ptclIt) {
402  HepMC::GenParticle const *ptcl = *ptclIt;
403  int Id = ptcl->pdg_id(); // std::cout << Id << '\n';
404  float Log_p = log10(ptcl->momentum().rho());
405  double charge = 999.; // for the charge it's needed a HepPDT method
406  int status = ptcl->status();
407  const HepPDT::ParticleData *PData = fPDGTable->particle(HepPDT::ParticleID(Id));
408  if (PData == nullptr) {
409  // std::cout << "Unknown id = " << Id << '\n';
410  ++unknownPDTNum;
411  } else
412  charge = PData->charge();
413 
415  genPtclStatus->Fill((float)status, weight);
416 
418  if (ptcl->status() == 1) {
419  ++stablePtclNum;
420  stablePtclPhi->Fill(ptcl->momentum().phi() / CLHEP::degree,
421  weight); //std::cout << ptcl->polarization().phi() << '\n';
422  stablePtclEta->Fill(ptcl->momentum().pseudoRapidity(), weight);
423  stablePtclCharge->Fill(charge, weight); // std::cout << ptclData.charge() << '\n';
424  stablePtclp->Fill(Log_p, weight);
425  stablePtclpT->Fill(log10(ptcl->momentum().perp()), weight);
426  if (charge != 0. && charge != 999.)
427  ++stableChaNum;
428  if (std::abs(Id) == 1)
430  if (std::abs(Id) == 2)
432  if (std::abs(Id) == 3)
434  if (std::abs(Id) == 4)
436  if (std::abs(Id) == 5)
438  if (std::abs(Id) == 6)
440  if (Id == 21)
442  if (std::abs(Id) == 15)
444  if (Id == 23)
446  if (std::abs(Id) == 24)
448  if (std::abs(Id) == 7 || std::abs(Id) == 8 || std::abs(Id) == 17 || (std::abs(Id) >= 25 && std::abs(Id) <= 99))
450  etotal += ptcl->momentum().e();
451  pxtotal += ptcl->momentum().px();
452  pytotal += ptcl->momentum().py();
453  pztotal += ptcl->momentum().pz();
454  }
455 
456  if (abs(Id) < 6 || abs(Id) == 22) {
457  ++partonNum;
458  partonpT->Fill(Log_p, weight);
459  }
460 
461  bool indentified = false;
462  for (unsigned int i = 0; i < particles.size(); i++) {
463  if (particles.at(i).Fill(ptcl, weight)) {
464  indentified = true;
465  break;
466  }
467  }
468  if (!indentified) {
469  ++otherPtclNum;
470  otherPtclMomentum->Fill(Log_p, weight);
471  }
472  } //event particles
473 
474  // set a default sqrt(s) and then check in the event
475  double ecms = 13000.;
476  if (myGenEvent->valid_beam_particles()) {
477  ecms = myGenEvent->beam_particles().first->momentum().e() + myGenEvent->beam_particles().second->momentum().e();
478  }
479  log10DeltaEcms->Fill(log10(fabs(etotal - ecms)), weight);
480  DeltaEcms->Fill(etotal - ecms, weight);
481  DeltaPx->Fill(pxtotal, weight);
482  DeltaPy->Fill(pytotal, weight);
483  DeltaPz->Fill(pztotal, weight);
484 
486  stablePtclNumber->Fill(log10(stablePtclNum + 0.1), weight);
487  stableChaNumber->Fill(log10(stableChaNum + 0.1), weight);
488  otherPtclNumber->Fill(log10(otherPtclNum + 0.1), weight);
489  unknownPDTNumber->Fill(log10(unknownPDTNum + 0.1), weight);
490  //
491  partonNumber->Fill(partonNum, weight);
492  for (unsigned int i = 0; i < particles.size(); i++) {
493  particles.at(i).FillCount(weight);
494  };
495 
496 } //analyze

References funct::abs(), Bjorken_x, ALCARECOTkAlJpsiMuMu_cff::charge, DeltaEcms, DeltaPx, DeltaPy, DeltaPz, dqm::impl::MonitorElement::Fill(), fPDGTable, GenParticle::GenParticle, genPtclNumber, genPtclStatus, genVrtxNumber, edm::HepMCProduct::GetEvent(), hepmcCollectionToken_, mps_fire::i, iEvent, log10DeltaEcms, nEvt, otherPtclMomentum, otherPtclNumber, outVrtxPtclNumber, outVrtxStablePtclNumber, LHEGenericFilter_cfi::ParticleID, particles, parton1Id, parton2Id, partonNumber, partonpT, pdf_bbbar, pdf_ccbar, pdf_d, pdf_dbar, pdf_g, pdf_ssbar, pdf_u, pdf_ubar, scalePDF, stableChaNumber, stablePtclCharge, stablePtclEta, stablePtclNumber, stablePtclp, stablePtclPhi, stablePtclpT, mps_update::status, status1ShortLived, unknownPDTNumber, vrtxRadius, vrtxZ, WeightManager::weight(), mps_merge::weight, and wmanager_.

◆ bookHistograms()

void BasicHepMCValidation::bookHistograms ( DQMStore::IBooker i,
edm::Run const &  ,
edm::EventSetup const &   
)
overridevirtual

Setting the DQM top directories

Booking the ME's multiplicity

other

Implements DQMEDAnalyzer.

Definition at line 35 of file BasicHepMCValidation.cc.

35  {
37  DQMHelper dqm(&i);
38  i.setCurrentFolder("Generator/Particles");
39 
40  // Number of analyzed events
41  nEvt = dqm.book1dHisto("nEvt", "n analyzed Events", 1, 0., 1.);
42 
45  // quarks
46  particles.push_back(ParticleMonitor("u", 1, i));
47  particles.push_back(ParticleMonitor("ubar", -1, i));
48  particles.push_back(ParticleMonitor("d", 2, i));
49  particles.push_back(ParticleMonitor("dbar", -2, i));
50  particles.push_back(ParticleMonitor("s", 3, i));
51  particles.push_back(ParticleMonitor("sbar", -3, i));
52  particles.push_back(ParticleMonitor("c", 4, i));
53  particles.push_back(ParticleMonitor("cbar", -4, i));
54  particles.push_back(ParticleMonitor("b", 5, i));
55  particles.push_back(ParticleMonitor("bbar", -5, i));
56  particles.push_back(ParticleMonitor("t", 6, i));
57  particles.push_back(ParticleMonitor("tbar", -6, i));
58 
59  //leptons
60  particles.push_back(ParticleMonitor("eminus", 11, i));
61  particles.push_back(ParticleMonitor("eplus", -11, i));
62  particles.push_back(ParticleMonitor("nue", 12, i));
63  particles.push_back(ParticleMonitor("nuebar", -12, i));
64  particles.push_back(ParticleMonitor("muminus", 13, i));
65  particles.push_back(ParticleMonitor("muplus", -13, i));
66  particles.push_back(ParticleMonitor("numu", 14, i));
67  particles.push_back(ParticleMonitor("numubar", -14, i));
68  particles.push_back(ParticleMonitor("tauminus", 15, i));
69  particles.push_back(ParticleMonitor("tauplus", -15, i));
70  particles.push_back(ParticleMonitor("nutau", 16, i));
71  particles.push_back(ParticleMonitor("nutaubar", -16, i));
72 
73  //bosons
74  particles.push_back(ParticleMonitor("Wplus", 24, i));
75  particles.push_back(ParticleMonitor("Wminus", -24, i));
76  particles.push_back(ParticleMonitor("Z", 23, i));
77  particles.push_back(ParticleMonitor("gamma", 22, i));
78  particles.push_back(ParticleMonitor("gluon", 21, i));
79 
80  //mesons
81  particles.push_back(ParticleMonitor("piplus", 211, i, true)); //log
82  particles.push_back(ParticleMonitor("piminus", -211, i, true)); //log
83  particles.push_back(ParticleMonitor("pizero", 111, i, true)); //log
84  particles.push_back(ParticleMonitor("Kplus", 321, i));
85  particles.push_back(ParticleMonitor("Kminus", -321, i));
86  particles.push_back(ParticleMonitor("Klzero", 130, i));
87  particles.push_back(ParticleMonitor("Kszero", 310, i));
88 
89  //baryons
90  particles.push_back(ParticleMonitor("p", 2212, i, true)); //log
91  particles.push_back(ParticleMonitor("pbar", -2212, i, true)); //log
92  particles.push_back(ParticleMonitor("n", 2112, i, true)); //log
93  particles.push_back(ParticleMonitor("nbar", -2112, i, true)); //log
94  particles.push_back(ParticleMonitor("lambda0", 3122, i));
95  particles.push_back(ParticleMonitor("lambda0bar", -3122, i));
96 
97  //D mesons
98  particles.push_back(ParticleMonitor("Dplus", 411, i));
99  particles.push_back(ParticleMonitor("Dminus", -411, i));
100  particles.push_back(ParticleMonitor("Dzero", 421, i));
101  particles.push_back(ParticleMonitor("Dzerobar", -421, i));
102 
103  //B mesons
104  particles.push_back(ParticleMonitor("Bplus", 521, i));
105  particles.push_back(ParticleMonitor("Bminus", -521, i));
106  particles.push_back(ParticleMonitor("Bzero", 511, i));
107  particles.push_back(ParticleMonitor("Bzerobar", -511, i));
108  particles.push_back(ParticleMonitor("Bszero", 531, i));
109  particles.push_back(ParticleMonitor("Bszerobar", -531, i));
110 
111  //
112  otherPtclNumber = dqm.book1dHisto(
113  "otherPtclNumber", "Log10(No. other ptcls)", 60, -1, 5, "log_{10}(No. other ptcls)", "Number of Events"); //Log
114  otherPtclMomentum = dqm.book1dHisto("otherPtclMomentum",
115  "Log10(p) other ptcls",
116  60,
117  -2,
118  4,
119  "log10(P^{other ptcls}) (log_{10}(GeV))",
120  "Number of Events");
121 
123  genPtclNumber = dqm.book1dHisto(
124  "genPtclNumber", "Log10(No. all particles)", 60, -1, 5, "log10(No. all particles)", "Number of Events"); //Log
125  genVrtxNumber = dqm.book1dHisto(
126  "genVrtxNumber", "Log10(No. all vertexs)", 60, -1, 5, "log10(No. all vertexs)", "Number of Events"); //Log
127  //
128  stablePtclNumber = dqm.book1dHisto("stablePtclNumber",
129  "Log10(No. stable particles)",
130  50,
131  0,
132  5,
133  "log10(No. stable particles)",
134  "Number of Events"); //Log
135  stablePtclPhi = dqm.book1dHisto(
136  "stablePtclPhi", "stable Ptcl Phi", 360, -180, 180, "#phi^{stable Ptcl} (rad)", "Number of Events");
137  stablePtclEta = dqm.book1dHisto(
138  "stablePtclEta", "stable Ptcl Eta (pseudo rapidity)", 220, -11, 11, "#eta^{stable Ptcl}", "Number of Events");
140  dqm.book1dHisto("stablePtclCharge", "stablePtclCharge", 5, -2, 2, "Charge^{stable ptcls}", "Number of Events");
141  stableChaNumber = dqm.book1dHisto("stableChaNumber",
142  "Log10(No. stable charged particles)",
143  50,
144  0,
145  5,
146  "log_{10}(No. stable charged particles)",
147  "Number of Events"); //Log
148  stablePtclp = dqm.book1dHisto("stablePtclp",
149  "Log10(p) stable ptcl p",
150  80,
151  -4,
152  4,
153  "log_{10}(P^{stable ptcl}) (log_{10}(GeV))",
154  "Number of Events"); //Log
155  stablePtclpT = dqm.book1dHisto("stablePtclpT",
156  "Log10(pT) stable ptcl pT",
157  80,
158  -4,
159  4,
160  "log_{10}(P_{t}^{stable ptcl}) (log_{10}(GeV))",
161  "Number of Events"); //Log
162  partonNumber =
163  dqm.book1dHisto("partonNumber", "number of partons", 100, 0, 100, "number of partons", "Number of Events");
164  partonpT =
165  dqm.book1dHisto("partonpT", "Log10(pT) parton pT", 80, -4, 4, "Log10(P_{t}^{parton})", "Number of Events"); //Log
166  outVrtxStablePtclNumber = dqm.book1dHisto("outVrtxStablePtclNumber",
167  "No. outgoing stable ptcls from vrtx",
168  10,
169  0,
170  10,
171  "No. outgoing stable ptcls from vrtx",
172  "Number of Events");
173  //
174  outVrtxPtclNumber = dqm.book1dHisto("outVrtxPtclNumber",
175  "No. outgoing ptcls from vrtx",
176  30,
177  0,
178  30,
179  "No. outgoing ptcls from vrtx",
180  "Number of Events");
181  vrtxZ = dqm.book1dHisto("VrtxZ", "VrtxZ", 50, -250, 250, "Z_{Vtx}", "Number of Events");
182  vrtxRadius = dqm.book1dHisto("vrtxRadius", "vrtxRadius", 50, 0, 50, "R_{vtx}", "Number of Events");
183  //
184  unknownPDTNumber = dqm.book1dHisto("unknownPDTNumber",
185  "Log10(No. unknown ptcls PDT)",
186  60,
187  -1,
188  5,
189  "log_{10}(No. unknown ptcls PDT)",
190  "Number of Events"); //Log
191  genPtclStatus = dqm.book1dHisto("genPtclStatus", "Status of genParticle", 200, 0, 200., "", "Number of Events");
192  //
193  Bjorken_x = dqm.book1dHisto("Bjorken_x", "Bjorken_x", 1000, 0.0, 1.0, "Bjorken_{x}", "Number of Events");
194  pdf_u = dqm.book1dHisto(
195  "pdf_u", "Log10(PDF(u,x,Q))", logPdfNbin, logPdfMin, logPdfMax, "log_{10}(x*f(x))", "Number of Events"); //Log
196  pdf_ubar = dqm.book1dHisto("pdf_ubar",
197  "Log10(PDF(ubar,x,Q))",
198  logPdfNbin,
199  logPdfMin,
200  logPdfMax,
201  "log_{10}(x*f(x))",
202  "Number of Events"); //Log
203  pdf_d = dqm.book1dHisto(
204  "pdf_d", "Log10(PDF(d,x,Q))", logPdfNbin, logPdfMin, logPdfMax, "log_{10}(x*f(x))", "Number of Events"); //Log
205  pdf_dbar = dqm.book1dHisto("pdf_dbar",
206  "Log10(PDF(dbar,x,Q))",
207  logPdfNbin,
208  logPdfMin,
209  logPdfMax,
210  "log_{10}(x*f(x))",
211  "Number of Events"); //Log
212  pdf_ssbar = dqm.book1dHisto("pdf_ssbar",
213  "Log10(PDF(ssbar,x,Q))",
214  logPdfNbin,
215  logPdfMin,
216  logPdfMax,
217  "log_{10}(x*f(x))",
218  "Number of Events"); //Log
219  pdf_ccbar = dqm.book1dHisto("pdf_ccbar",
220  "Log10(PDF(ccbar,x,Q))",
221  logPdfNbin,
222  logPdfMin,
223  logPdfMax,
224  "log_{10}(x*f(x))",
225  "Number of Events"); //Log
226  pdf_bbbar = dqm.book1dHisto("pdf_bbbar",
227  "Log10(PDF(bbbar,x,Q))",
228  logPdfNbin,
229  logPdfMin,
230  logPdfMax,
231  "log_{10}(x*f(x))",
232  "Number of Events"); //Log
233  pdf_g = dqm.book1dHisto(
234  "pdf_g", "Log10(PDF(g,x,Q))", logPdfNbin, logPdfMin, logPdfMax, "log_{10}(x*f(x))", "Number of Events"); //Log
235  scalePDF = dqm.book1dHisto("scalePDF",
236  "Log10(Q-scale(GeV))",
237  logQScaleNbin,
238  logQScaleMin,
239  logQScaleMax,
240  "log_{10}(Q-scale(GeV))",
241  "Number of Events");
242  parton1Id = dqm.book1dHisto("parton1Id", "ID of parton 1", 45, -14.5, 30.5, "ID", "Number of Events");
243  parton2Id = dqm.book1dHisto("parton2Id", "ID of parton 2", 45, -14.5, 30.5, "ID", "Number of Events");
244  //
245  status1ShortLived = dqm.book1dHisto("status1ShortLived", "Status 1 short lived", 11, 0, 11, "", "Number of Events");
246  status1ShortLived->setBinLabel(1, "d/dbar");
247  status1ShortLived->setBinLabel(2, "u/ubar");
248  status1ShortLived->setBinLabel(3, "s/sbar");
249  status1ShortLived->setBinLabel(4, "c/cbar");
250  status1ShortLived->setBinLabel(5, "b/bbar");
251  status1ShortLived->setBinLabel(6, "t/tbar");
253  status1ShortLived->setBinLabel(8, "tau-/tau+");
254  status1ShortLived->setBinLabel(9, "Z0");
255  status1ShortLived->setBinLabel(10, "W-/W+");
256  status1ShortLived->setBinLabel(11, "PDG = 7,8,17,25-99");
257 
258  log10DeltaEcms = dqm.book1dHisto("DeltaEcms1log10",
259  "log_{10} of deviation from nominal Ecms",
260  200,
261  -1.,
262  5.,
263  "log_{10}(#DeltaE) (log_{10}(GeV))",
264  "Number of Events");
265  DeltaEcms =
266  dqm.book1dHisto("DeltaEcms1", "deviation from nominal Ecms", 200, -1., 1., "#DeltaE (GeV)", "Number of Events");
267  DeltaPx =
268  dqm.book1dHisto("DeltaPx1", "deviation from nominal Px", 200, -1., 1., "#DeltaP_{x} (GeV)", "Number of Events");
269  DeltaPy =
270  dqm.book1dHisto("DeltaPy1", "deviation from nominal Py", 200, -1., 1., "#DeltaP_{y} (GeV)", "Number of Events");
271  DeltaPz =
272  dqm.book1dHisto("DeltaPz1", "deviation from nominal Pz", 200, -1., 1., "#DeltaP_{z} (GeV)", "Number of Events");
273  return;
274 }

References Bjorken_x, DeltaEcms, DeltaPx, DeltaPy, DeltaPz, genPtclNumber, genPtclStatus, genVrtxNumber, mps_fire::i, log10DeltaEcms, nEvt, otherPtclMomentum, otherPtclNumber, outVrtxPtclNumber, outVrtxStablePtclNumber, particles, parton1Id, parton2Id, partonNumber, partonpT, pdf_bbbar, pdf_ccbar, pdf_d, pdf_dbar, pdf_g, pdf_ssbar, pdf_u, pdf_ubar, scalePDF, dqm::impl::MonitorElement::setBinLabel(), stableChaNumber, stablePtclCharge, stablePtclEta, stablePtclNumber, stablePtclp, stablePtclPhi, stablePtclpT, status1ShortLived, unknownPDTNumber, vrtxRadius, and vrtxZ.

◆ dqmBeginRun()

void BasicHepMCValidation::dqmBeginRun ( const edm::Run r,
const edm::EventSetup c 
)
overridevirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 21 of file BasicHepMCValidation.cc.

21 { c.getData(fPDGTable); }

References c, and fPDGTable.

Member Data Documentation

◆ Bjorken_x

MonitorElement* BasicHepMCValidation::Bjorken_x
private

Definition at line 220 of file BasicHepMCValidation.h.

Referenced by analyze(), and bookHistograms().

◆ DeltaEcms

MonitorElement* BasicHepMCValidation::DeltaEcms
private

Definition at line 236 of file BasicHepMCValidation.h.

Referenced by analyze(), and bookHistograms().

◆ DeltaPx

MonitorElement* BasicHepMCValidation::DeltaPx
private

Definition at line 237 of file BasicHepMCValidation.h.

Referenced by analyze(), and bookHistograms().

◆ DeltaPy

MonitorElement* BasicHepMCValidation::DeltaPy
private

Definition at line 238 of file BasicHepMCValidation.h.

Referenced by analyze(), and bookHistograms().

◆ DeltaPz

MonitorElement* BasicHepMCValidation::DeltaPz
private

Definition at line 239 of file BasicHepMCValidation.h.

Referenced by analyze(), and bookHistograms().

◆ fPDGTable

edm::ESHandle<HepPDT::ParticleDataTable> BasicHepMCValidation::fPDGTable
private

PDT table.

Definition at line 48 of file BasicHepMCValidation.h.

Referenced by analyze(), and dqmBeginRun().

◆ genPtclNumber

MonitorElement* BasicHepMCValidation::genPtclNumber
private

Definition at line 200 of file BasicHepMCValidation.h.

Referenced by analyze(), and bookHistograms().

◆ genPtclStatus

MonitorElement* BasicHepMCValidation::genPtclStatus
private

Definition at line 204 of file BasicHepMCValidation.h.

Referenced by analyze(), and bookHistograms().

◆ genVrtxNumber

MonitorElement* BasicHepMCValidation::genVrtxNumber
private

Definition at line 201 of file BasicHepMCValidation.h.

Referenced by analyze(), and bookHistograms().

◆ hepmcCollection_

edm::InputTag BasicHepMCValidation::hepmcCollection_
private

Definition at line 45 of file BasicHepMCValidation.h.

Referenced by BasicHepMCValidation().

◆ hepmcCollectionToken_

edm::EDGetTokenT<edm::HepMCProduct> BasicHepMCValidation::hepmcCollectionToken_
private

Definition at line 241 of file BasicHepMCValidation.h.

Referenced by analyze(), and BasicHepMCValidation().

◆ log10DeltaEcms

MonitorElement* BasicHepMCValidation::log10DeltaEcms
private

Definition at line 235 of file BasicHepMCValidation.h.

Referenced by analyze(), and bookHistograms().

◆ nEvt

MonitorElement* BasicHepMCValidation::nEvt
private

Definition at line 194 of file BasicHepMCValidation.h.

Referenced by analyze(), and bookHistograms().

◆ otherPtclMomentum

MonitorElement* BasicHepMCValidation::otherPtclMomentum
private

Definition at line 199 of file BasicHepMCValidation.h.

Referenced by analyze(), and bookHistograms().

◆ otherPtclNumber

MonitorElement* BasicHepMCValidation::otherPtclNumber
private

other ME's

Definition at line 198 of file BasicHepMCValidation.h.

Referenced by analyze(), and bookHistograms().

◆ outVrtxPtclNumber

MonitorElement* BasicHepMCValidation::outVrtxPtclNumber
private

Definition at line 203 of file BasicHepMCValidation.h.

Referenced by analyze(), and bookHistograms().

◆ outVrtxStablePtclNumber

MonitorElement* BasicHepMCValidation::outVrtxStablePtclNumber
private

Definition at line 215 of file BasicHepMCValidation.h.

Referenced by analyze(), and bookHistograms().

◆ particles

std::vector<ParticleMonitor> BasicHepMCValidation::particles
private

Definition at line 195 of file BasicHepMCValidation.h.

Referenced by analyze(), and bookHistograms().

◆ parton1Id

MonitorElement* BasicHepMCValidation::parton1Id
private

Definition at line 230 of file BasicHepMCValidation.h.

Referenced by analyze(), and bookHistograms().

◆ parton2Id

MonitorElement* BasicHepMCValidation::parton2Id
private

Definition at line 231 of file BasicHepMCValidation.h.

Referenced by analyze(), and bookHistograms().

◆ partonNumber

MonitorElement* BasicHepMCValidation::partonNumber
private

Definition at line 213 of file BasicHepMCValidation.h.

Referenced by analyze(), and bookHistograms().

◆ partonpT

MonitorElement* BasicHepMCValidation::partonpT
private

Definition at line 214 of file BasicHepMCValidation.h.

Referenced by analyze(), and bookHistograms().

◆ pdf_bbbar

MonitorElement* BasicHepMCValidation::pdf_bbbar
private

Definition at line 227 of file BasicHepMCValidation.h.

Referenced by analyze(), and bookHistograms().

◆ pdf_ccbar

MonitorElement* BasicHepMCValidation::pdf_ccbar
private

Definition at line 226 of file BasicHepMCValidation.h.

Referenced by analyze(), and bookHistograms().

◆ pdf_d

MonitorElement* BasicHepMCValidation::pdf_d
private

Definition at line 223 of file BasicHepMCValidation.h.

Referenced by analyze(), and bookHistograms().

◆ pdf_dbar

MonitorElement* BasicHepMCValidation::pdf_dbar
private

Definition at line 224 of file BasicHepMCValidation.h.

Referenced by analyze(), and bookHistograms().

◆ pdf_g

MonitorElement* BasicHepMCValidation::pdf_g
private

Definition at line 228 of file BasicHepMCValidation.h.

Referenced by analyze(), and bookHistograms().

◆ pdf_ssbar

MonitorElement* BasicHepMCValidation::pdf_ssbar
private

Definition at line 225 of file BasicHepMCValidation.h.

Referenced by analyze(), and bookHistograms().

◆ pdf_u

MonitorElement* BasicHepMCValidation::pdf_u
private

Definition at line 221 of file BasicHepMCValidation.h.

Referenced by analyze(), and bookHistograms().

◆ pdf_ubar

MonitorElement* BasicHepMCValidation::pdf_ubar
private

Definition at line 222 of file BasicHepMCValidation.h.

Referenced by analyze(), and bookHistograms().

◆ scalePDF

MonitorElement* BasicHepMCValidation::scalePDF
private

Definition at line 229 of file BasicHepMCValidation.h.

Referenced by analyze(), and bookHistograms().

◆ stableChaNumber

MonitorElement* BasicHepMCValidation::stableChaNumber
private

Definition at line 207 of file BasicHepMCValidation.h.

Referenced by analyze(), and bookHistograms().

◆ stablePtclCharge

MonitorElement* BasicHepMCValidation::stablePtclCharge
private

Definition at line 210 of file BasicHepMCValidation.h.

Referenced by analyze(), and bookHistograms().

◆ stablePtclEta

MonitorElement* BasicHepMCValidation::stablePtclEta
private

Definition at line 209 of file BasicHepMCValidation.h.

Referenced by analyze(), and bookHistograms().

◆ stablePtclNumber

MonitorElement* BasicHepMCValidation::stablePtclNumber
private

Definition at line 206 of file BasicHepMCValidation.h.

Referenced by analyze(), and bookHistograms().

◆ stablePtclp

MonitorElement* BasicHepMCValidation::stablePtclp
private

Definition at line 211 of file BasicHepMCValidation.h.

Referenced by analyze(), and bookHistograms().

◆ stablePtclPhi

MonitorElement* BasicHepMCValidation::stablePtclPhi
private

Definition at line 208 of file BasicHepMCValidation.h.

Referenced by analyze(), and bookHistograms().

◆ stablePtclpT

MonitorElement* BasicHepMCValidation::stablePtclpT
private

Definition at line 212 of file BasicHepMCValidation.h.

Referenced by analyze(), and bookHistograms().

◆ status1ShortLived

MonitorElement* BasicHepMCValidation::status1ShortLived
private

Definition at line 233 of file BasicHepMCValidation.h.

Referenced by analyze(), and bookHistograms().

◆ unknownPDTNumber

MonitorElement* BasicHepMCValidation::unknownPDTNumber
private

Definition at line 202 of file BasicHepMCValidation.h.

Referenced by analyze(), and bookHistograms().

◆ vrtxRadius

MonitorElement* BasicHepMCValidation::vrtxRadius
private

Definition at line 218 of file BasicHepMCValidation.h.

Referenced by analyze(), and bookHistograms().

◆ vrtxZ

MonitorElement* BasicHepMCValidation::vrtxZ
private

Definition at line 217 of file BasicHepMCValidation.h.

Referenced by analyze(), and bookHistograms().

◆ wmanager_

WeightManager BasicHepMCValidation::wmanager_
private

Definition at line 44 of file BasicHepMCValidation.h.

Referenced by analyze().

BasicHepMCValidation::particles
std::vector< ParticleMonitor > particles
Definition: BasicHepMCValidation.h:195
mps_fire.i
i
Definition: mps_fire.py:428
mps_update.status
status
Definition: mps_update.py:68
mps_merge.weight
weight
Definition: mps_merge.py:88
BasicHepMCValidation::hepmcCollection_
edm::InputTag hepmcCollection_
Definition: BasicHepMCValidation.h:45
BasicHepMCValidation::DeltaPy
MonitorElement * DeltaPy
Definition: BasicHepMCValidation.h:238
BasicHepMCValidation::otherPtclNumber
MonitorElement * otherPtclNumber
other ME's
Definition: BasicHepMCValidation.h:198
BasicHepMCValidation::vrtxZ
MonitorElement * vrtxZ
Definition: BasicHepMCValidation.h:217
BasicHepMCValidation::DeltaPx
MonitorElement * DeltaPx
Definition: BasicHepMCValidation.h:237
BasicHepMCValidation::pdf_g
MonitorElement * pdf_g
Definition: BasicHepMCValidation.h:228
BasicHepMCValidation::stablePtclPhi
MonitorElement * stablePtclPhi
Definition: BasicHepMCValidation.h:208
BasicHepMCValidation::genPtclStatus
MonitorElement * genPtclStatus
Definition: BasicHepMCValidation.h:204
edm::Handle
Definition: AssociativeIterator.h:50
HepMC::GenEvent
Definition: hepmc_rootio.cc:9
ParticleData
HepPDT::ParticleData ParticleData
Definition: ParticleDataTable.h:9
BasicHepMCValidation::fPDGTable
edm::ESHandle< HepPDT::ParticleDataTable > fPDGTable
PDT table.
Definition: BasicHepMCValidation.h:48
BasicHepMCValidation::pdf_ccbar
MonitorElement * pdf_ccbar
Definition: BasicHepMCValidation.h:226
BasicHepMCValidation::status1ShortLived
MonitorElement * status1ShortLived
Definition: BasicHepMCValidation.h:233
BasicHepMCValidation::scalePDF
MonitorElement * scalePDF
Definition: BasicHepMCValidation.h:229
BasicHepMCValidation::Bjorken_x
MonitorElement * Bjorken_x
Definition: BasicHepMCValidation.h:220
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
BasicHepMCValidation::stablePtclNumber
MonitorElement * stablePtclNumber
Definition: BasicHepMCValidation.h:206
BasicHepMCValidation::hepmcCollectionToken_
edm::EDGetTokenT< edm::HepMCProduct > hepmcCollectionToken_
Definition: BasicHepMCValidation.h:241
BasicHepMCValidation::nEvt
MonitorElement * nEvt
Definition: BasicHepMCValidation.h:194
BasicHepMCValidation::partonpT
MonitorElement * partonpT
Definition: BasicHepMCValidation.h:214
BasicHepMCValidation::otherPtclMomentum
MonitorElement * otherPtclMomentum
Definition: BasicHepMCValidation.h:199
ALCARECOTkAlJpsiMuMu_cff.charge
charge
Definition: ALCARECOTkAlJpsiMuMu_cff.py:47
BasicHepMCValidation::DeltaEcms
MonitorElement * DeltaEcms
Definition: BasicHepMCValidation.h:236
BasicHepMCValidation::partonNumber
MonitorElement * partonNumber
Definition: BasicHepMCValidation.h:213
BasicHepMCValidation::DeltaPz
MonitorElement * DeltaPz
Definition: BasicHepMCValidation.h:239
BasicHepMCValidation::genVrtxNumber
MonitorElement * genVrtxNumber
Definition: BasicHepMCValidation.h:201
BasicHepMCValidation::stablePtclEta
MonitorElement * stablePtclEta
Definition: BasicHepMCValidation.h:209
iEvent
int iEvent
Definition: GenABIO.cc:224
dqm::impl::MonitorElement::setBinLabel
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)
Definition: MonitorElement.cc:762
BasicHepMCValidation::outVrtxStablePtclNumber
MonitorElement * outVrtxStablePtclNumber
Definition: BasicHepMCValidation.h:215
BasicHepMCValidation::pdf_u
MonitorElement * pdf_u
Definition: BasicHepMCValidation.h:221
edm::HepMCProduct::GetEvent
const HepMC::GenEvent * GetEvent() const
Definition: HepMCProduct.h:37
WeightManager::weight
double weight(const edm::Event &)
Definition: WeightManager.cc:24
DQMHelper
Definition: DQMHelper.h:15
BasicHepMCValidation::vrtxRadius
MonitorElement * vrtxRadius
Definition: BasicHepMCValidation.h:218
GenParticle.GenParticle
GenParticle
Definition: GenParticle.py:18
BasicHepMCValidation::unknownPDTNumber
MonitorElement * unknownPDTNumber
Definition: BasicHepMCValidation.h:202
BasicHepMCValidation::pdf_ubar
MonitorElement * pdf_ubar
Definition: BasicHepMCValidation.h:222
BasicHepMCValidation::stablePtclCharge
MonitorElement * stablePtclCharge
Definition: BasicHepMCValidation.h:210
BasicHepMCValidation::pdf_bbbar
MonitorElement * pdf_bbbar
Definition: BasicHepMCValidation.h:227
BasicHepMCValidation::pdf_d
MonitorElement * pdf_d
Definition: BasicHepMCValidation.h:223
BasicHepMCValidation::outVrtxPtclNumber
MonitorElement * outVrtxPtclNumber
Definition: BasicHepMCValidation.h:203
BasicHepMCValidation::stableChaNumber
MonitorElement * stableChaNumber
Definition: BasicHepMCValidation.h:207
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
BasicHepMCValidation::wmanager_
WeightManager wmanager_
Definition: BasicHepMCValidation.h:44
BasicHepMCValidation::genPtclNumber
MonitorElement * genPtclNumber
Definition: BasicHepMCValidation.h:200
dqm
Definition: DQMStore.h:18
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
BasicHepMCValidation::parton1Id
MonitorElement * parton1Id
Definition: BasicHepMCValidation.h:230
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:56
BasicHepMCValidation::stablePtclpT
MonitorElement * stablePtclpT
Definition: BasicHepMCValidation.h:212
LHEGenericFilter_cfi.ParticleID
ParticleID
Definition: LHEGenericFilter_cfi.py:6
edm::InputTag
Definition: InputTag.h:15
BasicHepMCValidation::log10DeltaEcms
MonitorElement * log10DeltaEcms
Definition: BasicHepMCValidation.h:235
weight
Definition: weight.py:1
BasicHepMCValidation::pdf_dbar
MonitorElement * pdf_dbar
Definition: BasicHepMCValidation.h:224
BasicHepMCValidation::parton2Id
MonitorElement * parton2Id
Definition: BasicHepMCValidation.h:231
BasicHepMCValidation::stablePtclp
MonitorElement * stablePtclp
Definition: BasicHepMCValidation.h:211
BasicHepMCValidation::pdf_ssbar
MonitorElement * pdf_ssbar
Definition: BasicHepMCValidation.h:225