EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
fbst.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file fbst.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 
13 // No tricky elements like inclined roof beams; still water pipes, etc are
14 // created (so chip assembly is uniform in beam line direction only);
15 #define _BEAM_LINE_UNIFORM_GEOMETRY_
16 
17 // FIXME: does not work; in case of FST/BST will have to fall back to tricky
18 // TGeoCompositeShape cell assemblies; also half of th ecells should be Z-rotated
19 // to bring chips close to the beam pipe;
20 #define _USE_TRIANGULAR_ASSEMBLIES_
21 
22 // Comment out if no mounting rings wanted;
23 //#define _WITH_MOUNTING_RINGS_
24 // Comment out if no stave enforcement brackets wanted;
25 //#define _WITH_ENFORCEMENT_BRACKETS_
26 // Comment out if no external water pipe pieces wanted;
27 //#define _WITH_EXTERNAL_PIPES_
28 
29 #include <./maps-lib.C>
30 
31 //#define _DISK_NUM_ (7)
32 //-#define _DISK_NUM_ (8)
33 #define _DISK_NUM_ (6)
34 //#define _DISK_NUM_ (3)
35 
37 {
38  // Load basic libraries;
39  gROOT->Macro("$VMCWORKDIR/gconfig/rootlogon.C");
40 
41  // Assume 7 disks in both forward and backward directions; change symmetry later if needed;
42  //const Double_t Z[_DISK_NUM_] = { 350., 500., 700., 900., 1020., 1120., 1220.};
43  //@@@const Double_t Z[_DISK_NUM_] = { 270., 500., 700., 900., 1020., 1120., 1220.};
44  const Double_t Z[_DISK_NUM_] = { 250., 400., 600., 800., 1000., 1210.};
45  const Double_t R[_DISK_NUM_] = { 0., 45., 0., 45., 0., 45.};
46  //-const Double_t Z[_DISK_NUM_] = { 250., 400., 600., 800., 1000., 1235., 1500., 1700.};
47  //-const Double_t R[_DISK_NUM_] = { 0., 45., 0., 45., 0., 45., 0., 45.};
48  //const Double_t Z[_DISK_NUM_] = { 270., 400., 500., 600., 700., 900., 1220.};
49  //const Double_t Z[_DISK_NUM_] = {300., 500., 800.};
50 
51  for(unsigned fb=0; fb<2; fb++) {
52  FstGeoParData *fbst = new FstGeoParData(fb ? "BST" : "FST", _VERSION_, _SUBVERSION_);
53 
54  // Parse #define statements and make certain configuration calls accordingly;
55  // NB: cast to the base MAPS geo class since void* interface used; FIXME!;
57 
58  //
59  // Prefer to think in [mm] and convert to [cm] when calling ROOT shape
60  // definition routines only;
61  //
62 
63  // Mounting ring construction; arbitrary numbers, same for all layers;
64  if (fbst->WithMountingRings()) {
65  fbst->mMountingRingBeamLineThickness = 3.00;
66  fbst->mMountingRingRadialThickness = 5.00;
67  } //if
68  // Simplify the design -> just a triangular piece with a reasonable volume;
69  if (fbst->WithEnforcementBrackets())
70  fbst->mEnforcementBracketThickness = 1.00;
71  // This is something for display purposes mostly;
72  if (fbst->WithExternalPipes())
73  fbst->mWaterPipeExtensionLength = 4.00;
74 
75  //
76  // For now assume ALICE Inner Barrel design, composed in staves with
77  // varying number of Mimosa chips;
78  //
79 
81 
82  // For now consider a single disc design (all the same); add staves by hand;
83  // Parameters:
84  // - cell assembly pointer;
85  // - min available radius;
86  // - max available radius;
87  // - default neigboring stave overlap in "X" direction;
88  //+FstDisc *disc = new FstDisc(ibcell, 18.0, 197.0, 12.8);
89  FstDisc *disc = new FstDisc(ibcell, 18.0, 185.0, 12.8);
90 
91  // Declare discs; just put them by hand at hardcoded locations along the beam line;
92  for(unsigned dc=0; dc<_DISK_NUM_; dc++)
93  fbst->AddDisc(disc, (fb ? -1.0 : 1.0)*Z[dc], R[dc]);
94 #if 0
95  if (!fb) {
96  FstDisc *hdisc = new FstDisc(ibcell, 18.0, 400.0, 12.8);
97 
98  fbst->AddDisc(hdisc, 1500.);
99  } //if
100 #endif
101 
102  fbst->AttachSourceFile("fbst.C");
103  fbst->AttachSourceFile("maps-lib.C");
104  fbst->AttachSourceFile("../../eic/detectors/maps/FstGeoParData.cxx");
105 
106  // Specify color preferences; NB: void* interface, sorry;
108  //fbst->GetTransparencyTable()->AddPatternMatch("MountingRing", 50);
109 
110  // Geometry is defined -> build it in ROOT;
111  fbst->ConstructGeometry();
112  } //for fb
113 
114  // Yes, always exit;
115  exit(0);
116 }
117