ROOT logo
ROOT » TMVA » TMVA::Tools

class TMVA::Tools

Function Members (Methods)

public:
~Tools()
void*AddChild(void* parent, const char* childname, const char* content = 0)
Bool_tCheckForSilentOption(const TString&) const
Bool_tCheckForVerboseOption(const TString&) const
Bool_tCheckSplines(const TH1*, const TSpline*)
const TString&Color(const TString&)
voidComputeStat(const vector<TMVA::Event*>&, vector<Float_t>*, Double_t&, Double_t&, Double_t&, Double_t&, Double_t&, Double_t&, Int_t signalClass, Bool_t norm = kFALSE)
Double_tComputeVariance(Double_t sumx2, Double_t sumx, Int_t nx)
Bool_tContainsRegularExpression(const TString& s)
static voidDestroyInstance()
voidFormattedOutput(const TMatrixD&, const vector<TString>&, TMVA::MsgLogger& logger)
voidFormattedOutput(const TMatrixD&, const vector<TString>& vert, const vector<TString>& horiz, TMVA::MsgLogger& logger)
voidFormattedOutput(const vector<Double_t>&, const vector<TString>&, const TString titleVars, const TString titleValues, TMVA::MsgLogger& logger, TString format = "%+1.3f")
void*GetChild(void* parent, const char* childname = 0)
const char*GetContent(void* node)
const TMatrixD*GetCorrelationMatrix(const TMatrixD* covMat)
Double_tGetCorrelationRatio(const TH2F&)
Int_tGetIndexMaxElement(vector<Double_t>&)
Int_tGetIndexMinElement(vector<Double_t>&)
Double_tGetMutualInformation(const TH2F&)
void*GetNextChild(void* prevchild, const char* childname = 0)
Double_tGetSeparation(TH1* S, TH1* B) const
Double_tGetSeparation(const TMVA::PDF& pdfS, const TMVA::PDF& pdfB) const
TMatrixD*GetSQRootMatrix(TMatrixDSym* symMat)
TStringGetXTitleWithUnit(const TString& title, const TString& unit)
TStringGetYTitleWithUnit(const TH1& h, const TString& unit, Bool_t normalised)
Bool_tHistoHasEquidistantBins(const TH1& h)
static TMVA::Tools&Instance()
TMVA::MsgLogger&Log() const
vector<Double_t>MVADiff(vector<Double_t>&, vector<Double_t>&)
Double_tNormHist(TH1* theHist, Double_t norm = 1.0)
Double_tNormVariable(Double_t x, Double_t xmin, Double_t xmax)
vector<Int_t>*ParseANNOptionString(TString theOptions, Int_t nvar, vector<Int_t>* nodes)
TList*ParseFormatLine(TString theString, const char* sep = ":")
TH1*projNormTH1F(TTree* theTree, const TString& theVarName, const TString& name, Int_t nbins, Double_t xmin, Double_t xmax, const TString& cut)
voidReadFloatArbitraryPrecision(Float_t& val, istream& is)
voidReadTMatrixDFromXML(void* node, const char* name, TMatrixD* mat)
voidReadTVectorDFromXML(void* node, const char* name, TVectorD* vec)
TStringReplaceRegularExpressions(const TString& s, const TString& replace = "+")
voidROOTVersionMessage(TMVA::MsgLogger& logger)
voidScale(vector<Double_t>&, Double_t)
voidScale(vector<Float_t>&, Float_t)
vector<TString>SplitString(const TString& theOpt, const char separator) const
TStringStringFromDouble(Double_t d)
TStringStringFromInt(Long_t i)
voidTMVAVersionMessage(TMVA::MsgLogger& logger)
voidTMVAWelcomeMessage()
voidTMVAWelcomeMessage(TMVA::MsgLogger& logger, TMVA::Tools::EWelcomeMessage m = kStandardWelcomeMsg)
TMVA::ToolsTools(const TMVA::Tools&)
TH2F*TransposeHist(const TH2F&)
voidUsefulSortAscending(vector<Double_t>&)
voidUsefulSortAscending(vector<std::vector<Double_t> >&, vector<TString>* vs = 0)
voidUsefulSortDescending(vector<Double_t>&)
voidUsefulSortDescending(vector<std::vector<Double_t> >&, vector<TString>* vs = 0)
voidWriteFloatArbitraryPrecision(Float_t val, ostream& os)
voidWriteTMatrixDToXML(void* node, const char* name, TMatrixD* mat)
voidWriteTVectorDToXML(void* node, const char* name, TVectorD* vec)
TXMLEngine&xmlengine()
private:
Double_tGetYMean_binX(const TH2&, Int_t bin_x)
TMVA::ToolsTools()

