library: libTMVA
#include "TMVA_Factory.h"

TMVA_Factory


class description - source file - inheritance tree (.pdf)

class TMVA_Factory : public TObject

Inheritance Chart:
TObject
<-
TMVA_Factory
    private:
void SetLocalDir() protected:
void GetCorrelationMatrix(TTree* theTree) void PlotVariables(TTree* theTree) public:
TMVA_Factory(TString theJobName, TFile* theTargetFile, TString theOption = ) TMVA_Factory(TFile* theTargetFile) TMVA_Factory(const TMVA_Factory&) virtual ~TMVA_Factory() Bool_t BookMethod(TString theMethodName, TString theOption = , TString theNameAppendix = ) Bool_t BookMethod(TMVA_Types::MVA theMethod, TString theOption = , TString theNameAppendix = ) Bool_t BookMethod(TMVA_MethodBase* theMethod, TString theNameAppendix = ) void BookMultipleMVAs(TString theVariable, Int_t nbins, Double_t* array) static TClass* Class() void DeleteAllMethods() void EvaluateAllMethods() void EvaluateAllVariables(TString options = ) TCut GetCut() TMVA_MethodBase* GetMVA(TString method) TTree* GetTestTree() const TTree* GetTrainingTree() const void Greeting(TString = ) virtual TClass* IsA() const TMVA_Factory& operator=(const TMVA_Factory&) void PrepareTrainingAndTestTree(TCut cut = , Int_t Ntrain = 0, Int_t Ntest = 0, TString TreeName = ) void ProcessMultipleMVA() void SetBackgroundTree(TTree* background) Bool_t SetInputTrees(TString signalFileName, TString backgroundFileName) Bool_t SetInputTrees(TTree* inputTree, TCut SigCut, TCut BgCut = ) Bool_t SetInputTrees(TTree* signal, TTree* background) void SetInputVariables(vector<TString>* theVariables) void SetSignalTree(TTree* signal) void SetTestTree(TTree* testTree) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b) void TestAllMethods() void TrainAllMethods() Bool_t Verbose() const

Data Members

    private:
TFile* fSignalFile TFile* fBackgFile TTree* fTrainingTree TTree* fTestTree TTree* fMultiCutTestTree TTree* fSignalTree TTree* fBackgTree TFile* fTargetFile TCut fCut TString fOptions Bool_t fVerbose vector<TString>* fInputVariables vector<TMVA_MethodBase*> fMethods TString fJobName Bool_t fMultipleMVAs Bool_t fMultipleStoredOptions Bool_t fMultiTrain Bool_t fMultiTest Bool_t fMultiEvalVar Bool_t fMultiEval TCut fMultiCut Int_t fMultiNtrain Int_t fMultiNtest map<TString,std::pair<TString,TCut> > fMultipleMVAnames map<TString,std::pair<TString,TString> > fMultipleMVAMethodOptions TString fMultiVar1 TDirectory* fLocalTDir

Class Description

 This is the main MVA steering class: it creates all MVA methods,
 and guides them through the training, testing and evaluation
 phases. It also manages multiple MVA handling in case of distinct
 phase space requirements (cuts).
_______________________________________________________________________

TMVA_Factory( TString jobName, TFile* theTargetFile, TString theOption ) : fSignalFile ( 0 ), fBackgFile ( 0 ), fTrainingTree ( 0 ), fTestTree ( 0 ), fMultiCutTestTree( 0 ), fSignalTree ( 0 ), fBackgTree ( 0 ), fTargetFile ( theTargetFile ), fOptions ( theOption ), fMultipleMVAs (kFALSE), fMultipleStoredOptions(kFALSE)
 default  constructor

TMVA_Factory( TFile* theTargetFile) : fSignalFile ( 0 ), fBackgFile ( 0 ), fTrainingTree ( 0 ), fTestTree ( 0 ), fMultiCutTestTree( 0 ), fSignalTree ( 0 ), fBackgTree ( 0 ), fTargetFile ( theTargetFile ), fOptions ( ""), fMultipleMVAs (kFALSE), fMultipleStoredOptions(kFALSE)

void Greeting(TString op)

