00001 // Template class: JetPlotsExample 00002 // Description: Example of simple EDAnalyzer for jets. 00003 // Author: K. Kousouris 00004 // Date: 25 - August - 2008 00005 #ifndef JetPlotsExample_h 00006 #define JetPlotsExample_h 00007 #include <TH1.h> 00008 #include <TFile.h> 00009 #include "TNamed.h" 00010 #include <vector> 00011 #include <map> 00012 #include "FWCore/Framework/interface/EDAnalyzer.h" 00013 00014 template<class Jet> 00015 class JetPlotsExample : public edm::EDAnalyzer 00016 { 00017 public: 00018 JetPlotsExample(edm::ParameterSet const& cfg); 00019 private: 00020 typedef std::vector<Jet> JetCollection; 00021 void FillHist1D(const TString& histName, const Double_t& x); 00022 void beginJob(); 00023 void analyze(edm::Event const& e, edm::EventSetup const& iSetup); 00024 void endJob(); 00025 std::map<TString, TH1*> m_HistNames1D; 00026 TFile* m_file; 00029 std::string JetAlgorithm; 00031 std::string HistoFileName; 00033 int NJets; 00034 }; 00035 #endif