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:
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
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
PReaction r(c,"eta_dalitz", 3, 0, 0, 0, 1)
makeDistributionManager() -> GetDistribution("eta_dalitz") ->EnableWeighting()
TF1 * flat
PInclusiveModel * dilepton_generator