1 |
|
#include "TriggerUtilsBits.h" |
2 |
+ |
#include "PassHLT.h" |
3 |
+ |
#include <assert.h> |
4 |
|
#include <bitset> |
5 |
+ |
#include <iostream> |
6 |
+ |
using namespace std; |
7 |
|
|
8 |
|
|
9 |
|
bool passHLTSingleMuon(std::bitset<TRIGGER_BIG_NUMBER> triggerBits) { |
20 |
|
// for sync ... |
21 |
|
bool passHLTMC(std::bitset<TRIGGER_BIG_NUMBER> triggerBits, |
22 |
|
unsigned runNum, |
23 |
< |
unsigned channel) |
23 |
> |
unsigned channel, |
24 |
> |
EMCYear mc_year) |
25 |
|
//-------------------------------------------------------------------------- |
26 |
|
{ |
22 |
– |
bool isMC = false; |
23 |
– |
bool pass = false; |
27 |
|
|
28 |
< |
// |
26 |
< |
// Electrons |
27 |
< |
// |
28 |
< |
if ( triggerBits.test(kHLT_Ele17_CaloIdT_TrkIdVL_CaloIsoVL_TrkIsoVL_Ele8_CaloIdT_TrkIdVL_CaloIsoVL_TrkIsoVL) ) |
29 |
< |
pass = true; |
28 |
> |
assert(mc_year == k2011_MC || mc_year == k2012_MC); |
29 |
|
|
30 |
+ |
bool pass = false; |
31 |
+ |
|
32 |
+ |
if(mc_year == k2011_MC){ |
33 |
+ |
|
34 |
+ |
//electron trigger |
35 |
+ |
if ( triggerBits.test(kHLT_Ele17_CaloIdT_TrkIdVL_CaloIsoVL_TrkIsoVL_Ele8_CaloIdT_TrkIdVL_CaloIsoVL_TrkIsoVL) ) |
36 |
+ |
pass = true; |
37 |
+ |
|
38 |
+ |
//muon trigger |
39 |
+ |
if( triggerBits.test(kHLT_Mu17_Mu8) ) |
40 |
+ |
pass = true; |
41 |
+ |
|
42 |
+ |
//cross triggers |
43 |
|
|
44 |
< |
// |
45 |
< |
// Muons |
46 |
< |
// |
47 |
< |
if( triggerBits.test(kHLT_Mu13_Mu8) || triggerBits.test(kHLT_Mu17_Mu8) ) |
48 |
< |
pass = true; |
49 |
< |
|
44 |
> |
} |
45 |
> |
|
46 |
> |
if(mc_year == k2012_MC){ |
47 |
> |
|
48 |
> |
//electron trigger |
49 |
> |
if ( triggerBits.test(kHLT_Ele17_CaloIdT_TrkIdVL_CaloIsoVL_TrkIsoVL_Ele8_CaloIdT_TrkIdVL_CaloIsoVL_TrkIsoVL) ) |
50 |
> |
pass = true; |
51 |
> |
|
52 |
> |
//muon trigger |
53 |
> |
if( triggerBits.test(kHLT_Mu17_Mu8) || triggerBits.test(kHLT_Mu17_TkMu8)) |
54 |
> |
pass = true; |
55 |
> |
|
56 |
> |
//cross triggers |
57 |
> |
if( triggerBits.test(kHLT_Mu8_Ele17_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL) || triggerBits.test(kHLT_Mu17_Ele8_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL)) |
58 |
> |
pass = true; |
59 |
> |
|
60 |
> |
} |
61 |
> |
|
62 |
|
return pass; |
63 |
|
} |
64 |
|
|
121 |
|
|
122 |
|
return pass; |
123 |
|
}; |
124 |
+ |
//---------------------------------------------------------------------------------------- |
125 |
+ |
bool passHLTEMU(ControlFlags &ctrl, std::bitset<TRIGGER_BIG_NUMBER> triggerBits) |
126 |
+ |
//-------------------------------------------------------------------------- |
127 |
+ |
{ |
128 |
+ |
if(ctrl.debug) cout << "testing bits for emu..." << endl; |
129 |
+ |
bool pass = false; |
130 |
+ |
// double electron dset |
131 |
+ |
if( triggerBits.test(kHLT_Ele17_CaloIdL_CaloIsoVL) ) { if(ctrl.debug) cout << "\tpasses kHLT_Ele17_CaloIdL_CaloIsoVL" << endl; pass = true; } |
132 |
+ |
if( triggerBits.test(kHLT_Ele17_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL) ) { if(ctrl.debug) cout << "\tpasses kHLT_Ele17_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL" << endl;pass = true; } |
133 |
+ |
// single electron dset |
134 |
+ |
if( triggerBits.test(kHLT_Ele22_CaloIdL_CaloIsoVL) ) { if(ctrl.debug) cout << "\tpasses kHLT_Ele22_CaloIdL_CaloIsoVL" << endl; pass = true; } |
135 |
+ |
if( triggerBits.test(kHLT_Ele27_WP80_PFMET_MT50) ) { if(ctrl.debug) cout << "\tpasses kHLT_Ele27_WP80_PFMET_MT50" << endl; pass = true; } |
136 |
+ |
if( triggerBits.test(kHLT_Ele27_WP80) ) { if(ctrl.debug) cout << "\tpasses kHLT_Ele27_WP80" << endl; pass = true; } |
137 |
+ |
// single mudset |
138 |
+ |
if( triggerBits.test(kHLT_Mu12) ) { if(ctrl.debug) cout << "\tpasses kHLT_Mu12" << endl; pass = true; } |
139 |
+ |
if( triggerBits.test(kHLT_Mu15_eta2p1) ) { if(ctrl.debug) cout << "\tpasses kHLT_Mu15_eta2p1" << endl; pass = true; } |
140 |
+ |
if( triggerBits.test(kHLT_Mu24_eta2p1) ) { if(ctrl.debug) cout << "\tpasses kHLT_Mu24_eta2p1" << endl; pass = true; } |
141 |
+ |
if( triggerBits.test(kHLT_Mu24) ) { if(ctrl.debug) cout << "\tpasses kHLT_Mu24" << endl; pass = true; } |
142 |
+ |
// double mu dset |
143 |
+ |
if( triggerBits.test(kHLT_Mu17) ) { if(ctrl.debug) cout << "\tpasses kHLT_Mu17" << endl; pass = true; } |
144 |
|
|
145 |
< |
|
146 |
< |
|
103 |
< |
|
145 |
> |
return pass; |
146 |
> |
} |