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