9 gROOT->Macro(
"$VMCWORKDIR/gconfig/rootlogon.C");
18 double CellFaceSizeX = 100.0;
20 double CellFaceSizeY = CellFaceSizeX;
23 double SubCellLength = 23.4;
24 double SubCellNum = 36;
25 double RearPlateThickness = 10.0;
26 double CellLength = SubCellNum*SubCellLength + RearPlateThickness;
27 cout <<
"Cell length: " << CellLength <<
" mm" << endl;
29 double AbsorberPlateWidth = 96.0;
31 double AbsorberPlateHeight = 98.0;
32 double SteelSpacerThickness = 2.0;
33 double AbsorberPlateThickness = 20.0;
36 double ScintillatorPlateThickness = 3.0;
37 double ScintillatorPlateWidth = 95.0;
38 double ScintillatorPlateHeight = 97.0;
41 double WlsPlateThickness = 2.9;
42 double WlsPlateLength = CellLength;
43 double WlsPlateHeight = 97.0;
45 double MylarThickness = 0.1;
48 TGeoBBox *tower =
new TGeoBBox(cname +
"Tower",
49 0.1 * CellFaceSizeX/2,
50 0.1 * CellFaceSizeY/2,
52 TGeoVolume *
vtower =
new TGeoVolume(cname +
"Tower", tower, hcal->
GetMedium(
"air"));
56 TGeoBBox *absPlate =
new TGeoBBox(cname +
"AbsorberPlate",
57 0.1 * AbsorberPlateWidth/2,
58 0.1 * AbsorberPlateHeight/2,
59 0.1 * AbsorberPlateThickness/2);
60 TGeoVolume *vabsPlate =
62 new TGeoVolume(cname +
"AbsorberPlate", absPlate, hcal->
GetMedium(
"iron"));
65 double offsetX = -(CellFaceSizeX - AbsorberPlateWidth)/2.;
66 double offsetY = -(CellFaceSizeY - AbsorberPlateHeight)/2.;
68 for(
unsigned pt=0; pt<SubCellNum; pt++) {
69 double offsetZ = -CellLength/2. + AbsorberPlateThickness/2 + pt*SubCellLength;
71 vtower->AddNode(vabsPlate, pt,
new TGeoCombiTrans(0.1 * offsetX, 0.1 *offsetY,
76 TGeoBBox *rearPlate =
new TGeoBBox(cname +
"RearSteelPlate",
77 0.1 * AbsorberPlateWidth/2,
78 0.1 * AbsorberPlateHeight/2,
79 0.1 * RearPlateThickness/2);
80 TGeoVolume *vrearPlate =
82 new TGeoVolume(cname +
"RearSteelPlate", rearPlate, hcal->
GetMedium(
"iron"));
84 double offsetZ = CellLength/2. - RearPlateThickness/2;
86 vtower->AddNode(vrearPlate, 0,
new TGeoCombiTrans(0.1 * offsetX, 0.1 *offsetY,
93 TGeoBBox *sciPlate =
new TGeoBBox(cname +
"ScintillatorPlate",
94 0.1 * ScintillatorPlateWidth/2,
95 0.1 * ScintillatorPlateHeight/2,
96 0.1 * ScintillatorPlateThickness/2);
97 TGeoVolume *vsciPlate =
98 new TGeoVolume(cname +
"ScintillatorPlate", sciPlate, hcal->
GetMedium(
"polystyrene"));
101 double offsetX = -(CellFaceSizeX - ScintillatorPlateWidth)/2.;
102 double offsetY = -(CellFaceSizeY - ScintillatorPlateHeight)/2.;
104 for(
unsigned pt=0; pt<SubCellNum; pt++) {
106 double offsetZ = -CellLength/2. +
107 (pt+1)*SubCellLength - (SubCellLength - AbsorberPlateThickness)/2;
109 vtower->AddNode(vsciPlate, pt,
new TGeoCombiTrans(0.1 * offsetX, 0.1 *offsetY,
116 TGeoBBox *wlsPlate =
new TGeoBBox(cname +
"WlsPlate",
117 0.1 * WlsPlateThickness/2,
118 0.1 * WlsPlateHeight/2,
119 0.1 * WlsPlateLength/2);
120 TGeoVolume *vwlsPlate =
122 new TGeoVolume(cname +
"WlsPlate", wlsPlate, hcal->
GetMedium(
"polystyrene"));
125 TGeoBBox *mylarFilm =
new TGeoBBox(
"mylarFilm",
126 0.1 * MylarThickness/2,
127 0.1 * WlsPlateHeight/2,
128 0.1 * WlsPlateLength/2);
129 TGeoVolume *vmylarFilm =
131 new TGeoVolume(cname +
"MylarFilm", mylarFilm, hcal->
GetMedium(
"kapton"));
133 TGeoBBox *steelSpacer =
new TGeoBBox(cname +
"SteelSpacer",
134 0.1 * CellFaceSizeX/2,
135 0.1 * SteelSpacerThickness/2,
136 0.1 * WlsPlateLength/2);
137 TGeoVolume *vsteelSpacer =
139 new TGeoVolume(cname +
"SteelSpacer", steelSpacer, hcal->
GetMedium(
"iron"));
142 double offsetX = CellFaceSizeX/2. - (CellFaceSizeX - AbsorberPlateWidth)/2.;
143 double offsetY = -(CellFaceSizeY - WlsPlateHeight)/2.;
144 double offsetZ = (CellLength - WlsPlateLength)/2.;
146 vtower->AddNode(vwlsPlate, 0,
new TGeoCombiTrans(0.1 * offsetX, 0.1 *offsetY,
149 for(
unsigned lr=0; lr<2; lr++) {
151 double dx = (lr ? -1. : 1.)*(WlsPlateThickness + MylarThickness)/2;
153 vtower->AddNode(vmylarFilm, lr,
new TGeoCombiTrans(0.1 * (offsetX + dx),
154 0.1 *offsetY, 0.1 * offsetZ, 0));
157 vtower->AddNode(vsteelSpacer, 0,
158 new TGeoCombiTrans(0.0,
159 0.1 * (CellFaceSizeY/2 - SteelSpacerThickness/2),
164 hcal->
GetTopVolume()->AddNode(vtower, 0,
new TGeoCombiTrans());