00001 // Template class: JetAnaPythia 00002 // Description: Example of simple analyzer for jets produced by Pythia 00003 // Author: R. Harris 00004 // Date: 28 - October - 2008 00005 #ifndef JetAnaPythia_h 00006 #define JetAnaPythia_h 00007 #include <TTree.h> 00008 #include <TH1.h> 00009 #include <TFile.h> 00010 #include "TNamed.h" 00011 #include <vector> 00012 #include <map> 00013 #include "FWCore/Framework/interface/EDAnalyzer.h" 00014 00015 template<class Jet> 00016 class JetAnaPythia : public edm::EDAnalyzer 00017 { 00018 public: 00019 JetAnaPythia(edm::ParameterSet const& cfg); 00020 private: 00021 typedef std::vector<Jet> JetCollection; 00022 void FillHist1D(const TString& histName, const Double_t& x, const Double_t& wt); 00023 void beginJob(); 00024 void analyze(edm::Event const& e, edm::EventSetup const& iSetup); 00025 void endJob(); 00026 std::map<TString, TH1*> m_HistNames1D; 00028 TTree* mcTruthTree_; 00029 float xsec; 00030 float weight; 00031 float pt_hat; 00032 int nJets; 00033 float etaJet1, etaJet2; 00034 float ptJet1, ptJet2; 00035 float etaPart1, etaPart2; 00036 float ptPart1, ptPart2; 00037 float diJetMass; 00038 float diPartMass; 00039 TFile* m_file; 00042 std::string JetAlgorithm; 00044 std::string HistoFileName; 00046 int NJets; 00048 bool debug; 00050 int eventsGen; 00056 std::string anaLevel; 00060 std::vector<double> xsecGen; 00061 std::vector<double> ptHatEdges; 00062 00063 }; 00064 #endif