Pluto v6.3.0
Loading...
Searching...
No Matches
piA.C
Go to the documentation of this file.
1//TITLE <PFermiNucleus, PBeamSmearing> Quasi-free pi+A scattering, including beam smearing
2
3#include "PFermiNucleus.C"
4#include "PCopyBeam.C"
5
6void piA(void) {
7 //Uses PFermiNucleus.C & PCopyBeam
8 //This class is here only for didactical reasons. It has no real physics content
9
10 makeStaticData()->AddParticle(90, "A", 20.);
11 makeStaticData()->AddParticle(91, "A'", 19.);
12
13 makeStaticData()->AddParticle(90008, "pi+ + A", 21.);
14 if (!makeStaticData()->IsParticleValid("pi+ + p")) {
15 makeStaticData()->AddParticle(14008, "pi+ + p", 2.);
16 }
17
18 makeStaticData()->AddDecay(-1, "pi+ + A -> (pi+ + p) + A' (quasi-free)",
19 "pi+ + A","pi+ + p,A'", 1.0);
20
21
23 "nucleon_fermi@pi+ + A_to_pi+ + p_A'",
24 "Quasi-free particle production", -1);
25
26 pmodel->Add("q", "parent");
27 pmodel->Add("pi+", "grandparent", "beam");
28 pmodel->Add("A", "grandparent", "target");
29 pmodel->Add("A'", "daughter", "spectator");
30 pmodel->Add("q", "daughter", "composite");
31 pmodel->Add("p", "granddaughter", "participant");
32 pmodel->Add("pi+", "granddaughter", "p2");
33
36
37 PParticle pi("pi+", 2.2); //projectil
38 PParticle A("A"); //target
39 PParticle A1("A'"); //spectator fragment
40
41 PParticle piA = pi + A;
42
43 PParticle pi1("pi+");
44 PParticle p2("p");
45 PParticle pip = pi1 + p2; //quasi-elastic scattering
46
47 PParticle p3("p");
48 PParticle pi4("pi+"); //outgoing products
49
50
51 PParticle *s0[] = {&piA, &A1, &pip};
52 PParticle *s1[] = {&pip, &p3, &pi4};
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, "piA", 2, 1);
59
60 //Use PCopyBeam macro to copy the original beam + target into the particle array....
61 PCopyBeam *copy = new PCopyBeam();
62 my_reaction.AddBulk(copy);
63 //...could be useful sometimes
64 //...this is dangerous if you use GEANT!
65
66 makeDistributionManager()->Print("user");//The "Print()" statement is optional
67
68 //Create my histograms:
69 TH1F *histo2 = new TH1F ("histo2", "cos theta", 100, -1., 1.);
70
71 //Create the container of the histogram list
72 PProjector *m1 = new PProjector();
73 //cos theta in piA rest frame
74 //m1->AddHistogram(histo2,"p1=[p,1]; p1->Boost([pi+ + A]); _x=cos(p1->Theta())");
75 m1->AddHistogram(histo2, "p1=[pi+ + p,1]; p1->Boost([pi+ + A]);_x=cos(p1->Theta())");
76 m1->Print();
77
78 my_reaction.AddBulk(m1);
79
80 my_reaction.Print();
81
82 my_reaction.Loop(1000);
83
84 histo2->Draw();
85}
PDistributionManager * makeDistributionManager()
PStaticData * makeStaticData()
void Print(const Option_t *delme="root") const
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 p3("p")
PParticle p2("p")
PParticle * s1[]
PChannel * cc[]
PProjector * m1
PFermiMomentumDD * pmodel
Definition fermi_dd.C:38
void piA(void)
Definition piA.C:6
PReaction my_reaction("3.5","p","7Li","p (n) phi [K+ K-] (6Li)","delme")
TH2F * histo2
PParticle * pi4
PParticle * pi1
PParticle * pi