ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitHzz4l/Selection/src/MuonSelection.cc
Revision: 1.3
Committed: Sat Oct 1 13:00:23 2011 UTC (13 years, 7 months ago) by khahn
Content type: text/plain
Branch: MAIN
Changes since 1.2: +30 -0 lines
Log Message:
adding soft muon ID

File Contents

# User Rev Content
1 khahn 1.1 #include <math.h>
2 dkralph 1.2 #include "HiggsAnaDefs.hh"
3 khahn 1.1 #include "TMuon.hh"
4     #include "MuonSelection.h"
5    
6 khahn 1.3 unsigned passSoftMuonSelection( const mithep::TMuon * mu ) {
7 khahn 1.1
8 khahn 1.3 int level=0;
9     unsigned failmask=0x0;
10    
11     if(mu->nTkHits < 11 )
12     failmask |= (1<<level);
13     level++;
14    
15     if(fabs(mu->d0) > 0.2)
16     failmask |= (1<<level);
17     level++;
18    
19     if(fabs(mu->dz) > 0.1)
20     failmask |= (1<<level);
21     level++;
22    
23     if(!(mu->typeBits & kTracker))
24     failmask |= (1<<level);
25     level++;
26    
27     if(!(mu->qualityBits & kTMLastStationAngTight))
28     failmask |= (1<<level);
29     level++;
30    
31     Double_t iso = (mu->trkIso03 + mu->emIso03 + mu->hadIso03)/mu->pt;
32     if(mu->pt>20 && iso<0.1)
33     failmask |= (1<<level);
34     }
35    
36    
37 khahn 1.1 unsigned passMuonSelectionZZ( const mithep::TMuon * mu ) {
38     int level=0;
39     unsigned failmask=0x0;
40    
41     if(mu->pt < 5) {
42     failmask |= (1<<level);
43     }
44    
45     level++;
46     if(fabs(mu->eta) > 2.4) {
47     failmask |= (1<<level);
48     }
49    
50     level++;
51     if(!(mu->typeBits & kGlobal)) {
52     failmask |= (1<<level);
53     }
54    
55     level++;
56     if(mu->nTkHits < 10) {
57     failmask |= (1<<level);
58     }
59    
60    
61     level++;
62     if( (mu->trkIso03/mu->pt) > 0.7 ) {
63     failmask |= (1<<level);
64     }
65    
66     // if(muon->nPixHits < 1) return false;
67     // if(muon->muNchi2 > 10) return false;
68     // if(muon->nMatch < 2) return false;
69     // if(muon->nValidHits < 1) return false;
70     // if(muon->pterr/muon->pt > 0.1) return false;
71     // if(fabs(muon->dz) > 0.1) return false;
72    
73    
74     return failmask;
75    
76     };