1 |
// -*- C++ -*-
|
2 |
//
|
3 |
// Package: PATJetIDAnalyzer
|
4 |
// Class: PATJetIDAnalyzer
|
5 |
//
|
6 |
/**\class PATJetIDAnalyzer PATJetIDAnalyzer.h Demo/PATJetIDAnalyzer/interface/PATJetIDAnalyzer.h
|
7 |
|
8 |
Description: <one line class summary>
|
9 |
|
10 |
Implementation:
|
11 |
<Notes on implementation>
|
12 |
*/
|
13 |
//
|
14 |
// Original Author: Christian Autermann
|
15 |
// Created: Mon Feb 25 11:33:02 CET 2008
|
16 |
// $Id: PATJetIDAnalyzer.h,v 1.2 2008/02/25 17:52:29 auterman Exp $
|
17 |
//
|
18 |
//
|
19 |
|
20 |
|
21 |
// system include files
|
22 |
#include <memory>
|
23 |
|
24 |
// user include files
|
25 |
#include "FWCore/Framework/interface/Frameworkfwd.h"
|
26 |
#include "FWCore/Framework/interface/EDAnalyzer.h"
|
27 |
#include "FWCore/Framework/interface/Event.h"
|
28 |
#include "FWCore/Framework/interface/MakerMacros.h"
|
29 |
#include "FWCore/ParameterSet/interface/ParameterSet.h"
|
30 |
|
31 |
#include "Geometry/CaloGeometry/interface/CaloSubdetectorGeometry.h"
|
32 |
#include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h"
|
33 |
|
34 |
//
|
35 |
// class declerations
|
36 |
//
|
37 |
class PATJetIDAnalyzer : public edm::EDAnalyzer {
|
38 |
public:
|
39 |
explicit PATJetIDAnalyzer(const edm::ParameterSet&);
|
40 |
~PATJetIDAnalyzer();
|
41 |
|
42 |
|
43 |
private:
|
44 |
virtual void beginJob(const edm::EventSetup&) ;
|
45 |
virtual void analyze(const edm::Event&, const edm::EventSetup&);
|
46 |
virtual void endJob() ;
|
47 |
virtual void makeMatchingMaps(edm::Handle<reco::GenJetCollection> GenJets,
|
48 |
edm::Handle<reco::CaloJetCollection> CaloJets);
|
49 |
void FourierTransformation( const unsigned int i, const pat::Jet& jet, const EBRecHitCollection& EcalRecHitEB );
|
50 |
double norm(int n);
|
51 |
TH2F * FDCT(TH2F & k);
|
52 |
void FakeNoise(TH2F & k, double * k);
|
53 |
void FakeNoise2x2(TH2F & k, double * k);
|
54 |
double dphi(double phi1, double phi2);
|
55 |
// ----------member data ---------------------------
|
56 |
|
57 |
const CaloSubdetectorGeometry* EBgeom;
|
58 |
TRandom *random;
|
59 |
|
60 |
//jets from PAT
|
61 |
edm::InputTag _patJet;
|
62 |
edm::InputTag _patMet;
|
63 |
//EM-cells
|
64 |
edm::InputTag _ebrechits;
|
65 |
|
66 |
//jets from AOD
|
67 |
edm::InputTag _recJet;
|
68 |
edm::InputTag _genJet;
|
69 |
edm::InputTag _recMet;
|
70 |
edm::InputTag _genMet;
|
71 |
|
72 |
|
73 |
std::string _hist;
|
74 |
double _jetminpt, _jetmaxeta;
|
75 |
bool _simulate_noise;
|
76 |
double _NoiseMean;
|
77 |
double _NoiseSigma;
|
78 |
double _NoiseThreshold;
|
79 |
bool _DoNormalization;
|
80 |
int _uniqueplotid;
|
81 |
|
82 |
//CaloJets
|
83 |
unsigned static const _njets = 4;
|
84 |
TH1F *_jetmult; //total number of jets
|
85 |
TH1F *_pt_jet[_njets]; //pt of a specific jet
|
86 |
TH1F *_eta_jet[_njets]; //eta
|
87 |
TH1F *_phi_jet[_njets]; //phi
|
88 |
TH1F *_emfrac_jet[_njets]; //electromagnetic energy fraction
|
89 |
TH1F *_hadfrac_jet[_njets]; //hadronic energy fraction
|
90 |
TH1F *_n60_jet[_njets]; //number of components containing 60% of the energy
|
91 |
TH1F *_n90_jet[_njets]; //number of components containing 90% of the energy
|
92 |
TH1F *_area_jet[_njets]; //area covered by the jet's towers
|
93 |
|
94 |
//Fourier Transformation
|
95 |
unsigned static const N_Fourier_Bins_2D = 200;
|
96 |
unsigned static const N_Fourier_Bins_1D = 20;
|
97 |
unsigned static const Nf_Fourier_Bins_1D = N_Fourier_Bins_1D/2;
|
98 |
TH2F *_ft_energy[_njets];
|
99 |
TH2F *_ft_frequency[_njets];
|
100 |
TH1F *_ft_k[_njets];
|
101 |
TH1F *_ft_f[_njets];
|
102 |
TH1F *_ft_ksubavg[_njets];
|
103 |
|
104 |
TH1F *_noisecontrib[_njets]; //amount of added noise
|
105 |
TH1I *_fto_n99[_njets]; //number of bins containing 90%
|
106 |
TH1I *_fto_n95[_njets]; //number of bins containing 90%
|
107 |
TH1I *_fto_n90[_njets]; //number of bins containing 90%
|
108 |
TH1I *_fto_n60[_njets]; //number of bins containing 60%
|
109 |
TH1I *_fto_n30[_njets]; //number of bins containing 30%
|
110 |
TH1I *_fto_n10[_njets]; //number of bins containing 10%
|
111 |
TH1F *_fto_F10[_njets]; //Sum of 10 largest bins
|
112 |
TH1F *_fto_Fs10[_njets]; //Sum of 10 smallest (non-zero) bins
|
113 |
TH1F *_fto_LowFvsHiF[_njets]; //diff. between low & high frequencies
|
114 |
TH1F *_fto_LowFovHiF[_njets]; //ratio of low vs. high frequencies
|
115 |
TH1F *_fto_det16[_njets]; //determinante
|
116 |
TH1F *_fto_det8[_njets]; //determinante
|
117 |
|
118 |
|
119 |
//GenJets
|
120 |
unsigned static const _ngenjets = 4;
|
121 |
TH1F *_genjetmult; //total number of genjets
|
122 |
TH1F *_pt_genjet[_ngenjets]; //pt of a specific genjet
|
123 |
TH1F *_eta_genjet[_ngenjets]; //eta
|
124 |
TH1F *_phi_genjet[_ngenjets]; //phi
|
125 |
TH1F *_emfrac_genjet[_ngenjets]; //electromagnetic energy fraction
|
126 |
TH1F *_hadfrac_genjet[_ngenjets]; //hadronic energy fraction
|
127 |
TH1F *_invisible_genjet[_ngenjets]; //electromagnetic energy fraction
|
128 |
TH1F *_aux_genjet[_ngenjets]; //hadronic energy fraction
|
129 |
//met
|
130 |
TH1F *_met; //missing transverse energy
|
131 |
TH1F *_metmult; //size of the met std::vector
|
132 |
TH1F *_metx; //missing transverse energy, x-component
|
133 |
TH1F *_mety; //missing transverse energy, y-component
|
134 |
TH1F *_metsig; //MET significance = sqrt(met)/sum et
|
135 |
//genmet
|
136 |
TH1F *_genmet; //missing transverse energy
|
137 |
TH1F *_genmetmult; //size of the met std::vector
|
138 |
TH1F *_genmetx; //missing transverse energy, x-component
|
139 |
TH1F *_genmety; //missing transverse energy, y-component
|
140 |
//other
|
141 |
TH1F *_ht; //sum of all hadronic energy in the event
|
142 |
TH1F *_htmet; //sum of all energy, incl. MET in the event
|
143 |
TH1F *_dijet; //invariant mass of two leading jets
|
144 |
TH1F *_nv; //the "new variable"
|
145 |
TH1F *_nv2; //the "new variable 2"
|
146 |
TH1F *_genht; //sum of all hadronic energy in the event (gen)
|
147 |
TH1F *_genhtmet; //sum of all energy, incl. MET in the event (gen)
|
148 |
TH1F *_gendijet; //invariant mass of two leading jets (gen)
|
149 |
//matching
|
150 |
TH2F *_GenOnCalo_match; //Matching of GenJets on CaloJets
|
151 |
TH2F *_CaloOnGen_match; //Matching of Calojets on GenJets
|
152 |
TH2F *_GenVsMatched_pt; //Generated vs. Matched quantities
|
153 |
TH2F *_GenVsMatched_eta;
|
154 |
TH2F *_GenVsMatched_phi;
|
155 |
TH1F *_RecoEff_pt; //Reconstruction efficiencies
|
156 |
TH1F *_RecoEff_eta;
|
157 |
TH1F *_RecoEff_phi;
|
158 |
// helper histograms
|
159 |
TH1F *_RecoTot_pt;
|
160 |
TH1F *_RecoTot_eta;
|
161 |
TH1F *_RecoTot_phi;
|
162 |
|
163 |
// Matching Map: GenJets -> CaloJets
|
164 |
std::map<const reco::GenJet*, const reco::CaloJet*> MatchingMapGen;
|
165 |
// Matching Map: CaloJets -> GenJets
|
166 |
std::map<const reco::CaloJet*, const reco::GenJet*> MatchingMapJet;
|
167 |
|
168 |
|
169 |
|
170 |
};
|
171 |
|
172 |
//
|
173 |
// constants, enums and typedefs
|
174 |
//
|
175 |
|
176 |
//
|
177 |
// static data member definitions
|
178 |
//
|
179 |
|