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