1 |
#ifndef ELECTRONFAKERATEMOD_H
|
2 |
#define ELECTRONFAKERATEMOD_H
|
3 |
|
4 |
#include <TTree.h>
|
5 |
#include <TFile.h>
|
6 |
#include <TLorentzVector.h>
|
7 |
#include <TBenchmark.h>
|
8 |
#include <TGraphAsymmErrors.h>
|
9 |
|
10 |
|
11 |
#include "MitAna/TreeMod/interface/BaseMod.h"
|
12 |
#include "MitAna/TreeMod/interface/Analysis.h"
|
13 |
#include "MitAna/DataTree/interface/TriggerMask.h"
|
14 |
#include "MitAna/DataTree/interface/TriggerTable.h"
|
15 |
#include "MitAna/DataTree/interface/TriggerObjectsTable.h"
|
16 |
#include "MitAna/DataTree/interface/Names.h"
|
17 |
#include "MitAna/Catalog/interface/Catalog.h"
|
18 |
#include "MitAna/DataUtil/interface/Debug.h"
|
19 |
#include "MitAna/DataTree/interface/MuonCol.h"
|
20 |
#include "MitAna/DataTree/interface/PFMetCol.h"
|
21 |
#include "MitAna/DataTree/interface/PFCandidateCol.h"
|
22 |
#include "MitAna/DataTree/interface/PileupInfoCol.h"
|
23 |
#include "MitAna/DataTree/interface/VertexCol.h"
|
24 |
|
25 |
#include "MitHzz4l/LeptonSelection/interface/VBTFElectronSelection.h"
|
26 |
#include "MitHzz4l/LeptonSelection/interface/ElectronSelection.h"
|
27 |
#include "MitHzz4l/LeptonSelection/interface/MuonSelection.h"
|
28 |
#include "MitHzz4l/LeptonSelection/interface/IsolationSelection.h"
|
29 |
|
30 |
#include "MitAna/DataCont/interface/RunLumiRangeMap.h"
|
31 |
|
32 |
#include "MitHzz4l/Util/interface/TriggerUtilsBits.h"
|
33 |
|
34 |
#include "MitCommon/DataFormats/interface/TH2DAsymErr.h"
|
35 |
|
36 |
#include "MitHzz4l/Util/interface/TriggerUtils.h"
|
37 |
|
38 |
namespace mithep
|
39 |
{
|
40 |
class ElectronFakeRateMod : public BaseMod
|
41 |
{
|
42 |
public:
|
43 |
ElectronFakeRateMod(const char *name="ElectronFakeRateMod", const char *title="BAMBU to measure fake rates") {};
|
44 |
~ElectronFakeRateMod() {};
|
45 |
|
46 |
TString fMuonName;
|
47 |
const mithep::MuonCol *fMuons;
|
48 |
|
49 |
TString fElectronName;
|
50 |
const mithep::ElectronCol *fElectrons;
|
51 |
|
52 |
TString fPrimVtxName;
|
53 |
const mithep::Array<mithep::Vertex> *fPrimVerts;
|
54 |
|
55 |
TString fPFCandidateName;
|
56 |
const mithep::Array<mithep::PFCandidate> *fPFCandidates;
|
57 |
|
58 |
TString fPUEnergyDensityName;
|
59 |
const mithep::Array<mithep::PileupEnergyDensity> * fPileupEnergyDensity;
|
60 |
|
61 |
TString fTrigMaskName;
|
62 |
const mithep::TriggerMask *fTrigMask;
|
63 |
|
64 |
TString fPileupName;
|
65 |
const PileupInfoCol *fPileup;
|
66 |
|
67 |
std::bitset<1024> fTriggerBits;
|
68 |
|
69 |
TFile *fOutputFile;
|
70 |
TString fOutputName;
|
71 |
|
72 |
vector<TTree*> fOutputTrees;
|
73 |
|
74 |
const DecayParticleCol *fConversions;
|
75 |
|
76 |
const PFMetCol *fPFMet;
|
77 |
|
78 |
UInt_t evt_num,lumi_sec,run_num;
|
79 |
UInt_t nvertices;
|
80 |
vector<Float_t> fake_electron_pt;
|
81 |
vector<Float_t> fake_electron_eta;
|
82 |
vector<Float_t> fake_electron_phi;
|
83 |
vector<UInt_t> fake_electron_pass;
|
84 |
|
85 |
enum {e_dielectron_data, e_dimuon_data} die_or_dimu;
|
86 |
|
87 |
Double_t massLo;
|
88 |
Double_t massHi;
|
89 |
|
90 |
mithep::RunLumiRangeMap rlrm;
|
91 |
|
92 |
Bool_t useJSON;
|
93 |
Bool_t useTrigger;
|
94 |
Bool_t store_npu;
|
95 |
|
96 |
std::bitset<1024> GetHLTMatchBits(const Double_t pt, const Double_t eta, const Double_t phi);
|
97 |
|
98 |
vector<Int_t> denominatorType;
|
99 |
|
100 |
protected:
|
101 |
void Begin() {};
|
102 |
void BeginRun() {};
|
103 |
void EndRun() {};
|
104 |
void SlaveBegin();
|
105 |
void SlaveTerminate();
|
106 |
void Terminate() {};
|
107 |
void Process();
|
108 |
|
109 |
|
110 |
ClassDef(ElectronFakeRateMod,1);
|
111 |
};
|
112 |
}
|
113 |
|
114 |
#endif
|