18 #define PI 3.14159265358979323846264338328
36 for (
int j = 0; j <
m; ++j) {
53 for (
int ievt = 0; ievt <
n; ievt+=1000 ) {
55 for (
int i=0; i < 1000; i++) {
58 if ( ( x*x + y*y ) <= 1.0 ) n1++;
62 double delta = piEstimate-
PI;
67 std::cout << std::endl;
68 std::cout <<
"Random: " <<
typeid(
r).
name()
70 std::cout <<
"Time/call: " << w.
CpuTime()/(2*
n)*1.0E9 << std::endl;
87 TH1D * h0 =
new TH1D(
"h0",
"TRandom delta",100,-dy,dy);
88 TH1D *
h1 =
new TH1D(
"h1",
"TRandom1 delta",100,-dy,dy);
89 TH1D * h2 =
new TH1D(
"h2",
"TRandom2 delta",100,-dy,dy);
90 TH1D * h3 =
new TH1D(
"h3",
"TRandom3 delta",100,-dy,dy);
93 std::cout <<
"**********************************************************" << std::endl;
94 std::cout <<
" Generate " << int(n) <<
" for " << nloop <<
" times " << std::endl;
95 std::cout <<
"**********************************************************" << std::endl;
96 std::cout <<
"\tExpected Sigma = " << sigma << std::endl;
115 else { del = -999; err = 1; }
118 sprintf(text,
"Spread %8.4f",del/err);
134 else { del = -999; err = 1; }
136 sprintf(text,
"Spread %8.4f",del/err);
150 else { del = -999; err = 1; }
152 sprintf(text,
"Spread %8.4f",del/err);
166 else { del = -999; err = 1; }
168 sprintf(text,
"Spread %8.4f",del/err);
virtual Int_t Fill(Double_t x)
Increment bin with abscissa X by 1.
Random number generator class based on M.
Double_t RealTime()
Stop the stopwatch (if it is running) and return the realtime (in seconds) passed between the start a...
void Start(Bool_t reset=kTRUE)
Start the stopwatch.
Random number generator class based on the maximally quidistributed combined Tausworthe generator by ...
R__EXTERN TStyle * gStyle
TVirtualPad * cd(Int_t subpadnumber=0)
Set current canvas & pad.
Double_t CpuTime()
Stop the stopwatch (if it is running) and return the cputime (in seconds) passed between the start an...
virtual Double_t GetParError(Int_t ipar) const
Return value of parameter number ipar.
void generate(R &r, TH1D *h)
void Stop()
Stop the stopwatch.
The Ranlux Random number generator class.
This is the base class for the ROOT Random number generators.
unsigned int r3[N_CITIES]
virtual TObject * FindObject(const char *name) const
search object named name in the list of functions
A Pave (see TPave) with a text centered in the Pave.
virtual void Draw(Option_t *option="")
Draw this histogram with options.
unsigned int r1[N_CITIES]
void SetOptFit(Int_t fit=1)
The type of information about fit parameters printed in the histogram statistics box can be selected ...
1-D histogram with a double per channel (see TH1 documentation)}
virtual void Draw(Option_t *option="")
Draw this pavelabel with its current attributes.
virtual Double_t GetParameter(Int_t ipar) const
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.
void SetOptLogy(Int_t logy=1)
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.
unsigned int r2[N_CITIES]