Pluto v6.3.0
Loading...
Searching...
No Matches
pA.C
Go to the documentation of this file.
1#include "PFermiNucleus.C"
2
3void pA(void) {
4
5 //Uses PFermiNucleus.C
6 //This class is here only for didactical reasons. It has no real physics content
7 //See nucleus_fermi plugin for a real implementation
8
9 makeStaticData()->AddParticle(90, "A", 20.);
10 makeStaticData()->AddParticle(91, "A'", 19.);
11
12 makeStaticData()->AddParticle(90014, "p + A", 21.);
13 if (!makeStaticData()->IsParticleValid("p + p")) {
14 makeStaticData()->AddParticle(14014, "p + p", 2.);
15 }
16
17 makeStaticData()->AddDecay(-1, "p + A -> (p + p) + A' (quasi-free)",
18 "p + A","p + p,A'", 1.0);
19
21 new PFermiNucleus("n_fermi@p + A_to_p + p_A'",
22 "Quasi-free particle production", -1);
23
24 pmodel->Add("q", "parent");
25 pmodel->Add("p", "grandparent", "beam");
26 pmodel->Add("A", "grandparent", "target");
27 pmodel->Add("A'", "daughter", "spectator");
28 pmodel->Add("q", "daughter", "composite");
29 pmodel->Add("p", "granddaughter", "participant");
30 pmodel->Add("p", "granddaughter", "p2");
31
33 makeDistributionManager()->Print("user");//The "Print()" statement is optional
34
35 makeDistributionManager()->Disable("pp_elastic");
36
37 PParticle p("p", 2.2); //projectil
38 PParticle A("A"); //target
39 PParticle A1("A'"); //spectator fragment
40
41 PParticle pA = p + A;
42
43 PParticle p1("p");
44 PParticle p2("p");
45 PParticle pp = p1 + p2; //quasi-elastic scattering
46
47 PParticle p3("p");
48 PParticle p4("p"); //outgoing products
49
50
51 PParticle *s0[] = {&pA, &A1, &pp};
52 PParticle *s1[] = {&pp, &p3, &p4};
53
54 PChannel *c0 = new PChannel(s0, 2);
55 PChannel *c1 = new PChannel(s1, 2);
56 PChannel *cc[] = {c0, c1};
57
58 PReaction my_reaction(cc, "pA", 2, 1);
59
60 makeDistributionManager()->Print("user");//The "Print()" statement is optional
61
62 //Create my histograms:
63 TH1F *histo1 = new TH1F ("histo1", "pp mass", 100, 2.5, 4.0);
64 TH1F *histo2 = new TH1F ("histo2", "cos theta", 100, -1., 1.);
65 histo1->Sumw2();
66 //Create the container of the histogram list
67 PProjector *m1 = new PProjector();
68 //Dilepton mass
69 m1->AddHistogram(histo1, "_x=[p + p]->M()");
70 //cos theta in pA rest frame
71 m1->AddHistogram(histo2, "p1=[p,1]; p1->Boost([p + A]); _x=cos(p1->Theta())");
72
73 my_reaction.AddBulk(m1);
74
75 my_reaction.Print();
76
77 my_reaction.Loop(10000);
78
79 TCanvas *can1 = new TCanvas();
80 histo1->Draw();
81
82 TCanvas *can2 = new TCanvas();
83 histo2->Draw();
84}
PDistributionManager * makeDistributionManager()
PStaticData * makeStaticData()
new TCanvas()
void Print(const Option_t *delme="root") const
void Disable(const Char_t *id)
int Add(PDistribution *dist)
int AddDecay(int didx, const char *name, const char *parent, const char *daughters, double br)
int AddParticle(int pid, const char *name, double mass)
PParticle p4("p")
PParticle p3("p")
PParticle p2("p")
PParticle p1("p", beam_energy)
PParticle * s1[]
PChannel * cc[]
PProjector * m1
PParticle * p
Definition dp_mult.C:24
PFermiMomentumDD * pmodel
Definition fermi_dd.C:38
void pA(void)
Definition pA.C:3
TH1F * histo1
PReaction my_reaction("3.5","p","7Li","p (n) phi [K+ K-] (6Li)","delme")
TH2F * histo2