5 jets_(iConfig.getParameter<edm::InputTag>(
"jets")),
6 genEventInfoProductTag_(iConfig.getParameter<edm::InputTag>(
"genEventInfoProductTag"))
25 if(!evt_info.isValid())
return;
26 weight = evt_info->weight() ;
32 if(!
jets.isValid())
return;
35 for(std::vector<reco::GenJet>::const_iterator jet_it=
jets->begin(); jet_it!=
jets->end(); ++jet_it){
42 if (njets == 1) {
hists_[
"jetPt1" ]->Fill( jet_it->pt() ,
weight );
45 if (njets == 2) {
hists_[
"jetPt2" ]->Fill( jet_it->pt() ,
weight );
48 if (njets == 3) {
hists_[
"jetPt3" ]->Fill( jet_it->pt() ,
weight );
51 if (njets == 4) {
hists_[
"jetPt4" ]->Fill( jet_it->pt() ,
weight );
edm::EDGetTokenT< std::vector< reco::GenJet > > jetsToken_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
virtual void bookHistograms(DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override
virtual void analyze(const edm::Event &, const edm::EventSetup &) override
edm::InputTag genEventInfoProductTag_
edm::EDGetTokenT< GenEventInfoProduct > genEventInfoProductTagToken_
std::map< std::string, MonitorElement * > hists_
void setCurrentFolder(const std::string &fullpath)
MonitorElement * book1dHisto(TString name, TString title, int n, double xmin, double xmax, TString xaxis, TString yaxis)
TTbar_GenJetAnalyzer(const edm::ParameterSet &)