EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
calorimetry.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file calorimetry.C
1 {
2  auto eic = new EicToyModel();
3 
4  // Shift IP if needed; define canvas width; request eta=0 line in the drawing; set name;
5  eic->ip(-50.0)->width(1500)->AddEtaLine(0.0)->SetName("calorimetry");
6  // Define acceptance ranges and the vacuum chamber design;
7  eic->acceptance(-4.2, -1.0, 1.2, 4.2);
8  //++eic->DefineVacuumChamber(new vc2020_03_20());
9 
10  // Barrel;
11  {
12  // etm::cm can be safely omitted everywhere, it is equal 1.0 and will never change;
13  auto mid = eic->mid(); mid->offset( 100 * etm::cm);
14 
15  mid->add("EmCal", 30 * etm::cm);
16  mid->add("Cryostat", 40 * etm::cm);
17  mid->add("HCal", 80 * etm::cm);
18  mid->add("HCal", 40 * etm::cm)->trim(0.0, 0.5);
19  }
20 
21  // Hadron-going endcap;
22  {
23  auto fwd = eic->fwd(); fwd->offset(250 * etm::cm);
24 
25  fwd->add("EmCal", 35 * etm::cm);
26  fwd->add("HCal", 105 * etm::cm)->trim(1.0, 0.0);
27  }
28 
29  // Electron-going endcap;
30  {
31  auto bck = eic->bck(); bck->offset(200 * etm::cm);
32 
33  bck->add("EmCal", 35 * etm::cm)->trim(0.0, 1.0);
34  bck->add("HCal", 105 * etm::cm)->trim(0.0, 1.0);
35  }
36 
37  // Declare eta boundary configuration;
38  {
39  eic->bck()->get("HCal") ->stretch(eic->mid()->get("HCal", 1), 40 * etm::cm);
40  eic->bck()->get("EmCal") ->stretch(eic->mid()->get("Cryostat"));
41 
42  eic->mid()->get("EmCal") ->stretch(eic->bck()->get("EmCal"), 20 * etm::cm);
43  eic->mid()->get("EmCal") ->stretch(eic->fwd()->get("HCal"));
44 
45  eic->mid()->get("HCal", 0)->stretch(eic->bck()->get("HCal"));
46  eic->mid()->get("HCal", 0)->stretch(eic->fwd()->get("HCal"), 50 * etm::cm);
47  eic->mid()->get("HCal", 1)->stretch(eic->bck()->get("HCal"), 50 * etm::cm);
48  }
49 
50  // Beautify picture a little bit;
51  eic->ApplyStandardTrimming();
52 
53  // Draw vertical cross cut view; write the .root file out;
54  eic->vdraw();
55  eic->write();
56 }