40 cout<<
"--- kanwa started ---"<<endl;
41 TH2D *hst_xy =
new TH2D(
"hst_xy" ,
"x-y plot", 50,0,1.0, 50,0,1.0);
54 TCanvas *cKanwa =
new TCanvas(
"cKanwa",
"Canvas for plotting",600,600);
58 for(
long loop=0; loop<100000; loop++){
63 if(loop<10) cout<<
"(x,y) = ( "<<
x <<
", "<<
y <<
" )"<<endl;
68 hst_xy->
Draw(
"lego2");
73 hst_xy->
Draw(
"lego2");
78 cout <<
" MCresult= " << MCresult <<
" +- " << MCerror <<endl;
79 cout<<
"--- kanwa ended ---"<<endl;
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)
virtual void Draw(Option_t *option="")
Draw this histogram with options.
2-D histogram with a double per channel (see TH1 documentation)}
Int_t Fill(Double_t)
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.
double Dist(void *xp, void *yp)
VecExpr< UnaryOp< Sqr< T >, VecExpr< A, T, D >, T >, T, D > sqr(const VecExpr< A, T, D > &rhs)