11 #include <TGeoVolume.h>
19 const char *detName = mDetName->Name().Data();
22 for(
unsigned bl=0; bl<mBarrels.size(); bl++) {
34 if (airContainerThickness < layer->mOuterFrameThickness)
39 char barrelContainerVolumeName[128];
40 snprintf(barrelContainerVolumeName, 128-1,
"%sBarrelContainerVolume%02d", detName, bl);
42 TGeoTube *bcontainer =
new TGeoTube(barrelContainerVolumeName,
44 0.1 * (barrel->
mRadius + airContainerThickness),
46 TGeoVolume *vbcontainer =
new TGeoVolume(barrelContainerVolumeName, bcontainer,
GetMedium(
_AIR_));
52 char outerFrameVolumeName[128];
53 snprintf(outerFrameVolumeName, 128-1,
"%sOuterFrameVolume%02d", detName, bl);
55 TGeoTube *oframe =
new TGeoTube(outerFrameVolumeName,
59 TGeoVolume *voframe =
new TGeoVolume(outerFrameVolumeName, oframe,
GetMedium(
"MuMegasCarbonFiber"));
61 for(
unsigned fb=0; fb<2; fb++)
62 vbcontainer->AddNode(voframe, fb,
new TGeoCombiTrans(0.0, 0.0, 0.1 * (fb ? -1.0 : 1.0)*zOffset, 0));
67 char innerFrameVolumeName[128];
68 snprintf(innerFrameVolumeName, 128-1,
"%sInnerFrameVolume%02d", detName, bl);
70 TGeoTube *iframe =
new TGeoTube(innerFrameVolumeName,
74 TGeoVolume *viframe =
new TGeoVolume(innerFrameVolumeName, iframe,
GetMedium(
"MuMegasCarbonFiber"));
76 vbcontainer->AddNode(viframe, 0,
new TGeoCombiTrans(0.0, 0.0, 0.0, 0));
86 double singleSectorAngle = 360.0;
90 double singleSectorLength = barrel->
mLength;
96 char sectorContainerVolumeName[128];
97 snprintf(sectorContainerVolumeName, 128-1,
"%sSectorContainerVolume%02d", detName, bl);
100 TGeoTube *sector =
new TGeoTube(sectorContainerVolumeName,
102 0.1 * (barrel->
mRadius + gasSectorThickness),
103 0.1 * singleSectorLength/2
106 TGeoVolume *vsector =
new TGeoVolume(sectorContainerVolumeName, sector,
GetMedium(layer->
mGasMixture));
110 TGeoRotation *
rw = 0;
112 rw =
new TGeoRotation();
122 new TGeoCombiTrans(0.0, 0.0, 0.1 * zOffset, rw));
129 double rOffset = barrel->
mRadius;
131 PlaceMaterialLayer(detName,
"ReadoutPcb", bl, vsector,
133 singleSectorLength, singleSectorAngle,
137 PlaceMaterialLayer(detName,
"ReadoutStrips", bl, vsector,
139 singleSectorLength, singleSectorAngle,
143 PlaceMaterialLayer(detName,
"AmplificationRegion", bl, vsector,
145 singleSectorLength, singleSectorAngle,
149 PlaceMaterialLayer(detName,
"SteelMesh", bl, vsector,
151 singleSectorLength, singleSectorAngle,
156 PlaceMaterialLayer(detName,
"ConversionRegion", bl, vsector,
158 singleSectorLength, singleSectorAngle,
162 PlaceMaterialLayer(detName,
"ExitWindow", bl, vsector,
164 singleSectorLength, singleSectorAngle,
174 char sectorFrameVolumeName[128];
175 snprintf(sectorFrameVolumeName, 128-1,
"%sSectorFrameVolume%02d", detName, bl);
178 TGeoTubeSeg *sframe =
new TGeoTubeSeg(sectorFrameVolumeName,
181 0.1 * singleSectorLength/2,
183 singleSectorFrameAngle);
184 TGeoVolume *vsframe =
new TGeoVolume(sectorFrameVolumeName, sframe,
GetMedium(
"MuMegasCarbonFiber"));
189 TGeoRotation *rw =
new TGeoRotation();
199 new TGeoCombiTrans(0.0, 0.0, 0.1 * zOffset, rw));
210 char conversionVolumeName[128];
211 snprintf(conversionVolumeName, 128-1,
"%s%s%02d", detName,
"ConversionRegion", bl);
222 if (SetMappingTableEntry(fgmap, geant, bl, logical)) {
223 cout <<
"Failed to set mapping table entry!" << endl;
241 TGeoVolume *sectorContainer,
const char *
material,
242 double length,
double angle,
245 char volumeName[128];
247 snprintf(volumeName, 128-1,
"%s%s%02d", detName, volumeNamePrefix, barrelID);
249 TGeoTube *shape =
new TGeoTube(volumeName,
255 TGeoVolume *vshape =
new TGeoVolume(volumeName, shape,
GetMedium(material));
257 sectorContainer->AddNode(vshape, 0,
new TGeoCombiTrans(0.0, 0.0, 0.0, 0));