Pluto
v6.3.0
Loading...
Searching...
No Matches
sampleB.C
Go to the documentation of this file.
1
{
2
// test thermal b sampling
3
// R.H. 13/4/2000
4
//
5
TH1F *
h1
=
new
TH1F(
"Npart"
,
"Npart"
, 100, 0., 100.);
6
TH1F *
h2
=
new
TH1F(
"b"
,
"Impact Parameter"
, 100, 0., 20.);
7
PFireball
source
(
"pi0"
, 0.1, 0);
8
source
.setRandomB(200., 200., 0.03);
9
for
(Int_t i=0; i<100000; i++) {
10
float
b =
source
.sampleB();
11
Int_t
n
=
source
.sampleNProd(b);
12
h1
->Fill(
n
);
13
h2
->Fill(b);
14
}
15
h1
->Scale(1./
h1
->Integral());
// normalize to 1
16
for
(Int_t j=0; j<30; j++)
17
printf(
"%d: %f\n"
, j,
h1
->GetBinContent(j+1));
18
}
h1
TH1F * h1
Definition
analyze_g12C.C:101
PFireball
Definition
PFireball.h:21
n
Int_t n
Definition
etap+omeg.C:21
h2
TH1F * h2
Definition
rho_mass_shape.C:50
source
PFireball source("pi0", 0.1, 0)
pluto6
macros
sampleB.C
Generated by
1.14.0