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 #define _VERSION_ 2
3 #define _SUBVERSION_ 0
4 
5 #define _DISK_NUM_ (6)
6 
7 fbst()
8 {
9  // Load basic libraries;
10  gROOT->Macro("$VMCWORKDIR/gconfig/rootlogon.C");
11 
12  // Well, consider to tune by hand for now; and for FST only;
13  const Double_t Z[_DISK_NUM_] = { 250., 400., 600., 800., 1000., 1180.};
14  const Double_t rMin[_DISK_NUM_] = { 35., 35., 35., 40., 46., 51.};
15  const Double_t xOffset[_DISK_NUM_] = { 0., 0., 0., 2., 5., 7.};
16 
17  // rMax is defined by the TPC inner field cage diameter;
18  double rMax = 185.0;
19  //Double_t nominal_proton_direction = 0.022;
20  //Double_t proton_cone_opening_angle = 0.020;
21  // Cylindrical section around IP;
22  //double cylindrical_beam_pipe_radius = 31.00;
23  // Stay clear from the beam pipe;
24  //double safety_margin = 3.00;
25  Double_t waferThickness = 0.2;
26 
27  for(unsigned fb=0; fb<2; fb++) {
28  EicGeoParData *fbst = new EicGeoParData(fb ? "BST" : "FST", _VERSION_, _SUBVERSION_);
29 
30  char wname[128];
31  sprintf(wname, "%sSiliconWafer", fb ? "Bst" : "Fst");
32  TGeoTube *wafer = new TGeoTube(wname,
33  0.0,
34  0.1 * rMax,
35  0.1 * waferThickness/2);
36 
37  for(unsigned wf=0; wf<_DISK_NUM_; wf++) {
38  double z0 = Z[wf], r0 = rMin[wf], dx = fb ? 0.0 : xOffset[wf];
39 
40  char hname[128];
41  sprintf(hname, "%sSiliconHole%02d", fb ? "Bst" : "Fst", wf);
42  TGeoTube *hole = new TGeoTube(hname,
43  0.0,
44  0.1 * r0,
45  0.1 * waferThickness/2 + 0.1);
46 
47  char tname[128];
48  sprintf(tname, "%sCombi%02d", fb ? "Bst" : "Fst", wf);
49  TGeoCombiTrans *combi = new TGeoCombiTrans(tname, 0.1 * dx, 0, 0, 0);
50  combi->RegisterYourself();
51 
52  char vname[128], cname[128];
53  sprintf(vname, "%sSiliconPlate%02d", fb ? "Bst" : "Fst", wf);
54  sprintf(cname, "%sSiliconWafer-%s:%s", fb ? "Bst" : "Fst", hname, tname);
55  TGeoCompositeShape *comp = new TGeoCompositeShape(vname, cname);
56 
57  TGeoVolume *vwafer = new TGeoVolume(vname, comp, fbst->GetMedium("silicon"));
58 
59  fbst->GetTopVolume()->AddNode(vwafer, 0, new TGeoCombiTrans(0.0, 0.0, 0.1 * z0, 0));
60  } //for iq
61  } //for fb
62 
63  fbst->GetColorTable()->AddPatternMatch ("Silicon", kYellow);
64  fbst->GetTransparencyTable()->AddPatternMatch("Silicon", 50);
65 
66  fbst->FinalizeOutput();
67 
68  // Yes, always exit;
69  exit(0);
70 }
71