9 #define _NO_STRUCTURE_GEOMETRY_
20 {
"bhac", -3400.+1130.}
23 static double offsets[2] = {-3400.+1130., 3400.};
28 gROOT->Macro(
"$VMCWORKDIR/gconfig/rootlogon.C");
31 for(
unsigned fb=0; fb<2; fb++) {
38 #ifdef _NO_STRUCTURE_GEOMETRY_
64 const Double_t endcapMaxR =
70 const Int_t rowsNumMax = (int)floor(endcapMaxR / envelopeWidth);
78 } *rows = calloc(rowsNumMax,
sizeof(FemcRow));
80 for(
int iq=0; iq<rowsNumMax; iq++) {
81 FemcRow *row = rows + iq;
83 row->yc = envelopeWidth * (iq + 0.5);
90 TGeoRotation *_qquad[4];
91 for(
int ixy=0; ixy<4; ixy++)
92 _qquad[ixy] =
new TGeoRotation();
95 _qquad[0]->RotateZ(180);
96 _qquad[1]->ReflectX(kTRUE);
97 _qquad[2]->ReflectY(kTRUE);
99 TGeoTubeSeg *quadrant =
new TGeoTubeSeg(cname +
"Quadrant",
104 TGeoVolume *vquadrant =
new TGeoVolume(cname +
"Quadrant", quadrant, hcal->
GetMedium(
"air"));
111 #ifndef _NO_STRUCTURE_GEOMETRY_
125 unsigned tcounter = 0;
126 for(
int ix=0; ix<rowsNumMax; ix++) {
127 FemcRow *brx = rows + ix;
131 for(
int iy=0; iy<rowsNumMax; iy++) {
132 FemcRow *bry = rows + iy;
138 double rr = sqrt(xx*xx + yy*yy);
143 for(
int iqx=0; iqx<2; iqx++)
144 for(
int iqy=0; iqy<2; iqy++) {
145 int XX = iqx ? rowsNumMax + ix : rowsNumMax - ix - 1;
146 int YY = iqy ? rowsNumMax + iy : rowsNumMax - iy - 1;
149 #ifdef _NO_STRUCTURE_GEOMETRY_
150 UInt_t geant[2] = { tcounter, 2*iqx + iqy};
152 UInt_t geant[3] = {0, tcounter, 2*iqx + iqy};
154 unsigned group = 0, logical[2] = {XX, YY};
157 cout <<
"Failed to set mapping table entry!" << endl;
163 TGeoRotation *rt =
new TGeoRotation();
165 vquadrant->AddNode(vtower, tcounter++,
166 new TGeoCombiTrans(0.1 * xx, 0.1 * yy, 0.0, rt));
171 printf(
"%5d towers per quadrant\n", tcounter);
174 for(
int ixy=0; ixy<4; ixy++) {
177 _qquad[ixy]->LocalToMaster(local, master);
180 new TGeoCombiTrans(0.1 * master[0], 0.1 * master[1], 0.0, _qquad[ixy]));
186 TGeoRotation *
rw = 0;
188 if (beamLineOffset < 0.0) {
189 rw =
new TGeoRotation();