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")) {
42 i.setCurrentFolder(
dir);
45 nEvt =
dqm.book1dHisto(
"nEvt",
"n analyzed Events", 1, 0., 1.,
"bin",
"Number of Events");
115 for (HepMC::GenEvent::particle_const_iterator iter = myGenEvent->particles_begin();
116 iter != myGenEvent->particles_end() && !filled;
119 std::vector<HepMC::GenParticle*> decayprod;
125 for (
unsigned int i = 0;
i < decayprod.size();
i++) {
141 std::vector<HepMC::GenParticle*>& decayprod) {
142 if (genParticle->status() == 1)
145 if (genParticle->end_vertex()) {
146 HepMC::GenVertex::particle_iterator des;
147 for (des = genParticle->end_vertex()->particles_begin(HepMC::descendants);
148 des != genParticle->end_vertex()->particles_end(HepMC::descendants);
150 if ((*des)->pdg_id() == genParticle->pdg_id())
153 HepMC::GenVertex::particle_iterator mother = (*des)->production_vertex()->particles_begin(
HepMC::parents);
154 if ((*mother)->pdg_id() == genParticle->pdg_id()) {
155 children.push_back((*des)->pdg_id());
156 decayprod.push_back((*des));
edm::ESHandle< HepPDT::ParticleDataTable > fPDGTable
PDT table.
std::vector< MonitorElement * > HiggsDecayProd_pt
MonitorElement * Higgs_eta
void dqmBeginRun(const edm::Run &r, const edm::EventSetup &c) override
std::vector< MonitorElement * > HiggsDecayProd_eta
size_t position(int pid1, int pid2)
MonitoredDecays * monitoredDecays
int findHiggsDecayChannel(const HepMC::GenParticle *, std::vector< HepMC::GenParticle *> &decayprod)
HiggsValidation(const edm::ParameterSet &)
void bookHistograms(DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override
edm::EDGetTokenT< edm::HepMCProduct > hepmcCollectionToken_
Abs< T >::type abs(const T &t)
MonitorElement * Higgs_pt
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)
const HepMC::GenEvent * GetEvent() const
int isDecayParticle(int pid)
MonitorElement * HiggsDecayChannels
edm::ESGetToken< HepPDT::ParticleDataTable, edm::DefaultRecord > fPDGTableToken
unsigned int NDecayParticles()
void analyze(edm::Event const &, edm::EventSetup const &) override
edm::InputTag hepmcCollection_
~HiggsValidation() override
std::string ConvertIndex(int index)
std::string channel(size_t i)
std::string particle_name
double weight(const edm::Event &)
MonitorElement * Higgs_mass