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"))
40 TString
dir=
"Generator/";
82 HepMC::GenEvent *myGenEvent =
new HepMC::GenEvent(*(evt->GetEvent()));
86 for(HepMC::GenEvent::particle_const_iterator
iter = myGenEvent->particles_begin();
87 iter!= myGenEvent->particles_end() && !filled; ++
iter) {
89 std::vector<HepMC::GenParticle*> decayprod;
95 for(
unsigned int i=0;
i<decayprod.size();
i++){
112 std::vector<int> children;
113 if ( genParticle->end_vertex() ) {
114 HepMC::GenVertex::particle_iterator des;
115 for(des = genParticle->end_vertex()->particles_begin(HepMC::descendants);
116 des!= genParticle->end_vertex()->particles_end(HepMC::descendants);++des ) {
118 if((*des)->pdg_id() == genParticle->pdg_id())
continue;
120 HepMC::GenVertex::particle_iterator mother = (*des)->production_vertex()->particles_begin(
HepMC::parents);
121 if((*mother)->pdg_id() == genParticle->pdg_id()){
122 children.push_back((*des)->pdg_id());
123 decayprod.push_back((*des));
128 if(children.size() == 2 && children.at(0) != 0 && children.at(1) != 0){
edm::ESHandle< HepPDT::ParticleDataTable > fPDGTable
PDT table.
MonitorElement * Higgs_eta
virtual void dqmBeginRun(const edm::Run &r, const edm::EventSetup &c) override
bool getByToken(EDGetToken token, Handle< PROD > &result) const
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)
virtual void bookHistograms(DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override
std::vector< MonitorElement * > HiggsDecayProd_eta
edm::EDGetTokenT< edm::HepMCProduct > hepmcCollectionToken_
MonitorElement * Higgs_pt
int isDecayParticle(int pid)
MonitorElement * HiggsDecayChannels
unsigned int NDecayParticles()
void setCurrentFolder(const std::string &fullpath)
virtual void analyze(edm::Event const &, edm::EventSetup const &) override
tuple idx
DEBUGGING if hasattr(process,"trackMonIterativeTracking2012"): print "trackMonIterativeTracking2012 D...
edm::InputTag hepmcCollection_
MonitorElement * book1dHisto(const std::string &name, const std::string &title, int n, double xmin, double xmax)
std::string ConvertIndex(int index)
std::string channel(size_t i)
std::string particle_name
double weight(const edm::Event &)
MonitorElement * Higgs_mass