ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
TSPlot Class Reference

Definition at line 21 of file TSPlot.h.

Public Member Functions

 TSPlot ()
 
 TSPlot (Int_t nx, Int_t ny, Int_t ne, Int_t ns, TTree *tree)
 
virtual ~TSPlot ()
 destructor More...
 
void Browse (TBrowser *b)
 To browse the histograms. More...
 
Bool_t IsFolder () const
 Returns kTRUE in case object contains browsable objects (like containers or lists of other objects). More...
 
void FillXvarHists (Int_t nbins=100)
 Fills the histograms of x variables (not weighted) with nbins. More...
 
void FillYvarHists (Int_t nbins=100)
 Fill the histograms of y variables. More...
 
void FillYpdfHists (Int_t nbins=100)
 Fills the histograms of pdf-s of y variables with binning nbins. More...
 
void FillSWeightsHists (Int_t nbins=50)
 The order of histograms in the array: x0_species0, x0_species1,..., x1_species0, x1_species1,..., y0_species0, y0_species1,... More...
 
Int_t GetNevents ()
 
Int_t GetNspecies ()
 
TObjArrayGetSWeightsHists ()
 Returns an array of all histograms of variables, weighted with sWeights If histograms have not been already filled, they are filled with default binning 50 The order of histograms in the array: x0_species0, x0_species1,..., x1_species0, x1_species1,..., y0_species0, y0_species1,... More...
 
TH1DGetSWeightsHist (Int_t ixvar, Int_t ispecies, Int_t iyexcl=-1)
 Returns the histogram of a variable, weithed with sWeights If histograms have not been already filled, they are filled with default binning 50 If parameter ixvar!=-1, the histogram of x-variable #ixvar is returned for species ispecies If parameter ixvar==-1, the histogram of y-variable #iyexcl is returned for species ispecies If the histogram has already been filled and the binning is different from the parameter nbins all histograms with old binning will be deleted and refilled. More...
 
TObjArrayGetXvarHists ()
 Returns the array of histograms of x variables (not weighted) If histograms have not already been filled, they are filled with default binning 100. More...
 
TH1DGetXvarHist (Int_t ixvar)
 Returns the histogram of variable #ixvar If histograms have not already been filled, they are filled with default binning 100. More...
 
TObjArrayGetYvarHists ()
 Returns the array of histograms of y variables. More...
 
TH1DGetYvarHist (Int_t iyvar)
 Returns the histogram of variable iyvar.If histograms have not already been filled, they are filled with default binning 100. More...
 
TObjArrayGetYpdfHists ()
 Returns the array of histograms of pdf's of y variables with binning nbins If histograms have not already been filled, they are filled with default binning 100. More...
 
TH1DGetYpdfHist (Int_t iyvar, Int_t ispecies)
 Returns the histogram of the pdf of variable #iyvar for species #ispecies, binning nbins If histograms have not already been filled, they are filled with default binning 100. More...
 
void GetSWeights (TMatrixD &weights)
 Returns the matrix of sweights. More...
 
void GetSWeights (Double_t *weights)
 Returns the matrix of sweights. It is assumed that the array passed in the argurment is big enough. More...
 
TStringGetTreeName ()
 
TStringGetTreeSelection ()
 
TStringGetTreeExpression ()
 
void MakeSPlot (Option_t *option="v")
 Calculates the sWeights The option controls the print level "Q" - no print out "V" - prints the estimated #of events in species - default "VV" - as "V" + the minuit printing + sums of weights for control. More...
 
void RefillHist (Int_t type, Int_t var, Int_t nbins, Double_t min, Double_t max, Int_t nspecies=-1)
 The Fill...Hist() methods fill the histograms with the real limits on the variables This method allows to refill the specified histogram with user-set boundaries min and max Parameters: type = 1 - histogram of x variable #nvar = 2 - histogram of y variable #nvar = 3 - histogram of y_pdf for y #nvar and species #nspecies = 4 - histogram of x variable #nvar, species #nspecies, WITH sWeights = 5 - histogram of y variable #nvar, species #nspecies, WITH sWeights. More...
 
