class TMVA::DataSet


DataSet

Class that contains all the data information


Function Members (Methods)

public:
virtual~DataSet()
voidAddBackgroundTree(TTree* tr, Double_t weight = 1.0)
voidAddSignalTree(TTree* tr, Double_t weight = 1.0)
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
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)
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
TCutfCutSigthe pretraining cut
UInt_tfDataStats[2][3]! statistics of the dataset for training/test tree
TMatrixD*fDecorrMatrix[2]! Decorrelation matrix [signal/background]
TMVA::Event*fEvent! the event
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<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()
virtual ~DataSet()
const char* GetName()
{ return "DataSet"; }
void AddSignalTree(TTree* tr, Double_t weight = 1.0)
 the tree data
void AddBackgroundTree(TTree* tr, Double_t weight = 1.0)
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(); }
void AddVariable(const TString& expression, char varType = 'F', void* external = 0)
 the variable data
void AddVariable(const TString& expression, Double_t min, Double_t max, char varType, void* external = 0)
std::vector<VariableInfo>& GetVariableInfos()
{ return fVariables; }
UInt_t GetNVariables()
{ return fVariables.size(); }
char GetVarType(Int_t i) const
{ return fVariables[i].GetVarType(); }
Int_t FindVar(const TString& var) const
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 PrepareForTrainingAndTesting(const TString& splitOpt)
 data preparation
 prepare input tree for training
void GetCorrelationMatrix(Bool_t isSignal, TMatrixDBase* mat)
 auxiliary functions to compute correlations
void GetCovarianceMatrix(Bool_t isSignal, TMatrixDBase* , Bool_t norm = kFALSE)
void SetVerbose(Bool_t v = kTRUE)
{ fVerbose = v; }
VariableTransformBase* FindTransform(TMVA::Types::EVariableTransform transform) const
 finds transformation in map
VariableTransformBase* GetTransform(TMVA::Types::EVariableTransform transform)
 finds transformation in map or creates new one
Bool_t ReadEvent(TTree* tr, Long64_t evidx) const
 event reading
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; }
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 ResetBranchAndEventAddresses(TTree* )
 resets branch addresses to current event
void ResetCurrentTree()
{ fCurrentTree = 0; }
void ChangeToNewTree(TTree* tr)
void PrintCorrelationMatrix(TTree* theTree)
Bool_t Verbose()
 verbosity
{ return fVerbose; }

Author: Andreas Hoecker, Joerg Stelzer, Helge Voss
Last update: root/tmva $Id: DataSet.h 21630 2008-01-10 19:40:44Z brun $
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.