EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
aerogel.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file aerogel.C
1 
2 // Meaningless number for now; fine;
3 #define _VERSION_ 1
4 #define _SUBVERSION_ 0
5 
6 // Do not want to always overwrite "official" files; place "test" tag into the file name;
7 //#define _TEST_VERSION_
8 
9 // All construction elements are smeared (so chip assembly is uniform in both
10 // beam line and asimuthal direction);
11 //#define _NO_STRUCTURE_GEOMETRY_
12 
14 {
15  // Load basic libraries;
16  gROOT->Macro("$VMCWORKDIR/gconfig/rootlogon.C");
17 
18  // Forward & backward parts;
19  for(unsigned fb=0; fb<2; fb++) {
20  EicGeoParData *fbagr = new EicGeoParData(fb ? "BLR" : "FLR", _VERSION_, _SUBVERSION_);
21 
22  if (fb) {
23  TGeoRotation *rw = new TGeoRotation();
24  rw->RotateY(180);
25 
26  fbagr->SetTopVolumeTransformation(new TGeoCombiTrans(0.0, 0.0, 0.0, rw));
27  } //if
28 
29 #ifdef _TEST_VERSION_
30  fbagr->SetTestGeometryFlag();
31 #endif
32 
33  TGeoTube *outv = new TGeoTube("OuterVolumeFBAG",
34  0.1 * 100.0,
35  0.1 * 1100.0,
36  0.1 * 250.0/2);
37  TGeoVolume *voutv = new TGeoVolume("OuterVolumeFBAG", outv, fbagr->GetMedium("CF4"));
38 
39  //double zOffset = (fb ? -1.0 : 1.0)*1350.0;
40 
41  // Yes, prefer to rotate right here -> local coordinates will point towards
42  // the registering pads for both upstream and downstream halves;
43  {
44  TGeoRotation *rw = new TGeoRotation();
45 
46  if (fb) rw->RotateY(180);
47 
48  fbagr->GetTopVolume()->AddNode(voutv, fb, new TGeoCombiTrans(0.0, 0.0, 0.1 * 1350.0, rw));
49  }
50 
51  fbagr->AttachSourceFile("./aerogel.C");
52 
53  // Some colorification, please;
54  fbagr->GetColorTable()->AddPrefixMatch ("OuterVolume", kPink+1);
55  fbagr->GetTransparencyTable()->AddPrefixMatch("OuterVolume", 30);
56 
57  // And put this stuff as a whole into the top volume;
58  fbagr->FinalizeOutput();
59 
60  fbagr->ConstructGeometry();
61  } //for fb
62 
63  // Barrel part;
64  {
65  EicGeoParData *ctagr = new EicGeoParData("CLR", _VERSION_, _SUBVERSION_);
66 
67 #ifdef _TEST_VERSION_
68  ctagr->SetTestGeometryFlag();
69 #endif
70  TGeoTube *outv = new TGeoTube("OuterVolumeCTAG",
71  0.1 * 850.0,
72  0.1 * 1100.0,
73  0.1 * 2300.0/2);
74  TGeoVolume *voutv = new TGeoVolume("OuterVolumeCTAG", outv, ctagr->GetMedium("CF4"));
75 
76  ctagr->GetTopVolume()->AddNode(voutv, 0, new TGeoCombiTrans(0.0, 0.0, 0.0, 0));
77 
78  ctagr->AttachSourceFile("./aerogel.C");
79 
80  // Some colorification, please;
81  ctagr->GetColorTable()->AddPrefixMatch ("OuterVolume", kPink+2);
82  ctagr->GetTransparencyTable()->AddPrefixMatch("OuterVolume", 30);
83 
84  // And put this stuff as a whole into the top volume;
85  ctagr->FinalizeOutput();
86 
87  ctagr->ConstructGeometry();
88  }
89 
90  // Yes, always exit;
91  exit(0);
92 }
93