void SetNX (Int_t nx)
 
void SetNY (Int_t ny)
 
void SetNSpecies (Int_t ns)
 
void SetNEvents (Int_t ne)
 
void SetInitialNumbersOfSpecies (Int_t *numbers)
 Set the initial number of events of each species - used as initial estimates in minuit. More...
 
void SetTree (TTree *tree)
 Set the input Tree. More...
 
void SetTreeSelection (const char *varexp="", const char *selection="", Long64_t firstentry=0)
 Specifies the variables from the tree to be used for splot. More...
 
- Public Member Functions inherited from TObject
 TObject ()
 
 TObject (const TObject &object)
 TObject copy ctor. More...
 
TObjectoperator= (const TObject &rhs)
 TObject assignment operator. More...
 
virtual ~TObject ()
 TObject destructor. More...
 
virtual void AppendPad (Option_t *option="")
 Append graphics object to current pad. More...
 
virtual const char * ClassName () const
 Returns name of class to which the object belongs. More...
 
virtual void Clear (Option_t *="")
 
virtual TObjectClone (const char *newname="") const
 Make a clone of an object using the Streamer facility. More...
 
virtual Int_t Compare (const TObject *obj) const
 Compare abstract method. More...
 
virtual void Copy (TObject &object) const
 Copy this to obj. More...
 
virtual void Delete (Option_t *option="")
 Delete this object. More...
 
virtual Int_t DistancetoPrimitive (Int_t px, Int_t py)
 Computes distance from point (px,py) to the object. More...
 
virtual void Draw (Option_t *option="")
 Default Draw method for all objects. More...
 
virtual void DrawClass () const
 Draw class inheritance tree of the class to which this object belongs. More...
 
virtual TObjectDrawClone (Option_t *option="") const
 Draw a clone of this object in the current pad. More...
 
virtual void Dump () const
 Dump contents of object on stdout. More...
 
virtual void Execute (const char *method, const char *params, Int_t *error=0)
 Execute method on this object with the given parameter string, e.g. More...
 
virtual void Execute (TMethod *method, TObjArray *params, Int_t *error=0)
 Execute method on this object with parameters stored in the TObjArray. More...
 
virtual void ExecuteEvent (Int_t event, Int_t px, Int_t py)
 Execute action corresponding to an event at (px,py). More...
 
virtual TObjectFindObject (const char *name) const
 Must be redefined in derived classes. More...
 
virtual TObjectFindObject (const TObject *obj) const
 Must be redefined in derived classes. More...
 
virtual Option_tGetDrawOption () const
 Get option used by the graphics system to draw this object. More...
 
virtual UInt_t GetUniqueID () const
 Return the unique object id. More...
 
virtual const char * GetName () const
 Returns name of object. More...
 
virtual const char * GetIconName () const
 Returns mime type name of object. More...
 
virtual Option_tGetOption () const
 
virtual char * GetObjectInfo (Int_t px, Int_t py) const
 Returns string containing info about the object at position (px,py). More...
 
virtual const char * GetTitle () const
 Returns title of object. More...
 
virtual Bool_t HandleTimer (TTimer *timer)
 Execute action in response of a timer timing out. More...
 
virtual ULong_t Hash () const
 Return hash value for this object. More...
 
virtual Bool_t InheritsFrom (const char *classname) const
 Returns kTRUE if object inherits from class "classname". More...
 
virtual Bool_t InheritsFrom (const TClass *cl) const
 Returns kTRUE if object inherits from TClass cl. More...
 
virtual void Inspect () const
 Dump contents of this object in a graphics canvas. More...
 
virtual Bool_t IsEqual (const TObject *obj) const
 Default equal comparison (objects are equal if they have the same address in memory). More...
 
virtual Bool_t IsSortable () const
 
Bool_t IsOnHeap () const
 
Bool_t IsZombie () const
 
virtual Bool_t Notify ()
 This method must be overridden to handle object notification. More...
 
virtual void ls (Option_t *option="") const
 The ls function lists the contents of a class on stdout. More...
 
virtual void Paint (Option_t *option="")
 This method must be overridden if a class wants to paint itself. More...
 