Data Members

private:
enum EWelcomeMessage { kStandardWelcomeMsg
kIsometricWelcomeMsg
kBlockWelcomeMsg
kLeanWelcomeMsg
kLogoWelcomeMsg
kSmall1WelcomeMsg
kSmall2WelcomeMsg
kOriginalWelcomeMsgColor
kOriginalWelcomeMsgBW
};
public:
TMVA::MsgLogger*fLogger
const TStringfRegexp
TXMLEngine*fXMLEngine
static TMVA::Tools*fgTools

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TMVA::Tools& Instance()
{ return fgTools?*(fgTools): *(fgTools = new Tools()); }
void DestroyInstance()
Tools()
 constructor
~Tools()
 destructor
Double_t NormVariable(Double_t x, Double_t xmin, Double_t xmax)
 normalise to output range: [-1, 1]
Double_t GetSeparation( TH1* S, TH1* B )
 compute "separation" defined as
 <s2> = (1/2) Int_-oo..+oo { (S^2(x) - B^2(x))/(S(x) + B(x)) dx }
Double_t GetSeparation( const PDF& pdfS, const PDF& pdfB )
 compute "separation" defined as
 <s2> = (1/2) Int_-oo..+oo { (S(x)2 - B(x)2)/(S(x) + B(x)) dx }
void ComputeStat(const vector<TMVA::Event*>& , vector<Float_t>* , Double_t& , Double_t& , Double_t& , Double_t& , Double_t& , Double_t& , Int_t signalClass, Bool_t norm = kFALSE)
 sanity check
TMatrixD* GetSQRootMatrix(TMatrixDSym* symMat)
 square-root of symmetric matrix
 of course the resulting sqrtMat is also symmetric, but it's easier to
 treat it as a general matrix
const TMatrixD* GetCorrelationMatrix(const TMatrixD* covMat)
 turns covariance into correlation matrix
TH1* projNormTH1F(TTree* theTree, const TString& theVarName, const TString& name, Int_t nbins, Double_t xmin, Double_t xmax, const TString& cut)
 projects variable from tree into normalised histogram
Double_t NormHist(TH1* theHist, Double_t norm = 1.0)
 normalises histogram
TList* ParseFormatLine(TString theString, const char* sep = ":")
 Parse the string and cut into labels separated by ":"
vector<Int_t>* ParseANNOptionString(TString theOptions, Int_t nvar, vector<Int_t>* nodes)
 parse option string for ANN methods
 default settings (should be defined in theOption string)
Bool_t CheckSplines(const TH1* , const TSpline* )
 check quality of splining by comparing splines and histograms in each bin
std::vector<Double_t> MVADiff(vector<Double_t>& , vector<Double_t>& )
 computes difference between two vectors
void Scale( std::vector<Double_t>& v, Double_t f )
 scales double vector
void Scale( std::vector<Float_t>& v, Float_t f )
 scales float vector
void UsefulSortAscending(vector<std::vector<Double_t> >& , vector<TString>* vs = 0)
 sort 2D vector (AND in parallel a TString vector) in such a way
 that the "first vector is sorted" and the other vectors are reshuffled
 in the same way as necessary to have the first vector sorted.
 I.e. the correlation between the elements is kept.
void UsefulSortDescending(vector<std::vector<Double_t> >& , vector<TString>* vs = 0)
 sort 2D vector (AND in parallel a TString vector) in such a way
 that the "first vector is sorted" and the other vectors are reshuffled
 in the same way as necessary to have the first vector sorted.
 I.e. the correlation between the elements is kept.
