9 #include "CLHEP/Units/defs.h" 10 #include "CLHEP/Units/PhysicalConstants.h" 15 wmanager_(iPSet,consumesCollector()),
16 hepmcCollection_(iPSet.getParameter<
edm::
InputTag>(
"hepmcCollection"))
107 otherPtclNumber = dqm.
book1dHisto(
"otherPtclNumber",
"Log10(No. other ptcls)", 60, -1, 5,
"log_{10}(No. other ptcls)",
"Number of Events");
108 otherPtclMomentum = dqm.
book1dHisto(
"otherPtclMomentum",
"Log10(p) other ptcls", 60, -2, 4,
"log10(P^{other ptcls}) (log_{10}(GeV))",
"Number of Events");
111 genPtclNumber = dqm.
book1dHisto(
"genPtclNumber",
"Log10(No. all particles)", 60, -1, 5,
"log10(No. all particles)",
"Number of Events");
112 genVrtxNumber = dqm.
book1dHisto(
"genVrtxNumber",
"Log10(No. all vertexs)", 60, -1, 5,
"log10(No. all vertexs)",
"Number of Events");
114 stablePtclNumber= dqm.
book1dHisto(
"stablePtclNumber",
"Log10(No. stable particles)", 50, 0, 5,
"log10(No. stable particles)",
"Number of Events");
115 stablePtclPhi = dqm.
book1dHisto(
"stablePtclPhi",
"stable Ptcl Phi", 360, -180, 180,
"#phi^{stable Ptcl} (rad)",
"Number of Events");
116 stablePtclEta = dqm.
book1dHisto(
"stablePtclEta",
"stable Ptcl Eta (pseudo rapidity)", 220, -11, 11,
"#eta^{stable Ptcl}",
"Number of Events");
118 stableChaNumber= dqm.
book1dHisto(
"stableChaNumber",
"Log10(No. stable charged particles)", 50, 0, 5,
"log_{10}(No. stable charged particles)",
"Number of Events");
119 stablePtclp = dqm.
book1dHisto(
"stablePtclp",
"Log10(p) stable ptcl p", 80, -4, 4,
"log_{10}(P^{stable ptcl}) (log_{10}(GeV))",
"Number of Events");
120 stablePtclpT = dqm.
book1dHisto(
"stablePtclpT",
"Log10(pT) stable ptcl pT", 80, -4, 4,
"log_{10}(P_{t}^{stable ptcl}) (log_{10}(GeV))",
"Number of Events");
121 partonNumber = dqm.
book1dHisto(
"partonNumber",
"number of partons", 100, 0, 100,
"number of partons",
"Number of Events");
122 partonpT = dqm.
book1dHisto(
"partonpT",
"Log10(pT) parton pT", 80, -4, 4,
"Log10(P_{t}^{parton})",
"Number of Events");
123 outVrtxStablePtclNumber = dqm.
book1dHisto(
"outVrtxStablePtclNumber",
"No. outgoing stable ptcls from vrtx", 10, 0, 10,
"No. outgoing stable ptcls from vrtx",
"Number of Events");
125 outVrtxPtclNumber = dqm.
book1dHisto(
"outVrtxPtclNumber",
"No. outgoing ptcls from vrtx", 30, 0, 30,
"No. outgoing ptcls from vrtx",
"Number of Events");
126 vrtxZ = dqm.
book1dHisto(
"VrtxZ",
"VrtxZ", 50 , -250, 250,
"Z_{Vtx}",
"Number of Events");
129 unknownPDTNumber = dqm.
book1dHisto(
"unknownPDTNumber",
"Log10(No. unknown ptcls PDT)", 60, -1, 5,
"log_{10}(No. unknown ptcls PDT)",
"Number of Events");
132 Bjorken_x = dqm.
book1dHisto(
"Bjorken_x",
"Bjorken_x", 1000, 0.0, 1.0,
"Bjorken_{x}",
"Number of Events");
141 scalePDF = dqm.
book1dHisto(
"scalePDF",
"Log10(Q-scale(GeV))", logQScaleNbin, logQScaleMin, logQScaleMax,
"log_{10}(Q-scale(GeV))",
"Number of Events");
142 parton1Id = dqm.
book1dHisto(
"parton1Id",
"ID of parton 1", 45, -14.5, 30.5,
"ID",
"Number of Events");
143 parton2Id = dqm.
book1dHisto(
"parton2Id",
"ID of parton 2", 45, -14.5, 30.5,
"ID",
"Number of Events");
158 log10DeltaEcms =dqm.
book1dHisto(
"DeltaEcms1log10",
"log_{10} of deviation from nominal Ecms", 200,-1., 5.,
"log_{10}(#DeltaE) (log_{10}(GeV))",
"Number of Events");
159 DeltaEcms = dqm.
book1dHisto(
"DeltaEcms1",
"deviation from nominal Ecms", 200,-1., 1.,
"#DeltaE (GeV)",
"Number of Events");
160 DeltaPx = dqm.
book1dHisto(
"DeltaPx1",
"deviation from nominal Px", 200,-1., 1.,
"#DeltaP_{x} (GeV)",
"Number of Events");
161 DeltaPy = dqm.
book1dHisto(
"DeltaPy1",
"deviation from nominal Py", 200,-1., 1.,
"#DeltaP_{y} (GeV)",
"Number of Events");
162 DeltaPz = dqm.
book1dHisto(
"DeltaPz1",
"deviation from nominal Pz", 200,-1., 1.,
"#DeltaP_{z} (GeV)",
"Number of Events");
171 int outVrtxStablePtclNum = 0;
int stablePtclNum = 0;
int otherPtclNum = 0;
int unknownPDTNum = 0;
int stableChaNum = 0;
173 double bjorken = 0.;
double logPdf1 = 0.;
double logPdf2 = 0.;
double logQScale = 0.;
175 double etotal = 0. ;
double pxtotal = 0.;
double pytotal = 0.;
double pztotal = 0.;
192 HepMC::PdfInfo
const *pdf = myGenEvent->pdf_info();
194 bjorken = ((pdf->x1())/((pdf->x1())+(pdf->x2())));
195 logQScale = log10(pdf->scalePDF());
196 if(logQScale > logQScaleMax) logQScale = logQScaleMax - 0.5*
logQScaleBinsize;
197 if(logQScale < logQScaleMin) logQScale = logQScaleMin + 0.5*
logQScaleBinsize;
198 logPdf1 = log10(pdf->pdf1());
201 logPdf2 = log10(pdf->pdf2());
208 if(pdf->id1() == 2)
pdf_u->
Fill(logPdf1,weight);
209 if(pdf->id2() == 2)
pdf_u->
Fill(logPdf2,weight);
212 if(pdf->id1() == 1)
pdf_d->
Fill(logPdf1,weight);
213 if(pdf->id2() == 1)
pdf_d->
Fill(logPdf2,weight);
227 HepMC::GenEvent::vertex_const_iterator vrtxBegin = myGenEvent->vertices_begin();
228 HepMC::GenEvent::vertex_const_iterator vrtxEnd = myGenEvent->vertices_end();
229 unsigned int nvtx(0);
230 for(HepMC::GenEvent::vertex_const_iterator vrtxIt = vrtxBegin; vrtxIt!=vrtxEnd; ++vrtxIt)
233 HepMC::GenVertex
const *vrtx = *vrtxIt;
241 HepMC::GenVertex::particles_out_const_iterator vrtxPtclBegin = vrtx->particles_out_const_begin();
242 HepMC::GenVertex::particles_out_const_iterator vrtxPtclEnd = vrtx->particles_out_const_end();
243 outVrtxStablePtclNum = 0;
244 for(HepMC::GenVertex::particles_out_const_iterator vrtxPtclIt = vrtxPtclBegin; vrtxPtclIt != vrtxPtclEnd; ++vrtxPtclIt)
247 if (vrtxPtcl->status() == 1){
248 ++outVrtxStablePtclNum;
256 HepMC::GenEvent::particle_const_iterator ptclBegin = myGenEvent->particles_begin();
257 HepMC::GenEvent::particle_const_iterator ptclEnd = myGenEvent->particles_end();
258 for(HepMC::GenEvent::particle_const_iterator ptclIt = ptclBegin; ptclIt!=ptclEnd; ++ptclIt)
263 int Id = ptcl->pdg_id();
264 float Log_p = log10( ptcl->momentum().rho() );
266 int status = ptcl->status();
273 charge = PData->charge();
279 if(ptcl->status() == 1){
286 if (charge != 0. && charge != 999.) ++stableChaNum;
298 etotal += ptcl->momentum().e();
299 pxtotal += ptcl->momentum().px();
300 pytotal += ptcl->momentum().py();
301 pztotal += ptcl->momentum().pz();
304 if (
abs(Id) < 6 ||
abs(Id) == 22){
308 bool indentified=
false;
309 for(
unsigned int i=0;
i<
particles.size();
i++){
if(
particles.at(
i).Fill(ptcl,weight)){indentified=
true;
break;}}
314 double ecms = 13000.;
315 if ( myGenEvent->valid_beam_particles() ) {
316 ecms = myGenEvent->beam_particles().first->momentum().e()+myGenEvent->beam_particles().second->momentum().e();
MonitorElement * genPtclStatus
MonitorElement * DeltaEcms
MonitorElement * genVrtxNumber
MonitorElement * unknownPDTNumber
MonitorElement * pdf_bbbar
MonitorElement * outVrtxPtclNumber
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
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)
MonitorElement * stablePtclCharge
MonitorElement * partonNumber
edm::EDGetTokenT< edm::HepMCProduct > hepmcCollectionToken_
MonitorElement * book1dHisto(std::string name, std::string title, int n, double xmin, double xmax, std::string xaxis, std::string yaxis)
void getData(T &iHolder) const
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
HepPDT::ParticleData ParticleData
void analyze(edm::Event const &, edm::EventSetup const &) override
MonitorElement * stablePtclp
MonitorElement * status1ShortLived
MonitorElement * stablePtclpT
void setCurrentFolder(const std::string &fullpath)
MonitorElement * stableChaNumber
const HepMC::GenEvent * GetEvent() const
MonitorElement * stablePtclNumber
MonitorElement * genPtclNumber
edm::InputTag hepmcCollection_
MonitorElement * outVrtxStablePtclNumber
double weight(const edm::Event &)
std::vector< ParticleMonitor > particles
MonitorElement * pdf_ssbar
MonitorElement * parton1Id