Pluto v6.3.0
Loading...
Searching...
No Matches
proton_Li7_macro.C
Go to the documentation of this file.
1//TITLE Example for a p + 7Li reaction
2
3{
4
5 makeDistributionManager()->Exec("nucleus_fermi:proton");
6
7 PReaction my_reaction("3.5","p","7Li","p (n) phi [K+ K-] (6Li)","delme");
8 //both participant and spectator must be in brackets "( )"
9 //the last particle is the spectator
10
11 my_reaction.Print();
12
13 //check momentum distribution of K+
14 TH1F * histo1 = new TH1F ("histo1","K+ momentum",100,0,3);
15 my_reaction.Do(histo1,"_x = [K+]->P()");
16
17 //mass of phi
18 TH1F * histo2 = new TH1F ("histo2","phi mass",100,0.9,1.2);
19 my_reaction.Do(histo2,"_x = [phi]->M()");
20
21 my_reaction.Loop(1000);
22
23 histo2->Draw();
24
25
26 //same at much lower energy
27 //slightly below threshold, this is really time consuming
28 PReaction my_reaction2("2.5","p","7Li","p (n) phi [K+ K-] (6Li)","delme");
29 TH1F * histo2a = new TH1F ("histo2a","phi mass",100,0.9,1.2);
30 my_reaction2.Do(histo2a,"_x = [phi]->M()");
31 my_reaction2.Loop(1000);
32 histo2a->Draw("same");
33
34}
PDistributionManager * makeDistributionManager()
Bool_t Exec(const char *command)
PReaction my_reaction2("2.5","p","7Li","p (n) phi [K+ K-] (6Li)","delme")
TH1F * histo1
PReaction my_reaction("3.5","p","7Li","p (n) phi [K+ K-] (6Li)","delme")
TH1F * histo2a
TH2F * histo2