Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 // Template class: JetPlotsExample
0002 // Description:  Example of simple EDAnalyzer for jets.
0003 // Author: K. Kousouris
0004 // Date:  25 - August - 2008
0005 #ifndef JetPlotsExample_h
0006 #define JetPlotsExample_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 JetPlotsExample : public edm::one::EDAnalyzer<> {
0016 public:
0017   JetPlotsExample(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, Gen or PF algorithm //////
0029   std::string JetAlgorithm;
0030   /////// Histogram where the plots are stored ////////////////////////
0031   std::string HistoFileName;
0032   /////// Number of jets used for the plots ///////////////////////////
0033   int NJets;
0034 };
0035 #endif