34 #ifndef ROOT_TMVA_Factory
35 #define ROOT_TMVA_Factory
54 #ifndef ROOT_TMVA_Configurable
57 #ifndef ROOT_TMVA_Types
60 #ifndef ROOT_TMVA_DataSet
72 class DataInputHandler;
75 class VariableTransformBase;
88 virtual const char*
GetName()
const {
return "Factory"; }
134 AddTree( tree,
"Regression", weight,
"", treetype );
142 const TCut& cut =
"",
180 const TString& otherOpt=
"SplitMode=Random:!V" );
Int_t fATreeType
for each class: tmp tree if user wants to assign the events directly
void AddSignalTrainingEvent(const std::vector< Double_t > &event, Double_t weight=1.0)
add signal training event
void SetInputTrees(const TString &signalFileName, const TString &backgroundFileName, Double_t signalWeight=1.0, Double_t backgroundWeight=1.0)
virtual void MakeClass(const TString &methodTitle="") const
Print predefined help message of classifier iterate over methods and test.
static TDirectory * RootBaseDir()
void OptimizeAllMethods(TString fomType="ROCIntegral", TString fitType="FitGA")
iterates through all booked methods and sees if they use parameter tuning and if so.
static Vc_ALWAYS_INLINE int_v min(const int_v &x, const int_v &y)
std::vector< TMVA::VariableTransformBase * > fDefaultTrfs
DataInputHandler * fDataInputHandler
ROOT output file.
std::vector< TTree * > fTestAssignTree
for each class: tmp tree if user wants to assign the events directly
void OptimizeAllMethodsForClassification(TString fomType="ROCIntegral", TString fitType="FitGA")
void SetSignalWeightExpression(const TString &variable)
void SetInputVariables(std::vector< TString > *theVariables)
fill input variables in data set
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
void AddRegressionTree(TTree *tree, Double_t weight=1.0, Types::ETreeType treetype=Types::kMaxTreeType)
void OptimizeAllMethodsForRegression(TString fomType="ROCIntegral", TString fitType="FitGA")
void AddBackgroundTrainingEvent(const std::vector< Double_t > &event, Double_t weight=1.0)
add signal training event
TString fTransformations
option string given by construction (presently only "V")
void AddSpectator(const TString &expression, const TString &title="", const TString &unit="", Double_t min=0, Double_t max=0)
user inserts target in data set info
std::vector< TTree * > fTrainAssignTree
flags for data assigning
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
void TrainAllMethods()
iterates through all booked methods and calls training
DataSetInfo & DefaultDataSetInfo()
default creation
static TFile * fgTargetFile
void AddTrainingEvent(const TString &className, const std::vector< Double_t > &event, Double_t weight)
add signal training event
void AddTarget(const TString &expression, const TString &title="", const TString &unit="", Double_t min=0, Double_t max=0)
user inserts target in data set info
void TrainAllMethodsForClassification(void)
void SetSignalTree(TTree *signal, Double_t weight=1.0)
void WriteDataInformation()
put correlations of input data and a few (default + user selected) transformations into the root file...
MVector fMethods
verbose mode
void AddTestEvent(const TString &className, const std::vector< Double_t > &event, Double_t weight)
add signal test event
void AddBackgroundTree(TTree *background, Double_t weight=1.0, Types::ETreeType treetype=Types::kMaxTreeType)
number of signal events (used to compute significance)
void AddEvent(const TString &className, Types::ETreeType tt, const std::vector< Double_t > &event, Double_t weight)
add event vector event : the order of values is: variables + targets + spectators ...
void TrainAllMethodsForRegression(void)
#define ClassDef(name, id)
IMethod * GetMethod(const TString &title) const
returns pointer to MVA that corresponds to given method title
void EvaluateAllVariables(TString options="")
iterates over all MVA input varables and evaluates them
TTree * CreateEventAssignTrees(const TString &name)
create the data assignment tree (for event-wise data assignment by user)
DataInputHandler & DataInput()
A specialized string object used for TTree selections.
Bool_t UserAssignEvents(UInt_t clIndex)
virtual ~Factory()
destructor delete fATreeEvent;
void AddBackgroundTestEvent(const std::vector< Double_t > &event, Double_t weight=1.0)
add signal training event
void SetCut(const TString &cut, const TString &className="")
DataSetInfo & AddDataSet(DataSetInfo &)
MethodBase * BookMethod(TString theMethodName, TString methodTitle, TString theOption="")
Book a classifier or regression method.
TPaveLabel title(3, 27.1, 15, 28.7,"ROOT Environment and Tools")
void EvaluateAllMethods(void)
iterates over all MVAs that have been booked, and calls their evaluation methods
void AddCut(const TString &cut, const TString &className="")
void SetBackgroundWeightExpression(const TString &variable)
void Greetings()
print welcome message options are: kLogoWelcomeMsg, kIsometricWelcomeMsg, kLeanWelcomeMsg ...
void SetVerbose(Bool_t v=kTRUE)
DataAssignType
jobname, used as extension in weight file names
void AddRegressionTarget(const TString &expression, const TString &title="", const TString &unit="", Double_t min=0, Double_t max=0)
void SetInputTreesFromEventAssignTrees()
assign event-wise local trees to data set
void PrintHelpMessage(const TString &methodTitle="") const
Print predefined help message of classifier iterate over methods and test.
virtual const char * GetName() const
Returns name of object.
Describe directory structure in memory.
void AddTree(TTree *tree, const TString &className, Double_t weight=1.0, const TCut &cut="", Types::ETreeType tt=Types::kMaxTreeType)
static Vc_ALWAYS_INLINE int_v max(const int_v &x, const int_v &y)
DataAssignType fDataAssignType
void AddSignalTree(TTree *signal, Double_t weight=1.0, Types::ETreeType treetype=Types::kMaxTreeType)
number of signal events (used to compute significance)
MethodBase * BookMethod(TMVA::Types::EMVA, TString, TString, TMVA::Types::EMVA, TString)
void SetWeightExpression(const TString &variable, const TString &className="")
Log() << kWarning << DefaultDataSetInfo().GetNClasses() /*fClasses.size()*/ << Endl;.
TString fOptions
list of transformations on default DataSet
Bool_t Verbose(void) const
Factory(TString theJobName, TFile *theTargetFile, TString theOption="")
TString fJobName
all MVA methods
void DeleteAllMethods(void)
delete methods
DataSetManager * fDataSetManager
void AddSignalTestEvent(const std::vector< Double_t > &event, Double_t weight=1.0)
add signal testing event
A TTree object has a header with a name and a title.
Types::EAnalysisType fAnalysisType
std::vector< IMethod * > MVector
void SetTree(TTree *tree, const TString &className, Double_t weight)
set background tree
void PrepareTrainingAndTestTree(const TCut &cut, const TString &splitOpt)
prepare the training and test trees -> same cuts for signal and background
Bool_t fVerbose
List of transformations to test.
void SetBackgroundTree(TTree *background, Double_t weight=1.0)