16 #include <VstGeoParData.h>
22 mMountingRingRadialOffset ( 3.00 * etm::
mm)
31 unsigned staveGlobalCounter = 0, chipGlobalCounter = 0;
42 char mountingRingName[128];
44 snprintf(mountingRingName, 128-1,
"VstMountingRing%02d", bl);
59 for(
unsigned st=0; st<blayer->
mStaveNum; st++)
61 UInt_t geant[4] = {0, 0, nn, st}, logical[3] = {st, 0, nn};
64 cout <<
"Failed to set mapping table entry!" << endl;
72 double alfa = blayer->
mStaveSlope*TMath::Pi()/180.0;
75 double gamma = TMath::Pi() - alfa - beta;
76 double staveCenterRadius = blayer->
mRadius*sin(gamma)/sin(alfa);
80 TVector2 A(-W/2, -H/2), B(W/2, -H/2),
C(0.0, H/2), *arr[3] = {&A, &B, &
C};
81 double rmin = 0.0,
rmax = 0.0;
82 for(
unsigned iq=0; iq<3; iq++) {
83 TVector2 pt = arr[iq]->Rotate(alfa) + TVector2(0.0, staveCenterRadius);
86 if (!iq || r < rmin) rmin = r;
92 char barrelContainerVolumeName[128];
93 snprintf(barrelContainerVolumeName, 128-1,
"%sBarrelContainerVolume%02d",
"Vst", bl);
95 TGeoTube *bcontainer =
new TGeoTube(barrelContainerVolumeName,
99 TGeoVolume *vbcontainer =
new TGeoVolume(barrelContainerVolumeName, bcontainer,
GetMedium(
_AIR_));
105 for(
unsigned st=0; st<blayer->
mStaveNum; st++) {
106 TGeoRotation *
rw =
new TGeoRotation();
109 double radAngle = degAngle*TMath::Pi()/180.0;
112 rw->SetAngles(90.0, 0.0 - fullAngle, 180.0, 0.0, 90.0, 90.0 - fullAngle);
114 vbcontainer->AddNode(stave->
GetVolume(), st,
115 new TGeoCombiTrans(staveCenterRadius*sin(radAngle),
116 staveCenterRadius*
cos(radAngle), 0.0, rw));
124 TGeoTube *mring =
new TGeoTube(mountingRingName,
131 for(
unsigned fb=0; fb<2; fb++) {
134 GetTopVolume()->AddNode(vmring, fb,
new TGeoCombiTrans(0.0, 0.0, zOffset, 0));