virtual void Pop ()
 Pop on object drawn in a pad to the top of the display list. More...
 
virtual void Print (Option_t *option="") const
 This method must be overridden when a class wants to print itself. More...
 
virtual Int_t Read (const char *name)
 Read contents of object with specified name from the current directory. More...
 
virtual void RecursiveRemove (TObject *obj)
 Recursively remove this object from a list. More...
 
virtual void SaveAs (const char *filename="", Option_t *option="") const
 Save this object in the file specified by filename. More...
 
virtual void SavePrimitive (std::ostream &out, Option_t *option="")
 Save a primitive as a C++ statement(s) on output stream "out". More...
 
virtual void SetDrawOption (Option_t *option="")
 Set drawing option for object. More...
 
virtual void SetUniqueID (UInt_t uid)
 Set the unique object id. More...
 
virtual void UseCurrentStyle ()
 Set current style settings in this object This function is called when either TCanvas::UseCurrentStyle or TROOT::ForceStyle have been invoked. More...
 
virtual Int_t Write (const char *name=0, Int_t option=0, Int_t bufsize=0)
 Write this object to the current directory. More...
 
virtual Int_t Write (const char *name=0, Int_t option=0, Int_t bufsize=0) const
 Write this object to the current directory. More...
 
voidoperator new (size_t sz)
 
voidoperator new[] (size_t sz)
 
voidoperator new (size_t sz, void *vp)
 
voidoperator new[] (size_t sz, void *vp)
 
void operator delete (void *ptr)
 Operator delete. More...
 
void operator delete[] (void *ptr)
 Operator delete []. More...
 
void SetBit (UInt_t f, Bool_t set)
 Set or unset the user status bits as specified in f. More...
 
void SetBit (UInt_t f)
 
void ResetBit (UInt_t f)
 
Bool_t TestBit (UInt_t f) const
 
Int_t TestBits (UInt_t f) const
 
void InvertBit (UInt_t f)
 
virtual void Info (const char *method, const char *msgfmt,...) const
 Issue info message. More...
 
virtual void Warning (const char *method, const char *msgfmt,...) const
 Issue warning message. More...
 
virtual void Error (const char *method, const char *msgfmt,...) const
 Issue error message. More...
 
virtual void SysError (const char *method, const char *msgfmt,...) const
 Issue system error message. More...
 
virtual void Fatal (const char *method, const char *msgfmt,...) const
 Issue fatal error message. More...
 
void AbstractMethod (const char *method) const
 Use this method to implement an "abstract" method that you don't want to leave purely abstract. More...
 
void MayNotUse (const char *method) const
 Use this method to signal that a method (defined in a base class) may not be called in a derived class (in principle against good design since a child class should not provide less functionality than its parent, however, sometimes it is necessary). More...
 
void Obsolete (const char *method, const char *asOfVers, const char *removedFromVers) const
 Use this method to declare a method obsolete. More...
 

Protected Member Functions

void SPlots (Double_t *covmat, Int_t i_excl)
 Computes the sWeights from the covariance matrix. More...
 
- Protected Member Functions inherited from TObject
void MakeZombie ()
 
virtual void DoError (int level, const char *location, const char *fmt, va_list va) const
 Interface to ErrorHandler (protected). More...
 

Protected Attributes

TMatrixD fXvar
 
TMatrixD fYvar
 
TMatrixD fYpdf
 
TMatrixD fPdfTot
 
TMatrixD fMinmax
 
TMatrixD fSWeights
 
TObjArray fXvarHists
 
TObjArray fYvarHists
 
TObjArray fYpdfHists
 
TObjArray fSWeightsHists
 
TTreefTree
 
TStringfTreename
 
TStringfVarexp
 
TStringfSelection
 
Int_t fNx
 
Int_t fNy
 
Int_t fNSpecies
 
Int_t fNevents
 
Double_tfNumbersOfEvents
 

Additional Inherited Members

