Go to the documentation of this file.00001 #ifndef TtSemiLepSignalSelEval_h
00002 #define TtSemiLepSignalSelEval_h
00003
00004 #include "Math/VectorUtil.h"
00005 #include "TMath.h"
00006
00007 #include "PhysicsTools/MVAComputer/interface/MVAComputerCache.h"
00008 #include "PhysicsTools/MVATrainer/interface/MVATrainer.h"
00009
00010 #include "DataFormats/PatCandidates/interface/Jet.h"
00011 #include "TopQuarkAnalysis/TopEventSelection/interface/TtSemiLepSignalSel.h"
00012
00013 inline double evaluateTtSemiLepSignalSel(PhysicsTools::MVAComputerCache& mvaComputer,
00014 const TtSemiLepSignalSel& sigsel, float weight = 1.,
00015 const bool training = false, const bool isSignal = false)
00016 {
00017 std::vector<PhysicsTools::Variable::Value> values;
00018
00019 if(training) values.push_back( PhysicsTools::Variable::Value(PhysicsTools::MVATrainer::kTargetId, isSignal) );
00020 if(training) values.push_back( PhysicsTools::Variable::Value(PhysicsTools::MVATrainer::kWeightId, weight));
00021
00022 values.push_back( PhysicsTools::Variable::Value("sumEt", sigsel.sumEt() ) );
00023 values.push_back( PhysicsTools::Variable::Value("relEt1", sigsel.Et1() ) );
00024 values.push_back( PhysicsTools::Variable::Value("Abs_lepeta", sigsel.lepeta() ) );
00025 values.push_back( PhysicsTools::Variable::Value("MET", sigsel.MET() ) );
00026
00027 values.push_back( PhysicsTools::Variable::Value("dphiMETlepton", sigsel.dphiMETlepton() ) );
00028
00029 values.push_back( PhysicsTools::Variable::Value("detajet2jet3", sigsel.detajet2jet3() ) );
00030 values.push_back( PhysicsTools::Variable::Value("detajet3jet4", sigsel.detajet3jet4() ) );
00031
00032 values.push_back( PhysicsTools::Variable::Value("mindijetmass", sigsel.mindijetmass() ) );
00033 values.push_back( PhysicsTools::Variable::Value("maxdijetmass", sigsel.maxdijetmass() ) );
00034
00035 values.push_back( PhysicsTools::Variable::Value("mindRjetlepton", sigsel.mindRjetlepton() ) );
00036
00037
00038 return mvaComputer->eval( values );
00039
00040 }
00041
00042 #endif