test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DiJetAnalyzer.h
Go to the documentation of this file.
1 #ifndef DiJetAnalyzer_h
2 #define DiJetAnalyzer_h
3 
4 // system include files
5 #include <memory>
6 #include <string>
7 #include <vector>
8 #include <set>
9 #include <map>
10 
11 #include "TTree.h"
12 #include "TFile.h"
13 #include "TH1D.h"
14 #include "TH2D.h"
15 #include "TClonesArray.h"
16 
17 // user include files
49 
50 // forward declarations
51 class TH1D;
52 class TH2D;
53 class TFile;
54 class TTree;
55 
56 //
57 // class declarations
58 //
59 
60 class JetCorretPair : protected std::pair<const reco::PFJet*, double> {
61  public:
63  first=0;
64  second=1.0;
65  }
66  JetCorretPair(const reco::PFJet* j, double s) {
67  first=j;
68  second=s;
69  }
71 
72  inline const reco::PFJet* jet(void) const { return first; }
73  inline void jet(const reco::PFJet* j) { first=j; return; }
74  inline double scale(void) const { return second; }
75  inline void scale(double d) { second=d; return; }
76 
77  private:
78 
79 };
80 
82  public:
83  explicit DiJetAnalyzer(const edm::ParameterSet&);
85 
86 
87  private:
88  virtual void beginJob();//(const edm::EventSetup&);
89  virtual void analyze(const edm::Event&, const edm::EventSetup&);
90  virtual void endJob();
91 
92 
93  // parameters
94  bool debug_; // print debug statements
95  std::string pfJetCollName_; // label for the PF jet collection
96  std::string pfJetCorrName_; // label for the PF jet correction service
97  std::string hbheRecHitName_; // label for HBHERecHits collection
98  std::string hfRecHitName_; // label for HFRecHit collection
99  std::string hoRecHitName_; // label for HORecHit collection
100  std::string pvCollName_; // label for primary vertex collection
101  std::string rootHistFilename_; // name of the histogram file
102  double maxDeltaEta_; // maximum delta-|Eta| between Jets
103  double minTagJetEta_; // minimum |eta| of the tag jet
104  double maxTagJetEta_; // maximum |eta| of the tag jet
105  double minSumJetEt_; // minimum Sum of the tag and probe jet Et
106  double minJetEt_; // minimum Jet Et
107  double maxThirdJetEt_; // maximum 3rd jet Et
108 
114 
115 
116  // root file/histograms
117  TFile* rootfile_;
118 
120  TTree* tree_;
121 
161  int pf_NPV_;
162 
163  // helper functions
164  double deltaR(const reco::Jet* j1, const reco::Jet* j2);
165  double deltaR(const double eta1, const double phi1, const double eta2, const double phi2);
166  int getEtaPhi(const DetId id);
167  int getEtaPhi(const HcalDetId id);
168 
170  inline bool operator() ( const JetCorretPair& a, const JetCorretPair& b) {
171  return (a.jet()->pt()*a.scale()) > (b.jet()->pt()*b.scale());
172  }
173  };
174 
175 };
176 
177 
178 #endif
TH1D * h_PassSelPF_
float tpfjet_unkown_pz_
std::vector< int > tpfjet_twr_elmttype_
float tpfjet_photon_py_
std::vector< float > tpfjet_had_emf_
std::vector< float > tpfjet_had_E_
std::vector< int > ppfjet_had_candtrackind_
const reco::PFJet * jet(void) const
Definition: DiJetAnalyzer.h:72
std::vector< float > tpfjet_candtrack_pz_
std::vector< float > tpfjet_cluster_eta_
std::vector< float > tpfjet_twr_hade_
std::vector< float > tpfjet_twr_dR_
double minTagJetEta_
std::vector< int > ppfjet_twr_depth_
std::vector< float > tpfjet_cluster_dR_
std::vector< float > ppfjet_twr_frac_
float tpfjet_muon_E_
float ppfjet_photon_py_
float pf_thirdjet_py_
std::vector< float > ppfjet_candtrack_py_
float ppfjet_muon_py_
std::vector< int > tpfjet_had_candtrackind_
double maxDeltaEta_
float ppfjet_photon_pz_
std::vector< float > tpfjet_had_py_
Base class for all types of Jets.
Definition: Jet.h:20
float tpfjet_photon_EcalE_
std::vector< float > ppfjet_had_emf_
std::vector< int > ppfjet_twr_subdet_
float tpfjet_muon_EcalE_
float tpfjet_electron_px_
void jet(const reco::PFJet *j)
Definition: DiJetAnalyzer.h:73
virtual void endJob()
float tpfjet_photon_px_
std::vector< int > tpfjet_twr_depth_
float pf_realthirdjet_px_
std::string hfRecHitName_
Definition: DiJetAnalyzer.h:98
std::vector< int > ppfjet_twr_clusterind_
std::vector< float > tpfjet_candtrack_EcalE_
void scale(double d)
Definition: DiJetAnalyzer.h:75
TFile * rootfile_
std::vector< int > tpfjet_twr_clusterind_
float pf_realthirdjet_scale_
std::vector< int > ppfjet_twr_candtrackind_
std::vector< float > ppfjet_twr_hade_
edm::EDGetTokenT< reco::VertexCollection > tok_Vertex_
float tpfjet_unkown_py_
Jets made from PFObjects.
Definition: PFJet.h:21
float tpfjet_EMfrac_
float ppfjet_EMfrac_
float ppfjet_unkown_px_
std::string hbheRecHitName_
Definition: DiJetAnalyzer.h:97
bool operator()(const JetCorretPair &a, const JetCorretPair &b)
float ppfjet_electron_py_
float ppfjet_muon_E_
U second(std::pair< T, U > const &p)
std::string pfJetCorrName_
Definition: DiJetAnalyzer.h:96
tuple d
Definition: ztail.py:151
virtual void analyze(const edm::Event &, const edm::EventSetup &)
std::vector< float > ppfjet_cluster_eta_
float tpfjet_muon_py_
std::vector< float > tpfjet_had_px_
JetCorretPair(const reco::PFJet *j, double s)
Definition: DiJetAnalyzer.h:66
std::string pvCollName_
float ppfjet_unkown_pz_
edm::EDGetTokenT< edm::SortedCollection< HFRecHit, edm::StrictWeakOrdering< HFRecHit > > > tok_HF_
float tpfjet_muon_px_
std::vector< float > ppfjet_candtrack_pz_
std::vector< float > tpfjet_had_EcalE_
edm::EDGetTokenT< reco::PFJetCollection > tok_PFJet_
virtual void beginJob()
float tpfjet_photon_E_
float ppfjet_electron_pz_
std::vector< float > tpfjet_had_pz_
std::vector< int > tpfjet_twr_ieta_
std::vector< float > tpfjet_cluster_phi_
float ppfjet_unkown_EcalE_
std::vector< float > ppfjet_cluster_dR_
int j
Definition: DBlmapReader.cc:9
std::vector< float > ppfjet_had_rawHcalE_
std::vector< float > tpfjet_candtrack_px_
std::vector< float > ppfjet_cluster_phi_
float pf_realthirdjet_py_
std::vector< int > tpfjet_twr_candtrackind_
std::vector< float > ppfjet_had_px_
std::vector< int > ppfjet_twr_hadind_
std::vector< float > ppfjet_had_pz_
float ppfjet_muon_px_
DiJetAnalyzer(const edm::ParameterSet &)
Definition: DiJetAnalyzer.cc:9
Definition: DetId.h:18
std::vector< int > tpfjet_twr_iphi_
float ppfjet_hadEcalEfrac_
float ppfjet_muon_pz_
std::vector< int > ppfjet_twr_ieta_
float tpfjet_muon_pz_
float tpfjet_electron_EcalE_
float tpfjet_unkown_E_
std::string hoRecHitName_
Definition: DiJetAnalyzer.h:99
edm::EDGetTokenT< edm::SortedCollection< HORecHit, edm::StrictWeakOrdering< HORecHit > > > tok_HO_
double maxThirdJetEt_
double maxTagJetEta_
float tpfjet_hadEcalEfrac_
double b
Definition: hdecay.h:120
std::vector< float > ppfjet_had_E_
double scale(void) const
Definition: DiJetAnalyzer.h:74
std::vector< float > ppfjet_twr_dR_
float pf_thirdjet_px_
float tpfjet_electron_pz_
std::vector< float > tpfjet_had_rawHcalE_
float ppfjet_electron_px_
std::vector< float > ppfjet_had_py_
float tpfjet_electron_py_
float ppfjet_muon_EcalE_
float tpfjet_unkown_EcalE_
float pf_dijet_balance_
std::string rootHistFilename_
float tpfjet_photon_pz_
double a
Definition: hdecay.h:121
double deltaR(const reco::Jet *j1, const reco::Jet *j2)
float pf_dijet_deta_
float ppfjet_photon_E_
std::vector< int > ppfjet_had_id_
int getEtaPhi(const DetId id)
std::vector< int > ppfjet_had_ntwrs_
std::vector< float > tpfjet_twr_frac_
float tpfjet_unkown_px_
float ppfjet_photon_px_
std::vector< float > tpfjet_candtrack_py_
float tpfjet_electron_E_
std::vector< int > tpfjet_had_id_
std::vector< float > ppfjet_had_EcalE_
std::vector< float > ppfjet_candtrack_px_
float ppfjet_electron_EcalE_
std::vector< int > tpfjet_had_ntwrs_
std::vector< int > ppfjet_twr_elmttype_
std::vector< int > tpfjet_twr_subdet_
std::string pfJetCollName_
Definition: DiJetAnalyzer.h:95
double minSumJetEt_
std::vector< float > ppfjet_candtrack_EcalE_
float ppfjet_photon_EcalE_
float ppfjet_unkown_E_
std::vector< int > tpfjet_twr_hadind_
float ppfjet_electron_E_
float ppfjet_unkown_py_
virtual double pt() const final
transverse momentum
edm::EDGetTokenT< edm::SortedCollection< HBHERecHit, edm::StrictWeakOrdering< HBHERecHit > > > tok_HBHE_
std::vector< int > ppfjet_twr_iphi_
float pf_dijet_dphi_