EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
EIC-IR1-XX-v01.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file EIC-IR1-XX-v01.C
1 
2 {
3  auto eic = new EicToyModel();
4 
5  // Shift IP if needed; define canvas width; request eta=0 line in the drawing; set name;
6  eic->ip(-50.0 * etm::cm)->width(1200)->AddEtaLine(0.0)->SetName("EIC-IR1-XX-v01");
7  // Define acceptance ranges and the vacuum chamber design;
8  eic->acceptance(-4.2, -1.0, 1.2, 4.2);
9  eic->SetAzimuthalSegmentation(12);
10  eic->DefineVacuumChamber(new vc2020_03_20());
11 
12  // Vertex tracker;
13  {
14  auto vtx = eic->vtx(); vtx->offset(0.0 * etm::cm);
15 
16  vtx->add("Si Tracker",20 * etm::cm);
17  }
18 
19  // Barrel;
20  {
21  auto mid = eic->mid(); mid->offset( 20 * etm::cm);
22 
23  mid->add("TRACKER", 75 * etm::cm);
24  mid->add("Cherenkov", 25 * etm::cm);
25  mid->add("EmCal", 30 * etm::cm);
26  mid->add("Cryostat", 40 * etm::cm);
27  mid->add("HCal", 120 * etm::cm)->brick();
28  }
29 
30  // Hadron-going endcap;
31  {
32  auto fwd = eic->fwd(); fwd->offset(130 * etm::cm);
33 
34  fwd->add("TRACKER", 15 * etm::cm)->brick();
35  fwd->marker();
36 
37  fwd->add("HM RICH", 150 * etm::cm)->trim(0.9, 1.0);
38  for(unsigned nn=0; nn<2; nn++)
39  fwd->add("TRD", 15 * etm::cm)->brick();
40 
41  fwd->add("Preshower", 10 * etm::cm);
42  fwd->add("EmCal", 40 * etm::cm);
43  fwd->add("HCal", 105 * etm::cm);
44  }
45 
46  // Electron-going endcap;
47  {
48  auto bck = eic->bck(); bck->offset(130 * etm::cm);
49 
50  bck->add("TRACKER", 15 * etm::cm)->brick();
51  for(unsigned nn=0; nn<3; nn++)
52  bck->add("TRD", 15 * etm::cm)->brick();
53  bck->marker();
54 
55  bck->add("Cherenkov", 25 * etm::cm);
56  bck->add("Preshower", 10 * etm::cm)->brick();
57  bck->add("TOF", 5 * etm::cm)->brick();
58  bck->add("EmCal", 50 * etm::cm);
59  bck->add("HCal", 105 * etm::cm);
60  }
61 
62  // Declare eta boundary configuration;
63  {
64  eic->vtx()->get("Si Tracker")->stretch(eic->bck()->get("Cherenkov"));
65  eic->vtx()->get("Si Tracker")->stretch(eic->fwd()->get("HM RICH"));
66 
67  eic->mid()->get("TRACKER") ->stretch(eic->bck()->get("TRACKER"));
68  eic->mid()->get("TRACKER") ->stretch(eic->fwd()->get("TRACKER"));
69  eic->mid()->get("HCal") ->stretch(eic->bck()->get("HCal"));
70  eic->mid()->get("HCal") ->stretch(eic->fwd()->get("HCal"));
71  eic->mid()->get("Cryostat") ->stretch(eic->bck()->get("HCal"));
72  eic->mid()->get("EmCal") ->stretch(eic->bck()->get("EmCal"));
73 
74  eic->fwd()->get("HCal") ->stretch(eic->mid()->get("HCal"), 90 * etm::cm);
75 
76  eic->bck()->get("HCal") ->stretch(eic->mid()->get("HCal"), 90 * etm::cm);
77  }
78 
79  // Beautify picture a little bit;
80  eic->ApplyStandardTrimming();
81 
82  // Draw horizontal cross cut view; write the .root file out;
83  //eic->mirror();
84  eic->hdraw();
85  eic->write();
86  //eic->Export("example.stp");
87 }