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