46 using namespace DiTauRecTools::msgHelperFunction;
47 std::unique_ptr<TFile> fBDT(TFile::Open(weightFile));
49 ANA_MSG_ERROR(
"configureMVABDT: Cannot find tau input BDT file: " << weightFile );
53 TTree* tBDT =
dynamic_cast<TTree*
> (fBDT->Get(
"BDT"));
55 ANA_MSG_ERROR(
"configureMVABDT: Cannot find tau input BDT tree");
59 ANA_MSG_INFO(
"configureMVABDT: opened file: " << weightFile);
61 std::vector<float*> vars;
64 TNamed* n_varList =
dynamic_cast<TNamed*
> (fBDT->Get(
"varList"));
66 ANA_MSG_ERROR(
"configureMVABDT: no Variable List in file: " << weightFile );
72 for(
const TString&
str : varList_ar){
73 if(
str.Length()==0)
continue;
74 std::map<TString, float*>::iterator itr = availableVars.find(
str);
75 if(itr==availableVars.end()){
76 ANA_MSG_ERROR(
"configureMVABDT: Variable : " <<
str <<
" is not available" );
79 vars.push_back( itr->second );
82 auto reader = std::make_unique<MVAUtils::BDT>(tBDT);
83 reader->SetPointers( vars );