EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
eicroot.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file eicroot.C
1 {
2  auto eic = new EicToyModel();
3 
4  // Define canvas width; request eta=0 line in the drawing; set name;
5  eic->width(1500)->AddEtaLine(0.0)->SetName("eicroot");
6  // Define acceptance ranges; go simple: close to the beam line, and no vacuum chamber cutaway;
7  eic->acceptance(-6.2, -1.0, 1.2, 6.2);
8 
9  // Barrel;
10  {
11  auto mid = eic->mid(); mid->offset( 5 * etm::cm);
12 
13  mid->add("TRACKER",100 * etm::cm);
14  }
15 
16  // Hadron-going endcap;
17  {
18  auto fwd = eic->fwd(); fwd->offset(120 * etm::cm);
19 
20  fwd->add("MPGD", 30 * etm::cm)->brick();
21  }
22 
23  // Electron-going endcap;
24  {
25  auto bck = eic->bck(); bck->offset(120 * etm::cm);
26 
27  bck->add("TRD", 15 * etm::cm)->brick();
28  }
29 
30  // Declare eta boundary configuration;
31  {
32  eic->mid()->get("TRACKER")->stretch(eic->bck()->get("TRD"));
33  eic->mid()->get("TRACKER")->stretch(eic->fwd()->get("MPGD"));
34  }
35 
36  // Draw vertical cross cut view;
37  eic->vdraw();
38 
39  // Write eicroot.root file with the configuration out;
40  eic->write();
41 }