class TMVA::DataSet

Function Members (Methods)

public:
virtual~DataSet()
voidAddBackgroundTree(TTree* tr, Double_t weight = 1.0, TMVA::Types::ETreeType tt = Types::kMaxTreeType)
voidAddSignalTree(TTree* tr, Double_t weight = 1.0, TMVA::Types::ETreeType tt = Types::kMaxTreeType)
voidAddVariable(const TString& expression, char varType = 'F', void* external = 0)
voidAddVariable(const TString& expression, Double_t min, Double_t max, char varType, void* external = 0)
const TMVA::TreeInfo&BackgroundTreeInfo(Int_t i) const
TDirectory*BaseRootDir() const
voidClearBackgroundTreeList()
voidClearSignalTreeList()
const TMatrixD*CorrelationMatrix(TMVA::Types::ESBType sigbgd) const
const TCut&CutBkg() const
const char*CutBkgS() const
const TCut&CutSig() const
const char*CutSigS() const
TMVA::DataSetDataSet()
TMVA::VariableTransformBase*FindTransform(TMVA::Types::EVariableTransform transform) const
Int_tFindVar(const TString& var) const
voidGetCorrelationMatrix(Bool_t isSignal, TMatrixDBase* mat)
voidGetCovarianceMatrix(Bool_t isSignal, TMatrixDBase*, Bool_t norm = kFALSE)
UInt_tGetCurrentEvtIdx() const
TMVA::Event&GetEvent()
const TMVA::Event&GetEvent() const
const TString&GetExpression(Int_t i) const
const TString&GetInternalVarName(Int_t i) const
TTree*GetMultiCutTestTree() const
const char*GetName() const
Int_tGetNEvtBkgdTest() const
Int_tGetNEvtBkgdTrain() const
Int_tGetNEvtSigTest() const
Int_tGetNEvtSigTrain() const
Int_tGetNEvtTest() const
Int_tGetNEvtTrain() const
UInt_tGetNVariables() const
TTree*GetTestTree() const
TTree*GetTrainingTree() const
TMVA::VariableTransformBase*GetTransform(TMVA::Types::EVariableTransform transform)
vector<TMVA::VariableInfo,allocator<TMVA::VariableInfo> >&GetVariableInfos()
charGetVarType(Int_t i) const
Bool_tHasCuts() const
Bool_tHasNegativeEventWeights() const
TDirectory*LocalRootDir() const
UInt_tNBackgroundTrees() const
UInt_tNSignalTrees() const
voidPrepareForTrainingAndTesting(const TString& splitOpt)
Bool_tReadEvent(TTree* tr, Long64_t evidx) const
Bool_tReadTestEvent(Long64_t evidx) const
Bool_tReadTrainingEvent(Long64_t evidx) const
voidResetBranchAndEventAddresses(TTree*)
voidResetCurrentTree()
voidSetBackgroundWeightExpression(const TString& expr)
voidSetBaseRootDir(TDirectory* dir)
voidSetCuts(const TString& scut, const TString& bcut)
voidSetCuts(const TCut& scut, const TCut& bcut)
voidSetLocalRootDir(TDirectory* dir)
voidSetMultiCut(const TString& cut)
voidSetMultiCut(const TCut& cut)
voidSetMultiCutTestTree(TTree* tr)
voidSetSignalWeightExpression(const TString& expr)
voidSetTestTree(TTree* tr)
voidSetTrainingTree(TTree* tr)
voidSetVerbose(Bool_t v = kTRUE)
const TMVA::TreeInfo&SignalTreeInfo(Int_t i) const
private:
voidChangeToNewTree(TTree* tr, Int_t sb)
voidPrintCorrelationMatrix(TTree* theTree)
Bool_tVerbose()

Data Members

