6 #define _NO_STRUCTURE_GEOMETRY_
15 static double offsets[2] = {-1650., 2800.};
20 gROOT->Macro(
"$VMCWORKDIR/gconfig/rootlogon.C");
27 for(
unsigned fb=0; fb<2; fb++) {
35 #ifdef _NO_STRUCTURE_GEOMETRY_
38 #ifdef _IGNORE_BRASS_LAYERS_
62 const Double_t endcapMaxR =
63 fabs(beamLineOffset) * tan(emcal->
mEndcapMaxTheta * TMath::Pi() / 180.);
68 const Int_t rowsNumMax = (int)floor(endcapMaxR / envelopeWidth);
77 } *rows = calloc(rowsNumMax,
sizeof(FemcRow));
79 for(
int iq=0; iq<rowsNumMax; iq++)
81 FemcRow *row = rows + iq;
83 row->yc = envelopeWidth * (iq + 0.5);
94 TGeoRotation *_qquad[4];
95 for(
int ixy=0; ixy<4; ixy++)
96 _qquad[ixy] =
new TGeoRotation();
99 _qquad[0]->RotateZ(180);
100 _qquad[1]->ReflectX(kTRUE);
101 _qquad[2]->ReflectY(kTRUE);
103 TGeoTubeSeg *quadrant =
new TGeoTubeSeg(cname +
"Quadrant",
108 TGeoVolume *vquadrant =
new TGeoVolume(cname +
"Quadrant", quadrant, emcal->
GetMedium(
"air"));
110 #ifdef _NO_STRUCTURE_GEOMETRY_
113 fgmap->AddGeantVolumeLevel(cname +
"TowerShell", rowsNumMax*rowsNumMax);
114 fgmap->AddGeantVolumeLevel(cname +
"Quadrant", 4);
116 fgmap->SetSingleSensorContainerVolume(cname +
"Tower");
118 for(
unsigned iqq=0; iqq<fptr->
GetLayerNum(); iqq++) {
136 unsigned tcounter = 0;
137 for(
int ix=0; ix<rowsNumMax; ix++) {
138 FemcRow *brx = rows + ix;
142 for(
int iy=0; iy<rowsNumMax; iy++) {
143 FemcRow *bry = rows + iy;
149 double rr = sqrt(xx*xx + yy*yy);
154 for(
int iqx=0; iqx<2; iqx++)
155 for(
int iqy=0; iqy<2; iqy++) {
156 int XX = iqx ? rowsNumMax + ix : rowsNumMax - ix - 1;
157 int YY = iqy ? rowsNumMax + iy : rowsNumMax - iy - 1;
161 UInt_t geant[6] = {0, 0, 0, 0, tcounter, 2*iqx + iqy}, group = 0, logical[2] = {XX, YY};
162 #ifdef _NO_STRUCTURE_GEOMETRY_
165 cout <<
"Failed to set mapping table entry!" << endl;
169 for(
unsigned iqq=0; iqq<fptr->
GetLayerNum(); iqq++) {
174 cout <<
"Failed to set mapping table entry!" << endl;
182 TGeoRotation *rt =
new TGeoRotation();
186 #ifdef _ASSUME_TWO_TOWER_ASSEMBLIES_
187 if (ix%2) rt->RotateZ(180);
190 vquadrant->AddNode(vtower, tcounter++,
191 new TGeoCombiTrans(0.1 * xx, 0.1 * yy, 0.0, rt));
196 printf(
"%5d towers per quadrant\n", tcounter);
199 for(
int ixy=0; ixy<4; ixy++) {
202 _qquad[ixy]->LocalToMaster(local, master);
205 new TGeoCombiTrans(0.1 * master[0], 0.1 * master[1], 0.0, _qquad[ixy]));
211 TGeoRotation *
rw =
new TGeoRotation();
213 if (beamLineOffset < 0.0) rw->RotateY(180);