Pluto v6.3.0
Loading...
Searching...
No Matches
fermi_rescattering.C
Go to the documentation of this file.
1//TITLE Two-step process (phi in medium -> K K -> K K_scatter)
2
3double f_my_function(double *x, double * par)
4{
5 if (x[0] > 0.8) return 1;
6 return 0;
7}
8
10
11 gErrorIgnoreLevel=kWarning;
12
13 makeDistributionManager()->Exec("nucleus_fermi:proton");
14 Double_t fragment_mass = makeStaticData()->GetParticleMass("6Li") -
16 makeStaticData()->AddParticle(999, "fragment",fragment_mass);
17
18 //Now we have to do some preparation:
19 PFermiDistributions* model =
20 new PFermiDistributions("6Li_fermi@6Li/fermi","Fermi momentum of 6Li",-1);
21 model->SetRange(0,2.);
23
24 //This is the real reaction:
25 PParticle * beam =new PParticle("p",3.5);
26 PParticle * target=new PParticle("7Li");
28
29 //Quasi-free sub-reaction:
30 PParticle * beam2 =new PParticle("p");
31 PParticle * target2=new PParticle("n");
33
34 PParticle * spectator=new PParticle("6Li");
35 PParticle * cc1[]={s,s2,spectator};
36
37 //The outgoing products of the p-n scattering:
38 PParticle * p1 =new PParticle("p");
39 PParticle * p2 =new PParticle("n");
40 PParticle * phi =new PParticle("phi");
41
42 PParticle * cc2[]={s2,p1,p2,phi};
43
44 //decay of the phi:
45 PParticle * kp =new PParticle("K+");
46 PParticle * km =new PParticle("K-");
47
48 PParticle * cc3[]={phi,kp,km};
49
50 //scatter the K+ again, this is like treating it as a "beam particle"
51 //the "real reaction" in this case is K+ + 6Li
52 //Use the "Scatter" method to keep the original pointers
53 PParticle * rescatter= new PParticle("dummy");
54 rescatter->Scatter(kp,spectator);
55
56 //Next quasi-free sub-reaction:
57 PParticle * beam3 =new PParticle("K+");
58 PParticle * target3=new PParticle("n");
59 PParticle * s3= new PParticle(*beam3+*target3);
60
61 PParticle * spectator3=new PParticle("fragment");
62 PParticle * cc4[]={rescatter,s3,spectator3};
63
64 //The outgoing products of the final re-scattering:
65 PParticle * final_kp =new PParticle("K+");
66 PParticle * final_n =new PParticle("n");
67
68 PParticle * cc5[]={s3,final_kp,final_n};
69
70 //after this point our new particles and decays are pre-defined
71
73 new PFermiMomentumGA("K+n_in_6Li@K+ + 6Li_to_K+ + n_fragment",
74 "Quasi-free particle production",-1);
75 // Now add all particles
76 // Define spectators and final decay products (the granddaughters)
77 pmodel->Add("q,parent");
78 pmodel->Add("K+,grandparent,beam");
79 pmodel->Add("6Li,grandparent,target");
80 pmodel->Add("fragment,daughter,spectator");
81 pmodel->Add("q,daughter,composite");
82 pmodel->Add("n,granddaughter,participant");
83 pmodel->Add("K+,granddaughter,p2");
85
86
87 //Add a dummy angular distribution
88 //In this case it is just a step function, it is without any physical meaning!
89 PAngularDistribution *ang = new PAngularDistribution("my_angle","My angular dist");
90 ang->Add("q,parent,reference");
91 ang->Add("n,daughter");
92 ang->Add("K+,daughter,primary");
93 ang->Add("n,grandparent,base_reference");
94 TF1 *angles2=new TF1("angles2",f_my_function,-1,1,1);
95 ang->SetAngleFunction(angles2);
97
98
99 PChannel *c1=new PChannel(cc1,2);
100 PChannel *c2=new PChannel(cc2,3);
101 PChannel *c3=new PChannel(cc3,2);
102 PChannel *c4=new PChannel(cc4,2);
103 PChannel *c5=new PChannel(cc5,2);
104
105 PChannel *cc[]={c1,c2,c3,c4,c5};
106
107
108 //Some online histograms: compare the undistorted phi shape with
109 //the reconstructed one
110 PReaction *r=new PReaction(cc,"fermi_rescattering",5);
111 TH1F * histo1 = new TH1F ("histo1","phi mass",100,0.9,1.2);
112 r->Do(histo1,"_x = [phi]->M()");
113 TH1F * histo2 = new TH1F ("histo2","phi mass (scatter)",100,0.9,1.2);
114 r->Do(histo2,"_x = ([K+,2] + [K-])->M()");
115
116 r->Print();
117
118
119 r->loop(10000);
120
121 histo1->Draw();
122 histo2->Draw("same");
123
124}
PDistributionManager * makeDistributionManager()
PStaticData * makeStaticData()
PParticle * par[11]
Bool_t Exec(const char *command)
int Add(PDistribution *dist)
Int_t Add(const Char_t *opt)
void Scatter(PParticle *p1, PParticle *p2)
double GetParticleMass(const int &id)
int AddParticle(int pid, const char *name, double mass)
PParticle p2("p")
PReaction r(c,"eta_dalitz", 3, 0, 0, 0, 1)
PParticle p1("p", beam_energy)
PParticle * s2[]
PChannel * c4
PParticle * s3[]
PChannel * c2
PChannel * cc[]
PChannel * c5
PChannel * c3
PParticle * s
Definition dp_mult.C:25
PParticle * cc2[]
Definition fermi_dd.C:31
PFermiMomentumDD * pmodel
Definition fermi_dd.C:38
PParticle * cc1[]
Definition fermi_dd.C:30
PParticle * target2
Definition fermi_dd.C:21
PParticle * target
Definition fermi_dd.C:9
PParticle * beam2
Definition fermi_dd.C:20
double f_my_function(double *x, double *par)
fermi_rescattering()
PParticle * kp
PParticle * km
PParticle * beam
TH1F * histo1
TH2F * histo2