- Public Types inherited from TObject
enum  EStatusBits {
  kCanDelete = BIT(0), kMustCleanup = BIT(3), kObjInCanvas = BIT(3), kIsReferenced = BIT(4),
  kHasUUID = BIT(5), kCannotPick = BIT(6), kNoContextMenu = BIT(8), kInvalidObject = BIT(13)
}
 
enum  { kIsOnHeap = 0x01000000, kNotDeleted = 0x02000000, kZombie = 0x04000000, kBitMask = 0x00ffffff }
 
enum  { kSingleKey = BIT(0), kOverwrite = BIT(1), kWriteDelete = BIT(2) }
 
- Static Public Member Functions inherited from TObject
static Long_t GetDtorOnly ()
 Return destructor only flag. More...
 
static void SetDtorOnly (void *obj)
 Set destructor only flag. More...
 
static Bool_t GetObjectStat ()
 Get status of object stat flag. More...
 
static void SetObjectStat (Bool_t stat)
 Turn on/off tracking of objects in the TObjectTable. More...
 

#include <TSPlot.h>

Inheritance diagram for TSPlot:
[legend]

Constructor & Destructor Documentation

TSPlot::TSPlot ( )
TSPlot::TSPlot ( Int_t  nx,
Int_t  ny,
Int_t  ne,
Int_t  ns,
TTree tree 
)

Definition at line 448 of file TSPlot.cxx.

TSPlot::~TSPlot ( )
virtual

destructor

Definition at line 477 of file TSPlot.cxx.

Member Function Documentation

void TSPlot::Browse ( TBrowser b)
virtual

To browse the histograms.

Reimplemented from TObject.

Definition at line 492 of file TSPlot.cxx.

void TSPlot::FillSWeightsHists ( Int_t  nbins = 50)

The order of histograms in the array: x0_species0, x0_species1,..., x1_species0, x1_species1,..., y0_species0, y0_species1,...

If the histograms have already been filled with a different binning, they are refilled and all histograms are deleted

Definition at line 833 of file TSPlot.cxx.

Referenced by GetSWeightsHist(), GetSWeightsHists(), and TestSPlot().

void TSPlot::FillXvarHists ( Int_t  nbins = 100)

Fills the histograms of x variables (not weighted) with nbins.

Definition at line 665 of file TSPlot.cxx.

Referenced by GetXvarHist(), and GetXvarHists().

void TSPlot::FillYpdfHists ( Int_t  nbins = 100)

Fills the histograms of pdf-s of y variables with binning nbins.

Definition at line 775 of file TSPlot.cxx.

Referenced by GetYpdfHist(), and GetYpdfHists().

void TSPlot::FillYvarHists ( Int_t  nbins = 100)

Fill the histograms of y variables.

Definition at line 722 of file TSPlot.cxx.

Referenced by GetYvarHist(), and GetYvarHists().

Int_t TSPlot::GetNevents ( )
inline

Definition at line 63 of file TSPlot.h.

Int_t TSPlot::GetNspecies ( )
inline

Definition at line 64 of file TSPlot.h.

void TSPlot::GetSWeights ( TMatrixD weights)

Returns the matrix of sweights.

Definition at line 643 of file TSPlot.cxx.

void TSPlot::GetSWeights ( Double_t weights)

Returns the matrix of sweights. It is assumed that the array passed in the argurment is big enough.

Definition at line 653 of file TSPlot.cxx.

TH1D * TSPlot::GetSWeightsHist ( Int_t  ixvar,
Int_t  ispecies,
Int_t  iyexcl = -1 
)

Returns the histogram of a variable, weithed with sWeights If histograms have not been already filled, they are filled with default binning 50 If parameter ixvar!=-1, the histogram of x-variable #ixvar is returned for species ispecies If parameter ixvar==-1, the histogram of y-variable #iyexcl is returned for species ispecies If the histogram has already been filled and the binning is different from the parameter nbins all histograms with old binning will be deleted and refilled.

Definition at line 964 of file TSPlot.cxx.

Referenced by TestSPlot().

TObjArray * TSPlot::GetSWeightsHists ( )

Returns an array of all histograms of variables, weighted with sWeights If histograms have not been already filled, they are filled with default binning 50 The order of histograms in the array: x0_species0, x0_species1,..., x1_species0, x1_species1,..., y0_species0, y0_species1,...

