ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitHzz4l/Selection/src/PassHLT.cc
(Generate patch)

Comparing UserCode/MitHzz4l/Selection/src/PassHLT.cc (file contents):
Revision 1.1 by khahn, Thu Sep 8 13:33:18 2011 UTC vs.
Revision 1.9 by anlevin, Tue May 22 22:31:18 2012 UTC

# Line 1 | Line 1
1 < #include "PassHLT.h"
2 < #include "EWKAnaDefs.hh"
1 > #include "TriggerUtilsBits.h"
2 > #include <bitset>
3  
4 bool passHLT(uint64_t triggerBits, unsigned runNum, unsigned channel) {
4  
5 + bool passHLTSingleMuon(std::bitset<TRIGGER_BIG_NUMBER> triggerBits) {
6 +  if ( triggerBits.test(kHLT_Mu8)  ||
7 +       triggerBits.test(kHLT_Mu12) ||  
8 +       triggerBits.test(kHLT_Mu15) ||  
9 +       triggerBits.test(kHLT_Mu24) ||  
10 +       triggerBits.test(kHLT_Mu30) )
11 +    return true;
12 +  return false;
13 + }
14 +
15 + //--------------------------------------------------------------------------
16 + // for sync ...
17 + bool passHLTMC(std::bitset<TRIGGER_BIG_NUMBER> triggerBits,
18 +               unsigned runNum,
19 +               unsigned channel)
20 + //--------------------------------------------------------------------------
21 + {
22    bool isMC = false;
23    bool pass = false;  
24  
25    //
26    // Electrons
27    //  
28 <  //  if( channel == 0 || channel == 2  ) {
29 <    //    if ( runNum >= 160404 && runNum <= 167151 ) { // may10 & PRv4
14 <    if ( runNum >= 160404 && runNum <= 170826 ) { // may10 & PRv4
15 <      if ( triggerBits & kHLT_Ele17_CaloIdL_CaloIsoVL_Ele8_CaloIdL_CaloIsoVL)
16 <        pass = true;
17 <    }
18 <    if (  runNum > 170826) { // aug05 & PRv6
19 <      if ( triggerBits & kHLT_Ele17_CaloIdT_TrkIdVL_CaloIsoVL_TrkIsoVL_Ele8_CaloIdT_TrkIdVL_CaloIsoVL_TrkIsoVL )
20 <        pass = true;
21 <    }
22 <    //  }
28 >  if ( triggerBits.test(kHLT_Ele17_CaloIdT_TrkIdVL_CaloIsoVL_TrkIsoVL_Ele8_CaloIdT_TrkIdVL_CaloIsoVL_TrkIsoVL) )
29 >    pass = true;
30  
31 +  
32    //
33    // Muons
34    //
35 <    //  if( channel == 1 || channel == 2  ){
36 <    if( runNum >= 136033 && runNum <= 149942 ) { // april11 (2010)
29 <      // don't have DoubleMu3 in the ntuple
30 <      //      if( triggerBits & kHLT_DoubleMu3 )     pass = true;
31 <    }
32 <    if( runNum >= 160404 && runNum <= 163869 ) { // may10
33 <      if( triggerBits & kHLT_DoubleMu7 )    
34 <        pass = true;
35 <    }
36 <    if( runNum >= 165088  ) {  // PRv4 and on ....
37 <      if( triggerBits & kHLT_Mu17_Mu8 )    
38 <        pass = true;
39 <    }
40 <    //  }
35 >  if( triggerBits.test(kHLT_Mu17_Mu8) )    
36 >    pass = true;
37    
38    return pass;
39 < };
39 > }
40  
41  
42 + //--------------------------------------------------------------------------
43 + bool passHLT(std::bitset<TRIGGER_BIG_NUMBER> triggerBits,
44 +             unsigned runNum,
45 +             unsigned channel)
46 + //--------------------------------------------------------------------------
47 + {
48  
49 +  bool isMC = false;
50 +  bool pass = false;  
51  
52 < bool passHLTMC(uint64_t triggerBits) {
52 >  //
53 >  // Electrons
54 >  //  
55 >  //  if( channel == 0 || channel == 2  ) {
56 >  //    if ( runNum >= 160404 && runNum <= 167151 ) { // may10 & PRv4
57 >  if(runNum < 160404) {
58 >    pass = true; //punt for now, Si doesn't have the needed triggers
59 >  }
60 >  if ( runNum >= 160404 && runNum <= 170826 ) { // may10 & PRv4
61 >    if ( triggerBits.test(kHLT_Ele17_CaloIdL_CaloIsoVL_Ele8_CaloIdL_CaloIsoVL))
62 >      pass = true;
63 >  }
64 >  if (  runNum > 170826 ) { // aug05 & PRv6
65 >    if ( triggerBits.test(kHLT_Ele17_CaloIdT_TrkIdVL_CaloIsoVL_TrkIsoVL_Ele8_CaloIdT_TrkIdVL_CaloIsoVL_TrkIsoVL) )
66 >      pass = true;
67 >  }
68  
69 <  bool pass=false;
70 <  if( triggerBits & kHLT_DoubleMu7 ||
71 <      triggerBits & kHLT_DoubleMu6 ||
72 <      triggerBits & kHLT_Mu5 ) {
73 <    pass = true;
74 <  } else if ( triggerBits & kHLT_Ele17_CaloIdL_CaloIsoVL_Ele8_CaloIdL_CaloIsoVL ||
75 <              triggerBits & kHLT_Ele27_CaloIdVT_CaloIsoT_TrkIdT_TrkIsoT ||
76 <              triggerBits & kHLT_Ele8 ||
77 <              triggerBits & kHLT_Ele8_CaloIdL_CaloIsoVL ||
78 <              triggerBits & kHLT_Ele17_CaloIdL_CaloIsoVL ||
79 <              triggerBits & kHLT_Ele8_CaloIdT_TrkIdVL_CaloIsoVL_TrkIsoVL ) {
80 <    pass = true;
69 >  // 58 pb-1 had a prescale issue, run range is 171050-171578
70 >  // they allow electron evts to pass kHLT_Ele17_CaloIdVT_CaloIsoVT_TrkIdT_TrkIsoVT_SC8_Mass30 in this period
71 >  if (runNum >= 171050 && runNum <= 171578 ) {  
72 >    if( triggerBits.test(kHLT_Ele17_CaloIdVT_CaloIsoVT_TrkIdT_TrkIsoVT_SC8_Mass30) )
73 >      pass=true;
74 >  }
75 >
76 >  
77 >  //
78 >  // Muons
79 >  //
80 >  //  if( channel == 1 || channel == 2  ){
81 >  if(runNum < 160404) {
82 >    pass = true; //punt for now, Si doesn't have the needed triggers
83 >  }
84 >  if( runNum >= 136033 && runNum <= 149942 ) { // april11 (2010)
85 >    // don't have DoubleMu3 in the ntuple
86 >    //      if( triggerBits & kHLT_DoubleMu3 )     pass = true;
87 >  }
88 >  if( runNum >= 160404 && runNum <= 163869 ) { // may10
89 >    if( triggerBits.test(kHLT_DoubleMu7) )    
90 >        pass = true;
91    }
92 +  if( runNum >= 165088  ) {  // PRv4 and on ....
93 +    if( triggerBits.test(kHLT_Mu13_Mu8) )    
94 +      pass = true;
95 +  }
96 +  //  }
97 +  
98    return pass;
99   };
100  
101  
102 +
103 +

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines