352 while ((
h = (
TH1D*)next()))
359 while ((
h = (
TH1D*)next()))
365 while ((
h = (
TH1D*)next()))
371 while ((
h = (
TH1D*)next()))
401 Error(
"MakeSPlot",
"Initial numbers of events in species have not been set");
404 Int_t i, j, ispecies;
424 for (
Int_t iplot=-1; iplot<
fNy; iplot++){
426 for (ispecies=0; ispecies<
fNSpecies; ispecies++){
428 for (j=0; j<
fNy; j++){
446 for (ispecies=0; ispecies<
fNSpecies; ispecies++)
450 for (ispecies=0; ispecies<
fNSpecies; ispecies++){
453 printf(
"estimated #of events in species %d = %f\n", ispecies,
fNumbersOfEvents[ispecies]);
466 printf(
"checking sum of weights[%d]=%f\n", i, sumweight[i]);
479 Int_t i, ispecies, k;
483 for (ispecies=0; ispecies<
fNSpecies; ispecies++)
485 for (ispecies=0; ispecies<
fNSpecies; ispecies++){
534 for (i=0; i<
fNx; i++){
591 for (i=0; i<
fNy; i++){
633 Int_t i, j, ispecies;
643 for (ispecies=0; ispecies<
fNSpecies; ispecies++){
644 for (i=0; i<
fNy; i++){
694 Error(
"GetSWeightsHists",
"SWeights were not computed");
708 for (
Int_t ivar=0; ivar<
fNx; ivar++){
720 for (
Int_t iexcl=0; iexcl<
fNy; iexcl++){
762 if (type<1 || type>5){
763 Error(
"RefillHist",
"type must lie between 1 and 5");
864 std::vector<TString> cnames;
879 nch = varexp ? strlen(varexp) : 0;
884 if (selection && strlen(selection)) {
887 if (!select->
GetNdim()) {
delete select;
return; }
888 formulaList.
Add(select);
894 for (i=0;i<ncols;i++) {
895 cnames.push_back( leaves->
At(i)->
GetName() );
905 for (i=0; i<ncols; i++){
911 for (i=0;i<ncols;i++) {
913 formulaList.
Add(var[i]);
920 for(i=0;i<=formulaList.
LastIndex();i++) {
930 for (entry=firstentry;entry<firstentry+
fNevents;entry++) {
932 if (entryNumber < 0)
break;
934 if (localEntry < 0)
break;
944 for(
Int_t inst=0;inst<ndata;inst++) {
952 if (inst==0) loaded =
kTRUE;
956 for (i=0;i<ncols;i++) {
962 for (i=0;i<ncols;i++) {
971 for (i=0; i<
fNx; i++){
972 fXvar(selectedrows, i) = xvars[i];
978 for (i=0; i<
fNy; i++){
979 fYvar(selectedrows, i) = xvars[i+
fNx];
1024 for (i=0; i<nev; i++){
1026 for (ispecies=0; ispecies<nes; ispecies++)
1027 lik+=
x[ispecies]*(*pdftot)(i, ispecies);
1033 for (i=0; i<nes; i++)
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
void Yields(Int_t &, Double_t *, Double_t &f, Double_t *x, Int_t iflag)
FCN-function for Minuit.
Using a TBrowser one can browse all ROOT objects.
1-D histogram with a double per channel (see TH1 documentation)}
virtual Bool_t Add(TF1 *h1, Double_t c1=1, Option_t *option="")
Performs the operation: this = this + c1*f1 if errors are defined (see TH1::Sumw2),...
void Clear(Option_t *option="") override
Remove all objects from the list.
void Add(TObject *obj) override
TObject * At(Int_t idx) const override
Returns the object at position idx. Returns 0 if idx is out of range.
Int_t GetNoElements() const
TMatrixTBase< Element > & ResizeTo(Int_t nrows, Int_t ncols, Int_t=-1) override
Set size of the matrix to nrows x ncols New dynamic elements are created, the overlapping part of the...
const char * GetName() const override
Returns name of object.
void AddAt(TObject *obj, Int_t idx) override
Add object at position ids.
void Delete(Option_t *option="") override
Remove all objects from the array AND delete all heap based objects.
TObject * At(Int_t idx) const override
void AddLast(TObject *obj) override
Add object in the next empty slot in the array.
TObject * UncheckedAt(Int_t i) const
TObject * First() const override
Return the object in the first slot.
Bool_t IsEmpty() const override
TObject * RemoveAt(Int_t idx) override
Remove object at index idx.
void Add(TObject *obj) override
virtual const char * GetName() const
Returns name of object.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
<div class="legacybox"><h2>Legacy Code</h2> TSPlot is a legacy interface: there will be no bug fixes ...
void FillYvarHists(Int_t nbins=100)
Fill the histograms of y variables.
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 allow...
~TSPlot() override
Destructor.
void Browse(TBrowser *b) override
To browse the histograms.
void SPlots(Double_t *covmat, Int_t i_excl)
Computes the sWeights from the covariance matrix.
void GetSWeights(TMatrixD &weights)
Returns the matrix of sweights.
void FillSWeightsHists(Int_t nbins=50)
The order of histograms in the array:
TH1D * GetSWeightsHist(Int_t ixvar, Int_t ispecies, Int_t iyexcl=-1)
Returns the histogram of a variable, weighted with sWeights.
void MakeSPlot(Option_t *option="v")
Calculates the sWeights.
TH1D * GetYpdfHist(Int_t iyvar, Int_t ispecies)
Returns the histogram of the pdf of variable iyvar for species #ispecies, binning nbins.
TObjArray * GetSWeightsHists()
Returns an array of all histograms of variables, weighted with sWeights.
TObjArray * GetYpdfHists()
Returns the array of histograms of pdf's of y variables with binning nbins.
void FillXvarHists(Int_t nbins=100)
Fills the histograms of x variables (not weighted) with nbins.
TObjArray * GetXvarHists()
Returns the array of histograms of x variables (not weighted).
void SetTree(TTree *tree)
Set the input Tree.
TObjArray * GetYvarHists()
Returns the array of histograms of y variables.
void FillYpdfHists(Int_t nbins=100)
Fills the histograms of pdf-s of y variables with binning nbins.
void SetTreeSelection(const char *varexp="", const char *selection="", Long64_t firstentry=0)
Specifies the variables from the tree to be used for splot.
TSPlot()
default constructor (used by I/O only)
TClass * IsA() const override
TH1D * GetYvarHist(Int_t iyvar)
Returns the histogram of variable iyvar.If histograms have not already been filled,...
void SetInitialNumbersOfSpecies(Int_t *numbers)
Set the initial number of events of each species - used as initial estimates in minuit.
Double_t * fNumbersOfEvents
TH1D * GetXvarHist(Int_t ixvar)
Returns the histogram of variable ixvar.
A specialized TSelector for TTree::Draw.
virtual UInt_t SplitNames(const TString &varexp, std::vector< TString > &names)
Build Index array for names in varexp.
TString & ReplaceAll(const TString &s1, const TString &s2)
void ToUpper()
Change string to upper case.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Implement some of the functionality of the class TTree requiring access to extra libraries (Histogram...
A TTree represents a columnar dataset.
virtual TObjArray * GetListOfLeaves()
TVirtualTreePlayer * GetPlayer()
Load the TTreePlayer (if not already done).
virtual Long64_t GetEntryNumber(Long64_t entry) const
Return entry number corresponding to entry.
virtual Long64_t LoadTree(Long64_t entry)
Set current entry.
virtual Int_t GetTreeNumber() const
Abstract Base Class for Fitting.
virtual void SetObjectFit(TObject *obj)
virtual TObject * GetObjectFit() const
virtual Double_t * GetCovarianceMatrix() const =0
void Clear(Option_t *option="") override=0
Set name and title to empty strings ("").
virtual void SetFCN(void(*fcn)(Int_t &, Double_t *, Double_t &f, Double_t *, Int_t))
To set the address of the minimization objective function called by the native compiler (see function...
virtual Int_t SetParameter(Int_t ipar, const char *parname, Double_t value, Double_t verr, Double_t vlow, Double_t vhigh)=0
virtual Int_t ExecuteCommand(const char *command, Double_t *args, Int_t nargs)=0
virtual Double_t GetParameter(Int_t ipar) const =0
static TVirtualFitter * GetFitter()
static: return the current Fitter
static TVirtualFitter * Fitter(TObject *obj, Int_t maxpar=25)
Static function returning a pointer to the current fitter.
Double_t Log(Double_t x)
Returns the natural logarithm of x.