It is an example of analysis of charmless B decays, performed for BABAR. One is dealing with a data sample in which two species are present: the first is termed signal and the second background. A maximum Likelihood fit is performed to obtain the two yields N1 and N2 The fit relies on two discriminating variables collectively denoted y, which are chosen within three possible variables denoted Mes, dE and F. The variable which is not incorporated in y, is used as the control variable x. The distributions of discriminating variables and more details about the method can be found in the TSPlot class description
estimated #of events in species 0 = 462.641575
estimated #of events in species 1 = 4957.409256
estimated #of events in species 0 = 490.068958
estimated #of events in species 1 = 4929.942571
estimated #of events in species 0 = 431.484129
estimated #of events in species 1 = 4988.519463
estimated #of events in species 0 = 420.453703
estimated #of events in species 1 = 4999.547303
void TestSPlot()
{
TTree *datatree =
new TTree(
"datatree",
"datatree");
"Mes/D:dE/D:F/D:MesSignal/D:MesBackground/D:dESignal/D:dEBackground/D:FSignal/D:FBackground/D",' ');
"Mes:dE:F:MesSignal:dESignal:FSignal:MesBackground:"
"dEBackground:FBackground");
ne[0]=500; ne[1]=5000;
"sPlots of Mes and F signal and background", 800, 600);
pt->
AddText(
"sPlots of Mes and F signal and background,");
pt->
AddText(
"obtained by the tutorial TestSPlot.C on BABAR MC "
"data (sPlot_toyMC.fit)");
"M. Pivk and F. R. Le Diberder, Nucl.Inst.Meth.A, physics/0402083");
TPad* pad1 =
new TPad(
"pad1",
"Mes signal",0.02,0.43,0.48,0.83,33);
TPad* pad2 =
new TPad(
"pad2",
"Mes background",0.5,0.43,0.98,0.83,33);
TPad* pad3 =
new TPad(
"pad3",
"F signal", 0.02, 0.02, 0.48, 0.41,33);
TPad* pad4 =
new TPad(
"pad4",
"F background", 0.5, 0.02, 0.98, 0.41,33);
}
char * Form(const char *fmt,...)
R__EXTERN TSystem * gSystem
virtual void SetLabelSize(Float_t size=0.04)
Set size of axis labels.
virtual void SetLabelOffset(Float_t offset=0.005)
Set distance between the axis and the labels.
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
virtual void SetMarkerColor(Color_t mcolor=1)
Set the marker color.
virtual void SetMarkerStyle(Style_t mstyle=1)
Set the marker style.
virtual void SetMarkerSize(Size_t msize=1)
Set the marker size.
virtual void SetTextColor(Color_t tcolor=1)
Set the text color.
virtual void SetTextFont(Font_t tfont=62)
Set the text font.
TVirtualPad * cd(Int_t subpadnumber=0)
Set current canvas & pad.
1-D histogram with a double per channel (see TH1 documentation)}
virtual void SetTitle(const char *title)
See GetStatOverflows for more information.
TAxis * GetXaxis()
Get the behaviour adopted by the object about the statoverflows. See EStatOverflows for more informat...
virtual void Draw(Option_t *option="")
Draw this histogram with options.
virtual void SetStats(Bool_t stats=kTRUE)
Set statistics option on/off.
The most important graphics class in the ROOT system.
virtual void Draw(Option_t *option="")
Draw Pad in Current pad (re-parent pad if necessary).
virtual void SetGrid(Int_t valuex=1, Int_t valuey=1)
TVirtualPad * cd(Int_t subpadnumber=0)
Set Current pad.
A Pave (see TPave) with text, lines or/and boxes inside.
virtual TText * AddText(Double_t x1, Double_t y1, const char *label)
Add a new Text line to this pavetext at given coordinates.
virtual void Draw(Option_t *option="")
Draw this pavetext with its current attributes.
A common method used in High Energy Physics to perform measurements is the maximum Likelihood method,...
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.
void SetTreeSelection(const char *varexp="", const char *selection="", Long64_t firstentry=0)
Specifies the variables from the tree to be used for splot.
void SetInitialNumbersOfSpecies(Int_t *numbers)
Set the initial number of events of each species - used as initial estimates in minuit.
const char * Data() const
TString & ReplaceAll(const TString &s1, const TString &s2)
virtual const char * UnixPathName(const char *unixpathname)
Convert from a Unix pathname to a local pathname.
Base class for several text objects.
A TTree represents a columnar dataset.
virtual Long64_t ReadFile(const char *filename, const char *branchDescriptor="", char delimiter=' ')
Create or simply read branches from filename.