本文整理汇总了C++中tmva::Reader::GetMVAError方法的典型用法代码示例。如果您正苦于以下问题:C++ Reader::GetMVAError方法的具体用法?C++ Reader::GetMVAError怎么用?C++ Reader::GetMVAError使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tmva::Reader
的用法示例。
在下文中一共展示了Reader::GetMVAError方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: TMVAClassificationApplication
//.........这里部分代码省略.........
if (Use["LikelihoodD" ]) histLkD ->Fill( reader->EvaluateMVA( "LikelihoodD method" ) );
if (Use["LikelihoodPCA"]) histLkPCA ->Fill( reader->EvaluateMVA( "LikelihoodPCA method" ) );
if (Use["LikelihoodKDE"]) histLkKDE ->Fill( reader->EvaluateMVA( "LikelihoodKDE method" ) );
if (Use["LikelihoodMIX"]) histLkMIX ->Fill( reader->EvaluateMVA( "LikelihoodMIX method" ) );
if (Use["PDERS" ]) histPD ->Fill( reader->EvaluateMVA( "PDERS method" ) );
if (Use["PDERSD" ]) histPDD ->Fill( reader->EvaluateMVA( "PDERSD method" ) );
if (Use["PDERSPCA" ]) histPDPCA ->Fill( reader->EvaluateMVA( "PDERSPCA method" ) );
if (Use["KNN" ]) histKNN ->Fill( reader->EvaluateMVA( "KNN method" ) );
if (Use["HMatrix" ]) histHm ->Fill( reader->EvaluateMVA( "HMatrix method" ) );
if (Use["Fisher" ]) histFi ->Fill( reader->EvaluateMVA( "Fisher method" ) );
if (Use["FisherG" ]) histFiG ->Fill( reader->EvaluateMVA( "FisherG method" ) );
if (Use["BoostedFisher"]) histFiB ->Fill( reader->EvaluateMVA( "BoostedFisher method" ) );
if (Use["LD" ]) histLD ->Fill( reader->EvaluateMVA( "LD method" ) );
if (Use["MLP" ]) histNn ->Fill( reader->EvaluateMVA( "MLP method" ) );
if (Use["MLPBFGS" ]) histNnbfgs ->Fill( reader->EvaluateMVA( "MLPBFGS method" ) );
if (Use["MLPBNN" ]) histNnbnn ->Fill( reader->EvaluateMVA( "MLPBNN method" ) );
if (Use["CFMlpANN" ]) histNnC ->Fill( reader->EvaluateMVA( "CFMlpANN method" ) );
if (Use["TMlpANN" ]) histNnT ->Fill( reader->EvaluateMVA( "TMlpANN method" ) );
if (Use["BDT" ]) histBdt ->Fill( reader->EvaluateMVA( "BDT method" ) );
if (Use["BDTD" ]) histBdtD ->Fill( reader->EvaluateMVA( "BDTD method" ) );
if (Use["BDTG" ]) histBdtG ->Fill( reader->EvaluateMVA( "BDTG method" ) );
if (Use["RuleFit" ]) histRf ->Fill( reader->EvaluateMVA( "RuleFit method" ) );
if (Use["SVM_Gauss" ]) histSVMG ->Fill( reader->EvaluateMVA( "SVM_Gauss method" ) );
if (Use["SVM_Poly" ]) histSVMP ->Fill( reader->EvaluateMVA( "SVM_Poly method" ) );
if (Use["SVM_Lin" ]) histSVML ->Fill( reader->EvaluateMVA( "SVM_Lin method" ) );
if (Use["FDA_MT" ]) histFDAMT ->Fill( reader->EvaluateMVA( "FDA_MT method" ) );
if (Use["FDA_GA" ]) histFDAGA ->Fill( reader->EvaluateMVA( "FDA_GA method" ) );
if (Use["Category" ]) histCat ->Fill( reader->EvaluateMVA( "Category method" ) );
if (Use["Plugin" ]) histPBdt ->Fill( reader->EvaluateMVA( "P_BDT method" ) );
// retrieve also per-event error
if (Use["PDEFoam"]) {
Double_t val = reader->EvaluateMVA( "PDEFoam method" );
Double_t err = reader->GetMVAError();
histPDEFoam ->Fill( val );
histPDEFoamErr->Fill( err );
histPDEFoamSig->Fill( val/err );
}
// retrieve probability instead of MVA output
if (Use["Fisher"]) {
probHistFi ->Fill( reader->GetProba ( "Fisher method" ) );
rarityHistFi->Fill( reader->GetRarity( "Fisher method" ) );
}
}
// get elapsed time
sw.Stop();
std::cout << "--- End of event loop: "; sw.Print();
// get efficiency for cuts classifier
if (Use["CutsGA"]) std::cout << "--- Efficiency for CutsGA method: " << double(nSelCutsGA)/theTree->GetEntries()
<< " (for a required signal efficiency of " << effS << ")" << std::endl;
if (Use["CutsGA"]) {
// test: retrieve cuts for particular signal efficiency
// CINT ignores dynamic_casts so we have to use a cuts-secific Reader function to acces the pointer
TMVA::MethodCuts* mcuts = reader->FindCutsMVA( "CutsGA method" ) ;
if (mcuts) {
std::vector<Double_t> cutsMin;
std::vector<Double_t> cutsMax;
mcuts->GetCuts( 0.7, cutsMin, cutsMax );
std::cout << "--- -------------------------------------------------------------" << std::endl;
std::cout << "--- Retrieve cut values for signal efficiency of 0.7 from Reader" << std::endl;
for (UInt_t ivar=0; ivar<cutsMin.size(); ivar++) {
示例2: TMVAClassificationApplication
//.........这里部分代码省略.........
if (Use["LikelihoodD" ]) histLkD ->Fill( reader->EvaluateMVA( "LikelihoodD method" ) );
if (Use["LikelihoodPCA"]) histLkPCA ->Fill( reader->EvaluateMVA( "LikelihoodPCA method" ) );
if (Use["LikelihoodKDE"]) histLkKDE ->Fill( reader->EvaluateMVA( "LikelihoodKDE method" ) );
if (Use["LikelihoodMIX"]) histLkMIX ->Fill( reader->EvaluateMVA( "LikelihoodMIX method" ) );
if (Use["PDERS" ]) histPD ->Fill( reader->EvaluateMVA( "PDERS method" ) );
if (Use["PDERSD" ]) histPDD ->Fill( reader->EvaluateMVA( "PDERSD method" ) );
if (Use["PDERSPCA" ]) histPDPCA ->Fill( reader->EvaluateMVA( "PDERSPCA method" ) );
if (Use["KNN" ]) histKNN ->Fill( reader->EvaluateMVA( "KNN method" ) );
if (Use["HMatrix" ]) histHm ->Fill( reader->EvaluateMVA( "HMatrix method" ) );
if (Use["Fisher" ]) histFi ->Fill( reader->EvaluateMVA( "Fisher method" ) );
if (Use["FisherG" ]) histFiG ->Fill( reader->EvaluateMVA( "FisherG method" ) );
if (Use["BoostedFisher"]) histFiB ->Fill( reader->EvaluateMVA( "BoostedFisher method" ) );
if (Use["LD" ]) histLD ->Fill( reader->EvaluateMVA( "LD method" ) );
if (Use["MLP" ]) histNn ->Fill( reader->EvaluateMVA( "MLP method" ) );
if (Use["MLPBFGS" ]) histNnbfgs ->Fill( reader->EvaluateMVA( "MLPBFGS method" ) );
if (Use["MLPBNN" ]) histNnbnn ->Fill( reader->EvaluateMVA( "MLPBNN method" ) );
if (Use["CFMlpANN" ]) histNnC ->Fill( reader->EvaluateMVA( "CFMlpANN method" ) );
if (Use["TMlpANN" ]) histNnT ->Fill( reader->EvaluateMVA( "TMlpANN method" ) );
if (Use["BDT" ]) histBdt ->Fill( reader->EvaluateMVA( "BDT method" ) );
if (Use["BDTD" ]) histBdtD ->Fill( reader->EvaluateMVA( "BDTD method" ) );
if (Use["BDTG" ]) histBdtG ->Fill( reader->EvaluateMVA( "BDTG method" ) );
if (Use["RuleFit" ]) histRf ->Fill( reader->EvaluateMVA( "RuleFit method" ) );
if (Use["SVM_Gauss" ]) histSVMG ->Fill( reader->EvaluateMVA( "SVM_Gauss method" ) );
if (Use["SVM_Poly" ]) histSVMP ->Fill( reader->EvaluateMVA( "SVM_Poly method" ) );
if (Use["SVM_Lin" ]) histSVML ->Fill( reader->EvaluateMVA( "SVM_Lin method" ) );
if (Use["FDA_MT" ]) histFDAMT ->Fill( reader->EvaluateMVA( "FDA_MT method" ) );
if (Use["FDA_GA" ]) histFDAGA ->Fill( reader->EvaluateMVA( "FDA_GA method" ) );
if (Use["Category" ]) histCat ->Fill( reader->EvaluateMVA( "Category method" ) );
if (Use["Plugin" ]) histPBdt ->Fill( reader->EvaluateMVA( "P_BDT method" ) );
// Retrieve also per-event error
if (Use["PDEFoam"]) {
Double_t val = reader->EvaluateMVA( "PDEFoam method" );
Double_t err = reader->GetMVAError();
histPDEFoam ->Fill( val );
histPDEFoamErr->Fill( err );
if (err>1.e-50) histPDEFoamSig->Fill( val/err );
}
// Retrieve probability instead of MVA output
if (Use["Fisher"]) {
probHistFi ->Fill( reader->GetProba ( "Fisher method" ) );
rarityHistFi->Fill( reader->GetRarity( "Fisher method" ) );
}
}
// Get elapsed time
sw.Stop();
std::cout << "--- End of event loop: "; sw.Print();
// Get efficiency for cuts classifier
if (Use["CutsGA"]) std::cout << "--- Efficiency for CutsGA method: " << double(nSelCutsGA)/theTree->GetEntries()
<< " (for a required signal efficiency of " << effS << ")" << std::endl;
if (Use["CutsGA"]) {
// test: retrieve cuts for particular signal efficiency
// CINT ignores dynamic_casts so we have to use a cuts-secific Reader function to acces the pointer
TMVA::MethodCuts* mcuts = reader->FindCutsMVA( "CutsGA method" ) ;
if (mcuts) {
std::vector<Double_t> cutsMin;
std::vector<Double_t> cutsMax;
mcuts->GetCuts( 0.7, cutsMin, cutsMax );
std::cout << "--- -------------------------------------------------------------" << std::endl;
std::cout << "--- Retrieve cut values for signal efficiency of 0.7 from Reader" << std::endl;
示例3: Classify_HWW
//.........这里部分代码省略.........
if (Use["LikelihoodD" ]) histLkD ->Fill( reader->EvaluateMVA( "LikelihoodD method" ) , weight);
if (Use["LikelihoodPCA"]) histLkPCA ->Fill( reader->EvaluateMVA( "LikelihoodPCA method" ) , weight);
if (Use["LikelihoodKDE"]) histLkKDE ->Fill( reader->EvaluateMVA( "LikelihoodKDE method" ) , weight);
if (Use["LikelihoodMIX"]) histLkMIX ->Fill( reader->EvaluateMVA( "LikelihoodMIX method" ) , weight);
if (Use["PDERS" ]) histPD ->Fill( reader->EvaluateMVA( "PDERS method" ) , weight);
if (Use["PDERSD" ]) histPDD ->Fill( reader->EvaluateMVA( "PDERSD method" ) , weight);
if (Use["PDERSPCA" ]) histPDPCA ->Fill( reader->EvaluateMVA( "PDERSPCA method" ) , weight);
if (Use["KNN" ]) histKNN ->Fill( reader->EvaluateMVA( "KNN method" ) , weight);
if (Use["HMatrix" ]) histHm ->Fill( reader->EvaluateMVA( "HMatrix method" ) , weight);
if (Use["Fisher" ]) histFi ->Fill( reader->EvaluateMVA( "Fisher method" ) , weight);
if (Use["FisherG" ]) histFiG ->Fill( reader->EvaluateMVA( "FisherG method" ) , weight);
if (Use["BoostedFisher"]) histFiB ->Fill( reader->EvaluateMVA( "BoostedFisher method" ) , weight);
if (Use["LD" ]) histLD ->Fill( reader->EvaluateMVA( "LD method" ) , weight);
if (Use["MLP" ]) histNn ->Fill( reader->EvaluateMVA( "MLP method" ) , weight);
if (Use["MLPBFGS" ]) histNnbfgs ->Fill( reader->EvaluateMVA( "MLPBFGS method" ) , weight);
if (Use["MLPBNN" ]) histNnbnn ->Fill( reader->EvaluateMVA( "MLPBNN method" ) , weight);
if (Use["CFMlpANN" ]) histNnC ->Fill( reader->EvaluateMVA( "CFMlpANN method" ) , weight);
if (Use["TMlpANN" ]) histNnT ->Fill( reader->EvaluateMVA( "TMlpANN method" ) , weight);
if (Use["BDT" ]) histBdt ->Fill( reader->EvaluateMVA( "BDT method" ) , weight);
if (Use["BDTD" ]) histBdtD ->Fill( reader->EvaluateMVA( "BDTD method" ) , weight);
if (Use["BDTG" ]) histBdtG ->Fill( reader->EvaluateMVA( "BDTG method" ) , weight);
if (Use["RuleFit" ]) histRf ->Fill( reader->EvaluateMVA( "RuleFit method" ) , weight);
if (Use["SVM_Gauss" ]) histSVMG ->Fill( reader->EvaluateMVA( "SVM_Gauss method" ) , weight);
if (Use["SVM_Poly" ]) histSVMP ->Fill( reader->EvaluateMVA( "SVM_Poly method" ) , weight);
if (Use["SVM_Lin" ]) histSVML ->Fill( reader->EvaluateMVA( "SVM_Lin method" ) , weight);
if (Use["FDA_MT" ]) histFDAMT ->Fill( reader->EvaluateMVA( "FDA_MT method" ) , weight);
if (Use["FDA_GA" ]) histFDAGA ->Fill( reader->EvaluateMVA( "FDA_GA method" ) , weight);
if (Use["Category" ]) histCat ->Fill( reader->EvaluateMVA( "Category method" ) , weight);
if (Use["Plugin" ]) histPBdt ->Fill( reader->EvaluateMVA( "P_BDT method" ) , weight);
// Retrieve also per-event error
if (Use["PDEFoam"]) {
Double_t val = reader->EvaluateMVA( "PDEFoam method" );
Double_t err = reader->GetMVAError();
histPDEFoam ->Fill( val );
histPDEFoamErr->Fill( err );
if (err>1.e-50) histPDEFoamSig->Fill( val/err , weight);
}
// Retrieve probability instead of MVA output
if (Use["Fisher"]) {
probHistFi ->Fill( reader->GetProba ( "Fisher method" ) , weight);
rarityHistFi->Fill( reader->GetRarity( "Fisher method" ) , weight);
}
}
std::cout << npass << " events passing selection, yield " << yield << std::endl;
// Get elapsed time
sw.Stop();
std::cout << "--- End of event loop: "; sw.Print();
// Get efficiency for cuts classifier
if (Use["CutsGA"]) std::cout << "--- Efficiency for CutsGA method: " << double(nSelCutsGA)/theTree->GetEntries()
<< " (for a required signal efficiency of " << effS << ")" << std::endl;
if (Use["CutsGA"]) {
// test: retrieve cuts for particular signal efficiency
// CINT ignores dynamic_casts so we have to use a cuts-secific Reader function to acces the pointer
TMVA::MethodCuts* mcuts = reader->FindCutsMVA( "CutsGA method" ) ;
if (mcuts) {
std::vector<Double_t> cutsMin;
std::vector<Double_t> cutsMax;
mcuts->GetCuts( 0.7, cutsMin, cutsMax );
示例4: DYPtZ_HF_BDTCut
//.........这里部分代码省略.........
if (Use["PDERS" ]) histPD ->Fill( reader->EvaluateMVA( "PDERS method" ) );
if (Use["PDERSD" ]) histPDD ->Fill( reader->EvaluateMVA( "PDERSD method" ) );
if (Use["PDERSPCA" ]) histPDPCA ->Fill( reader->EvaluateMVA( "PDERSPCA method" ) );
if (Use["KNN" ]) histKNN ->Fill( reader->EvaluateMVA( "KNN method" ) );
if (Use["HMatrix" ]) histHm ->Fill( reader->EvaluateMVA( "HMatrix method" ) );
if (Use["Fisher" ]) histFi ->Fill( reader->EvaluateMVA( "Fisher method" ) );
if (Use["FisherG" ]) histFiG ->Fill( reader->EvaluateMVA( "FisherG method" ) );
if (Use["BoostedFisher"]) histFiB ->Fill( reader->EvaluateMVA( "BoostedFisher method" ) );
if (Use["LD" ]) histLD ->Fill( reader->EvaluateMVA( "LD method" ) );
if (Use["MLP" ]) histNn ->Fill( reader->EvaluateMVA( "MLP method" ) );
if (Use["MLPBFGS" ]) histNnbfgs ->Fill( reader->EvaluateMVA( "MLPBFGS method" ) );
if (Use["MLPBNN" ]) histNnbnn ->Fill( reader->EvaluateMVA( "MLPBNN method" ) );
if (Use["CFMlpANN" ]) histNnC ->Fill( reader->EvaluateMVA( "CFMlpANN method" ) );
if (Use["TMlpANN" ]) histNnT ->Fill( reader->EvaluateMVA( "TMlpANN method" ) );
if (Use["BDT" ]) {
BDTvalue = reader->EvaluateMVA( "BDT method" );
histMattBdt ->Fill( BDTvalue,DY_PtZ_weight*Trigweight*B2011PUweight );
histTMVABdt ->Fill( BDTvalue,DY_PtZ_weight*Trigweight*B2011PUweight );
}
if (Use["BDTD" ]) histBdtD ->Fill( reader->EvaluateMVA( "BDTD method" ) );
if (Use["BDTG" ]) histBdtG ->Fill( reader->EvaluateMVA( "BDTG method" ) );
if (Use["RuleFit" ]) histRf ->Fill( reader->EvaluateMVA( "RuleFit method" ) );
if (Use["SVM_Gauss" ]) histSVMG ->Fill( reader->EvaluateMVA( "SVM_Gauss method" ) );
if (Use["SVM_Poly" ]) histSVMP ->Fill( reader->EvaluateMVA( "SVM_Poly method" ) );
if (Use["SVM_Lin" ]) histSVML ->Fill( reader->EvaluateMVA( "SVM_Lin method" ) );
if (Use["FDA_MT" ]) histFDAMT ->Fill( reader->EvaluateMVA( "FDA_MT method" ) );
if (Use["FDA_GA" ]) histFDAGA ->Fill( reader->EvaluateMVA( "FDA_GA method" ) );
if (Use["Category" ]) histCat ->Fill( reader->EvaluateMVA( "Category method" ) );
if (Use["Plugin" ]) histPBdt ->Fill( reader->EvaluateMVA( "P_BDT method" ) );
// Retrieve also per-event error
if (Use["PDEFoam"]) {
Double_t val = reader->EvaluateMVA( "PDEFoam method" );
Double_t err = reader->GetMVAError();
histPDEFoam ->Fill( val );
histPDEFoamErr->Fill( err );
if (err>1.e-50) histPDEFoamSig->Fill( val/err );
}
// Retrieve probability instead of MVA output
if (Use["Fisher"]) {
probHistFi ->Fill( reader->GetProba ( "Fisher method" ) );
rarityHistFi->Fill( reader->GetRarity( "Fisher method" ) );
}
// std::cout << "Ht is "<< Ht << endl;
if(BDTvalue>-1.50){
NpassBDT++;
hMjj_OpenSelection->Fill(Hmass,DY_PtZ_weight*Trigweight*B2011PUweight );
hMmumu_OpenSelection->Fill(Emumass,DY_PtZ_weight*Trigweight*B2011PUweight );
hPtjj_OpenSelection->Fill(Hpt,DY_PtZ_weight*Trigweight*B2011PUweight );
hPtmumu_OpenSelection->Fill(Zpt,DY_PtZ_weight*Trigweight*B2011PUweight );
hCSV0_OpenSelection->Fill(CSV0,DY_PtZ_weight*Trigweight*B2011PUweight );
hCSV1_OpenSelection->Fill(CSV1,DY_PtZ_weight*Trigweight*B2011PUweight );
hdphiVH_OpenSelection->Fill(DeltaPhiHV,DY_PtZ_weight*Trigweight*B2011PUweight );
hdetaJJ_OpenSelection->Fill(DetaJJ,DY_PtZ_weight*Trigweight*B2011PUweight );
hUnweightedEta_OpenSelection->Fill(UnweightedEta,DY_PtZ_weight*Trigweight*B2011PUweight );
hPtmu0_OpenSelection->Fill(lep0pt,DY_PtZ_weight*Trigweight*B2011PUweight );
hHt_OpenSelection->Fill(Ht,DY_PtZ_weight*Trigweight*B2011PUweight );
hCircularity_OpenSelection->Fill(EvntShpCircularity,DY_PtZ_weight*Trigweight*B2011PUweight );
hCHFb0_OpenSelection->Fill(jetCHF0, DY_PtZ_weight*Trigweight*B2011PUweight );
hCHFb1_OpenSelection->Fill(jetCHF1, DY_PtZ_weight*Trigweight*B2011PUweight );
hPtbalZH_OpenSelection->Fill(PtbalZH, DY_PtZ_weight*Trigweight*B2011PUweight );
hPtmu1_OpenSelection->Fill(lep1pt, DY_PtZ_weight*Trigweight*B2011PUweight );
hPFRelIsomu0_OpenSelection->Fill(lep_pfCombRelIso0, DY_PtZ_weight*Trigweight*B2011PUweight );
hPFRelIsomu1_OpenSelection->Fill(lep_pfCombRelIso1, DY_PtZ_weight*Trigweight*B2011PUweight );
示例5: ZTMVAClassificationApplication
//.........这里部分代码省略.........
}
if (Use["MLPBFGS" ]) histNnbfgs ->Fill( reader->EvaluateMVA( "MLPBFGS method" ) );
if (Use["MLPBNN" ]) histNnbnn ->Fill( reader->EvaluateMVA( "MLPBNN method" ) );
if (Use["CFMlpANN" ]) histNnC ->Fill( reader->EvaluateMVA( "CFMlpANN method" ) );
if (Use["TMlpANN" ]) histNnT ->Fill( reader->EvaluateMVA( "TMlpANN method" ) );
if (Use["BDT" ]) {
histBdt ->Fill( reader->EvaluateMVA( "BDT method" ) );
bdt = reader->EvaluateMVA( "BDT method" ) ;
b_bdt->Fill();
}
if (Use["BDTD" ]) {
histBdtD ->Fill( reader->EvaluateMVA( "BDTD method" ) );
bdtd = reader->EvaluateMVA( "BDTD method" );
b_bdtd->Fill();
}
if (Use["BDTG" ]) {
histBdtG ->Fill( reader->EvaluateMVA( "BDTG method" ) );
bdtg = reader->EvaluateMVA( "BDTG method" );
b_bdtg->Fill();
//cout << reader->EvaluateMVA( "BDTG method" ) <<endl;
}
if (Use["RuleFit" ]) histRf ->Fill( reader->EvaluateMVA( "RuleFit method" ) );
if (Use["SVM_Gauss" ]) histSVMG ->Fill( reader->EvaluateMVA( "SVM_Gauss method" ) );
if (Use["SVM_Poly" ]) histSVMP ->Fill( reader->EvaluateMVA( "SVM_Poly method" ) );
if (Use["SVM_Lin" ]) histSVML ->Fill( reader->EvaluateMVA( "SVM_Lin method" ) );
if (Use["FDA_MT" ]) histFDAMT ->Fill( reader->EvaluateMVA( "FDA_MT method" ) );
if (Use["FDA_GA" ]) histFDAGA ->Fill( reader->EvaluateMVA( "FDA_GA method" ) );
if (Use["Category" ]) histCat ->Fill( reader->EvaluateMVA( "Category method" ) );
if (Use["Plugin" ]) histPBdt ->Fill( reader->EvaluateMVA( "P_BDT method" ) );
// Retrieve also per-event error
if (Use["PDEFoam"]) {
Double_t val = reader->EvaluateMVA( "PDEFoam method" );
Double_t err = reader->GetMVAError();
histPDEFoam ->Fill( val );
histPDEFoamErr->Fill( err );
if (err>1.e-50) histPDEFoamSig->Fill( val/err );
}
// Retrieve probability instead of MVA output
if (Use["Fisher"]) {
probHistFi ->Fill( reader->GetProba ( "Fisher method" ) );
rarityHistFi->Fill( reader->GetRarity( "Fisher method" ) );
}
}
// Get elapsed time
sw.Stop();
std::cout << "--- End of event loop: "; sw.Print();
// Get efficiency for cuts classifier
if (Use["CutsGA"]) std::cout << "--- Efficiency for CutsGA method: " << double(nSelCutsGA)/theTree->GetEntries()
<< " (for a required signal efficiency of " << effS << ")" << std::endl;
if (Use["CutsGA"]) {
// test: retrieve cuts for particular signal efficiency
// CINT ignores dynamic_casts so we have to use a cuts-secific Reader function to acces the pointer
TMVA::MethodCuts* mcuts = reader->FindCutsMVA( "CutsGA method" ) ;
if (mcuts) {
std::vector<Double_t> cutsMin;
std::vector<Double_t> cutsMax;
mcuts->GetCuts( 0.7, cutsMin, cutsMax );
std::cout << "--- -------------------------------------------------------------" << std::endl;
std::cout << "--- Retrieve cut values for signal efficiency of 0.7 from Reader" << std::endl;
示例6: TMVAClassificationApplicationLambda
//.........这里部分代码省略.........
n1->Fill(Lam_mass,MVA);
}
if (Use["BDTG" ]) {
double Lam_mass = la_mass;
histBdtG ->Fill( reader->EvaluateMVA( "BDTG method" ) );
double MVA = 0.0;
MVA = reader->EvaluateMVA("BDTG method");
n1->Fill(Lam_mass,MVA);
}
if (Use["RuleFit" ]) histRf ->Fill( reader->EvaluateMVA( "RuleFit method" ) );
if (Use["SVM_Gauss" ]) histSVMG ->Fill( reader->EvaluateMVA( "SVM_Gauss method" ) );
if (Use["SVM_Poly" ]) histSVMP ->Fill( reader->EvaluateMVA( "SVM_Poly method" ) );
if (Use["SVM_Lin" ]) histSVML ->Fill( reader->EvaluateMVA( "SVM_Lin method" ) );
if (Use["FDA_MT" ]) histFDAMT ->Fill( reader->EvaluateMVA( "FDA_MT method" ) );
if (Use["FDA_GA" ]) histFDAGA ->Fill( reader->EvaluateMVA( "FDA_GA method" ) );
if (Use["Category" ]) histCat ->Fill( reader->EvaluateMVA( "Category method" ) );
if (Use["Plugin" ]) histPBdt ->Fill( reader->EvaluateMVA( "P_BDT method" ) );
// Retrieve also per-event error
if (Use["PDEFoam"]) {
Double_t val = reader->EvaluateMVA( "PDEFoam method" );
Double_t err = reader->GetMVAError();
histPDEFoam ->Fill( val );
histPDEFoamErr->Fill( err );
if (err>1.e-50) histPDEFoamSig->Fill( val/err );
}
// Retrieve probability instead of MVA output
if (Use["Fisher"]) {
probHistFi ->Fill( reader->GetProba ( "Fisher method" ) );
rarityHistFi->Fill( reader->GetRarity( "Fisher method" ) );
}
}
// Get elapsed time
sw.Stop();
std::cout << "--- End of event loop: "; sw.Print();
// Get efficiency for cuts classifier
if (Use["CutsGA"]) std::cout << "--- Efficiency for CutsGA method: " << double(nSelCutsGA)/theTree->GetEntries()
<< " (for a required signal efficiency of " << effS << ")" << std::endl;
if (Use["CutsGA"]) {
// test: retrieve cuts for particular signal efficiency
// CINT ignores dynamic_casts so we have to use a cuts-secific Reader function to acces the pointer
TMVA::MethodCuts* mcuts = reader->FindCutsMVA( "CutsGA method" ) ;
if (mcuts) {
std::vector<Double_t> cutsMin;
std::vector<Double_t> cutsMax;
mcuts->GetCuts( 0.7, cutsMin, cutsMax );
std::cout << "--- -------------------------------------------------------------" << std::endl;
std::cout << "--- Retrieve cut values for signal efficiency of 0.7 from Reader" << std::endl;
示例7: rezamyTMVAClassificationApplication1systematic
//.........这里部分代码省略.........
//cout<<(*myweight)[0]<<endl;
eventwight["__PU__plus"]=(*myweight)[0]*(*mypileupSFup)[0]/(*mypileupSF)[0];
eventwight["__PU__minus"]=(*myweight)[0]*(*mypileupSFdown)[0]/(*mypileupSF)[0];
eventwight["__TRIG__plus"]=(*myweight)[0]*(*mytriggerSFup)[0]/(*mytriggerSF)[0];
eventwight["__TRIG__minus"]=(*myweight)[0]*(*mytriggerSFdown)[0]/(*mytriggerSF)[0];
eventwight["__BTAG__plus"]=(*myweight)[0]*(*mybtagSFup)[0]/(*mybtagSF)[0];
eventwight["__BTAG__minus"]=(*myweight)[0]*(*mybtagSFdown)[0]/(*mybtagSF)[0];
eventwight["__MISSTAG__plus"]=(*myweight)[0]*(*mymistagSFup)[0]/(*mybtagSF)[0];
eventwight["__MISSTAG__minus"]=(*myweight)[0]*(*mymistagSFdown)[0]/(*mybtagSF)[0];
eventwight["__MUON__plus"]=(*myweight)[0]*(*mymuonSFup)[0]/(*mymuonSF)[0];
eventwight["__MUON__minus"]=(*myweight)[0]*(*mymuonSFdown)[0]/(*mymuonSF)[0];
eventwight["__PHOTON__plus"]=(*myweight)[0]*(*myphotonSFup)[0]/(*myphotonSF)[0];
eventwight["__PHOTON__minus"]=(*myweight)[0]*(*myphotonSFdown)[0]/(*myphotonSF)[0];
eventwight[""]=(*myweight)[0];
finalweight=eventwight[systematics[phi].c_str()];
if (samples_[idx]=="SIGNAL.root") finalweight=(*myweight)[0];
//if (samples_[idx]=="WPHJET") finalweight=(*mypileupSF)[0]*(*mytriggerSF)[0]*(*mybtagSF)[0]*(*mymuonSF)[0]*(*myphotonSF)[0];
//if (finalweight<0) finalweight=30;
//cout<<"negative event weight"<<finalweight<<" "<<ptphoton<<endl;
if (Use["CutsGA"]) {
// Cuts is a special case: give the desired signal efficienciy
Bool_t passed = reader->EvaluateMVA( "CutsGA method", effS );
if (passed) nSelCutsGA++;
}
hists[idx] ->Fill( reader->EvaluateMVA( "BDT method" ),finalweight* scales[idx] );
//cout<<reader->EvaluateMVA( "BDT method")<<" "<<finalweight<<endl;
//cout<<(*myweight)[0]<<endl;
// Retrieve also per-event error
if (Use["PDEFoam"]) {
Double_t val = reader->EvaluateMVA( "PDEFoam method" );
Double_t err = reader->GetMVAError();
histPDEFoam ->Fill( val );
histPDEFoamErr->Fill( err );
if (err>1.e-50) histPDEFoamSig->Fill( val/err );
}
// Retrieve probability instead of MVA output
if (Use["Fisher"]) {
probHistFi ->Fill( reader->GetProba ( "Fisher method" ) );
rarityHistFi->Fill( reader->GetRarity( "Fisher method" ) );
}
//delete finalweight;
}
// Get elapsed time
sw.Stop();
std::cout << "--- End of event loop: "; sw.Print();
// Get efficiency for cuts classifier
if (Use["CutsGA"]) std::cout << "--- Efficiency for CutsGA method: " << double(nSelCutsGA)/theTree->GetEntries()
<< " (for a required signal efficiency of " << effS << ")" << std::endl;
if (Use["CutsGA"]) {
// test: retrieve cuts for particular signal efficiency
// CINT ignores dynamic_casts so we have to use a cuts-secific Reader function to acces the pointer
TMVA::MethodCuts* mcuts = reader->FindCutsMVA( "CutsGA method" ) ;
if (mcuts) {
std::vector<Double_t> cutsMin;
std::vector<Double_t> cutsMax;
mcuts->GetCuts( 0.7, cutsMin, cutsMax );
std::cout << "--- -------------------------------------------------------------" << std::endl;
示例8: TMVAClassificationApplication
//.........这里部分代码省略.........
if (Use["LikelihoodPCA"]) histLkPCA ->Fill( reader->EvaluateMVA( "LikelihoodPCA method" ) );
if (Use["LikelihoodKDE"]) histLkKDE ->Fill( reader->EvaluateMVA( "LikelihoodKDE method" ) );
if (Use["LikelihoodMIX"]) histLkMIX ->Fill( reader->EvaluateMVA( "LikelihoodMIX method" ) );
if (Use["PDERS" ]) histPD ->Fill( reader->EvaluateMVA( "PDERS method" ) );
if (Use["PDERSD" ]) histPDD ->Fill( reader->EvaluateMVA( "PDERSD method" ) );
if (Use["PDERSPCA" ]) histPDPCA ->Fill( reader->EvaluateMVA( "PDERSPCA method" ) );
if (Use["KNN" ]) histKNN ->Fill( reader->EvaluateMVA( "KNN method" ) );
if (Use["HMatrix" ]) histHm ->Fill( reader->EvaluateMVA( "HMatrix method" ) );
if (Use["Fisher" ]) histFi ->Fill( reader->EvaluateMVA( "Fisher method" ) );
if (Use["FisherG" ]) histFiG ->Fill( reader->EvaluateMVA( "FisherG method" ) );
if (Use["BoostedFisher"]) histFiB ->Fill( reader->EvaluateMVA( "BoostedFisher method" ) );
if (Use["LD" ]) histLD ->Fill( reader->EvaluateMVA( "LD method" ) );
if (Use["MLP" ]) histNn ->Fill( reader->EvaluateMVA( "MLP method" ) );
if (Use["MLPBFGS" ]) histNnbfgs ->Fill( reader->EvaluateMVA( "MLPBFGS method" ) );
if (Use["MLPBNN" ]) histNnbnn ->Fill( reader->EvaluateMVA( "MLPBNN method" ) );
if (Use["CFMlpANN" ]) histNnC ->Fill( reader->EvaluateMVA( "CFMlpANN method" ) );
if (Use["TMlpANN" ]) histNnT ->Fill( reader->EvaluateMVA( "TMlpANN method" ) );
if (Use["BDT" ]) histBdt ->Fill( reader->EvaluateMVA( "BDT method" ), event_weight );
//if (Use["BDT" ]) histBdt ->Fill( reader->EvaluateMVA( "BDT method" ));
if (Use["BDTD" ]) histBdtD ->Fill( reader->EvaluateMVA( "BDTD method" ) );
if (Use["BDTG" ]) histBdtG ->Fill( reader->EvaluateMVA( "BDTG method" ) );
if (Use["RuleFit" ]) histRf ->Fill( reader->EvaluateMVA( "RuleFit method" ) );
if (Use["SVM_Gauss" ]) histSVMG ->Fill( reader->EvaluateMVA( "SVM_Gauss method" ) );
if (Use["SVM_Poly" ]) histSVMP ->Fill( reader->EvaluateMVA( "SVM_Poly method" ) );
if (Use["SVM_Lin" ]) histSVML ->Fill( reader->EvaluateMVA( "SVM_Lin method" ) );
if (Use["FDA_MT" ]) histFDAMT ->Fill( reader->EvaluateMVA( "FDA_MT method" ) );
if (Use["FDA_GA" ]) histFDAGA ->Fill( reader->EvaluateMVA( "FDA_GA method" ) );
if (Use["Category" ]) histCat ->Fill( reader->EvaluateMVA( "Category method" ) );
if (Use["Plugin" ]) histPBdt ->Fill( reader->EvaluateMVA( "P_BDT method" ) );
// Retrieve also per-event error
if (Use["PDEFoam"]) {
Double_t val = reader->EvaluateMVA( "PDEFoam method" );
Double_t err = reader->GetMVAError();
histPDEFoam ->Fill( val );
histPDEFoamErr->Fill( err );
if (err>1.e-50) histPDEFoamSig->Fill( val/err );
}
// Retrieve probability instead of MVA output
if (Use["Fisher"]) {
probHistFi ->Fill( reader->GetProba ( "Fisher method" ) );
rarityHistFi->Fill( reader->GetRarity( "Fisher method" ) );
}
}
// Get elapsed time
sw.Stop();
std::cout << "--- End of event loop: "; sw.Print();
// Get efficiency for cuts classifier
if (Use["CutsGA"]) std::cout << "--- Efficiency for CutsGA method: " << double(nSelCutsGA)/theTree->GetEntries()
<< " (for a required signal efficiency of " << effS << ")" << std::endl;
if (Use["CutsGA"]) {
// test: retrieve cuts for particular signal efficiency
// CINT ignores dynamic_casts so we have to use a cuts-secific Reader function to acces the pointer
TMVA::MethodCuts* mcuts = reader->FindCutsMVA( "CutsGA method" ) ;
if (mcuts) {
std::vector<Double_t> cutsMin;
std::vector<Double_t> cutsMax;
mcuts->GetCuts( 0.7, cutsMin, cutsMax );
std::cout << "--- -------------------------------------------------------------" << std::endl;
std::cout << "--- Retrieve cut values for signal efficiency of 0.7 from Reader" << std::endl;