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++){
127 std::vector<int> children;
128 if ( genParticle->end_vertex() ) {
129 HepMC::GenVertex::particle_iterator des;
130 for(des = genParticle->end_vertex()->particles_begin(HepMC::descendants);
131 des!= genParticle->end_vertex()->particles_end(HepMC::descendants);++des ) {
133 if((*des)->pdg_id() == genParticle->pdg_id())
continue;
135 HepMC::GenVertex::particle_iterator mother = (*des)->production_vertex()->particles_begin(
HepMC::parents);
136 if((*mother)->pdg_id() == genParticle->pdg_id()){
137 children.push_back((*des)->pdg_id());
138 decayprod.push_back((*des));
143 if(children.size() == 2 && children.at(0) != 0 && children.at(1) != 0)
return monitoredDecays->
position(children.at(0),children.at(1));
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()
tuple idx
DEBUGGING if hasattr(process,"trackMonIterativeTracking2012"): print "trackMonIterativeTracking2012 D...
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