Example for a p + 7Li reaction


{

    makeDistributionManager()->Exec("nucleus_fermi:proton");

    PReaction my_reaction("3.5","p","7Li","p (n) phi [K+ K-] (6Li)","delme");
    //both participant and spectator must be in brackets "( )"
    //the last particle is the spectator

    my_reaction.Print();

    //check momentum distribution of K+
    TH1F * histo1 = new TH1F ("histo1","K+ momentum",100,0,3);
    my_reaction.Do(histo1,"_x = [K+]->P()");

    //mass of phi
    TH1F * histo2 = new TH1F ("histo2","phi mass",100,0.9,1.2);
    my_reaction.Do(histo2,"_x = [phi]->M()");

    my_reaction.Loop(1000);

    histo2->Draw();


    //same at much lower energy
    //slightly below threshold, this is really time consuming
    PReaction my_reaction2("2.5","p","7Li","p (n) phi [K+ K-] (6Li)","delme");
    TH1F * histo2a = new TH1F ("histo2a","phi mass",100,0.9,1.2);
    my_reaction2.Do(histo2a,"_x = [phi]->M()");
    my_reaction2.Loop(1000);
    histo2a->Draw("same");

}
 plugin_proton_Li7_macro.C:1
 plugin_proton_Li7_macro.C:2
 plugin_proton_Li7_macro.C:3
 plugin_proton_Li7_macro.C:4
 plugin_proton_Li7_macro.C:5
 plugin_proton_Li7_macro.C:6
 plugin_proton_Li7_macro.C:7
 plugin_proton_Li7_macro.C:8
 plugin_proton_Li7_macro.C:9
 plugin_proton_Li7_macro.C:10
 plugin_proton_Li7_macro.C:11
 plugin_proton_Li7_macro.C:12
 plugin_proton_Li7_macro.C:13
 plugin_proton_Li7_macro.C:14
 plugin_proton_Li7_macro.C:15
 plugin_proton_Li7_macro.C:16
 plugin_proton_Li7_macro.C:17
 plugin_proton_Li7_macro.C:18
 plugin_proton_Li7_macro.C:19
 plugin_proton_Li7_macro.C:20
 plugin_proton_Li7_macro.C:21
 plugin_proton_Li7_macro.C:22
 plugin_proton_Li7_macro.C:23
 plugin_proton_Li7_macro.C:24
 plugin_proton_Li7_macro.C:25
 plugin_proton_Li7_macro.C:26
 plugin_proton_Li7_macro.C:27
 plugin_proton_Li7_macro.C:28
 plugin_proton_Li7_macro.C:29
 plugin_proton_Li7_macro.C:30
 plugin_proton_Li7_macro.C:31
 plugin_proton_Li7_macro.C:32
 plugin_proton_Li7_macro.C:33
 plugin_proton_Li7_macro.C:34