Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:25:26

0001 // Template class: JetCorExample

0002 // Description:  Example of simple EDAnalyzer correcting jets "on the fly".

0003 // Author: K. Kousouris

0004 // Date:  25 - August - 2008

0005 #ifndef JetCorExample_h
0006 #define JetCorExample_h
0007 #include <TH1.h>
0008 #include <TFile.h>
0009 #include "TNamed.h"
0010 #include <vector>
0011 #include <map>
0012 #include "FWCore/Framework/interface/one/EDAnalyzer.h"
0013 
0014 template <class Jet>
0015 class JetCorExample : public edm::one::EDAnalyzer<> {
0016 public:
0017   JetCorExample(edm::ParameterSet const& cfg);
0018 
0019 private:
0020   typedef std::vector<Jet> JetCollection;
0021   void FillHist1D(const TString& histName, const Double_t& x);
0022   void beginJob() override;
0023   void analyze(edm::Event const& e, edm::EventSetup const& iSetup) override;
0024   void endJob() override;
0025   std::map<TString, TH1*> m_HistNames1D;
0026   TFile* m_file;
0027   /////// Configurable parameters /////////////////////////////////////

0028   /////// Jet algorithm: it can be any Calo or PF algorithm ///////////

0029   std::string JetAlgorithm;
0030   /////// Histogram where the plots are stored ////////////////////////

0031   std::string HistoFileName;
0032   /////// Jet correction service: service providing jet corrections ///

0033   std::string JetCorrectionService;
0034 };
0035 #endif