File indexing completed on 2024-04-06 12:25:26
0001
0002
0003
0004
0005 #ifndef JetAnaPythia_h
0006 #define JetAnaPythia_h
0007 #include <TTree.h>
0008 #include <TH1.h>
0009 #include <TFile.h>
0010 #include "TNamed.h"
0011 #include <vector>
0012 #include <map>
0013 #include "FWCore/Framework/interface/one/EDAnalyzer.h"
0014
0015 template <class Jet>
0016 class JetAnaPythia : public edm::one::EDAnalyzer<> {
0017 public:
0018 JetAnaPythia(edm::ParameterSet const& cfg);
0019
0020 private:
0021 typedef std::vector<Jet> JetCollection;
0022 void FillHist1D(const TString& histName, const Double_t& x, const Double_t& wt);
0023 void beginJob() override;
0024 void analyze(edm::Event const& e, edm::EventSetup const& iSetup) override;
0025 void endJob() override;
0026 std::map<TString, TH1*> m_HistNames1D;
0027
0028 TTree* mcTruthTree_;
0029 float xsec;
0030 float weight;
0031 float pt_hat;
0032 int nJets;
0033 float etaJet1, etaJet2;
0034 float ptJet1, ptJet2;
0035 float etaPart1, etaPart2;
0036 float ptPart1, ptPart2;
0037 float diJetMass;
0038 float diPartMass;
0039 TFile* m_file;
0040
0041
0042 std::string JetAlgorithm;
0043
0044 std::string HistoFileName;
0045
0046 int NJets;
0047
0048 bool debug;
0049
0050 int eventsGen;
0051
0052
0053
0054
0055
0056 std::string anaLevel;
0057
0058
0059
0060 std::vector<double> xsecGen;
0061 std::vector<double> ptHatEdges;
0062 };
0063 #endif