11 #include <TGeoVolume.h>
14 #include <MuMegasGeoParData.h>
24 mReadoutPcbMaterial (
"MuMegasG10"),
25 mReadoutPcbThickness (0.320 * etm::
mm),
27 mCopperStripThickness (0.010 * etm::
mm),
30 mGasMixture (
"arco27030mmg"),
31 mAmplificationRegionLength(0.130 * etm::
mm),
34 mSteelMeshThickness (0.019 * etm::
mm * (19./50.) * (19./50.)),
37 mConversionRegionLength (3.000 * etm::
mm),
40 mExitWindowMaterial (
"MuMegasKapton"),
41 mExitWindowThickness (0.050 * etm::
mm),
47 mInnerFrameWidth (10.000 * etm::
mm),
48 mInnerFrameThickness ( 5.000 * etm::
mm),
49 mOuterFrameWidth (20.000 * etm::
mm),
50 mOuterFrameThickness ( 5.000 * etm::
mm)
61 for(
unsigned bl=0; bl<
mBarrels.size(); bl++) {
73 if (airContainerThickness < layer->mOuterFrameThickness)
77 char barrelContainerVolumeName[128];
78 snprintf(barrelContainerVolumeName, 128-1,
"%sBarrelContainerVolume%02d", detName, bl);
80 TGeoTube *bcontainer =
new TGeoTube(barrelContainerVolumeName,
82 barrel->
mRadius + airContainerThickness,
84 TGeoVolume *vbcontainer =
new TGeoVolume(barrelContainerVolumeName, bcontainer,
GetMedium(
_AIR_));
89 char outerFrameVolumeName[128];
90 snprintf(outerFrameVolumeName, 128-1,
"%sOuterFrameVolume%02d", detName, bl);
92 TGeoTube *oframe =
new TGeoTube(outerFrameVolumeName,
96 TGeoVolume *voframe =
new TGeoVolume(outerFrameVolumeName, oframe,
GetMedium(
"MuMegasCarbonFiber"));
98 for(
unsigned fb=0; fb<2; fb++)
99 vbcontainer->AddNode(voframe, fb,
new TGeoCombiTrans(0.0, 0.0, (fb ? -1.0 : 1.0)*zOffset, 0));
102 double singleSectorLength =
109 char innerFrameVolumeName[128];
110 snprintf(innerFrameVolumeName, 128-1,
"%sInnerFrameVolume%02d", detName, bl);
112 TGeoTube *iframe =
new TGeoTube(innerFrameVolumeName,
116 TGeoVolume *viframe =
new TGeoVolume(innerFrameVolumeName, iframe,
GetMedium(
"MuMegasCarbonFiber"));
121 vbcontainer->AddNode(viframe, iz,
new TGeoCombiTrans(0.0, 0.0, zOffset, 0));
126 double circumference = 2.0 * TMath::Pi() * barrel->
mRadius;
127 double clearAcceptanceFraction =
132 char sectorContainerVolumeName[128];
133 snprintf(sectorContainerVolumeName, 128-1,
"%sSectorContainerVolume%02d", detName, bl);
137 TGeoCtub *sector =
new TGeoCtub(sectorContainerVolumeName,
139 barrel->
mRadius + gasSectorThickness,
140 singleSectorLength/2,
141 0.0, singleSectorAngle,
143 TGeoVolume *vsector =
new TGeoVolume(sectorContainerVolumeName, sector,
GetMedium(layer->
mGasMixture));
147 TGeoRotation *
rw = 0;
149 rw =
new TGeoRotation();
157 new TGeoCombiTrans(0.0, 0.0, zOffset, rw));
163 double rOffset = barrel->
mRadius;
167 singleSectorLength, singleSectorAngle,
173 singleSectorLength, singleSectorAngle,
179 singleSectorLength, singleSectorAngle,
185 singleSectorLength, singleSectorAngle,
192 singleSectorLength, singleSectorAngle - 1.0,
198 singleSectorLength, singleSectorAngle,
206 char sectorFrameVolumeName[128];
207 snprintf(sectorFrameVolumeName, 128-1,
"%sSectorFrameVolume%02d", detName, bl);
209 TGeoCtub *sframe =
new TGeoCtub(sectorFrameVolumeName,
212 singleSectorLength/2,
214 singleSectorFrameAngle,
216 TGeoVolume *vsframe =
new TGeoVolume(sectorFrameVolumeName, sframe,
GetMedium(
"MuMegasCarbonFiber"));
219 TGeoRotation *rw =
new TGeoRotation();
226 new TGeoCombiTrans(0.0, 0.0, zOffset, rw));
238 char conversionVolumeName[128];
239 snprintf(conversionVolumeName, 128-1,
"%s%s%02d", detName,
"ConversionRegion", bl);
251 cout <<
"Failed to set mapping table entry!" << endl;
277 TGeoVolume *sectorContainer,
const char *
material,
278 double length,
double angle,
281 char volumeName[128];
283 snprintf(volumeName, 128-1,
"%s%s%02d", detName, volumeNamePrefix, barrelID);
284 TGeoCtub *shape =
new TGeoCtub(volumeName,
286 *rOffset + thickness,
291 TGeoVolume *vshape =
new TGeoVolume(volumeName, shape,
GetMedium(material));
293 sectorContainer->AddNode(vshape, 0,
new TGeoCombiTrans(0.0, 0.0, 0.0, 0));