9 #include "CLHEP/Units/defs.h"
10 #include "CLHEP/Units/PhysicalConstants.h"
15 wmanager_(iPSet,consumesCollector()),
16 hepmcCollection_(iPSet.getParameter<edm::
InputTag>(
"hepmcCollection"))
206 int uNum = 0;
int dNum = 0;
int sNum = 0;
int cNum = 0;
int bNum = 0;
int tNum = 0;
207 int ubarNum = 0;
int dbarNum = 0;
int sbarNum = 0;
int cbarNum = 0;
int bbarNum = 0;
int tbarNum = 0;
210 int eminusNum = 0;
int nueNum = 0;
int muminusNum = 0;
int numuNum = 0;
int tauminusNum = 0;
int nutauNum = 0;
211 int eplusNum = 0;
int nuebarNum = 0;
int muplusNum = 0;
int numubarNum = 0;
int tauplusNum = 0;
int nutaubarNum = 0;
213 int gluNum = 0;
int WplusNum = 0;
int WminusNum = 0;
int ZNum = 0;
int gammaNum = 0;
215 int piplusNum = 0;
int piminusNum = 0;
int pizeroNum = 0;
int KplusNum = 0;
int KminusNum = 0;
int KlzeroNum = 0;
int KszeroNum = 0;
217 int pNum = 0;
int pbarNum = 0;
int nNum = 0;
int nbarNum = 0;
int l0Num = 0;
int l0barNum = 0;
219 int DplusNum = 0;
int DminusNum = 0;
int DzeroNum = 0;
int BplusNum = 0;
int BminusNum = 0;
int BzeroNum = 0;
int BszeroNum = 0;
221 int outVrtxStablePtclNum = 0;
int stablePtclNum = 0;
int otherPtclNum = 0;
int unknownPDTNum = 0;
int stableChaNum = 0;
225 double etotal = 0. ;
double pxtotal = 0.;
double pytotal = 0.;
double pztotal = 0.;
232 HepMC::GenEvent *myGenEvent =
new HepMC::GenEvent(*(evt->GetEvent()));
242 HepMC::PdfInfo *pdf = myGenEvent->pdf_info();
244 bjorken = ((pdf->x1())/((pdf->x1())+(pdf->x2())));
249 HepMC::GenEvent::vertex_const_iterator vrtxBegin = myGenEvent->vertices_begin();
250 HepMC::GenEvent::vertex_const_iterator vrtxEnd = myGenEvent->vertices_end();
251 for(HepMC::GenEvent::vertex_const_iterator vrtxIt = vrtxBegin; vrtxIt!=vrtxEnd; ++vrtxIt)
254 HepMC::GenVertex *vrtx = *vrtxIt;
260 HepMC::GenVertex::particles_out_const_iterator vrtxPtclBegin = vrtx->particles_out_const_begin();
261 HepMC::GenVertex::particles_out_const_iterator vrtxPtclEnd = vrtx->particles_out_const_end();
262 outVrtxStablePtclNum = 0;
263 for(HepMC::GenVertex::particles_out_const_iterator vrtxPtclIt = vrtxPtclBegin; vrtxPtclIt != vrtxPtclEnd; ++vrtxPtclIt)
266 if (vrtxPtcl->status() == 1){
267 ++outVrtxStablePtclNum;
275 HepMC::GenEvent::particle_const_iterator ptclBegin = myGenEvent->particles_begin();
276 HepMC::GenEvent::particle_const_iterator ptclEnd = myGenEvent->particles_end();
277 for(HepMC::GenEvent::particle_const_iterator ptclIt = ptclBegin; ptclIt!=ptclEnd; ++ptclIt)
282 int Id = ptcl->pdg_id();
283 float Log_p = log10( ptcl->momentum().rho() );
285 int status = ptcl->status();
292 charge = PData->charge();
298 if(ptcl->status() == 1){
305 if (charge != 0. && charge != 999.) ++stableChaNum;
317 etotal += ptcl->momentum().e();
318 pxtotal += ptcl->momentum().px();
319 pytotal += ptcl->momentum().py();
320 pztotal += ptcl->momentum().pz();
323 if (
abs(Id) < 6 ||
abs(Id) == 22){
549 if ( myGenEvent->valid_beam_particles() ) {
550 ecms = myGenEvent->beam_particles().first->momentum().e()+myGenEvent->beam_particles().second->momentum().e();
MonitorElement * sbarMomentum
MonitorElement * WplusNumber
MonitorElement * genPtclStatus
MonitorElement * DeltaEcms
MonitorElement * BzeroMomentum
MonitorElement * pizeroMomentum
MonitorElement * muplusMomentum
MonitorElement * genVrtxNumber
MonitorElement * nueMomentum
MonitorElement * BplusNumber
MonitorElement * pbarNumber
MonitorElement * pizeroNumber
MonitorElement * KlzeroMomentum
MonitorElement * KplusMomentum
MonitorElement * pbarMomentum
MonitorElement * unknownPDTNumber
MonitorElement * gammaNumber
MonitorElement * uNumber
multiplicity ME's
MonitorElement * numubarNumber
MonitorElement * dbarNumber
MonitorElement * cMomentum
MonitorElement * outVrtxPtclNumber
MonitorElement * BszeroMomentum
MonitorElement * muminusNumber
bool getByToken(EDGetToken token, Handle< PROD > &result) const
MonitorElement * KlzeroNumber
MonitorElement * Bjorken_x
MonitorElement * otherPtclNumber
MonitorElement * ubarMomentum
MonitorElement * DminusNumber
MonitorElement * tauminusNumber
virtual void dqmBeginRun(const edm::Run &r, const edm::EventSetup &c) override
MonitorElement * eplusMomentum
MonitorElement * tauplusNumber
MonitorElement * piplusMomentum
BasicHepMCValidation(const edm::ParameterSet &)
MonitorElement * bbarMomentum
MonitorElement * sbarNumber
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 * pMomentum
MonitorElement * dbarMomentum
MonitorElement * partonNumber
MonitorElement * nuebarMomentum
MonitorElement * KminusNumber
MonitorElement * eminusMomentum
edm::EDGetTokenT< edm::HepMCProduct > hepmcCollectionToken_
MonitorElement * tauplusMomentum
MonitorElement * gluMomentum
MonitorElement * gammaMomentum
void getData(T &iHolder) const
MonitorElement * BszeroNumber
MonitorElement * tbarNumber
MonitorElement * nMomentum
MonitorElement * piplusNumber
MonitorElement * nbarNumber
MonitorElement * BminusNumber
MonitorElement * cbarNumber
MonitorElement * dMomentum
MonitorElement * vrtxRadius
MonitorElement * ZMomentum
MonitorElement * l0Number
MonitorElement * tbarMomentum
MonitorElement * BplusMomentum
MonitorElement * eminusNumber
MonitorElement * DminusMomentum
MonitorElement * nuebarNumber
edm::ESHandle< HepPDT::ParticleDataTable > fPDGTable
PDT table.
virtual void bookHistograms(DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override
MonitorElement * numubarMomentum
Abs< T >::type abs(const T &t)
MonitorElement * eplusNumber
MonitorElement * partonpT
MonitorElement * WminusMomentum
virtual ~BasicHepMCValidation()
MonitorElement * stablePtclPhi
MonitorElement * WplusMomentum
MonitorElement * stablePtclEta
MonitorElement * DzeroNumber
MonitorElement * KplusNumber
HepPDT::ParticleData ParticleData
MonitorElement * KminusMomentum
MonitorElement * cbarMomentum
MonitorElement * muminusMomentum
virtual void analyze(edm::Event const &, edm::EventSetup const &) override
MonitorElement * l0barNumber
MonitorElement * nbarMomentum
MonitorElement * stablePtclp
MonitorElement * status1ShortLived
MonitorElement * stablePtclpT
MonitorElement * tauminusMomentum
MonitorElement * muplusNumber
MonitorElement * nueNumber
void setCurrentFolder(const std::string &fullpath)
MonitorElement * stableChaNumber
MonitorElement * nutaubarMomentum
MonitorElement * DplusNumber
MonitorElement * stablePtclNumber
MonitorElement * bbarNumber
MonitorElement * sMomentum
MonitorElement * BzeroNumber
MonitorElement * book1dHisto(const std::string &name, const std::string &title, int n, double xmin, double xmax)
MonitorElement * piminusNumber
MonitorElement * uMomentum
Momentum ME's.
MonitorElement * tMomentum
MonitorElement * KszeroMomentum
MonitorElement * numuMomentum
MonitorElement * genPtclNumber
other ME's
edm::InputTag hepmcCollection_
MonitorElement * nutaubarNumber
MonitorElement * gluNumber
MonitorElement * outVrtxStablePtclNumber
MonitorElement * KszeroNumber
MonitorElement * piminusMomentum
double weight(const edm::Event &)
MonitorElement * numuNumber
MonitorElement * l0barMomentum
MonitorElement * DzeroMomentum
MonitorElement * DplusMomentum
MonitorElement * WminusNumber
MonitorElement * nutauMomentum
MonitorElement * nutauNumber
MonitorElement * ubarNumber
MonitorElement * bMomentum
MonitorElement * l0Momentum
MonitorElement * BminusMomentum