}
Dist +=exp(-(sqr(
x-1./3) +sqr(
y-1./3))/GamSq)/GamSq/
TMath::Pi();
Dist +=exp(-(sqr(
x-2./3) +sqr(
y-2./3))/GamSq)/GamSq/
TMath::Pi();
return 0.5*Dist;
}
cout<<"--- kanwa started ---"<<endl;
TH2D *hst_xy =
new TH2D(
"hst_xy" ,
"x-y plot", 50,0,1.0, 50,0,1.0);
TCanvas *cKanwa =
new TCanvas(
"cKanwa",
"Canvas for plotting",600,600);
int nshow=5000;
for(long loop=0; loop<100000; loop++){
if(loop<10) cout<<
"(x,y) = ( "<<
x <<
", "<<
y <<
" )"<<endl;
if(loop == nshow){
nshow += 5000;
}
}
cout << " MCresult= " << MCresult << " +- " << MCerror <<endl;
cout<<"--- kanwa ended ---"<<endl;
return 0;
}
TVirtualPad * cd(Int_t subpadnumber=0) override
Set current canvas & pad.
void Update() override
Update canvas pad buffers.
TFoam is the main class of the multi-dimensional general purpose Monte Carlo event generator (integra...
virtual void GetMCvect(Double_t *)
User may get generated MC point/vector with help of this method.
virtual void MakeEvent()
User method.
virtual void Initialize()
Basic initialization of FOAM invoked by the user.
virtual void GetIntegMC(Double_t &, Double_t &)
User method.
virtual void SetnCells(Long_t nCells)
virtual void SetRhoInt(Double_t(*fun)(Int_t, Double_t *))
User may use this method to set the distribution object as a global function pointer (and not as an i...
virtual void SetPseRan(TRandom *PseRan)
virtual void SetkDim(Int_t kDim)
void Draw(Option_t *option="") override
Draw this histogram with options.
2-D histogram with a double per channel (see TH1 documentation)
Int_t Fill(Double_t) override
Invalid Fill method.
Random number generator class based on M.
This is the base class for the ROOT Random number generators.
virtual void SetSeed(ULong_t seed=0)
Set the random generator seed.