11 #include "CLHEP/Units/defs.h"
12 #include "CLHEP/Units/PhysicalConstants.h"
22 : wmanager_(iPSet, consumesCollector()),
23 hepmcCollection_(iPSet.getParameter<
edm::
InputTag>(
"hepmcCollection")),
24 particle_id(iPSet.getParameter<
int>(
"pdg_id")),
25 particle_name(iPSet.getParameter<
std::
string>(
"particleName")) {
39 i.setCurrentFolder(
dir);
42 nEvt =
dqm.book1dHisto(
"nEvt",
"n analyzed Events", 1, 0., 1.,
"bin",
"Number of Events");
112 for (HepMC::GenEvent::particle_const_iterator iter = myGenEvent->particles_begin();
113 iter != myGenEvent->particles_end() && !filled;
116 std::vector<HepMC::GenParticle*> decayprod;
122 for (
unsigned int i = 0;
i < decayprod.size();
i++) {
138 std::vector<HepMC::GenParticle*>& decayprod) {
139 if (genParticle->status() == 1)
142 if (genParticle->end_vertex()) {
143 HepMC::GenVertex::particle_iterator des;
144 for (des = genParticle->end_vertex()->particles_begin(HepMC::descendants);
145 des != genParticle->end_vertex()->particles_end(HepMC::descendants);
147 if ((*des)->pdg_id() == genParticle->pdg_id())
150 HepMC::GenVertex::particle_iterator mother = (*des)->production_vertex()->particles_begin(
HepMC::parents);
151 if ((*mother)->pdg_id() == genParticle->pdg_id()) {
152 children.push_back((*des)->pdg_id());
153 decayprod.push_back((*des));