Definition at line 880 of file TSPlot.cxx.

TString* TSPlot::GetTreeExpression ( )
inline

Definition at line 78 of file TSPlot.h.

TString* TSPlot::GetTreeName ( )
inline

Definition at line 76 of file TSPlot.h.

TString* TSPlot::GetTreeSelection ( )
inline

Definition at line 77 of file TSPlot.h.

TH1D * TSPlot::GetXvarHist ( Int_t  ixvar)

Returns the histogram of variable #ixvar If histograms have not already been filled, they are filled with default binning 100.

Definition at line 708 of file TSPlot.cxx.

TObjArray * TSPlot::GetXvarHists ( )

Returns the array of histograms of x variables (not weighted) If histograms have not already been filled, they are filled with default binning 100.

Definition at line 693 of file TSPlot.cxx.

TH1D * TSPlot::GetYpdfHist ( Int_t  iyvar,
Int_t  ispecies 
)

Returns the histogram of the pdf of variable #iyvar for species #ispecies, binning nbins If histograms have not already been filled, they are filled with default binning 100.

Definition at line 818 of file TSPlot.cxx.

TObjArray * TSPlot::GetYpdfHists ( )

Returns the array of histograms of pdf's of y variables with binning nbins If histograms have not already been filled, they are filled with default binning 100.

Definition at line 804 of file TSPlot.cxx.

TH1D * TSPlot::GetYvarHist ( Int_t  iyvar)

Returns the histogram of variable iyvar.If histograms have not already been filled, they are filled with default binning 100.

Definition at line 762 of file TSPlot.cxx.

TObjArray * TSPlot::GetYvarHists ( )

Returns the array of histograms of y variables.

If histograms have not already been filled, they are filled with default binning 100.

Definition at line 748 of file TSPlot.cxx.

Bool_t TSPlot::IsFolder ( ) const
inlinevirtual

Returns kTRUE in case object contains browsable objects (like containers or lists of other objects).

Reimplemented from TObject.

Definition at line 56 of file TSPlot.h.

void TSPlot::MakeSPlot ( Option_t option = "v")

Calculates the sWeights The option controls the print level "Q" - no print out "V" - prints the estimated #of events in species - default "VV" - as "V" + the minuit printing + sums of weights for control.

Definition at line 542 of file TSPlot.cxx.

Referenced by TestSPlot().

void TSPlot::RefillHist ( Int_t  type,
Int_t  var,
Int_t  nbins,
Double_t  min,
Double_t  max,
Int_t  nspecies = -1 
)

The Fill...Hist() methods fill the histograms with the real limits on the variables This method allows to refill the specified histogram with user-set boundaries min and max Parameters: type = 1 - histogram of x variable #nvar = 2 - histogram of y variable #nvar = 3 - histogram of y_pdf for y #nvar and species #nspecies = 4 - histogram of x variable #nvar, species #nspecies, WITH sWeights = 5 - histogram of y variable #nvar, species #nspecies, WITH sWeights.

Definition at line 899 of file TSPlot.cxx.

void TSPlot::SetInitialNumbersOfSpecies ( Int_t numbers)

Set the initial number of events of each species - used as initial estimates in minuit.

Definition at line 527 of file TSPlot.cxx.

Referenced by TestSPlot().

void TSPlot::SetNEvents ( Int_t  ne)
inline

Definition at line 85 of file TSPlot.h.

void TSPlot::SetNSpecies ( Int_t  ns)
inline

Definition at line 84 of file TSPlot.h.

void TSPlot::SetNX ( Int_t  nx)
inline

Definition at line 82 of file TSPlot.h.

void TSPlot::SetNY ( Int_t  ny)
inline

Definition at line 83 of file TSPlot.h.

void TSPlot::SetTree ( TTree tree)

Set the input Tree.

Definition at line 982 of file TSPlot.cxx.

void TSPlot::SetTreeSelection ( const char *  varexp = "",
const char *  selection = "",
Long64_t  firstentry = 0 
)

Specifies the variables from the tree to be used for splot.

