25 unsigned staveGlobalCounter = 0, chipGlobalCounter = 0;
27 for(
unsigned bl=0; bl<GetNumberOfLayers(); bl++) {
36 char mountingRingName[128];
38 snprintf(mountingRingName, 128-1,
"VstMountingRing%02d", bl);
53 for(
unsigned st=0; st<blayer->
mStaveNum; st++)
55 UInt_t geant[4] = {0, 0, nn, st}, logical[3] = {st, 0, nn};
58 cout <<
"Failed to set mapping table entry!" << endl;
64 double staveCenterRadius;
68 for(
unsigned st=0; st<blayer->
mStaveNum; st++) {
69 TGeoRotation *
rw =
new TGeoRotation();
72 double radAngle = degAngle*TMath::Pi()/180.0;
76 rw->SetAngles(90.0, 0.0 - fullAngle, 180.0, 0.0, 90.0, 90.0 - fullAngle);
83 double alfa = blayer->
mStaveSlope*TMath::Pi()/180.0;
85 double gamma = TMath::Pi() - alfa - beta;
86 staveCenterRadius = blayer->
mRadius*sin(gamma)/sin(alfa);
88 new TGeoCombiTrans(0.1 * staveCenterRadius*sin(radAngle),
89 0.1 * staveCenterRadius*
cos(radAngle), 0.0, rw));
96 TGeoTube *mring =
new TGeoTube(mountingRingName,
103 for(
unsigned fb=0; fb<2; fb++) {
106 GetTopVolume()->AddNode(vmring, fb,
new TGeoCombiTrans(0.0, 0.0, 0.1 * zOffset, 0));
112 printf(
"%5d chip(s) and %5d stave(s) total\n", chipGlobalCounter, staveGlobalCounter);