1 |
//--------------------------------------------------------------------------------------------------
|
2 |
// $Id $
|
3 |
//
|
4 |
// ElectronTools
|
5 |
//
|
6 |
// Helper Class for electron Identification decisions.
|
7 |
//
|
8 |
// Authors: S.Xie
|
9 |
//--------------------------------------------------------------------------------------------------
|
10 |
|
11 |
#ifndef MITPHYSICS_UTILS_ELECTRONTOOLS_H
|
12 |
#define MITPHYSICS_UTILS_ELECTRONTOOLS_H
|
13 |
|
14 |
#include "MitAna/DataTree/interface/Electron.h"
|
15 |
#include "MitAna/DataTree/interface/DecayParticleCol.h"
|
16 |
#include "MitAna/DataTree/interface/VertexCol.h"
|
17 |
#include "MitAna/DataTree/interface/BeamSpotCol.h"
|
18 |
#include "MitAna/DataTree/interface/TriggerObjectCol.h"
|
19 |
#include "MitCommon/MathTools/interface/MathUtils.h"
|
20 |
#include "MitPhysics/ElectronLikelihood/interface/ElectronLikelihood.h"
|
21 |
#include <utility>
|
22 |
|
23 |
namespace mithep {
|
24 |
class ElectronTools {
|
25 |
public:
|
26 |
ElectronTools();
|
27 |
|
28 |
enum EElIdType {
|
29 |
kIdUndef = 0, //not defined
|
30 |
kTight, //"Tight"
|
31 |
kLoose, //"Loose"
|
32 |
kLikelihood, //"Likelihood"
|
33 |
kNoId, //"NoId"
|
34 |
kZeeId, //"ZeeId"
|
35 |
kCustomIdLoose, //"CustomLoose"
|
36 |
kCustomIdTight, //"CustomTight"
|
37 |
kVBTFWorkingPointFakeableId,
|
38 |
kVBTFWorkingPoint95Id,
|
39 |
kVBTFWorkingPoint90Id,
|
40 |
kVBTFWorkingPoint85Id,
|
41 |
kVBTFWorkingPoint80Id,
|
42 |
kVBTFWorkingPointLowPtId,
|
43 |
kVBTFWorkingPoint70Id,
|
44 |
kMVAID_BDTG_NoIPInfo,
|
45 |
kMVAID_BDTG_WithIPInfo,
|
46 |
kMVAID_BDTG_IDIsoCombined,
|
47 |
kHggLeptonTagId,
|
48 |
kHggLeptonTagId2012,
|
49 |
kHggLeptonTagId2012HCP,
|
50 |
kMVAID_BDTG_IDHWW2012TrigV0,
|
51 |
kMVAID_BDTG_IDIsoCombinedHWW2012TrigV4
|
52 |
};
|
53 |
|
54 |
enum EElIsoType {
|
55 |
kIsoUndef = 0, //"not defined"
|
56 |
kTrackCalo, //"TrackCalo"
|
57 |
kTrackJura, //"TrackJura"
|
58 |
kTrackJuraCombined, //"TrackJuraCombined"
|
59 |
kTrackJuraSliding, //"TrackJuraSliding"
|
60 |
kTrackJuraSlidingNoCorrection, //"TrackJuraSlidingNoCorrection"
|
61 |
kCombinedRelativeConeAreaCorrected, //"CombinedRelativeConeAreaCorrected"
|
62 |
kNoIso, //"NoIso"
|
63 |
kPFIso, //"PFIso"
|
64 |
kPFIsoNoL, //"PFIsoNoL"
|
65 |
kZeeIso, //"ZeeIso"
|
66 |
kCustomIso, //"Custom"
|
67 |
kVBTFWorkingPoint95Iso,
|
68 |
kVBTFWorkingPoint90Iso,
|
69 |
kVBTFWorkingPoint85Iso,
|
70 |
kVBTFWorkingPoint80Iso,
|
71 |
kVBTFWorkingPoint70Iso,
|
72 |
kMVAIso_BDTG_IDIsoCombined,
|
73 |
kPFIso_HWW2012TrigV0,
|
74 |
kPFIso_HggLeptonTag2012,
|
75 |
kPFIso_HggLeptonTag2012HCP,
|
76 |
kMVAIso_BDTG_IDIsoCombinedHWW2012TrigV4
|
77 |
};
|
78 |
|
79 |
enum EElectronEffectiveAreaType {
|
80 |
kEleChargedIso03,
|
81 |
kEleNeutralHadronIso03,
|
82 |
kEleGammaAndNeutralHadronIso03,
|
83 |
kEleGammaIso03,
|
84 |
kEleGammaIsoVetoEtaStrip03,
|
85 |
kEleChargedIso04,
|
86 |
kEleNeutralHadronIso04,
|
87 |
kEleGammaAndNeutralHadronIso04,
|
88 |
kEleGammaIso04,
|
89 |
kEleGammaIsoVetoEtaStrip04,
|
90 |
kEleNeutralHadronIso007,
|
91 |
kEleNeutralIso04,
|
92 |
kEleHoverE,
|
93 |
kEleHcalDepth1OverEcal,
|
94 |
kEleHcalDepth2OverEcal,
|
95 |
kEleGammaIsoDR0p0To0p1,
|
96 |
kEleGammaIsoDR0p1To0p2,
|
97 |
kEleGammaIsoDR0p2To0p3,
|
98 |
kEleGammaIsoDR0p3To0p4,
|
99 |
kEleGammaIsoDR0p4To0p5,
|
100 |
kEleNeutralHadronIsoDR0p0To0p1,
|
101 |
kEleNeutralHadronIsoDR0p1To0p2,
|
102 |
kEleNeutralHadronIsoDR0p2To0p3,
|
103 |
kEleNeutralHadronIsoDR0p3To0p4,
|
104 |
kEleNeutralHadronIsoDR0p4To0p5
|
105 |
};
|
106 |
|
107 |
enum EElectronEffectiveAreaTarget {
|
108 |
kEleEANoCorr,
|
109 |
kEleEAData2011,
|
110 |
kEleEAData2012,
|
111 |
kEleEASummer11MC,
|
112 |
kEleEAFall11MC
|
113 |
};
|
114 |
|
115 |
static Bool_t PassChargeFilter(const Electron *el);
|
116 |
static Bool_t PassConversionFilter(const Electron *el, const DecayParticleCol *conversions,
|
117 |
const BaseVertex *vtx, UInt_t nWrongHitsMax=0, Double_t probMin=1e-6,
|
118 |
Double_t lxyMin = 2.0, Bool_t matchCkf = kTRUE, Bool_t requireArbitratedMerged = kFALSE, Double_t trkptMin = -99.);
|
119 |
static Bool_t PassConversionFilterPFAOD(const Electron *el, const DecayParticleCol *conversions,
|
120 |
const BaseVertex *vtx, UInt_t nWrongHitsMax=0, Double_t probMin=1e-6,
|
121 |
Double_t lxyMin = 2.0, Bool_t matchCkf = kTRUE, Bool_t requireArbitratedMerged = kFALSE, Double_t trkptMin = -99.);
|
122 |
static Bool_t PassCustomID(const Electron *el, EElIdType idType);
|
123 |
static Bool_t PassCustomIso(const Electron *el, EElIsoType isoType,
|
124 |
Bool_t useCombineIso = kTRUE);
|
125 |
static Bool_t PassD0Cut(const Electron *el, const VertexCol *vertices, Double_t fD0Cut, Int_t nVertex = 0);
|
126 |
static Bool_t PassD0Cut(const Electron *el, const BeamSpotCol *beamspots, Double_t fD0Cut);
|
127 |
static Bool_t PassDZCut(const Electron *el, const VertexCol *vertices, Double_t fDZCut, Int_t nVertex = 0);
|
128 |
static Bool_t PassSpikeRemovalFilter(const Electron *ele);
|
129 |
static Bool_t PassTriggerMatching(const Electron *ele, const TriggerObjectCol *trigobjs);
|
130 |
static Int_t Classify(const Electron *ele);
|
131 |
static Int_t PassTightId(const Electron *ele, const VertexCol *vertices,
|
132 |
const DecayParticleCol *conversions, const Int_t typeCuts,
|
133 |
Double_t beta = 1.0);
|
134 |
static bool compute_cut(double x, double et, double cut_min, double cut_max, bool gtn=false);
|
135 |
static Double_t Likelihood(ElectronLikelihood *LH, const Electron *ele);
|
136 |
static Double_t ElectronEffectiveArea(EElectronEffectiveAreaType type, Double_t Eta,
|
137 |
EElectronEffectiveAreaTarget EffectiveAreaTarget = kEleEAData2011);
|
138 |
static std::pair<Double_t,Double_t> ComputeEPCombination( const Electron * ele, const float regression_energy,
|
139 |
const float regression_energy_error);
|
140 |
|
141 |
static Bool_t PassHggLeptonTagID(const Electron *el);
|
142 |
static Bool_t PassHggLeptonTagID2012(const Electron *el);
|
143 |
|
144 |
ClassDef(ElectronTools, 0) // Muon tools
|
145 |
};
|
146 |
}
|
147 |
|
148 |
#endif
|