Pluto
v6.3.0
Loading...
Searching...
No Matches
user_genbod.C
Go to the documentation of this file.
1
//TITLE Add a user-defined mass distribution to the genbod decay
2
3
{
4
5
//Add a bunch of dummy particles
6
makeStaticData
()->AddParticle(-1,
"A"
, 1.2);
7
makeStaticData
()->AddParticle(-1,
"a"
, 0.1);
8
makeStaticData
()->AddParticle(-1,
"b"
, 0.2);
9
makeStaticData
()->AddParticle(-1,
"c"
, 0.3);
10
11
12
makeStaticData
()->AddDecay(-1,
"A -> a b c "
,
"A"
,
"a,b,c"
, 1.);
13
14
PGenBod
*
d
=
new
PGenBod
(
"my_genbod@A_genbod_a_b_c/genbod"
,
"User Genbod"
, -1);
15
d
->Add(
"A, parent"
);
16
d
->Add(
"a, daughter, corr1"
);
17
d
->Add(
"b, daughter, corr2"
);
// --> these 2 particles are formed to have the mass distribution as below
18
d
->Add(
"c, daughter"
);
19
makeDistributionManager
()->Add(
d
);
20
21
PFunction
*
f
=
new
PFunction
(
"my_corr@A_genbod_a_b_c/correlation"
,
22
"User mass correlation"
, -1);
23
24
//Use this one:
25
f
->SetFunction(
new
TF1(
"f"
,
"x*x"
,
makeStaticData
()->GetParticleMass(
"a"
) +
makeStaticData
()->GetParticleMass(
"b"
),
makeStaticData
()->GetParticleMass(
"A"
)));
26
//or this one:
27
//f->AddEquation("_f = _x * _x");
28
f
->SetRange(
makeStaticData
()->GetParticleMass(
"a"
) +
29
makeStaticData
()->GetParticleMass(
"b"
),
30
makeStaticData
()->GetParticleMass(
"A"
));
31
makeDistributionManager
()->Add(
f
);
32
33
TH1F *
hf1
=
new
TH1F(
"hf1"
,
""
, 100, 0.1, 1.2);
34
PReaction
my_reaction
(
"_T1=3.5"
,
"p"
,
"p"
,
"p A [a b c]"
);
35
my_reaction
.Print();
36
my_reaction
.Do(
hf1
,
"_x = ([a] + [b])->M(); "
);
37
//my_reaction.Do("[a]->Print();");
38
my_reaction
.Loop(100000);
39
40
hf1
->Draw(
""
);
41
42
}
hf1
TH1F * hf1
Definition
anaAngularDistribution.C:14
d
PParticle * d
Definition
ana_eta_generator.C:20
f
TFile * f
Definition
analyze_g12C.C:8
PFunction
Definition
PFunction.h:17
PGenBod
Definition
PGenBod.h:17
PReaction
Definition
PReaction.h:37
my_reaction
PReaction my_reaction("3.5","p","7Li","p (n) phi [K+ K-] (6Li)","delme")
my_reaction
PReaction my_reaction("_T1=3.5", "p", "p", "p A [a b c]")
Definition
batch_read_ntuple.C:13
makeDistributionManager
makeDistributionManager() -> Add(d)
makeStaticData
makeStaticData() -> AddParticle(-1,"a", 0.1)
pluto6
macros
user_genbod.C
Generated by
1.14.0