1 |
anlevin |
1.1 |
#ifndef MUONFAKERATEMOD_H
|
2 |
|
|
#define MUONFAKERATEMOD_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/MuonSelection.h"
|
27 |
|
|
#include "MitHzz4l/LeptonSelection/interface/ElectronSelection.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 "EfficiencyUtils.cc"
|
37 |
|
|
//#include "PlotUtils.cc"
|
38 |
|
|
|
39 |
|
|
#include "MitHzz4l/Util/interface/TriggerUtils.h"
|
40 |
|
|
|
41 |
|
|
namespace mithep
|
42 |
|
|
{
|
43 |
|
|
class MuonFakeRateMod : public BaseMod
|
44 |
|
|
{
|
45 |
|
|
public:
|
46 |
|
|
MuonFakeRateMod(const char *name="MuonFakeRateMod", const char *title="BAMBU to do tag and probe") {};
|
47 |
|
|
~MuonFakeRateMod() {};
|
48 |
|
|
|
49 |
|
|
Double_t nProbes;
|
50 |
|
|
|
51 |
|
|
TString fMuonName;
|
52 |
|
|
const mithep::MuonCol *fMuons;
|
53 |
|
|
|
54 |
|
|
TString fElectronName;
|
55 |
|
|
const mithep::ElectronCol *fElectrons;
|
56 |
|
|
|
57 |
|
|
TString fPrimVtxName;
|
58 |
|
|
const mithep::Array<mithep::Vertex> *fPrimVerts;
|
59 |
|
|
|
60 |
|
|
TString fPFCandidateName;
|
61 |
|
|
const mithep::Array<mithep::PFCandidate> *fPFCandidates;
|
62 |
|
|
|
63 |
|
|
TString fPUEnergyDensityName;
|
64 |
|
|
const mithep::Array<mithep::PileupEnergyDensity> * fPileupEnergyDensity;
|
65 |
|
|
|
66 |
|
|
TString fTrigMaskName;
|
67 |
|
|
const mithep::TriggerMask *fTrigMask;
|
68 |
|
|
|
69 |
|
|
TString fPileupName;
|
70 |
|
|
const PileupInfoCol *fPileup;
|
71 |
|
|
|
72 |
|
|
const DecayParticleCol *fConversions;
|
73 |
|
|
|
74 |
|
|
const PFMetCol *fPFMet;
|
75 |
|
|
|
76 |
|
|
|
77 |
|
|
UInt_t evt_num,lumi_sec,run_num;
|
78 |
|
|
UInt_t nvertices;
|
79 |
|
|
vector<Float_t> fake_muon_pt;
|
80 |
|
|
vector<Float_t> fake_muon_eta;
|
81 |
|
|
vector<Float_t> fake_muon_phi;
|
82 |
|
|
vector<UInt_t> fake_muon_pass;
|
83 |
|
|
|
84 |
|
|
std::bitset<1024> fTriggerBits;
|
85 |
|
|
|
86 |
|
|
TFile *fOutputFile;
|
87 |
|
|
TString fOutputName;
|
88 |
|
|
|
89 |
|
|
vector<TTree*> fOutputTrees;
|
90 |
|
|
|
91 |
|
|
|
92 |
|
|
enum {e_dielectron_data, e_dimuon_data} die_or_dimu;
|
93 |
|
|
|
94 |
|
|
Double_t massLo;
|
95 |
|
|
Double_t massHi;
|
96 |
|
|
|
97 |
|
|
mithep::RunLumiRangeMap rlrm;
|
98 |
|
|
|
99 |
|
|
Bool_t useJSON;
|
100 |
|
|
Bool_t useTrigger;
|
101 |
|
|
Bool_t store_npu;
|
102 |
|
|
|
103 |
|
|
vector<Int_t> denominatorType;
|
104 |
|
|
|
105 |
|
|
std::bitset<1024> GetHLTMatchBits(const Double_t pt, const Double_t eta, const Double_t phi);
|
106 |
|
|
|
107 |
|
|
protected:
|
108 |
|
|
void Begin() {};
|
109 |
|
|
void BeginRun() {};
|
110 |
|
|
void EndRun() {};
|
111 |
|
|
void SlaveBegin();
|
112 |
|
|
void SlaveTerminate();
|
113 |
|
|
void Terminate() {};
|
114 |
|
|
void Process();
|
115 |
|
|
|
116 |
|
|
|
117 |
|
|
ClassDef(MuonFakeRateMod,1);
|
118 |
|
|
};
|
119 |
|
|
}
|
120 |
|
|
|
121 |
|
|
#endif
|