private:
TDirectory*fBaseRootDir! the base directory, usually the root dir of a ROOT-file
UInt_tfCurrentEvtIdx! the current event (to avoid reading of the same event)
TTree*fCurrentTree! the tree, events are currently read from
TCutfCutBkgthe pretraining cut
TTreeFormula*fCutBkgFthe pretraining cut as formula
TCutfCutSigthe pretraining cut
TTreeFormula*fCutSigFthe pretraining cut as formula
UInt_tfDataStats[2][3]! statistics of the dataset for training/test tree
TMatrixD*fDecorrMatrix[2]! Decorrelation matrix [signal/background]
TMVA::Event*fEvent! the event
Bool_tfExplicitTrainTest[2]! if set to true the user has specified training and testing data explicitly
Bool_tfHasNegativeEventWeightstrue if at least one signal or bkg event has negative weight
vector<TTreeFormula*>fInputVarFormulaslocal formulas of the same
TDirectory*fLocalRootDir! the current directory, where things are created
TMVA::MsgLoggerfLogger! message logger
TCutfMultiCutphase-space cut
TTree*fMultiCutTestTree! tree used for testing of multicut method
TTree*fTestTree! tree used for testing
TTree*fTrainingTree! tree used for training
vector<TMVA::TreeInfo>fTreeCollection[2]! list of signal and background trees/weights
map<TMVA::Types::EVariableTransform,TMVA::VariableTransformBase*>fVarTransforms! Registered variable transformations
vector<TString>fVariableStrings! list of variable expressions
vector<TMVA::VariableInfo>fVariables! list of variable expressions/internal names
Bool_tfVerbose! Verbosity
TStringfWeightExp[2]! the input formula string that is the weight
TTreeFormula*fWeightFormula[2]! local weight formula

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

DataSet()
 constructor
~DataSet()
 destructor
Bool_t ReadEvent(TTree* tr, Long64_t evidx) const
 read event from a tree into memory
 after the reading the event transformation is called
TMVA::VariableTransformBase* FindTransform(TMVA::Types::EVariableTransform transform) const
 finds transformation in map
TMVA::VariableTransformBase* GetTransform(TMVA::Types::EVariableTransform transform)
 retrieves transformation
void ResetBranchAndEventAddresses(TTree* )
 resets all branch adresses of the tree given as parameter
 to the event memory
void AddSignalTree(TTree* tr, Double_t weight = 1.0, TMVA::Types::ETreeType tt = Types::kMaxTreeType)
 add a signal tree to the dataset to be used as input
void AddBackgroundTree(TTree* tr, Double_t weight = 1.0, TMVA::Types::ETreeType tt = Types::kMaxTreeType)
 add a background tree to the dataset to be used as input
void AddVariable(const TString& expression, char varType = 'F', void* external = 0)
 add a variable (can be a complex expression) to the set of variables used in
 the MV analysis
void AddVariable(const TString& expression, Double_t min, Double_t max, char varType, void* external = 0)
 add a variable (can be a complex expression) to the set of variables used in
 the MV analysis
Int_t FindVar(const TString& var) const
 find variable by name
void PrepareForTrainingAndTesting(const TString& splitOpt)
void ChangeToNewTree(TTree* tr, Int_t sb)
 While the data gets copied into the local training and testing
 trees, the input tree can change (for intance when changing from
 signal to background tree, or using TChains as input) The
 TTreeFormulas, that hold the input expressions need to be
 reassociated with the new tree, which is done here
void PrintCorrelationMatrix(TTree* theTree)
 calculates the correlation matrices for signal and background,
 prints them to standard output, and fills 2D histograms
void GetCorrelationMatrix(Bool_t isSignal, TMatrixDBase* mat)
 computes correlation matrix for variables "theVars" in tree;
 "theType" defines the required event "type"
 ("type" variable must be present in tree)
void GetCovarianceMatrix(Bool_t isSignal, TMatrixDBase* , Bool_t norm = kFALSE)
 compute covariance matrix
