13 #include "CLHEP/Units/defs.h"
14 #include "CLHEP/Units/PhysicalConstants.h"
25 hepmcCollection_(iPSet.getParameter<edm::
InputTag>(
"hepmcCollection")),
26 particle_id(iPSet.getParameter<int>(
"pdg_id")),
27 particle_name(iPSet.getParameter<std::string>(
"particleName"))
42 TString
dir=
"Generator/";
95 HepMC::GenEvent *myGenEvent =
new HepMC::GenEvent(*(evt->GetEvent()));
99 for(HepMC::GenEvent::particle_const_iterator iter = myGenEvent->particles_begin();
100 iter!= myGenEvent->particles_end() && !filled; ++iter) {
102 std::vector<HepMC::GenParticle*> decayprod;
108 for(
unsigned int i=0;
i<decayprod.size();
i++){
125 std::vector<int> children;
126 if ( genParticle->end_vertex() ) {
127 HepMC::GenVertex::particle_iterator des;
128 for(des = genParticle->end_vertex()->particles_begin(HepMC::descendants);
129 des!= genParticle->end_vertex()->particles_end(HepMC::descendants);++des ) {
131 if((*des)->pdg_id() == genParticle->pdg_id())
continue;
133 HepMC::GenVertex::particle_iterator mother = (*des)->production_vertex()->particles_begin(
HepMC::parents);
134 if((*mother)->pdg_id() == genParticle->pdg_id()){
135 children.push_back((*des)->pdg_id());
136 decayprod.push_back((*des));
141 if(children.size() == 2 && children.at(0) != 0 && children.at(1) != 0){
edm::ESHandle< HepPDT::ParticleDataTable > fPDGTable
PDT table.
virtual void analyze(const edm::Event &, const edm::EventSetup &)
MonitorElement * Higgs_eta
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
#define DEFINE_FWK_MODULE(type)
virtual void endRun(const edm::Run &, const edm::EventSetup &)
virtual void beginRun(const edm::Run &, const edm::EventSetup &)
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)
std::vector< MonitorElement * > HiggsDecayProd_pt
size_t position(int pid1, int pid2)
MonitoredDecays * monitoredDecays
virtual ~HiggsValidation()
void getData(T &iHolder) const
HiggsValidation(const edm::ParameterSet &)
int findHiggsDecayChannel(const HepMC::GenParticle *, std::vector< HepMC::GenParticle * > &decayprod)
std::vector< MonitorElement * > HiggsDecayProd_eta
MonitorElement * Higgs_pt
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
int isDecayParticle(int pid)
MonitorElement * HiggsDecayChannels
unsigned int NDecayParticles()
edm::InputTag hepmcCollection_
DQMStore * dbe
ME's "container".
std::string ConvertIndex(int index)
std::string channel(size_t i)
std::string particle_name
double weight(const edm::Event &)
void setCurrentFolder(const std::string &fullpath)
MonitorElement * Higgs_mass