Pluto v6.3.0
Loading...
Searching...
No Matches
dummy_macro.C
Go to the documentation of this file.
1{
2
3 //Init the reaction for c.m. sampling:
4 PBeamLineSimulation *sim = new PBeamLineSimulation("beam", "Beam line simulation");
5 sim->SetReaction("p + p");
6 //Read the data file
7 sim->InitBeamLine("pibeam_set6.data");
8 //Place (virtual) detector along the beam line. Units are in mm:
9 sim->AddDetector("det1", -3000.0);
10 sim->AddDetector("det2", -6000.0);
11
12
13 for (double dist = -30000; dist<0; dist+=300)
14 sim->AddDetector("complete", dist);
15 //open the ROOT file and type:
16 //data.Draw("complete.fV.fX:complete.fV.fZ >>h3(100,-30000,0,100,-80,80)","","colz");
17
18
19 //Choose which module should be the target:
21 //Select the global momentum:
23
24 //Beam profile at the production target
25 //position in mm:
26 sim->Do("_beam_x = 0; _beam_y = 0;");
27 //divergence in px/pz and py/pz:
28 //sim->Do("_beam_px = 0; _beam_py = 0.05;");
29 sim->Do("_beam_px = 0; _beam_py = 0;");
30 //momentum spread:
31 sim->Do("_beam_dp = 0.16*sampleFlat() - 0.08; "); //+- 8%
32 //sim->Do("_beam_dp = -0.08; ");
33
34 //Add and enable module:
36
37 PReaction my_reaction("_T1 = 2.2","p","p","p p eta [dilepton [e+ e-] g]", "beam_line");
38 //PReaction my_reaction("_T1 = 2.2","p","p","p p", "beam_line");
39
40 my_reaction.Print(); //The "Print()" statement is optional
41 my_reaction.Loop(1000);
42
43
44}
Bool_t Do(char *command)
void SetGlobalMomentum(Double_t p)
Int_t AddDetector(char *name, Double_t distance)
Bool_t TargetIsElement(Int_t n)
Bool_t InitBeamLine(char *filename)
void SetReaction(const char *reaction)
makeDistributionManager() -> Add(sim)
PReaction my_reaction("_T1 = 2.2","p","p","p p eta [dilepton [e+ e-] g]", "beam_line")
PReaction my_reaction("3.5","p","7Li","p (n) phi [K+ K-] (6Li)","delme")