ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitPhysics/Utils/interface/TauIsoMVA.h
Revision: 1.1
Committed: Tue Jul 3 08:55:58 2012 UTC (12 years, 10 months ago) by pharris
Content type: text/plain
Branch: MAIN
Log Message:
Added Tau MVA Isolation

File Contents

# User Rev Content
1 pharris 1.1 //--------------------------------------------------------------------------------------------------
2     // $Id $
3     //
4     // Tau Iso MVA
5     //
6     // Authors: M. Chan (implemented by P. Harris)
7     //--------------------------------------------------------------------------------------------------
8    
9     #ifndef MITPHYSICS_UTILS_TAUISOMVA_H
10     #define MITPHYSICS_UTILS_TAUISOMVA_H
11    
12     #include "CondFormats/JetMETObjects/interface/FactorizedJetCorrector.h"
13     #include <vector>
14     #include "MitAna/DataTree/interface/PFTau.h"
15    
16     class TRandom3;
17     namespace TMVA {
18     class Reader;
19     }
20    
21     namespace mithep {
22     class TauIsoMVA {
23     public:
24     struct IsoRings
25     {
26     std::vector<int> niso;
27     std::vector<std::vector<float> > rings;
28     std::vector<std::vector<float> > shapes;
29    
30     std::vector<float> getVector()
31     {
32     std::vector<float> all;
33     all.reserve(33);
34    
35     for(uint i = 0; i < niso.size(); i++)
36     all.push_back(niso[i]);
37    
38     for(uint i = 0; i < rings.size(); i++)
39     all.insert(all.end(), rings[i].begin(), rings[i].end());
40    
41     for(uint i = 0; i < shapes.size(); i++)
42     all.insert(all.end(), shapes[i].begin(), shapes[i].end());
43    
44     return all;
45     }
46     };
47     TauIsoMVA();
48     ~TauIsoMVA();
49     void Initialize (TString iWeightFile);
50     double MVAValue (const PFTau *iTau,double iRho);
51     IsoRings computeIsoRings(const PFTau *iTau);
52    
53     protected:
54     TMVA::Reader *fReader;
55     ClassDef(TauIsoMVA,0)
56     };
57     }
58     #endif