ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitHzz4l/LeptonSelection/interface/ElectronSelection.h
Revision: 1.19
Committed: Tue Jul 17 10:17:22 2012 UTC (12 years, 10 months ago) by dkralph
Content type: text/plain
Branch: MAIN
Changes since 1.18: +1 -1 lines
Log Message:
1) implemented a way to store the bitset of all matched triggers for the leptons in the FO branches (using TBits, since root doesn't seem to yet support bitsets). See some commented lines in applyZPlusX.cc and ZPlusX.cc (more or less moot -- see below)

2) These bitsets are almost entirely zeroes, but root didn't compress them as much as I was hoping -- adding them tripled the file size, so I had to implement another way to store trigger info in the ntuples. I decided to store info for only a few  triggers in an unsigned value in SimpleLepton, with the def of the bits at the bottom of TriggerUtils.cc in the function initAnalysisTriggers (http://cmssw.cvs.cern.ch/cgi-bin/cmssw.cgi/UserCode/MitHzz4l/Util/src/TriggerUtils.cc?r1=1.15&r2=1.16)

3) added the same (info for a few triggers) for HLT Info to an unsigned value in InfoStruct

4) added all versions of the emu cross triggers to TriggerUtils.cc

File Contents

# User Rev Content
1 khahn 1.4 #ifndef ELECTRON_SELECTION
2     #define ELECTRON_SELECTION
3 khahn 1.1
4     #include <vector>
5     #include <cassert>
6     #include <math.h>
7     #include <map>
8    
9     #include "Vertex.h"
10     #include "Electron.h"
11     #include "ElectronCol.h"
12     #include "PFCandidate.h"
13    
14     #include "TMath.h"
15    
16     #include "TMVA/Factory.h"
17     #include "TMVA/Tools.h"
18     #include "TMVA/Reader.h"
19     #include "TMVA/MethodCuts.h"
20    
21     #include "ParseArgs.h"
22     #include "SelectionStatus.h"
23 dkralph 1.17 #include "Various.h"
24 khahn 1.1
25 dkralph 1.12 #include "ElectronTools.h"
26 anlevin 1.11 #include "PileupEnergyDensity.h"
27 dkralph 1.12 #include "PFCandidate.h"
28 anlevin 1.8
29 khahn 1.1 #define ELE_IDMVA_CUT_BIN0 0.369
30     #define ELE_IDMVA_CUT_BIN1 -0.025
31     #define ELE_IDMVA_CUT_BIN2 0.531
32     #define ELE_IDMVA_CUT_BIN3 0.735
33     #define ELE_IDMVA_CUT_BIN4 0.467
34     #define ELE_IDMVA_CUT_BIN5 0.795
35    
36 khahn 1.3 #define ELE_REFERENCE_IDMVA_CUT_BIN0 0.470 // eta<0.8, pt<10
37     #define ELE_REFERENCE_IDMVA_CUT_BIN1 0.004 // 0.8<eta<1.479, pt<10
38     #define ELE_REFERENCE_IDMVA_CUT_BIN2 0.295 // eta>1.478, pt<10
39     #define ELE_REFERENCE_IDMVA_CUT_BIN3 0.500 // eta<0.8, pt>10
40     #define ELE_REFERENCE_IDMVA_CUT_BIN4 0.120 // 0.8<eta<1.479, pt>10
41     #define ELE_REFERENCE_IDMVA_CUT_BIN5 0.600 // eta>1.478, pt>10
42    
43     #define ELE_LOOSE_IDMVA_CUT_BIN0 0.369
44     #define ELE_LOOSE_IDMVA_CUT_BIN1 -0.025
45     #define ELE_LOOSE_IDMVA_CUT_BIN2 0.531
46     #define ELE_LOOSE_IDMVA_CUT_BIN3 0.735
47     #define ELE_LOOSE_IDMVA_CUT_BIN4 0.467
48     #define ELE_LOOSE_IDMVA_CUT_BIN5 0.795
49    
50     #define ELE_TIGHT_IDMVA_CUT_BIN0 0.093
51     #define ELE_TIGHT_IDMVA_CUT_BIN1 0.451
52     #define ELE_TIGHT_IDMVA_CUT_BIN2 0.595
53     #define ELE_TIGHT_IDMVA_CUT_BIN3 0.881
54     #define ELE_TIGHT_IDMVA_CUT_BIN4 0.731
55     #define ELE_TIGHT_IDMVA_CUT_BIN5 0.891
56    
57 khahn 1.1 using namespace std;
58 khahn 1.2
59 dkralph 1.17 bool electron2012CutBasedIDMediumVersionThatWorksOn2011(ControlFlags &ctrl, const mithep::Electron *ele, const mithep::Vertex * vtx, const mithep::Array<mithep::PFCandidate> * fPFCandidates,
60     const mithep::DecayParticleCol *conversions, const mithep::Array<mithep::PileupEnergyDensity> * puEnergyDensity,
61     mithep::ElectronTools::EElectronEffectiveAreaTarget EffectiveAreaVersion);
62 anlevin 1.8
63 anlevin 1.16 bool electronPOG2012CutBasedIDMedium(const mithep::Electron *ele, const mithep::Vertex * vtx, const mithep::Array<mithep::PFCandidate> * fPFCandidates, const mithep::DecayParticleCol *conversions, const mithep::Array<mithep::PileupEnergyDensity> * puEnergyDensity);
64    
65 anlevin 1.5 SelectionStatus electronDummyVeto(ControlFlags &, const mithep::Electron*, const mithep::Vertex *);
66     SelectionStatus electronCutBasedVeto(ControlFlags &, const mithep::Electron*, const mithep::Vertex *);
67 khahn 1.1
68 anlevin 1.5 SelectionStatus electronPreSelection(ControlFlags &, const mithep::Electron *, const mithep::Vertex *);
69     SelectionStatus electronReferencePreSelection(ControlFlags &, const mithep::Electron *, const mithep::Vertex *);
70 khahn 1.7 SelectionStatus electronPreSelectionNoD0DzIP(ControlFlags &ctrl,
71     const mithep::Electron *electron,
72     const mithep::Vertex * vtx);
73 dkralph 1.19 SelectionStatus electronPreSelectionNoD0IP(ControlFlags &ctrl,
74 dkralph 1.18 const mithep::Electron *electron,
75     const mithep::Vertex * vtx);
76 khahn 1.1
77     SelectionStatus electronIDMVASelection(ControlFlags &ctrl,
78     const mithep::Electron *ele,
79 anlevin 1.5 const mithep::Vertex * vtx );
80 khahn 1.3 SelectionStatus electronReferenceIDMVASelection(ControlFlags &ctrl,
81     const mithep::Electron *ele,
82 anlevin 1.5 const mithep::Vertex * vtx );
83 khahn 1.6 SelectionStatus electronReferenceIDMVASelectionV1(ControlFlags &ctrl,
84     const mithep::Electron *ele,
85     const mithep::Vertex * vtx );
86 khahn 1.1 void initElectronIDMVA();
87 khahn 1.7 void initElectronIDMVAV1();
88 dkralph 1.12 SelectionStatus electronTagSelection(const mithep::Electron *ele,
89     const mithep::Vertex *vtx,
90     const mithep::Array<mithep::PFCandidate> *pfCandidates);
91 khahn 1.1 #endif
92