ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/FGolf/Tools/EfficiencyModelTools.h
Revision: 1.1
Committed: Sat Mar 17 19:53:30 2012 UTC (13 years, 1 month ago) by fgolf
Content type: text/plain
Branch: MAIN
CVS Tags: HEAD
Log Message:
useful tools for deriving and testing efficiency models

File Contents

# User Rev Content
1 fgolf 1.1 #ifndef EFFICIENCYMODELTOOLS_H
2     #define EFFICIENCYMODELTOOLS_H
3    
4     #include "GenParticleStruct.h"
5     #include "DileptonHypType.h"
6     #include <utility>
7     #include <vector>
8     #include "Math/LorentzVector.h"
9    
10     typedef ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<float> > LorentzVector;
11    
12     namespace efftools {
13    
14     // get reco lepton matched to a given gen lepton
15     std::pair<LorentzVector, int> getRecoLepton (struct GenParticleStruct& struct1);
16    
17     // get reco jets for same sign analysis, perform overlap removal for gen hyp and all good reco leptons
18     std::vector<unsigned int> getRecoJets (struct GenParticleStruct& struct1, struct GenParticleStruct& struct2);
19    
20     // get reco jets for same sign analysis, perform overlap removal for a given hyp and all good reco leptons
21     std::vector<unsigned int> getRecoJets (unsigned int hidx);
22    
23     // get reco jets for same sign analysis, perform overlap removal for all good reco leptons
24     std::vector<unsigned int> getRecoJets ();
25    
26     // calculate HT for a collection of jets
27     float getHT (std::vector<unsigned int>& jets);
28    
29     // make hyps from gen leptons
30     std::vector<std::pair<GenParticleStruct, GenParticleStruct> > makeGenHyps (float eta_cut = 2.4, bool removeLeptonsOverlappingWithPartons = false);
31    
32     // choose the best hyp for same sign analysis given lepton pt cuts and type (SS, OS, ALL)
33     std::pair<GenParticleStruct, GenParticleStruct> getGenHyp (float pt1_cut, float pt2_cut, enum HypType hypType);
34    
35     // calculate gen ht
36     float getGenHT(float pt_cut, float eta_cut);
37    
38     // get gen jets
39     std::vector<LorentzVector> getGenJets (float pt_cut, float eta_cut);
40    
41     // get gen b jets
42     std::vector<LorentzVector> getGenBjets (float pt_cut, float eta_cut);
43    
44     // get reco jet matched to a given gen jet
45     int getRecoJet (LorentzVector p4);
46    
47     // get gen particle matched to a given reco jet
48     int getGenParton (LorentzVector p4);
49    
50     // check if gen lepton overlaps with a status 3 parton (quark or gluon)
51     bool leptonOverlapsWithParton(LorentzVector p4, float parton_pt = 20., float dr = 0.3);
52    
53     // get gen hyp type (ee, em, mm)
54     enum DileptonHypType getHypType (int id1, int id2);
55    
56     }
57    
58     #endif