forked from mflechl/ProductionFromNano
-
Notifications
You must be signed in to change notification settings - Fork 0
/
TriggerEnum.h
124 lines (109 loc) · 5.29 KB
/
TriggerEnum.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
struct TriggerData {
std::string path_name;
unsigned int leg1Id=0, leg2Id=0;//0-undefined, 11-electron, 13-muon, 15-tau
int leg1BitMask=0, leg2BitMask=0;//definition depends on Id, cf. PhysicsTools/NanoAOD/python/triggerObjects_cff.py
float leg1Pt=0., leg2Pt=0.;
float leg1L1Pt=0., leg2L1Pt=0.;
float leg1Eta=0., leg2Eta=0.;
float leg1OfflinePt=0., leg2OfflinePt=0.;
};
enum class TriggerEnum {
HLT_IsoMu22 = 0,
HLT_IsoMu22_eta2p1,
HLT_IsoTkMu22,
HLT_IsoTkMu22_eta2p1,
HLT_IsoMu19_eta2p1_LooseIsoPFTau20,
HLT_IsoMu19_eta2p1_LooseIsoPFTau20_SingleL1,
HLT_Ele25_eta2p1_WPTight_Gsf,
HLT_DoubleMediumIsoPFTau35_Trk1_eta2p1_Reg,
HLT_DoubleMediumCombinedIsoPFTau35_Trk1_eta2p1_Reg,
NONE
};
vector<TriggerData> getTriggerSettings(){
vector<TriggerData> triggerBits_;
TriggerData aTrgData;
// These Filter bits are taken from cmssw/PhysicsTools/NanoAOD/python/triggerObjects_cff.py
// See line 138-160 for era-dependent modification used for the 2016 data set
// The following are now from private production and correct (central used wrong modifier)
// Electron
// 0 - ('*CaloIdLTrackIdLIsoVL*TrackIso*Filter') +
// 1 - ('hltEle*WPTight*TrackIsoFilter*') +
// 2 - ('hltEle*WPLoose*TrackIsoFilter') +
// 3 - ('*OverlapFilter*IsoEle*PFTau*')")
// Muon
// 0 - ('*RelTrkIso*Filtered0p4')
// 1 - ('hltL3cr*IsoFiltered0p09')
// 2 - ('*OverlapFilter*IsoMu*PFTau*')
// 3 - ('hltL3f*IsoFiltered0p09')
// Tau
// 0 - LooseIso = (('*LooseIso*')-('*VLooseIso*'))
// 1 - ('*Medium*Iso*')
// 2 - ('*VLooseIso*')
// 3 - 0
// 4 - ('hltL2TauIsoFilter')
// 5 - ('*OverlapFilter*IsoMu*')
// 6 - ('*OverlapFilter*IsoEle*')
// 7 - ('*L1HLTMatched*')
// 8 - ('*Dz02*')")
// single-mu trigger with mu-filter to match: hltL3cr IsoL1sMu20L1f0L2f10QL3f22QL3trk IsoFiltered0p09 ->2
// hltL3crIsoL1sMu20L1f0L2f10QL3f22QL3trkIsoFiltered0p09
triggerBits_.push_back(aTrgData);
triggerBits_.back().path_name="HLT_IsoMu22";
triggerBits_.back().leg1Id=13;
triggerBits_.back().leg1BitMask=(1<<1);
// single-mu trigger with mu-filter to match: hltL3cr IsoL1sSingleMu20erL1f0L2f10QL3f22QL3trk IsoFiltered0p09
triggerBits_.push_back(aTrgData);
triggerBits_.back().path_name="HLT_IsoMu22_eta2p1";
triggerBits_.back().leg1Id=13;
triggerBits_.back().leg1BitMask=(1<<1);
// single-mu trigger with mu-filter to match: hltL3f L1sMu20L1f0Tkf22QL3trk IsoFiltered0p09
triggerBits_.push_back(aTrgData);
triggerBits_.back().path_name="HLT_IsoTkMu22";
triggerBits_.back().leg1Id=13;
triggerBits_.back().leg1BitMask=(1<<3);
// single-mu trigger with mu-filter to match: hltL3f L1sMu20erL1f0Tkf22QL3trk IsoFiltered0p09
triggerBits_.push_back(aTrgData);
triggerBits_.back().path_name="HLT_IsoTkMu22_eta2p1";
triggerBits_.back().leg1Id=13;
triggerBits_.back().leg1BitMask=(1<<3);
// mu-tauh triggers with
// mu-filter : hltL3cr IsoL1sMu18erTauJet20erL1f0L2f10QL3f19QL3trk IsoFiltered0p09 and hlt OverlapFilter IsoMu 19LooseIso PFTau 20
// tauh-filter : hltPFTau20Track LooseIso AgainstMuon and hlt OverlapFilter IsoMu 19LooseIsoPFTau20
triggerBits_.push_back(aTrgData);
triggerBits_.back().path_name="HLT_IsoMu19_eta2p1_LooseIsoPFTau20";
triggerBits_.back().leg1Id=13;
triggerBits_.back().leg1BitMask=(1<<1) + (1<<2); //iso+OL (overlap)
triggerBits_.back().leg2Id=15;
triggerBits_.back().leg2BitMask=(1<<0) + (1<<5); //looseIso+OL
// mu-tauh triggers with
// mu-filter : hltL3cr IsoL1sSingleMu18erIorSingleMu20erL1f0L2f10QL3f19QL3trk IsoFiltered0p09 and hlt OverlapFilter Single IsoMu 19LooseIso PFTau 20
// tauh-filter : hltPFTau20Track LooseIso AgainstMuon and hlt OverlapFilter Single IsoMu 19LooseIsoPFTau20
triggerBits_.push_back(aTrgData);
triggerBits_.back().path_name="HLT_IsoMu19_eta2p1_LooseIsoPFTau20_SingleL1";
triggerBits_.back().leg1Id=13;
triggerBits_.back().leg1BitMask=(1<<1) + (1<<2); //iso+OL (overlap)
triggerBits_.back().leg2Id=15;
triggerBits_.back().leg2BitMask=(1<<0) + (1<<5); //looseIso+OL
// single-ele trigger with ele filter to match : hltEle 25er WPTight Gsf TrackIsoFilter
triggerBits_.push_back(aTrgData);
triggerBits_.back().path_name="HLT_Ele25_eta2p1_WPTight_Gsf";
triggerBits_.back().leg1Id=11;
triggerBits_.back().leg1BitMask=(1<<1);
// double-tauh trigger with tau filter to match:
// hltDoublePFTau35TrackPt1 Medium Iso lation Dz02 Reg
triggerBits_.push_back(aTrgData);
triggerBits_.back().path_name="HLT_DoubleMediumIsoPFTau35_Trk1_eta2p1_Reg";
triggerBits_.back().leg1Id=15;
triggerBits_.back().leg1BitMask=(1<<1) + (1<<8); //MediumIso+dz
triggerBits_.back().leg2Id=15;
triggerBits_.back().leg2BitMask=(1<<1) + (1<<8);
// double-tauh trigger with tau filter to match:
// hltDoublePFTau35TrackPt1 Medium Combined Iso lation Dz02 Reg
triggerBits_.push_back(aTrgData);
triggerBits_.back().path_name="HLT_DoubleMediumCombinedIsoPFTau35_Trk1_eta2p1_Reg";
triggerBits_.back().leg1Id=15;
triggerBits_.back().leg1BitMask=(1<<1) + (1<<8); //MediumIso+dz
triggerBits_.back().leg2Id=15;
triggerBits_.back().leg2BitMask=(1<<1) + (1<<8);
return triggerBits_;
}