Skip to content

Commit

Permalink
Merge pull request cms-sw#7 from rfriese/72X-mvaMETForMiniAOD-update
Browse files Browse the repository at this point in the history
Getting the Algorithm flexible for future usage
  • Loading branch information
schoef committed Jan 20, 2015
2 parents 177aa53 + 2984048 commit 10352a6
Show file tree
Hide file tree
Showing 3 changed files with 166 additions and 296 deletions.
58 changes: 18 additions & 40 deletions RecoMET/METPUSubtraction/interface/PFMETAlgorithmMVA.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,21 +58,15 @@ class PFMETAlgorithmMVA
void print(std::ostream&) const;

protected:
const std::string updateVariableNames(std::string input);
const GBRForest* loadMVAfromFile(const edm::FileInPath& inputFileName, const std::string& mvaName);
const GBRForest* loadMVAfromDB(const edm::EventSetup& es, const std::string& mvaName);

void setInput(double, double, double,
double, double, double,
double, double, double,
double, double, double,
double, double, double,
double, double, double,
double, double, double,
double, double,
double);

void evaluateU();
void evaluateDPhi();
void evaluateCovU1();
void evaluateCovU2();

const Float_t evaluateU();
const Float_t evaluateDPhi();
const Float_t evaluateCovU1();
const Float_t evaluateCovU2();

mvaMEtUtilities utils_;

Expand All @@ -82,35 +76,13 @@ class PFMETAlgorithmMVA
std::string mvaNameCovU2_;

int mvaType_;
bool is42_;
bool isOld42_;
bool hasPhotons_;
double dZcut_;
Float_t* createFloatVector(std::vector<std::string> variableNames);
const Float_t GetResponse(const GBRForest *Reader, std::vector<std::string> &variableNames);
void computeMET();
std::map<std::string, Float_t> var_;

Float_t pfSumEt_;
Float_t pfU_;
Float_t pfPhi_;
Float_t tkSumEt_;
Float_t tkU_;
Float_t tkPhi_;
Float_t npuSumEt_;
Float_t npuU_;
Float_t npuPhi_;
Float_t puSumEt_;
Float_t puMEt_;
Float_t puPhi_;
Float_t pucSumEt_;
Float_t pucU_;
Float_t pucPhi_;
Float_t jet1Pt_;
Float_t jet1Eta_;
Float_t jet1Phi_;
Float_t jet2Pt_;
Float_t jet2Eta_;
Float_t jet2Phi_;
Float_t numJetsPtGt30_;
Float_t numJets_;
Float_t numVertices_;

Float_t* mvaInputU_;
Float_t* mvaInputDPhi_;
Expand All @@ -122,6 +94,12 @@ class PFMETAlgorithmMVA
Float_t mvaOutputCovU1_;
Float_t mvaOutputCovU2_;

std::vector<std::string> varForU_;
std::vector<std::string> varForDPhi_;
std::vector<std::string> varForCovU1_;
std::vector<std::string> varForCovU2_;


double sumLeptonPx_;
double sumLeptonPy_;
double chargedSumLeptonPx_;
Expand Down
1 change: 0 additions & 1 deletion RecoMET/METPUSubtraction/plugins/PFMETProducerMVA.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ namespace reco
edm::EDGetTokenT<edm::Handle<double> > srcRho_;

std::string correctorLabel_;
bool isOld42_ ;
bool useType1_;

double globalThreshold_;
Expand Down
Loading

0 comments on commit 10352a6

Please sign in to comment.