Pluto
v6.3.0
Loading...
Searching...
No Matches
use_eta_generator.C
Go to the documentation of this file.
1
//TITLE <b>Usage of weights/generators:</B> another way of eta Dalitz simulation
2
3
{
4
gROOT->Reset();
5
6
//Disable old eta Dalitz model and enable it for weighting:
7
makeDistributionManager
()->GetDistribution(
"eta_dalitz"
)->EnableWeighting();
8
9
//TF1 object representing the di-lepton statistics:
10
TF1 *
flat
=
new
TF1(
"flat"
,
"1"
, 0, 1);
11
12
//The "PInclusiveModel" can be used as a generator:
13
PInclusiveModel
*
dilepton_generator
=
14
new
PInclusiveModel
(
"flat@eta_to_g_dilepton/generator"
,
"Dilepton generator"
, -1);
15
16
//The distribution template:
17
dilepton_generator
->Add(
"eta,parent"
);
18
dilepton_generator
->Add(
"g,daughter"
);
19
dilepton_generator
->Add(
"dilepton,daughter,primary"
);
20
dilepton_generator
->SetSampleFunction(
flat
);
21
22
//Enable distribution as a generator
23
dilepton_generator
->EnableGenerator();
24
25
makeDistributionManager
()->Add(
dilepton_generator
);
26
27
PReaction
*
r
=
new
PReaction
(3.13,
"p"
,
"p"
,
"p p eta [dilepton [e+ e-] g]"
,
28
"eta_generator"
, 1, 0, 0, 0);
29
30
r
->Print();
31
32
//100 dummy events to have a good starting point for the normalization:
33
r
->Preheating(100);
34
r
->loop(10000);
35
36
}
37
PInclusiveModel
Definition
PInclusiveModel.h:14
PReaction
Definition
PReaction.h:37
r
PReaction r(c,"eta_dalitz", 3, 0, 0, 0, 1)
makeDistributionManager
makeDistributionManager() -> GetDistribution("eta_dalitz") ->EnableWeighting()
flat
TF1 * flat
Definition
use_eta_generator.C:10
dilepton_generator
PInclusiveModel * dilepton_generator
Definition
use_eta_generator.C:13
pluto6
macros
use_eta_generator.C
Generated by
1.14.0