ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitHzz4l/NonMCBackground/interface/ZPlusX.h
Revision: 1.2
Committed: Tue Jul 17 09:48:16 2012 UTC (12 years, 10 months ago) by dkralph
Content type: text/plain
Branch: MAIN
Changes since 1.1: +4 -0 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

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 out ntuples. I throw info for only a few requested triggers into into an unsigned value in SimpleLepton, with the def of the bits at the bottom of TriggerUtils.cc in the function initAnalysisTriggers

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

File Contents

# Content
1 #ifndef ZPLUS2HIGHIP_SELECTION
2 #define ZPLUS2HIGHIP_SELECTION
3
4 // System headers
5 //
6 #include <vector> // STL vector class
7 #include <iostream> // standard I/O
8 #include <iomanip> // functions to format standard I/O
9 #include <fstream> // functions for file I/O
10 #include <string> // C++ string class
11 #include <sstream> // class for parsing strings
12 #include <assert.h>
13 #include <stdlib.h>
14 #include <getopt.h>
15 using namespace std;
16
17 //
18 // ROOT headers
19 //
20 #include <TROOT.h> // access to gROOT, entry point to ROOT system
21 #include <TTree.h>
22 #include <TFile.h>
23 #include <TChain.h> //
24 #include <TBranch.h> // class to access branches in TTree
25 #include <TClonesArray.h> // ROOT array class
26 #include <TLorentzVector.h> // 4-vector class
27 #include <TVector3.h> // 3D vector class
28 #include <TH1D.h>
29 #include <TBits.h>
30
31 //
32 // ntuple format headers
33 //
34 #include "EventHeader.h"
35 #include "Electron.h"
36 #include "Muon.h"
37 #include "PFCandidate.h"
38 #include "PFCandidateCol.h"
39 #include "RunLumiRangeMap.h"
40
41 #include "ParseArgs.h"
42 #include "EventData.h"
43 #include "SelectionStatus.h"
44
45 #define PASS_SKIM0 0
46 #define PASS_SKIM1 1
47 #define PASS_SKIM2 2
48 #define PASS_TRIGGER 3
49 #define PASS_ZCANDIDATE 4
50 #define PASS_GOODZ1 5
51 #define PASS_4L 6
52 #define PASS_ZZCANDIDATE 7
53 #define PASS_GOODZ2 8
54 #define PASS_ZZ_20_10 9
55 #define PASS_RESONANCE 10
56 #define PASS_m4l_GT_70 11
57 #define PASS_m4l_GT_100 12
58
59 EventData apply_ZPlusX(ControlFlags &ctrl, // input control
60 const mithep::EventHeader *info, // input event info
61 TriggerTable *hltTable,
62 Array<TriggerObject> *hltObjArr,
63 TriggerObjectsTable *fTrigObjs,
64 const mithep::Array<mithep::Vertex> * vtxArr ,
65 const mithep::Array<mithep::PFCandidate> *fPFCandidates,
66 const mithep::Array<mithep::PileupEnergyDensity> *puEnergyDensity,
67 const mithep::Array<mithep::Electron> *electronArr, // input electrons
68 SelectionStatus (*ElectronPreSelector)( ControlFlags &,
69 const mithep::Electron*,
70 const mithep::Vertex *),
71 SelectionStatus (*ElectronIDSelector)( ControlFlags &,
72 const mithep::Electron*,
73 const mithep::Vertex *),
74 SelectionStatus (*ElectronIsoSelector)( ControlFlags &,
75 const mithep::Electron*,
76 const mithep::Vertex *,
77 const mithep::Array<mithep::PFCandidate> *,
78 const mithep::Array<mithep::PileupEnergyDensity> *puEnergyDensity,
79
80 mithep::ElectronTools::EElectronEffectiveAreaTarget,
81 vector<const mithep::PFCandidate*>),
82 const mithep::Array<mithep::Muon> *muonArr, // input muons
83 SelectionStatus (*MuonPreSelector)( ControlFlags &,
84 const mithep::Muon*,
85 const mithep::Vertex *,
86 const mithep::Array<mithep::PFCandidate> *),
87 SelectionStatus (*MuonIDSelector)( ControlFlags &,
88 const mithep::Muon*,
89 // const mithep::Vertex *),
90 const mithep::Vertex *,
91 const mithep::Array<mithep::PFCandidate> *),
92 SelectionStatus (*MuonIsoSelector)( ControlFlags &,
93 const mithep::Muon*,
94 const mithep::Vertex * ,
95 const mithep::Array<mithep::PFCandidate> *,
96 const mithep::Array<mithep::PileupEnergyDensity> *,
97 mithep::MuonTools::EMuonEffectiveAreaTarget,
98 vector<const mithep::PFCandidate*>)
99 );
100 #endif