Double_t GetMutualInformation(const TH2F& )
 Mutual Information method for non-linear correlations estimates in 2D histogram
 Author: Moritz Backes, Geneva (2009)
Double_t GetCorrelationRatio(const TH2F& )
 Compute Correlation Ratio of 2D histogram to estimate functional dependency between two variables
 Author: Moritz Backes, Geneva (2009)
Double_t GetYMean_binX(const TH2& , Int_t bin_x)
 Compute the mean in Y for a given bin X of a 2D histogram
TH2F* TransposeHist(const TH2F& )
 Transpose quadratic histogram
Bool_t CheckForSilentOption(const TString& ) const
 check for "silence" option in configuration option string
Bool_t CheckForVerboseOption(const TString& ) const
 check if verbosity "V" set in option
void UsefulSortDescending(vector<Double_t>& )
 sort vector
void UsefulSortAscending(vector<Double_t>& )
 sort vector
Int_t GetIndexMaxElement(vector<Double_t>& )
 find index of maximum entry in vector
Int_t GetIndexMinElement(vector<Double_t>& )
 find index of minimum entry in vector
Bool_t ContainsRegularExpression(const TString& s)
 check if regular expression
 helper function to search for "$!%^&()'<>?= " in a string
TString ReplaceRegularExpressions(const TString& s, const TString& replace = "+")
 replace regular expressions
 helper function to remove all occurences "$!%^&()'<>?= " from a string
 and replace all ::,$,*,/,+,- with _M_,_S_,_T_,_D_,_P_,_M_ respectively
const TString& Color(const TString& )
 human readable color strings
void FormattedOutput(const vector<Double_t>& , const vector<TString>& , const TString titleVars, const TString titleValues, TMVA::MsgLogger& logger, TString format = "%+1.3f")
 formatted output of simple table
void FormattedOutput(const TMatrixD& , const vector<TString>& , TMVA::MsgLogger& logger)
 formatted output of matrix (with labels)
void FormattedOutput(const TMatrixD& , const vector<TString>& vert, const vector<TString>& horiz, TMVA::MsgLogger& logger)
 formatted output of matrix (with labels)
TString GetXTitleWithUnit(const TString& title, const TString& unit)
 histogramming utility
TString GetYTitleWithUnit(const TH1& h, const TString& unit, Bool_t normalised)
 histogramming utility
void WriteFloatArbitraryPrecision(Float_t val, ostream& os)
 writes a float value with the available precision to a stream
void ReadFloatArbitraryPrecision(Float_t& val, istream& is)
 reads a float value with the available precision from a stream
void* AddChild(void* parent, const char* childname, const char* content = 0)
void* GetChild(void* parent, const char* childname = 0)
void* GetNextChild(void* prevchild, const char* childname = 0)
 XML helpers
const char* GetContent(void* node)
 XML helpers
std::vector<TString> SplitString(const TString& theOpt, const char separator) const
 splits the option string at 'separator' and fills the list
 'splitV' with the primitive strings
TString StringFromInt(Long_t i)
 string tools
TString StringFromDouble(Double_t d)
 string tools
void WriteTMatrixDToXML(void* node, const char* name, TMatrixD* mat)
 XML helpers
void WriteTVectorDToXML(void* node, const char* name, TVectorD* vec)
void ReadTVectorDFromXML(void* node, const char* name, TVectorD* vec)
void ReadTMatrixDFromXML(void* node, const char* name, TMatrixD* mat)
void TMVAWelcomeMessage()
 direct output, eg, when starting ROOT session -> no use of Logger here
void TMVAVersionMessage(TMVA::MsgLogger& logger)
 prints the TMVA release number and date
void ROOTVersionMessage(TMVA::MsgLogger& logger)
 prints the ROOT release number and date
void TMVAWelcomeMessage(TMVA::MsgLogger& logger, TMVA::Tools::EWelcomeMessage m = kStandardWelcomeMsg)
 various kinds of welcome messages
 ASCII text generated by this site: http://www.network-science.de/ascii
Bool_t HistoHasEquidistantBins(const TH1& h)
Double_t ComputeVariance(Double_t sumx2, Double_t sumx, Int_t nx)
Tools()
TXMLEngine& xmlengine()
{ return *fXMLEngine; }