~TMVA_Factory( void )
 default destructor

 *** segmentation fault occurs when deleting this object :-( ***
   fTrainingTree->Delete();

 *** cannot delete: need to clarify ownership :-( ***
   fSignalTree->Delete();
   fBackgTree->Delete();

void DeleteAllMethods( void )
 delete methods

Bool_t SetInputTrees(TTree* signal, TTree* background)

Bool_t SetInputTrees(TTree* inputTree, TCut SigCut, TCut BgCut)

Bool_t SetInputTrees( TString datFileS, TString datFileB )
 create trees from these files

void BookMultipleMVAs(TString theVariable, Int_t nbins, Double_t *array)
 here the mess starts!

void PrepareTrainingAndTestTree( TCut cut, Int_t Ntrain, Int_t Ntest, TString TreeName )
!   ------------------------------------------------------
!   |              |              |        |             |
!   ------------------------------------------------------
!                                                        # input signal events
!                                          # input signal events after cuts
!   ------------------------------------------------------
!   |              |              |             |       |
!   ------------------------------------------------------
!    \/  \/                      # input bg events
!                                               # input bg events after cuts
!      Ntrain/2       Ntest/2
!
! definitions:
!
!         nsigTot = all signal events
!         nbkgTot = all bkg events
!         nTot    = nsigTot + nbkgTot
!         i.g.: nsigTot != nbkgTot
!         N:M     = use M events after event N (distinct event sample)
!                   (read as: "from event N to event M")
!
! assumptions:
!
! 	a) equal number of signal and background events is used for training
! 	b) any numbers of signal and background events are used for testing
! 	c) an explicit syntax can violate a)
!
! cases (in order of importance)
!
! 1)
!      user gives         : N1
!      PrepareTree does   : nsig_train=nbkg_train=min(N1,nsigTot,nbkgTot)
!                           nsig_test =nsig_train:nsigTot, nbkg_test =nsig_train:nbkgTot
!      -> give warning if nsig_test<=0 || nbkg_test<=0
!
! 2)
!      user gives         : N1, N2
!      PrepareTree does   : nsig_train=nbkg_train=min(N1,nsigTot,nbkgTot)
!                           nsig_test =nsig_train:min(N2,nsigTot-nsig_train),
!                           nbkg_test =nsig_train:min(N2,nbkgTot-nbkg_train)
!      -> give warning if nsig(bkg)_train != N1, or
!                      if nsig_test<N2 || nbkg_test<N2
!
! 3)
!      user gives         : -1
!      PrepareTree does   : nsig_train=nbkg_train=min(nsigTot,nbkgTot)
!                           nsig_test =nsigTot, nbkg_test=nbkgTot
!      -> give warning that same samples are used for testing and training
!
! 4)
!      user gives         : -1, -1
!      PrepareTree does   : nsig_train=nsigTot, nbkg_train=nbkgTot
! 		          nsig_test =nsigTot, nbkg_test =nbkgTot
!      -> give warning that same samples are used for testing and training,
!         and, if nsig_train != nbkg_train, that an unequal number of
!         signal and background events are used in training
!
! ------------------------------------------------------------------------
! Give in any case the number of signal and background events that are
! used for testing and training, and tell whether there are overlaps between
! the samples.
! ------------------------------------------------------------------------
!
! Addon (Jan 12, 2006) kai
! if

void PlotVariables( TTree* theTree )

void GetCorrelationMatrix( TTree* theTree )

void SetSignalTree(TTree* signal)

void SetBackgroundTree(TTree* background)

void SetTestTree(TTree* testTree)

Bool_t BookMethod( TString theMethodName, TString theOption, TString theNameAppendix )

Bool_t BookMethod( TMVA_Types::MVA theMethod, TString theOption, TString theNameAppendix )

Bool_t BookMethod( TMVA_MethodBase *theMethod, TString theNameAppendix )

TMVA_MethodBase* GetMVA( TString method )

void TrainAllMethods( void )

void TestAllMethods( void )

void EvaluateAllVariables( TString options )

void EvaluateAllMethods( void )
 if multiple  MVAs

void ProcessMultipleMVA( void )

void SetLocalDir( void )



Inline Functions


                 void SetInputVariables(vector<TString>* theVariables)
               TTree* GetTrainingTree() const
               TTree* GetTestTree() const
                 TCut GetCut()
               Bool_t Verbose() const
              TClass* Class()
              TClass* IsA() const
                 void ShowMembers(TMemberInspector& insp, char* parent)
                 void Streamer(TBuffer& b)
                 void StreamerNVirtual(TBuffer& b)
         TMVA_Factory TMVA_Factory(const TMVA_Factory&)
        TMVA_Factory& operator=(const TMVA_Factory&)


Author: Andreas Hoecker, Helge Voss, Kai Voss
Last update: root/tmva $Id: TMVA_Factory.cxx,v 1.6 2006/05/10 07:36:12 brun Exp $
Copyright (c) 2005: *


ROOT page - Class index - Class Hierarchy - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.