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 |
|
22 |
namespace mithep {
|
23 |
class ElectronTools {
|
24 |
public:
|
25 |
ElectronTools();
|
26 |
|
27 |
enum EElIdType {
|
28 |
kIdUndef = 0, //not defined
|
29 |
kTight, //"Tight"
|
30 |
kLoose, //"Loose"
|
31 |
kLikelihood, //"Likelihood"
|
32 |
kNoId, //"NoId"
|
33 |
kZeeId, //"ZeeId"
|
34 |
kCustomIdLoose, //"CustomLoose"
|
35 |
kCustomIdTight, //"CustomTight"
|
36 |
kVBTFWorkingPointFakeableId,
|
37 |
kVBTFWorkingPoint95Id,
|
38 |
kVBTFWorkingPoint90Id,
|
39 |
kVBTFWorkingPoint85Id,
|
40 |
kVBTFWorkingPoint80Id,
|
41 |
kVBTFWorkingPointLowPtId,
|
42 |
kVBTFWorkingPoint70Id,
|
43 |
kMVAID_BDTG_NoIPInfo,
|
44 |
kMVAID_BDTG_WithIPInfo,
|
45 |
kMVAID_BDTG_IDIsoCombined
|
46 |
};
|
47 |
|
48 |
enum EElIsoType {
|
49 |
kIsoUndef = 0, //"not defined"
|
50 |
kTrackCalo, //"TrackCalo"
|
51 |
kTrackJura, //"TrackJura"
|
52 |
kTrackJuraCombined, //"TrackJuraCombined"
|
53 |
kTrackJuraSliding, //"TrackJuraSliding"
|
54 |
kTrackJuraSlidingNoCorrection, //"TrackJuraSlidingNoCorrection"
|
55 |
kCombinedRelativeConeAreaCorrected, //"CombinedRelativeConeAreaCorrected"
|
56 |
kNoIso, //"NoIso"
|
57 |
kPFIso, //"PFIso"
|
58 |
kPFIsoNoL, //"PFIsoNoL"
|
59 |
kZeeIso, //"ZeeIso"
|
60 |
kCustomIso, //"Custom"
|
61 |
kVBTFWorkingPoint95Iso,
|
62 |
kVBTFWorkingPoint90Iso,
|
63 |
kVBTFWorkingPoint85Iso,
|
64 |
kVBTFWorkingPoint80Iso,
|
65 |
kVBTFWorkingPoint70Iso,
|
66 |
kMVAIso_BDTG_IDIsoCombined
|
67 |
};
|
68 |
|
69 |
enum EElectronEffectiveAreaType {
|
70 |
kEleChargedIso03,
|
71 |
kEleNeutralHadronIso03,
|
72 |
kEleGammaIso03,
|
73 |
kEleGammaIsoVetoEtaStrip03,
|
74 |
kEleChargedIso04,
|
75 |
kEleNeutralHadronIso04,
|
76 |
kEleGammaIso04,
|
77 |
kEleGammaIsoVetoEtaStrip04,
|
78 |
kEleNeutralHadronIso007,
|
79 |
kEleHoverE,
|
80 |
kEleHcalDepth1OverEcal,
|
81 |
kEleHcalDepth2OverEcal
|
82 |
};
|
83 |
|
84 |
static Bool_t PassChargeFilter(const Electron *el);
|
85 |
static Bool_t PassConversionFilter(const Electron *el, const DecayParticleCol *conversions,
|
86 |
const BaseVertex *vtx, UInt_t nWrongHitsMax=0, Double_t probMin=1e-6,
|
87 |
Double_t lxyMin = 2.0, Bool_t matchCkf = kTRUE, Bool_t requireArbitratedMerged = kFALSE, Double_t trkptMin = -99.);
|
88 |
static Bool_t PassCustomID(const Electron *el, EElIdType idType);
|
89 |
static Bool_t PassCustomIso(const Electron *el, EElIsoType isoType,
|
90 |
Bool_t useCombineIso = kTRUE);
|
91 |
static Bool_t PassD0Cut(const Electron *el, const VertexCol *vertices, Double_t fD0Cut, Int_t nVertex = 0);
|
92 |
static Bool_t PassD0Cut(const Electron *el, const BeamSpotCol *beamspots, Double_t fD0Cut);
|
93 |
static Bool_t PassDZCut(const Electron *el, const VertexCol *vertices, Double_t fDZCut, Int_t nVertex = 0);
|
94 |
static Bool_t PassSpikeRemovalFilter(const Electron *ele);
|
95 |
static Bool_t PassTriggerMatching(const Electron *ele, const TriggerObjectCol *trigobjs);
|
96 |
static Int_t Classify(const Electron *ele);
|
97 |
static Int_t PassTightId(const Electron *ele, const VertexCol *vertices,
|
98 |
const DecayParticleCol *conversions, const Int_t typeCuts,
|
99 |
Double_t beta = 1.0);
|
100 |
static bool compute_cut(double x, double et, double cut_min, double cut_max, bool gtn=false);
|
101 |
static Double_t Likelihood(ElectronLikelihood *LH, const Electron *ele);
|
102 |
static Double_t ElectronEffectiveArea(EElectronEffectiveAreaType type, Double_t Eta);
|
103 |
|
104 |
ClassDef(ElectronTools, 0) // Muon tools
|
105 |
};
|
106 |
}
|
107 |
|
108 |
#endif
|