ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitHzz4l/Selection/interface/SelectionFuncs.h
Revision: 1.10
Committed: Tue Oct 23 11:36:21 2012 UTC (12 years, 6 months ago) by dkralph
Content type: text/plain
Branch: MAIN
Changes since 1.9: +32 -12 lines
Log Message:
*** empty log message ***

File Contents

# Content
1 #ifndef SELECTION_UTILFUNCS
2 #define SELECTION_UTILFUNCS
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 <TClonesArray.h> // ROOT array class
22 #include <TFile.h>
23 #include <TH1F.h>
24 #include "TRegexp.h"
25
26 #include "FactorizedJetCorrector.h"
27 #include "JetCorrectorParameters.h"
28
29 #include "PFJetCol.h"
30 #include "JetIDMVA.h"
31 #include "JetSelection.h"
32 #include "MuonTools.h"
33 #include "ElectronTools.h"
34 #include "RunLumiRangeMap.h"
35
36 //
37 // ntuple format headers
38 //
39 #include "Vertex.h"
40 #include "PFCandidateCol.h"
41
42 #include "GenInfoStruct.h"
43 #include "ParseArgs.h"
44 #include "EventData.h"
45 #include "WeightStruct.h"
46 #include "PileupInfoCol.h"
47 #include "EfficiencyWeightsInterface.h"
48
49 using namespace mithep;
50
51 bool setPV(ControlFlags &ctrl,
52 const mithep::Array<mithep::Vertex> * vtxArr,
53 const mithep::Vertex* &vtx);
54
55 void writeEntries(ControlFlags ctrl, unsigned total_unskimmed);
56 void getEATargets(ControlFlags &ctrl, mithep::MuonTools::EMuonEffectiveAreaTarget &eraMu, mithep::ElectronTools::EElectronEffectiveAreaTarget &eraEle);
57 unsigned makePFnoPUArray(const mithep::Array<PFCandidate> * fPFCandidates,
58 vector<bool> &pfNoPileUpFlag,
59 const mithep::Array<mithep::Vertex> * vtxArr );
60 void setEfficiencyWeights(ControlFlags &ctrl,
61 unsigned era,
62 EventData & evtdat,
63 std::bitset<1024> triggerBits,
64 mithep::TriggerTable *hltTable,
65 mithep::Array<mithep::TriggerObject> *hltObjArr,
66 mithep::TriggerObjectsTable *fTrigObjs,
67 WeightStruct & weights ) ;
68 void initEvtRhoMap(map<unsigned,float> &);
69 void setEra(string, ControlFlags&);
70 unsigned getNPU(mithep::Array<mithep::PileupInfo> *puArr, int bx=0);
71 void initPUWeights();
72 double getPUWeight(int era, TString fname, unsigned npu);
73 void initJets(ControlFlags ctrl,
74 string cmsswpath,
75 vector<TString> &fJetCorrParsv,
76 vector<JetCorrectorParameters> &correctionParameters,
77 FactorizedJetCorrector *&fJetCorrector,
78 JetIDMVA *&fJetIDMVA);
79 int getGenSampleType(TString ofname);
80 TString getChannel(int z1type, int z2type);
81 // PU weight functions from Mangano:
82 float weightTruePileupV07toIchep52X(float input);
83 float weightTruePileupV07toHcp53X(float input);
84 float weightTruePileupV10toIchep53X(float input);
85 float weightTruePileupV10toHcp53X(float input);
86 float weightTrue2011(float input);
87 float weightTrue2011to2012(float input);
88 #endif