Logo ROOT   6.07/09
Reference Guide
testUnfold1.C
Go to the documentation of this file.
1 /// \file
2 /// \ingroup tutorial_unfold
3 /// \notebook
4 /// Test program for the classes TUnfold and related
5 ///
6 /// 1. Generate Monte Carlo and Data events
7 /// The events consist of
8 /// - signal
9 /// - background
10 ///
11 /// The signal is a resonance. It is generated with a Breit-Wigner,
12 /// smeared by a Gaussian
13 ///
14 /// 2. Unfold the data. The result is:
15 /// The background level
16 /// The shape of the resonance, corrected for detector effects
17 ///
18 /// Systematic errors from the MC shape variation are included
19 /// and propagated to the result
20 ///
21 /// 3. fit the unfolded distribution, including the correlation matrix
22 ///
23 /// 4. save six plots to a file testUnfold1.ps
24 /// - 1 2 3
25 /// - 4 5 6
26 /// 1. 2d-plot of the matrix decsribing the migrations
27 /// 2. generator-level distributions
28 /// - blue: unfolded data, total errors
29 /// - green: unfolded data, statistical errors
30 /// - red: generated data
31 /// - black: fit to green data points
32 /// 3. detector level distributions
33 /// - blue: unfoldede data, folded back through the matrix
34 /// - black: Monte Carlo (with wrong peal position)
35 /// - blue: data
36 /// 4. global correlation coefficients
37 /// 5. \f$ \chi^2 \f$ as a function of log(tau)
38 /// - the star indicates the final choice of tau
39 /// 6. the L curve
40 ///
41 /// Version 17.0, updated for using the classes TUnfoldDensity, TUnfoldBinning
42 ///
43 /// History:
44 /// - Version 16.1, parallel to changes in TUnfold
45 /// - Version 16.0, parallel to changes in TUnfold
46 /// - Version 15, with automated L-curve scan
47 /// - Version 14, with changes in TUnfoldSys.cxx
48 /// - Version 13, include test of systematic errors
49 /// - Version 12, catch error when defining the input
50 /// - Version 11, print chi**2 and number of degrees of freedom
51 /// - Version 10, with bug-fix in TUnfold.cxx
52 /// - Version 9, with bug-fix in TUnfold.cxx and TUnfold.h
53 /// - Version 8, with bug-fix in TUnfold.cxx and TUnfold.h
54 /// - Version 7, with bug-fix in TUnfold.cxx and TUnfold.h
55 /// - Version 6a, fix problem with dynamic array allocation under windows
56 /// - Version 6, bug-fixes in TUnfold.C
57 /// - Version 5, replace main() by testUnfold1()
58 /// - Version 4, with bug-fix in TUnfold.C
59 /// - Version 3, with bug-fix in TUnfold.C
60 /// - Version 2, with changed ScanLcurve() arguments
61 /// - Version 1, remove L curve analysis, use ScanLcurve() method instead
62 /// - Version 0, L curve analysis included here
63 ///
64 /// \macro_image
65 /// \macro_output
66 /// \macro_code
67 ///
68 /// \author Stefan Schmitt, DESY
69 
70 #include <TError.h>
71 #include <TMath.h>
72 #include <TCanvas.h>
73 #include <TRandom3.h>
74 #include <TFitter.h>
75 #include <TF1.h>
76 #include <TStyle.h>
77 #include <TVector.h>
78 #include <TGraph.h>
79 
80 #include "TUnfoldDensity.h"
81 
82 // #define VERBOSE_LCURVE_SCAN
83 
84 using namespace std;
85 
86 TRandom *rnd=0;
87 
88 TH2 *gHistInvEMatrix;
89 
90 TVirtualFitter *gFitter=0;
91 
92 void chisquare_corr(Int_t &npar, Double_t * /*gin */, Double_t &f, Double_t *u, Int_t /*flag */) {
93  // Minimization function for H1s using a Chisquare method
94  // only one-dimensional histograms are supported
95  // Corelated errors are taken from an external inverse covariance matrix
96  // stored in a 2-dimensional histogram
97  Double_t x;
98  TH1 *hfit = (TH1*)gFitter->GetObjectFit();
99  TF1 *f1 = (TF1*)gFitter->GetUserFunc();
100 
101  f1->InitArgs(&x,u);
102  npar = f1->GetNpar();
103  f = 0;
104 
105  Int_t npfit = 0;
106  Int_t nPoints=hfit->GetNbinsX();
107  Double_t *df=new Double_t[nPoints];
108  for (Int_t i=0;i<nPoints;i++) {
109  x = hfit->GetBinCenter(i+1);
111  df[i] = f1->EvalPar(&x,u)-hfit->GetBinContent(i+1);
112  if (TF1::RejectedPoint()) df[i]=0.0;
113  else npfit++;
114  }
115  for (Int_t i=0;i<nPoints;i++) {
116  for (Int_t j=0;j<nPoints;j++) {
117  f += df[i]*df[j]*gHistInvEMatrix->GetBinContent(i+1,j+1);
118  }
119  }
120  delete[] df;
121  f1->SetNumberFitPoints(npfit);
122 }
123 
124 Double_t bw_func(Double_t *x,Double_t *par) {
125  Double_t dm=x[0]-par[1];
126  return par[0]/(dm*dm+par[2]*par[2]);
127 }
128 
129 
130 // Generate an event
131 //
132 // Output:
133 // negative mass: background event
134 // positive mass: signal event
135 Double_t GenerateEvent(Double_t bgr, // relative fraction of background
136  Double_t mass, // peak position
137  Double_t gamma /* peak width*/ )
138 {
139  Double_t t;
140  if(rnd->Rndm()>bgr) {
141  // generate signal event
142  // with positive mass
143  do {
144  do {
145  t=rnd->Rndm();
146  } while(t>=1.0);
147  t=TMath::Tan((t-0.5)*TMath::Pi())*gamma+mass;
148  } while(t<=0.0);
149  return t;
150  } else {
151  // generate background event
152  // generate events following a power-law distribution
153  // f(E) = K * TMath::power((E0+E),N0)
154  static Double_t const E0=2.4;
155  static Double_t const N0=2.9;
156  do {
157  do {
158  t=rnd->Rndm();
159  } while(t>=1.0);
160  // the mass is returned negative
161  // In our example a convenient way to indicate it is a background event.
162  t= -(TMath::Power(1.-t,1./(1.-N0))-1.0)*E0;
163  } while(t>=0.0);
164  return t;
165  }
166 }
167 
168 // smear the event to detector level
169 //
170 // input:
171 // mass on generator level (mTrue>0 !)
172 //
173 // output:
174 // mass on detector level
175 Double_t DetectorEvent(Double_t mTrue) {
176  // smear by double-gaussian
177  static Double_t frac=0.1;
178  static Double_t wideBias=0.03;
179  static Double_t wideSigma=0.5;
180  static Double_t smallBias=0.0;
181  static Double_t smallSigma=0.1;
182  if(rnd->Rndm()>frac) {
183  return rnd->Gaus(mTrue+smallBias,smallSigma);
184  } else {
185  return rnd->Gaus(mTrue+wideBias,wideSigma);
186  }
187 }
188 
189 int testUnfold1()
190 {
191  // switch on histogram errors
193 
194  // show fit result
195  gStyle->SetOptFit(1111);
196 
197  // random generator
198  rnd=new TRandom3();
199 
200  // data and MC luminosity, cross-section
201  Double_t const luminosityData=100000;
202  Double_t const luminosityMC=1000000;
203  Double_t const crossSection=1.0;
204 
205  Int_t const nDet=250;
206  Int_t const nGen=100;
207  Double_t const xminDet=0.0;
208  Double_t const xmaxDet=10.0;
209  Double_t const xminGen=0.0;
210  Double_t const xmaxGen=10.0;
211 
212 //----------------------------------------------------
213  // generate MC distribution
214  //
215  TH1D *histMgenMC=new TH1D("MgenMC",";mass(gen)",nGen,xminGen,xmaxGen);
216  TH1D *histMdetMC=new TH1D("MdetMC",";mass(det)",nDet,xminDet,xmaxDet);
217  TH2D *histMdetGenMC=new TH2D("MdetgenMC",";mass(det);mass(gen)",
218  nDet,xminDet,xmaxDet,nGen,xminGen,xmaxGen);
219  Int_t neventMC=rnd->Poisson(luminosityMC*crossSection);
220  for(Int_t i=0;i<neventMC;i++) {
221  Double_t mGen=GenerateEvent(0.3, // relative fraction of background
222  4.0, // peak position in MC
223  0.2); // peak width in MC
224  Double_t mDet=DetectorEvent(TMath::Abs(mGen));
225  // the generated mass is negative for background
226  // and positive for signal
227  // so it will be filled in the underflow bin
228  // this is very convenient for the unfolding:
229  // the unfolded result will contain the number of background
230  // events in the underflow bin
231 
232  // generated MC distribution (for comparison only)
233  histMgenMC->Fill(mGen,luminosityData/luminosityMC);
234  // reconstructed MC distribution (for comparison only)
235  histMdetMC->Fill(mDet,luminosityData/luminosityMC);
236 
237  // matrix describing how the generator input migrates to the
238  // reconstructed level. Unfolding input.
239  // NOTE on underflow/overflow bins:
240  // (1) the detector level under/overflow bins are used for
241  // normalisation ("efficiency" correction)
242  // in our toy example, these bins are populated from tails
243  // of the initial MC distribution.
244  // (2) the generator level underflow/overflow bins are
245  // unfolded. In this example:
246  // underflow bin: background events reconstructed in the detector
247  // overflow bin: signal events generated at masses > xmaxDet
248  // for the unfolded result these bins will be filled
249  // -> the background normalisation will be contained in the underflow bin
250  histMdetGenMC->Fill(mDet,mGen,luminosityData/luminosityMC);
251  }
252 
253 //----------------------------------------------------
254  // generate alternative MC
255  // this will be used to derive a systematic error due to MC
256  // parameter uncertainties
257  TH2D *histMdetGenSysMC=new TH2D("MdetgenSysMC",";mass(det);mass(gen)",
258  nDet,xminDet,xmaxDet,nGen,xminGen,xmaxGen);
259  neventMC=rnd->Poisson(luminosityMC*crossSection);
260  for(Int_t i=0;i<neventMC;i++) {
261  Double_t mGen=GenerateEvent
262  (0.5, // relative fraction of background
263  3.6, // peak position in MC with systematic shift
264  0.15); // peak width in MC
265  Double_t mDet=DetectorEvent(TMath::Abs(mGen));
266  histMdetGenSysMC->Fill(mDet,mGen,luminosityData/luminosityMC);
267  }
268 
269 //----------------------------------------------------
270  // generate data distribution
271  //
272  TH1D *histMgenData=new TH1D("MgenData",";mass(gen)",nGen,xminGen,xmaxGen);
273  TH1D *histMdetData=new TH1D("MdetData",";mass(det)",nDet,xminDet,xmaxDet);
274  Int_t neventData=rnd->Poisson(luminosityData*crossSection);
275  for(Int_t i=0;i<neventData;i++) {
276  Double_t mGen=GenerateEvent(0.4, // relative fraction of background
277  3.8, // peak position in data
278  0.15); // peak width in data
279  Double_t mDet=DetectorEvent(TMath::Abs(mGen));
280  // generated data mass for comparison plots
281  // for real data, we do not have this histogram
282  histMgenData->Fill(mGen);
283 
284  // reconstructed mass, unfolding input
285  histMdetData->Fill(mDet);
286  }
287 
288  //----------------------------------------------------
289  // divide by bin withd to get density distributions
290  TH1D *histDensityGenData=new TH1D("DensityGenData",";mass(gen)",
291  nGen,xminGen,xmaxGen);
292  TH1D *histDensityGenMC=new TH1D("DensityGenMC",";mass(gen)",
293  nGen,xminGen,xmaxGen);
294  for(Int_t i=1;i<=nGen;i++) {
295  histDensityGenData->SetBinContent(i,histMgenData->GetBinContent(i)/
296  histMgenData->GetBinWidth(i));
297  histDensityGenMC->SetBinContent(i,histMgenMC->GetBinContent(i)/
298  histMgenMC->GetBinWidth(i));
299  }
300 
301  //----------------------------------------------------
302  // set up the unfolding
303  // define migration matrix
304  TUnfoldDensity unfold(histMdetGenMC,TUnfold::kHistMapOutputVert);
305 
306  // define input and bias scame
307  // do not use the bias, because MC peak may be at the wrong place
308  // watch out for error codes returned by the SetInput method
309  // errors larger or equal 10000 are fatal:
310  // the data points specified as input are not sufficient to constrain the
311  // unfolding process
312  if(unfold.SetInput(histMdetData)>=10000) {
313  std::cout<<"Unfolding result may be wrong\n";
314  }
315 
316  //----------------------------------------------------
317  // the unfolding is done here
318  //
319  // scan L curve and find best point
320  Int_t nScan=30;
321  // use automatic L-curve scan: start with taumin=taumax=0.0
322  Double_t tauMin=0.0;
323  Double_t tauMax=0.0;
324  Int_t iBest;
325  TSpline *logTauX,*logTauY;
326  TGraph *lCurve;
327 
328  // if required, report Info messages (for debugging the L-curve scan)
329 #ifdef VERBOSE_LCURVE_SCAN
330  Int_t oldinfo=gErrorIgnoreLevel;
332 #endif
333  // this method scans the parameter tau and finds the kink in the L curve
334  // finally, the unfolding is done for the best choice of tau
335  iBest=unfold.ScanLcurve(nScan,tauMin,tauMax,&lCurve,&logTauX,&logTauY);
336 
337  // if required, switch to previous log-level
338 #ifdef VERBOSE_LCURVE_SCAN
339  gErrorIgnoreLevel=oldinfo;
340 #endif
341 
342  //-------------------------------------------------------
343  // define a correlated systematic error
344  // for example, assume there is a 10% correlated error for all reconstructed
345  // masses larger than 7
346  Double_t SYS_ERROR1_MSTART=6;
347  Double_t SYS_ERROR1_SIZE=0.1;
348  TH2D *histMdetGenSys1=new TH2D("Mdetgensys1",";mass(det);mass(gen)",
349  nDet,xminDet,xmaxDet,nGen,xminGen,xmaxGen);
350  for(Int_t i=0;i<=nDet+1;i++) {
351  if(histMdetData->GetBinCenter(i)>=SYS_ERROR1_MSTART) {
352  for(Int_t j=0;j<=nGen+1;j++) {
353  histMdetGenSys1->SetBinContent(i,j,SYS_ERROR1_SIZE);
354  }
355  }
356  }
357  unfold.AddSysError(histMdetGenSysMC,"SYSERROR_MC",TUnfold::kHistMapOutputVert,
359  unfold.AddSysError(histMdetGenSys1,"SYSERROR1",TUnfold::kHistMapOutputVert,
361 
362  //-------------------------------------------------------
363  // print some results
364  //
365  std::cout<<"tau="<<unfold.GetTau()<<"\n";
366  std::cout<<"chi**2="<<unfold.GetChi2A()<<"+"<<unfold.GetChi2L()
367  <<" / "<<unfold.GetNdf()<<"\n";
368  std::cout<<"chi**2(sys)="<<unfold.GetChi2Sys()<<"\n";
369 
370 
371  //-------------------------------------------------------
372  // create graphs with one point to visualize the best choice of tau
373  //
374  Double_t t[1],x[1],y[1];
375  logTauX->GetKnot(iBest,t[0],x[0]);
376  logTauY->GetKnot(iBest,t[0],y[0]);
377  TGraph *bestLcurve=new TGraph(1,x,y);
378  TGraph *bestLogTauLogChi2=new TGraph(1,t,x);
379 
380  //-------------------------------------------------------
381  // retreive results into histograms
382 
383  // get unfolded distribution
384  TH1 *histMunfold=unfold.GetOutput("Unfolded");
385 
386  // get unfolding result, folded back
387  TH1 *histMdetFold=unfold.GetFoldedOutput("FoldedBack");
388 
389  // get error matrix (input distribution [stat] errors only)
390  // TH2D *histEmatData=unfold.GetEmatrix("EmatData");
391 
392  // get total error matrix:
393  // migration matrix uncorrelated and correlated systematic errors
394  // added in quadrature to the data statistical errors
395  TH2 *histEmatTotal=unfold.GetEmatrixTotal("EmatTotal");
396 
397  // create data histogram with the total errors
398  TH1D *histTotalError=
399  new TH1D("TotalError",";mass(gen)",nGen,xminGen,xmaxGen);
400  for(Int_t bin=1;bin<=nGen;bin++) {
401  histTotalError->SetBinContent(bin,histMunfold->GetBinContent(bin));
402  histTotalError->SetBinError
403  (bin,TMath::Sqrt(histEmatTotal->GetBinContent(bin,bin)));
404  }
405 
406  // get global correlation coefficients
407  // for this calculation one has to specify whether the
408  // underflow/overflow bins are included or not
409  // default: include all bins
410  // here: exclude underflow and overflow bins
411  TH1 *histRhoi=unfold.GetRhoItotal("rho_I",
412  0, // use default title
413  0, // all distributions
414  "*[UO]", // discard underflow and overflow bins on all axes
415  kTRUE, // use original binning
416  &gHistInvEMatrix // store inverse of error matrix
417  );
418 
419 //-------------------------------------------------------------------------------
420  // fit Breit-Wigner shape to unfolded data, using the full error matrix
421  // here we use a "user" chi**2 function to take into account
422  // the full covariance matrix
423 
424  gFitter=TVirtualFitter::Fitter(histMunfold);
425  gFitter->SetFCN(chisquare_corr);
426 
427  TF1 *bw=new TF1("bw",bw_func,xminGen,xmaxGen,3);
428  bw->SetParameter(0,1000.);
429  bw->SetParameter(1,3.8);
430  bw->SetParameter(2,0.2);
431 
432  // for (wrong!) fitting without correlations, drop the option "U"
433  // here.
434  histMunfold->Fit(bw,"UE");
435 
436 //----------------------------------------------------------------------------
437  // plot some histograms
438  TCanvas output;
439  output.Divide(3,2);
440 
441  // Show the matrix which connects input and output
442  // There are overflow bins at the bottom, not shown in the plot
443  // These contain the background shape.
444  // The overflow bins to the left and right contain
445  // events which are not reconstructed. These are necessary for proper MC
446  // normalisation
447  output.cd(1);
448  histMdetGenMC->Draw("BOX");
449 
450  // draw generator-level distribution:
451  // data (red) [for real data this is not available]
452  // MC input (black) [with completely wrong peak position and shape]
453  // unfolded data (blue)
454  output.cd(2);
455  histTotalError->SetLineColor(kBlue);
456  histTotalError->Draw("E");
457  histMunfold->SetLineColor(kGreen);
458  histMunfold->Draw("SAME E1");
459  histDensityGenData->SetLineColor(kRed);
460  histDensityGenData->Draw("SAME");
461  histDensityGenMC->Draw("SAME HIST");
462 
463  // show detector level distributions
464  // data (red)
465  // MC (black) [with completely wrong peak position and shape]
466  // unfolded data (blue)
467  output.cd(3);
468  histMdetFold->SetLineColor(kBlue);
469  histMdetFold->Draw();
470  histMdetMC->Draw("SAME HIST");
471 
472  TH1 *histInput=unfold.GetInput("Minput",";mass(det)");
473 
474  histInput->SetLineColor(kRed);
475  histInput->Draw("SAME");
476 
477  // show correlation coefficients
478  output.cd(4);
479  histRhoi->Draw();
480 
481  // show tau as a function of chi**2
482  output.cd(5);
483  logTauX->Draw();
484  bestLogTauLogChi2->SetMarkerColor(kRed);
485  bestLogTauLogChi2->Draw("*");
486 
487  // show the L curve
488  output.cd(6);
489  lCurve->Draw("AL");
490  bestLcurve->SetMarkerColor(kRed);
491  bestLcurve->Draw("*");
492 
493  output.SaveAs("testUnfold1.ps");
494 
495  return 0;
496 }
double par[1]
Definition: unuranDistr.cxx:38
virtual Int_t Fill(Double_t x)
Increment bin with abscissa X by 1.
Definition: TH1.cxx:3127
Random number generator class based on M.
Definition: TRandom3.h:29
virtual Double_t GetBinContent(Int_t bin) const
Return content of bin number bin.
Definition: TH1.cxx:4640
R__EXTERN Int_t gErrorIgnoreLevel
Definition: TError.h:107
virtual Double_t Gaus(Double_t mean=0, Double_t sigma=1)
Samples a random number from the standard Normal (Gaussian) Distribution with the given mean and sigm...
Definition: TRandom.cxx:235
Definition: Rtypes.h:61
R__EXTERN TStyle * gStyle
Definition: TStyle.h:418
Base class for spline implementation containing the Draw/Paint methods //.
Definition: TSpline.h:22
TVirtualPad * cd(Int_t subpadnumber=0)
Set current canvas & pad.
Definition: TCanvas.cxx:659
virtual TObject * GetUserFunc() const
virtual void SetNumberFitPoints(Int_t npfits)
Definition: TF1.h:428
int Int_t
Definition: RtypesCore.h:41
const Bool_t kFALSE
Definition: Rtypes.h:92
Definition: Rtypes.h:61
virtual Int_t GetNbinsX() const
Definition: TH1.h:301
STL namespace.
Short_t Abs(Short_t d)
Definition: TMathBase.h:110
virtual void Draw(Option_t *chopt="")
Draw this graph with its current attributes.
Definition: TGraph.cxx:747
LongDouble_t Power(LongDouble_t x, LongDouble_t y)
Definition: TMath.h:501
static void SetDefaultSumw2(Bool_t sumw2=kTRUE)
When this static function is called with sumw2=kTRUE, all new histograms will automatically activate ...
Definition: TH1.cxx:5969
virtual Double_t GetBinWidth(Int_t bin) const
Return bin width for 1D histogram.
Definition: TH1.cxx:8230
Double_t x[n]
Definition: legend1.C:17
This is the base class for the ROOT Random number generators.
Definition: TRandom.h:31
virtual void SaveAs(const char *filename="", Option_t *option="") const
Save Pad contents in a file in one of various formats.
Definition: TPad.cxx:5037
virtual void SetMarkerColor(Color_t mcolor=1)
Set the marker color.
Definition: TAttMarker.h:43
virtual void SetFCN(void *fcn) R__DEPRECATED(6
To set the address of the minimization objective function.
virtual void SetBinError(Int_t bin, Double_t error)
See convention for numbering bins in TH1::GetBin.
Definition: TH1.cxx:8266
virtual void GetKnot(Int_t i, Double_t &x, Double_t &y) const =0
virtual Double_t GetBinContent(Int_t bin) const
Return content of bin number bin.
Definition: TH2.h:90
virtual Double_t Rndm()
Machine independent random number generator.
Definition: TRandom.cxx:512
virtual void SetLineColor(Color_t lcolor)
Set the line color.
Definition: TAttLine.h:46
double gamma(double x)
virtual Double_t GetBinCenter(Int_t bin) const
Return bin center for 1D histogram.
Definition: TH1.cxx:8208
Service class for 2-Dim histogram classes.
Definition: TH2.h:36
const Int_t kInfo
Definition: TError.h:39
virtual void Draw(Option_t *option="")
Draw this histogram with options.
Definition: TH1.cxx:2853
virtual void SetBinContent(Int_t bin, Double_t content)
Set bin content see convention for numbering bins in TH1::GetBin In case the bin number is greater th...
Definition: TH1.cxx:8280
void SetOptFit(Int_t fit=1)
The type of information about fit parameters printed in the histogram statistics box can be selected ...
Definition: TStyle.cxx:1209
static void RejectPoint(Bool_t reject=kTRUE)
Static function to set the global flag to reject points the fgRejectPoint global flag is tested by al...
Definition: TF1.cxx:3402
tomato 1-D histogram with a double per channel (see TH1 documentation)}
Definition: TH1.h:618
Double_t Pi()
Definition: TMath.h:44
The Canvas class.
Definition: TCanvas.h:41
double f(double x)
double Double_t
Definition: RtypesCore.h:55
virtual void Draw(Option_t *option="")
Draw this function with its current attributes.
Definition: TSpline.cxx:100
Double_t y[n]
Definition: legend1.C:17
The TH1 histogram class.
Definition: TH1.h:80
THist< 2, double, THistStatContent, THistStatUncertainty > TH2D
Definition: THist.hxx:307
virtual void InitArgs(const Double_t *x, const Double_t *params)
Initialize parameters addresses.
Definition: TF1.cxx:2229
Abstract Base Class for Fitting.
static TVirtualFitter * Fitter(TObject *obj, Int_t maxpar=25)
Static function returning a pointer to the current fitter.
virtual void Divide(Int_t nx=1, Int_t ny=1, Float_t xmargin=0.01, Float_t ymargin=0.01, Int_t color=0)
Automatic pad generation by division.
Definition: TPad.cxx:1089
static Bool_t RejectedPoint()
See TF1::RejectPoint above.
Definition: TF1.cxx:3411
1-Dim function class
Definition: TF1.h:149
virtual TObject * GetObjectFit() const
A Graph is a graphics object made of two arrays X and Y with npoints each.
Definition: TGraph.h:53
TF1 * f1
Definition: legend1.C:11
THist< 1, double, THistStatContent, THistStatUncertainty > TH1D
Definition: THist.hxx:301
Definition: Rtypes.h:61
virtual void SetParameter(Int_t param, Double_t value)
Definition: TF1.h:431
virtual void SetBinContent(Int_t bin, Double_t content)
Set bin content.
Definition: TH2.cxx:2475
virtual Int_t Poisson(Double_t mean)
Generates a random integer N according to a Poisson law.
Definition: TRandom.cxx:362
Double_t Sqrt(Double_t x)
Definition: TMath.h:464
static void output(int code)
Definition: gifencode.c:226
const Bool_t kTRUE
Definition: Rtypes.h:91
Int_t Fill(Double_t)
Invalid Fill method.
Definition: TH2.cxx:292
virtual Double_t EvalPar(const Double_t *x, const Double_t *params=0)
Evaluate function with given coordinates and parameters.
Definition: TF1.cxx:1220
virtual TFitResultPtr Fit(const char *formula, Option_t *option="", Option_t *goption="", Double_t xmin=0, Double_t xmax=0)
Fit histogram with function fname.
Definition: TH1.cxx:3565
virtual Int_t GetNpar() const
Definition: TF1.h:349
Double_t Tan(Double_t)
Definition: TMath.h:427
tomato 2-D histogram with a double per channel (see TH1 documentation)}
Definition: TH2.h:296