23 void TMVACrossValidation()
30 TString fname =
"./tmva_class_example.root";
36 input =
TFile::Open(
"http://root.cern.ch/files/tmva_class_example.root",
"CACHEREAD");
39 std::cout <<
"ERROR: could not open data file" << std::endl;
43 TTree* signalTree = (
TTree*)input->Get(
"TreeS");
71 TMVACrossValidation();
void AddBackgroundTree(TTree *background, Double_t weight=1.0, Types::ETreeType treetype=Types::kMaxTreeType)
number of signal events (used to compute significance)
virtual Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
Returns FALSE if one can access a file using the specified access mode.
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
void AddVariable(const TString &expression, const TString &title, const TString &unit, char type='F', Double_t min=0, Double_t max=0)
user inserts discriminating variable in data set info
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=1, Int_t netopt=0)
Create / open a file.
R__EXTERN TSystem * gSystem
void PrepareTrainingAndTestTree(const TCut &cut, const TString &splitOpt)
prepare the training and test trees -> same cuts for signal and background
static Bool_t SetCacheFileDir(const char *cacheDir, Bool_t operateDisconnected=kTRUE, Bool_t forceCacheread=kFALSE)
Sets the directory where to locally stage/cache remote files.
A TTree object has a header with a name and a title.
void AddSignalTree(TTree *signal, Double_t weight=1.0, Types::ETreeType treetype=Types::kMaxTreeType)
number of signal events (used to compute significance)
int main(int argc, char **argv)