33 m_file =
new TFile(HistoFileName.c_str(),
"RECREATE");
36 m_HistNames1D[hname] =
new TH1F(hname,hname,100,0,1000);
38 m_HistNames1D[hname] =
new TH1F(hname,hname,100,0,1000);
47 typename JetCollection::const_iterator i_jet;
52 for(i_jet = jets->begin(); i_jet != jets->end(); i_jet++)
56 FillHist1D(hname,i_jet->pt());
58 FillHist1D(hname,scale*i_jet->pt());
69 for (std::map<TString, TH1*>::iterator hid = m_HistNames1D.begin(); hid != m_HistNames1D.end(); hid++)
79 std::map<TString, TH1*>::iterator hid=m_HistNames1D.find(histName);
80 if (hid==m_HistNames1D.end())
81 std::cout <<
"%fillHist -- Could not find histogram with name: " << histName << std::endl;
83 hid->second->Fill(value);
T getParameter(std::string const &) const
JetCorExample(edm::ParameterSet const &cfg)
double correction(const LorentzVector &fJet) const
get correction using Jet information only
void analyze(edm::Event const &e, edm::EventSetup const &iSetup) override
#define DEFINE_FWK_MODULE(type)
JetCorExample< CaloJet > CaloJetCorExample
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
static const JetCorrector * getJetCorrector(const std::string &fName, const edm::EventSetup &fSetup)
retrieve corrector from the event setup. troughs exception if something is missing ...
JetCorExample< PFJet > PFJetCorExample
void FillHist1D(const TString &histName, const Double_t &x)