Variables fNx, fNy, fNSpecies and fNEvents should already be set!

In the 1st parameter it is assumed that first fNx variables are x(control variables), then fNy y variables (discriminating variables), then fNy*fNSpecies ypdf variables (probability distribution functions of dicriminating variables for different species). The order of pdfs should be: species0_y0, species0_y1,... species1_y0, species1_y1,...species[fNSpecies-1]_y0... The 2nd parameter allows to make a cut TTree::Draw method description contains more details on specifying expression and selection

Definition at line 1000 of file TSPlot.cxx.

Referenced by TestSPlot().

void TSPlot::SPlots ( Double_t covmat,
Int_t  i_excl 
)
protected

Computes the sWeights from the covariance matrix.

Definition at line 622 of file TSPlot.cxx.

Referenced by MakeSPlot().

Member Data Documentation

TMatrixD TSPlot::fMinmax
protected
Int_t TSPlot::fNevents
protected
Int_t TSPlot::fNSpecies
protected
Double_t* TSPlot::fNumbersOfEvents
protected

Definition at line 46 of file TSPlot.h.

Referenced by MakeSPlot(), SetInitialNumbersOfSpecies(), SPlots(), TSPlot(), and ~TSPlot().

Int_t TSPlot::fNx
protected
Int_t TSPlot::fNy
protected
TMatrixD TSPlot::fPdfTot
protected

Definition at line 26 of file TSPlot.h.

Referenced by MakeSPlot(), and SPlots().

TString* TSPlot::fSelection
protected

Definition at line 38 of file TSPlot.h.

Referenced by GetTreeSelection(), and SetTreeSelection().

TMatrixD TSPlot::fSWeights
protected

Definition at line 28 of file TSPlot.h.

Referenced by Browse(), FillSWeightsHists(), GetSWeights(), MakeSPlot(), RefillHist(), SPlots(), and TSPlot().

TObjArray TSPlot::fSWeightsHists
protected

Definition at line 33 of file TSPlot.h.

Referenced by Browse(), FillSWeightsHists(), GetSWeightsHist(), GetSWeightsHists(), and RefillHist().

TTree* TSPlot::fTree
protected

Definition at line 35 of file TSPlot.h.

Referenced by SetTree(), SetTreeSelection(), and TSPlot().

TString* TSPlot::fTreename
protected

Definition at line 36 of file TSPlot.h.

Referenced by GetTreeName(), and SetTreeSelection().

TString* TSPlot::fVarexp
protected

Definition at line 37 of file TSPlot.h.

Referenced by GetTreeExpression(), and SetTreeSelection().

TMatrixD TSPlot::fXvar
protected

Definition at line 23 of file TSPlot.h.

Referenced by FillSWeightsHists(), FillXvarHists(), RefillHist(), SetTreeSelection(), and TSPlot().

TObjArray TSPlot::fXvarHists
protected

Definition at line 30 of file TSPlot.h.

Referenced by Browse(), FillXvarHists(), GetXvarHist(), GetXvarHists(), RefillHist(), and ~TSPlot().

TMatrixD TSPlot::fYpdf
protected

Definition at line 25 of file TSPlot.h.

Referenced by FillYpdfHists(), MakeSPlot(), RefillHist(), SetTreeSelection(), and TSPlot().

TObjArray TSPlot::fYpdfHists
protected

Definition at line 32 of file TSPlot.h.

Referenced by Browse(), FillYpdfHists(), GetYpdfHist(), GetYpdfHists(), RefillHist(), and ~TSPlot().

TMatrixD TSPlot::fYvar
protected

Definition at line 24 of file TSPlot.h.

Referenced by FillSWeightsHists(), FillYvarHists(), RefillHist(), SetTreeSelection(), and TSPlot().

TObjArray TSPlot::fYvarHists
protected

Definition at line 31 of file TSPlot.h.

Referenced by Browse(), FillYvarHists(), GetYvarHist(), GetYvarHists(), RefillHist(), and ~TSPlot().

Collaboration diagram for TSPlot:
[legend]

The documentation for this class was generated from the following files: