36 m_file =
new TFile(HistoFileName.c_str(),
"RECREATE");
39 m_HistNames1D[hname] =
new TH1F(hname,hname,100,0,1000);
41 m_HistNames1D[hname] =
new TH1F(hname,hname,120,-6,6);
43 m_HistNames1D[hname] =
new TH1F(hname,hname,100,-
M_PI,
M_PI);
44 hname =
"NumberOfJets";
45 m_HistNames1D[hname] =
new TH1F(hname,hname,100,0,100);
54 typename JetCollection::const_iterator i_jet;
58 hname =
"NumberOfJets";
59 FillHist1D(hname,jets->size());
61 for(i_jet = jets->begin(); i_jet != jets->end() && index < NJets; ++i_jet)
64 FillHist1D(hname,i_jet->pt());
66 FillHist1D(hname,i_jet->eta());
68 FillHist1D(hname,i_jet->phi());
80 for (std::map<TString, TH1*>::iterator hid = m_HistNames1D.begin(); hid != m_HistNames1D.end(); hid++)
90 std::map<TString, TH1*>::iterator hid=m_HistNames1D.find(histName);
91 if (hid==m_HistNames1D.end())
92 std::cout <<
"%fillHist -- Could not find histogram with name: " << histName << std::endl;
94 hid->second->Fill(value);
T getParameter(std::string const &) const
JetPlotsExample< PFJet > PFJetPlotsExample
JetPlotsExample< GenJet > GenJetPlotsExample
void FillHist1D(const TString &histName, const Double_t &x)
JetPlotsExample< CaloJet > CaloJetPlotsExample
void analyze(edm::Event const &e, edm::EventSetup const &iSetup)
DEFINE_FWK_MODULE(HiMixingModule)
JetPlotsExample< JPTJet > JPTJetPlotsExample
JetPlotsExample(edm::ParameterSet const &cfg)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const