Pluto v6.3.0
Loading...
Searching...
No Matches
beamsmearing_example.C
Go to the documentation of this file.
1//TITLE <b>Usage of Pluto build-in templates:</b> beam smearing
2
3{
4 //This macro demonstrates how the beam smearing model
5 //of Pluto can be used.
6 //
7 //In addition, one can play around what happens to the
8 //reconstructed eta mass if the unkown beam momentum is used
9
10
11 PBeamSmearing *smear = new PBeamSmearing("beam_smear", "Beam smearing");
12 smear->SetReaction("p + p");
13
14 //Now one has to set the beam parameters
15 //There are 3 options:
16 // * standard set (from the old Pluto)
17 // only angular smearing
18 // * A distribution function for angular
19 // smearing (the rho in polar coordinates)
20 // * A momentum smearing function
21 // (stretching, e.g. ==1 means no change)
22 //
23
24 //Set "standard" parameters:
25 //smear->SetBeamParameters(1., 0. , 0.5);
26 //Parameters
27 // 1.) Tilt theta in degree
28 // 2.) Tilt phi in degree
29 // 3.) Sigma (of gaus) in degree
30
31 //An angular spot
32 //Range of theta in unites of degree
33 //N.B. the radial distance probability is not included, so
34 //if you want to have a flat distribution
35 //one has to take this into account by multiplying with x
36 //This produces a flat beam spot around around +/- 1deg
37 smear->SetAngularSmearing(new TF1("delme","1 *x", 0, 1.));
38
39 //momentum smearing +/- 10%
40 //smear->SetMomentumSmearing(new TF1("delme", "1", 0.9, 1.1));
41
43
44 PReaction my_reaction("2.2", "p", "p", "p p eta [dilepton [e+ e-] g]", "eta_dalitz", 1, 0, 0, 0);
45
46 //This histogram shows the beam profile:
47 TH2F *histo1 = new TH2F ("histo1", "Px vs. Py of beam", 100, -.1, .1, 100, -.1, .1);
48 my_reaction.Do(histo1, "_x = [p + p]->Px(); _y = [p + p]->Py();");
49
50 //This histogram shows how a wrong assumption about the beam
51 //momentum can influence the reconstruction in an exclusive
52 //reaction
53 TH1F *histo2 = new TH1F ("histo2", "Reconstructed eta mass", 100, 0.3, 0.7);
54 my_reaction.Do("wrong_cm = P3E(0.000000,0.000000,2.994728,4.076545);");
55 my_reaction.Do(histo2, "_x = (wrong_cm - ([p,1] + [p,2]))->M();");
56
57 my_reaction.Print(); //The "Print()" statement is optional
58 my_reaction.Loop(10000);
59
60 histo1->Draw();
61
62 new TCanvas();
63
64 histo2->Draw();
65
66}
PReaction my_reaction("2.2", "p", "p", "p p eta [dilepton [e+ e-] g]", "eta_dalitz", 1, 0, 0, 0)
makeDistributionManager() -> Add(smear)
new TCanvas()
void SetAngularSmearing(TF1 *f)
void SetReaction(const char *reaction)
TH1F * histo1
PReaction my_reaction("3.5","p","7Li","p (n) phi [K+ K-] (6Li)","delme")
TH2F * histo2