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"))
41 TString
dir=
"Generator/";
94 HepMC::GenEvent *myGenEvent =
new HepMC::GenEvent(*(evt->GetEvent()));
98 for(HepMC::GenEvent::particle_const_iterator iter = myGenEvent->particles_begin();
99 iter!= myGenEvent->particles_end() && !filled; ++iter) {
101 std::vector<HepMC::GenParticle*> decayprod;
107 for(
unsigned int i=0;
i<decayprod.size();
i++){
124 std::vector<int> children;
125 if ( genParticle->end_vertex() ) {
126 HepMC::GenVertex::particle_iterator des;
127 for(des = genParticle->end_vertex()->particles_begin(HepMC::descendants);
128 des!= genParticle->end_vertex()->particles_end(HepMC::descendants);++des ) {
130 if((*des)->pdg_id() == genParticle->pdg_id())
continue;
132 HepMC::GenVertex::particle_iterator mother = (*des)->production_vertex()->particles_begin(
HepMC::parents);
133 if((*mother)->pdg_id() == genParticle->pdg_id()){
134 children.push_back((*des)->pdg_id());
135 decayprod.push_back((*des));
140 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.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#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
edm::EDGetTokenT< edm::HepMCProduct > hepmcCollectionToken_
MonitorElement * Higgs_pt
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