const char* GetName()
{ return "DataSet"; }
UInt_t NSignalTrees()
{ return fTreeCollection[Types::kSignal].size(); }
UInt_t NBackgroundTrees()
{ return fTreeCollection[Types::kBackground].size(); }
const TreeInfo& SignalTreeInfo(Int_t i) const
{ return fTreeCollection[Types::kSignal][i]; }
const TreeInfo& BackgroundTreeInfo(Int_t i) const
{ return fTreeCollection[Types::kBackground][i]; }
void ClearSignalTreeList()
{ fTreeCollection[Types::kSignal].clear(); }
void ClearBackgroundTreeList()
{ fTreeCollection[Types::kBackground].clear(); }
std::vector<VariableInfo>& GetVariableInfos()
{ return fVariables; }
UInt_t GetNVariables()
{ return fVariables.size(); }
char GetVarType(Int_t i) const
{ return fVariables[i].GetVarType(); }
const TString& GetExpression(Int_t i) const
{ return fVariables[i].GetExpression(); }
const TString& GetInternalVarName(Int_t i) const
{ return fVariables[i].GetInternalVarName(); }
void SetCuts( const TString& scut, const TString& bcut )
 the cut
{ SetCuts(TCut(scut), TCut(bcut)); }
void SetCuts( const TCut& scut, const TCut& bcut )
{ fCutSig = scut; fCutBkg = bcut; }
void SetMultiCut( const TString& cut )
{ SetMultiCut(TCut(cut)); }
void SetMultiCut( const TCut& cut )
{ fMultiCut = cut; }
const TCut& CutSig()
{ return fCutSig; }
const TCut& CutBkg()
{ return fCutBkg; }
const char* CutSigS()
{ return fCutSig.GetTitle(); }
const char* CutBkgS()
{ return fCutBkg.GetTitle(); }
Bool_t HasCuts()
{ return TString(CutSig()) != "" || TString(CutBkg()) != ""; }
TTree* GetTrainingTree()
 the internal trees
{ return fTrainingTree; }
TTree* GetTestTree()
{ return fTestTree; }
TTree* GetMultiCutTestTree()
{ return fMultiCutTestTree; }
void SetTrainingTree(TTree* tr)
{ fTrainingTree = tr; }
void SetTestTree(TTree* tr)
{ fTestTree = tr; }
void SetMultiCutTestTree(TTree* tr)
{ fMultiCutTestTree = tr; }
TDirectory* LocalRootDir()
 ROOT stuff
{ return fLocalRootDir; }
TDirectory* BaseRootDir()
{ return fBaseRootDir; }
void SetBaseRootDir(TDirectory* dir)
{ fBaseRootDir = dir; }
void SetLocalRootDir(TDirectory* dir)
{ fLocalRootDir = dir; }
void SetVerbose(Bool_t v = kTRUE)
{ fVerbose = v; }
Bool_t ReadTrainingEvent(Long64_t evidx) const
{ return ReadEvent(GetTrainingTree(), evidx ); }
Bool_t ReadTestEvent(Long64_t evidx) const
{ return ReadEvent(GetTestTree(), evidx ); }
TMVA::Event& GetEvent()
{ if (fEvent==0) fEvent = new TMVA::Event(fVariables); return *fEvent; }
UInt_t GetCurrentEvtIdx()
{ return fCurrentEvtIdx; }
const TMVA::Event& GetEvent()
{ return *fEvent; }
const TMatrixD* CorrelationMatrix(TMVA::Types::ESBType sigbgd) const
 correlation matrix
{ return fDecorrMatrix[sigbgd]; }
void SetSignalWeightExpression(const TString& expr)
 the weight
{ fWeightExp[Types::kSignal] = expr; }
void SetBackgroundWeightExpression(const TString& expr)
{ fWeightExp[Types::kBackground] = expr; }
Bool_t HasNegativeEventWeights()
{ return fHasNegativeEventWeights; }
Int_t GetNEvtTrain()
 some dataset stats
{ return fDataStats[Types::kTraining][Types::kSBBoth]; }
Int_t GetNEvtSigTrain()
{ return fDataStats[Types::kTraining][Types::kSignal]; }
Int_t GetNEvtBkgdTrain()
{ return fDataStats[Types::kTraining][Types::kBackground]; }
Int_t GetNEvtTest()
{ return fDataStats[Types::kTesting][Types::kSBBoth]; }
Int_t GetNEvtSigTest()
{ return fDataStats[Types::kTesting][Types::kSignal]; }
Int_t GetNEvtBkgdTest()
{ return fDataStats[Types::kTesting][Types::kBackground]; }
void ResetCurrentTree()
{ fCurrentTree = 0; }
Bool_t Verbose()
 verbosity
{ return fVerbose; }

Author: Andreas Hoecker, Joerg Stelzer, Helge Voss
Last change: root/tmva $Id: DataSet.h 26050 2008-11-01 09:18:41Z brun $
Last generated: 2008-11-01 10:21
Copyright (c) 2006: *

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.