ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitPhysics/Utils/interface/MVAMet.h
(Generate patch)

Comparing UserCode/MitPhysics/Utils/interface/MVAMet.h (file contents):
Revision 1.1 by pharris, Wed Mar 21 18:56:25 2012 UTC vs.
Revision 1.10 by pharris, Thu May 3 14:01:44 2012 UTC

# Line 8 | Line 8
8  
9   #ifndef MITPHYSICS_UTILS_MVAMet_H
10   #define MITPHYSICS_UTILS_MVAMet_H
11 <
11 > #include <TMatrixD.h>
12   #include "MitAna/DataTree/interface/PFJetFwd.h"
13   #include "MitAna/DataTree/interface/VertexFwd.h"
14   #include "MitAna/DataTree/interface/TrackFwd.h"
# Line 22 | Line 22
22   #include "MitCommon/MathTools/interface/MathUtils.h"
23  
24   #include "MitPhysics/Utils/interface/RecoilTools.h"
25 + #include "CondFormats/EgammaObjects/interface/GBRForest.h"
26  
27   class TRandom3;
28 + class GBRForest;
29  
30   namespace mithep {
31    class MVAMet {
# Line 34 | Line 36 | namespace mithep {
36        kBaseline = 0
37      };
38  
39 <    void    setVariables(TMVA::Reader *iReader,bool iScale);
40 <    void    Initialize( TString iU1MethodName="U1MVA",
41 <                        TString iPhiMethodName="PhiMVA",
42 <                        TString iJetMVAFile="$CMSSW_BASE/src/MitPhysics/data/mva_RecoilPhiRegress_data_clean2_njet.weights.xml",
43 <                        TString iU1Weights="$CMSSW_BASE/src/MitPhysics/data/mva_RecoilRegress_clean2_njet.weights.xml",
44 <                        TString iPhiWeights="$CMSSW_BASE/src/MitPhysics/data/mva_JetID.weights.xml",
45 <                        MVAType iType=kBaseline);
46 <
39 >    //void    setVariables(TMVA::Reader *iReader,bool iScale);
40 >    //void    Initialize( TString iU1MethodName="U1MVA",
41 >    //                    TString iPhiMethodName="PhiMVA",
42 >    //                  TString iJetMVAFile="$CMSSW_BASE/src/MitPhysics/data/mva_RecoilPhiRegress_baseline.weights.xml",
43 >    //                  TString iU1Weights="$CMSSW_BASE/src/MitPhysics/data/mva_RecoilRegress_baseline.weights.xml",
44 >    //                  TString iPhiWeights="$CMSSW_BASE/src/MitPhysics/data/mva_JetID.weights.xml",
45 >    //                  MVAType iType=kBaseline);
46 >    void    Initialize(
47 >                       TString iJetLowPtFile ="$CMSSW_BASE/src/MitPhysics/data/mva_RecoilPhiRegress_baseline.weights.xml",
48 >                       TString iJetHighPtFile="$CMSSW_BASE/src/MitPhysics/data/mva_RecoilPhiRegress_baseline.weights.xml",
49 >                       TString iJetCutFile   ="$CMSSW_BASE/src/MitPhysics/data/mva_RecoilPhiRegress_baseline.weights.xml",
50 >                       TString iU1Weights    ="$CMSSW_BASE/src/MitPhysics/data/gbrmet.root",
51 >                       TString iPhiWeights   ="$CMSSW_BASE/src/MitPhysics/data/gbrmetphi.root",
52 >                       TString iCovU1Weights   ="$CMSSW_BASE/src/MitPhysics/data/gbrcovu1_52.root",
53 >                       TString iCovU2Weights   ="$CMSSW_BASE/src/MitPhysics/data/gbrcovu2_52.root",
54 >                       MVAMet::MVAType  iType=kBaseline);
55 >        
56      Bool_t   IsInitialized() const { return fIsInitialized; }
57 +    Double_t evaluatePhi();
58 +    Double_t evaluateU1();
59 +    Double_t evaluateCovU1();
60 +    Double_t evaluateCovU2();
61      Double_t MVAValue(  bool iPhi,
62                          Float_t iPFSumEt,
63                          Float_t iU      ,
# Line 71 | Line 86 | namespace mithep {
86  
87      Met GetMet(         Bool_t iPhi,Float_t iPtVis,Float_t iPhiVis,Float_t iSumEtVis,
88                          const PFMet            *iMet  ,
89 <                        const PFCandidateCol   *iCands,const Vertex *iVertex,
89 >                        const PFCandidateCol   *iCands,
90 >                        const Vertex *iVertex,const VertexCol *iVertices,
91                          const PFJetCol         *iJets ,
92                          FactorizedJetCorrector *iJetCorrector,
93                          const PileupEnergyDensityCol *iPileupEnergyDensity,
94                          int iNPV,
95                          Bool_t printDebug=false);
96  
97 +    Met GetMet(         Bool_t iPhi,Float_t iPtVis,Float_t iPhiVis,Float_t iSumEtVis,
98 +                        const PFMet            *iMet  ,
99 +                        const PFCandidateCol   *iCands,
100 +                        const Vertex *iVertex,const VertexCol *iVertices,Double_t iRho,
101 +                        const PFJetCol         *iJets ,
102 +                        int iNPV,
103 +                        Bool_t printDebug=false);
104 +
105      Met GetMet(         Bool_t iPhi,
106                          Float_t iPt1,Float_t iPhi1,Float_t iEta1,
107                          Float_t iPt2,Float_t iPhi2,Float_t iEta2,
108                          const PFMet            *iMet  ,
109 <                        const PFCandidateCol   *iCands,const Vertex *iVertex,
109 >                        const PFCandidateCol   *iCands,
110 >                        const Vertex *iVertex,const VertexCol *iVertices,
111                          const PFJetCol         *iJets ,
112                          FactorizedJetCorrector *iJetCorrector,
113                          const PileupEnergyDensityCol *iPUEnergyDensity,
114                          int iNPV,
115 <                        Bool_t printDebug);
115 >                        Bool_t printDebug=false);
116 >
117 >    Met GetMet(         Bool_t iPhi,
118 >                        Float_t iPt1,Float_t iPhi1,Float_t iEta1,
119 >                        Float_t iPt2,Float_t iPhi2,Float_t iEta2,
120 >                        const PFMet            *iMet  ,
121 >                        const PFCandidateCol   *iCands,
122 >                        const Vertex *iVertex,const VertexCol *iVertices,Double_t iRho,
123 >                        const PFJetCol         *iJets ,
124 >                        int iNPV,
125 >                        Bool_t printDebug=false);
126 >
127 >    TMatrixD*   GetMetCovariance() { return fCov;         }
128 >    Float_t     GetSignificance () { return fSignificance;}
129 >    Float_t     GetUncertainty  () { return fUncertainty;}
130      RecoilTools *fRecoilTools;
131 <    protected:
131 >    
132 >  protected:
133      TString      fPhiMethodName;
134      TString      fU1MethodName;
135 +    TString      fCovU1MethodName;
136 +    TString      fCovU2MethodName;
137      Bool_t       fIsInitialized;
138      MVAType      fType;
139 +    Bool_t       f42;
140      
141 +    Float_t fSumEt  ;
142      Float_t fU      ;
143      Float_t fUPhi   ;
144      Float_t fTKSumEt;
# Line 119 | Line 163 | namespace mithep {
163      Float_t fNAllJet;
164      Float_t fNPV    ;
165      Float_t fUPhiMVA;
166 +    Float_t fUMVA;
167 +    
168 +    Float_t* fPhiVals;
169 +    Float_t* fU1Vals;
170 +    Float_t* fCovVals;
171 +    
172 +    GBRForest *fPhiReader;
173 +    GBRForest *fU1Reader;
174 +    GBRForest *fCovU1Reader;
175 +    GBRForest *fCovU2Reader;
176 +
177 +    Float_t   fSignificance;
178 +    Float_t   fUncertainty;
179 +    TMatrixD *fCov;
180  
181 <    TMVA::Reader* fPhiReader;
182 <    TMVA::Reader* fU1Reader;
181 >    //TMVA::Reader* fPhiReader;
182 >    //TMVA::Reader* fU1Reader;
183      ClassDef(MVAMet,0)
184    };
185   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines