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.10 by anlevin, Wed May 23 22:06:40 2012 UTC vs.
Revision 1.14 by dkralph, Tue Oct 23 11:39:21 2012 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines