00001 #ifndef TtFullHadSignalSelEval_h 00002 #define TtFullHadSignalSelEval_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/TtFullHadSignalSel.h" 00012 00013 inline double evaluateTtFullHadSignalSel(PhysicsTools::MVAComputerCache& mvaComputer, 00014 const TtFullHadSignalSel& sigsel, double weight = 1.0, 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("H", sigsel.H() ) ); 00023 values.push_back( PhysicsTools::Variable::Value("Ht", sigsel.Ht() ) ); 00024 values.push_back( PhysicsTools::Variable::Value("Ht123", sigsel.Ht123() ) ); 00025 values.push_back( PhysicsTools::Variable::Value("Ht3jet", sigsel.Ht3jet() ) ); 00026 values.push_back( PhysicsTools::Variable::Value("sqrt_s", sigsel.sqrt_s() ) ); 00027 values.push_back( PhysicsTools::Variable::Value("Et56", sigsel.Et56() ) ); 00028 values.push_back( PhysicsTools::Variable::Value("M3", sigsel.M3() ) ); 00029 00030 values.push_back( PhysicsTools::Variable::Value("TCHP_Bjets", sigsel.TCHP_Bjets() ) ); 00031 values.push_back( PhysicsTools::Variable::Value("SSV_Bjets", sigsel.SSV_Bjets() ) ); 00032 values.push_back( PhysicsTools::Variable::Value("CSV_Bjets", sigsel.CSV_Bjets() ) ); 00033 values.push_back( PhysicsTools::Variable::Value("SM_Bjets", sigsel.SM_Bjets() ) ); 00034 00035 values.push_back( PhysicsTools::Variable::Value("TCHP_Bjet1", sigsel.TCHP_Bjet1() ) ); 00036 values.push_back( PhysicsTools::Variable::Value("TCHP_Bjet2", sigsel.TCHP_Bjet2() ) ); 00037 values.push_back( PhysicsTools::Variable::Value("TCHP_Bjet3", sigsel.TCHP_Bjet3() ) ); 00038 values.push_back( PhysicsTools::Variable::Value("TCHP_Bjet4", sigsel.TCHP_Bjet4() ) ); 00039 values.push_back( PhysicsTools::Variable::Value("TCHP_Bjet5", sigsel.TCHP_Bjet5() ) ); 00040 values.push_back( PhysicsTools::Variable::Value("TCHP_Bjet6", sigsel.TCHP_Bjet6() ) ); 00041 values.push_back( PhysicsTools::Variable::Value("SSV_Bjet1", sigsel.SSV_Bjet1() ) ); 00042 values.push_back( PhysicsTools::Variable::Value("SSV_Bjet2", sigsel.SSV_Bjet2() ) ); 00043 values.push_back( PhysicsTools::Variable::Value("SSV_Bjet3", sigsel.SSV_Bjet3() ) ); 00044 values.push_back( PhysicsTools::Variable::Value("SSV_Bjet4", sigsel.SSV_Bjet4() ) ); 00045 values.push_back( PhysicsTools::Variable::Value("SSV_Bjet5", sigsel.SSV_Bjet5() ) ); 00046 values.push_back( PhysicsTools::Variable::Value("SSV_Bjet6", sigsel.SSV_Bjet6() ) ); 00047 values.push_back( PhysicsTools::Variable::Value("CSV_Bjet1", sigsel.CSV_Bjet1() ) ); 00048 values.push_back( PhysicsTools::Variable::Value("CSV_Bjet2", sigsel.CSV_Bjet2() ) ); 00049 values.push_back( PhysicsTools::Variable::Value("CSV_Bjet3", sigsel.CSV_Bjet3() ) ); 00050 values.push_back( PhysicsTools::Variable::Value("CSV_Bjet4", sigsel.CSV_Bjet4() ) ); 00051 values.push_back( PhysicsTools::Variable::Value("CSV_Bjet5", sigsel.CSV_Bjet5() ) ); 00052 values.push_back( PhysicsTools::Variable::Value("CSV_Bjet6", sigsel.CSV_Bjet6() ) ); 00053 values.push_back( PhysicsTools::Variable::Value("SM_Bjet1", sigsel.SM_Bjet1() ) ); 00054 values.push_back( PhysicsTools::Variable::Value("SM_Bjet2", sigsel.SM_Bjet2() ) ); 00055 values.push_back( PhysicsTools::Variable::Value("SM_Bjet3", sigsel.SM_Bjet3() ) ); 00056 values.push_back( PhysicsTools::Variable::Value("SM_Bjet4", sigsel.SM_Bjet4() ) ); 00057 values.push_back( PhysicsTools::Variable::Value("SM_Bjet5", sigsel.SM_Bjet5() ) ); 00058 values.push_back( PhysicsTools::Variable::Value("SM_Bjet6", sigsel.SM_Bjet6() ) ); 00059 00060 values.push_back( PhysicsTools::Variable::Value("pt1", sigsel.pt1() ) ); 00061 values.push_back( PhysicsTools::Variable::Value("pt2", sigsel.pt2() ) ); 00062 values.push_back( PhysicsTools::Variable::Value("pt3", sigsel.pt3() ) ); 00063 values.push_back( PhysicsTools::Variable::Value("pt4", sigsel.pt4() ) ); 00064 values.push_back( PhysicsTools::Variable::Value("pt5", sigsel.pt5() ) ); 00065 values.push_back( PhysicsTools::Variable::Value("pt6", sigsel.pt6() ) ); 00066 00067 values.push_back( PhysicsTools::Variable::Value("pt1_pt2", sigsel.pt1_pt2() ) ); 00068 values.push_back( PhysicsTools::Variable::Value("pt1_pt3", sigsel.pt1_pt3() ) ); 00069 values.push_back( PhysicsTools::Variable::Value("pt1_pt4", sigsel.pt1_pt4() ) ); 00070 values.push_back( PhysicsTools::Variable::Value("pt1_pt5", sigsel.pt1_pt5() ) ); 00071 values.push_back( PhysicsTools::Variable::Value("pt1_pt6", sigsel.pt1_pt6() ) ); 00072 values.push_back( PhysicsTools::Variable::Value("pt2_pt3", sigsel.pt2_pt3() ) ); 00073 values.push_back( PhysicsTools::Variable::Value("pt2_pt4", sigsel.pt2_pt4() ) ); 00074 values.push_back( PhysicsTools::Variable::Value("pt2_pt5", sigsel.pt2_pt5() ) ); 00075 values.push_back( PhysicsTools::Variable::Value("pt2_pt6", sigsel.pt2_pt6() ) ); 00076 values.push_back( PhysicsTools::Variable::Value("pt3_pt4", sigsel.pt3_pt4() ) ); 00077 values.push_back( PhysicsTools::Variable::Value("pt3_pt5", sigsel.pt3_pt5() ) ); 00078 values.push_back( PhysicsTools::Variable::Value("pt3_pt6", sigsel.pt3_pt6() ) ); 00079 values.push_back( PhysicsTools::Variable::Value("pt4_pt5", sigsel.pt4_pt5() ) ); 00080 values.push_back( PhysicsTools::Variable::Value("pt4_pt6", sigsel.pt4_pt6() ) ); 00081 values.push_back( PhysicsTools::Variable::Value("pt5_pt6", sigsel.pt5_pt6() ) ); 00082 00083 values.push_back( PhysicsTools::Variable::Value("pt1_pt2_norm", sigsel.pt1_pt2_norm() ) ); 00084 values.push_back( PhysicsTools::Variable::Value("pt1_pt3_norm", sigsel.pt1_pt3_norm() ) ); 00085 values.push_back( PhysicsTools::Variable::Value("pt1_pt4_norm", sigsel.pt1_pt4_norm() ) ); 00086 values.push_back( PhysicsTools::Variable::Value("pt1_pt5_norm", sigsel.pt1_pt5_norm() ) ); 00087 values.push_back( PhysicsTools::Variable::Value("pt1_pt6_norm", sigsel.pt1_pt6_norm() ) ); 00088 values.push_back( PhysicsTools::Variable::Value("pt2_pt3_norm", sigsel.pt2_pt3_norm() ) ); 00089 values.push_back( PhysicsTools::Variable::Value("pt2_pt4_norm", sigsel.pt2_pt4_norm() ) ); 00090 values.push_back( PhysicsTools::Variable::Value("pt2_pt5_norm", sigsel.pt2_pt5_norm() ) ); 00091 values.push_back( PhysicsTools::Variable::Value("pt2_pt6_norm", sigsel.pt2_pt6_norm() ) ); 00092 values.push_back( PhysicsTools::Variable::Value("pt3_pt4_norm", sigsel.pt3_pt4_norm() ) ); 00093 values.push_back( PhysicsTools::Variable::Value("pt3_pt5_norm", sigsel.pt3_pt5_norm() ) ); 00094 values.push_back( PhysicsTools::Variable::Value("pt3_pt6_norm", sigsel.pt3_pt6_norm() ) ); 00095 values.push_back( PhysicsTools::Variable::Value("pt4_pt5_norm", sigsel.pt4_pt5_norm() ) ); 00096 values.push_back( PhysicsTools::Variable::Value("pt4_pt6_norm", sigsel.pt4_pt6_norm() ) ); 00097 values.push_back( PhysicsTools::Variable::Value("pt5_pt6_norm", sigsel.pt5_pt6_norm() ) ); 00098 00099 values.push_back( PhysicsTools::Variable::Value("jet1_etaetaMoment", sigsel.jet1_etaetaMoment() ) ); 00100 values.push_back( PhysicsTools::Variable::Value("jet2_etaetaMoment", sigsel.jet2_etaetaMoment() ) ); 00101 values.push_back( PhysicsTools::Variable::Value("jet3_etaetaMoment", sigsel.jet3_etaetaMoment() ) ); 00102 values.push_back( PhysicsTools::Variable::Value("jet4_etaetaMoment", sigsel.jet4_etaetaMoment() ) ); 00103 values.push_back( PhysicsTools::Variable::Value("jet5_etaetaMoment", sigsel.jet5_etaetaMoment() ) ); 00104 values.push_back( PhysicsTools::Variable::Value("jet6_etaetaMoment", sigsel.jet6_etaetaMoment() ) ); 00105 values.push_back( PhysicsTools::Variable::Value("jet1_etaphiMoment", sigsel.jet1_etaphiMoment() ) ); 00106 values.push_back( PhysicsTools::Variable::Value("jet2_etaphiMoment", sigsel.jet2_etaphiMoment() ) ); 00107 values.push_back( PhysicsTools::Variable::Value("jet3_etaphiMoment", sigsel.jet3_etaphiMoment() ) ); 00108 values.push_back( PhysicsTools::Variable::Value("jet4_etaphiMoment", sigsel.jet4_etaphiMoment() ) ); 00109 values.push_back( PhysicsTools::Variable::Value("jet5_etaphiMoment", sigsel.jet5_etaphiMoment() ) ); 00110 values.push_back( PhysicsTools::Variable::Value("jet6_etaphiMoment", sigsel.jet6_etaphiMoment() ) ); 00111 values.push_back( PhysicsTools::Variable::Value("jet1_phiphiMoment", sigsel.jet1_phiphiMoment() ) ); 00112 values.push_back( PhysicsTools::Variable::Value("jet2_phiphiMoment", sigsel.jet2_phiphiMoment() ) ); 00113 values.push_back( PhysicsTools::Variable::Value("jet3_phiphiMoment", sigsel.jet3_phiphiMoment() ) ); 00114 values.push_back( PhysicsTools::Variable::Value("jet4_phiphiMoment", sigsel.jet4_phiphiMoment() ) ); 00115 values.push_back( PhysicsTools::Variable::Value("jet5_phiphiMoment", sigsel.jet5_phiphiMoment() ) ); 00116 values.push_back( PhysicsTools::Variable::Value("jet6_phiphiMoment", sigsel.jet6_phiphiMoment() ) ); 00117 00118 values.push_back( PhysicsTools::Variable::Value("jets_etaetaMoment", sigsel.jets_etaetaMoment() ) ); 00119 values.push_back( PhysicsTools::Variable::Value("jets_etaphiMoment", sigsel.jets_etaphiMoment() ) ); 00120 values.push_back( PhysicsTools::Variable::Value("jets_phiphiMoment", sigsel.jets_phiphiMoment() ) ); 00121 00122 values.push_back( PhysicsTools::Variable::Value("aplanarity", sigsel.aplanarity() ) ); 00123 values.push_back( PhysicsTools::Variable::Value("sphericity", sigsel.sphericity() ) ); 00124 values.push_back( PhysicsTools::Variable::Value("circularity", sigsel.circularity() ) ); 00125 values.push_back( PhysicsTools::Variable::Value("isotropy", sigsel.isotropy() ) ); 00126 values.push_back( PhysicsTools::Variable::Value("C", sigsel.C() ) ); 00127 values.push_back( PhysicsTools::Variable::Value("D", sigsel.D() ) ); 00128 values.push_back( PhysicsTools::Variable::Value("centrality", sigsel.centrality() ) ); 00129 00130 values.push_back( PhysicsTools::Variable::Value("dRMin1", sigsel.dRMin1() ) ); 00131 values.push_back( PhysicsTools::Variable::Value("dRMin2", sigsel.dRMin2() ) ); 00132 values.push_back( PhysicsTools::Variable::Value("sumDR3JetMin1", sigsel.sumDR3JetMin1() ) ); 00133 values.push_back( PhysicsTools::Variable::Value("sumDR3JetMin2", sigsel.sumDR3JetMin2() ) ); 00134 00135 values.push_back( PhysicsTools::Variable::Value("dRMin1Mass", sigsel.dRMin1Mass() ) ); 00136 values.push_back( PhysicsTools::Variable::Value("dRMin2Mass", sigsel.dRMin2Mass() ) ); 00137 values.push_back( PhysicsTools::Variable::Value("sumDR3JetMin1Mass", sigsel.sumDR3JetMin1Mass() ) ); 00138 values.push_back( PhysicsTools::Variable::Value("sumDR3JetMin2Mass", sigsel.sumDR3JetMin2Mass() ) ); 00139 00140 return mvaComputer->eval( values ); 00141 00142 } 00143 00144 #endif