11 #define _NO_STRUCTURE_GEOMETRY_
21 gROOT->Macro(
"$VMCWORKDIR/gconfig/rootlogon.C");
33 #ifdef _NO_STRUCTURE_GEOMETRY_
56 #ifndef _NO_STRUCTURE_GEOMETRY_
68 #ifdef _FIBER_X_SPACING_
81 #ifdef _FIBER_Y_SPACING_
113 tan((90 - sectorAlpha / 2) * TMath::Pi() / 180.);
114 cout << sectorMinR << endl;
116 const Double_t sectorMaxR = (sectorMinR + cemc->
mCellLength) /
117 cos((sectorAlpha / 2) * TMath::Pi() / 180.);
118 cout << sectorMaxR << endl;
121 const Double_t sliceStep = cellFaceSize + cemc->
mInterCellGap;
128 tan((sectorAlpha / 2) * TMath::Pi() / 180.);
129 cout << towerRearSideSize << endl;
130 #ifndef _NO_STRUCTURE_GEOMETRY_
134 double scalingFactor = (towerRearSideSize +
cellFaceSize)/(2*cellFaceSize);
135 cout << scalingFactor << endl;
139 TGeoTubeSeg *tubs =
new TGeoTubeSeg(
"CemcSector",
142 0.1 * sectorLength/2.,
143 -sectorAlpha/2., sectorAlpha/2.);
144 TGeoVolume *vtubs =
new TGeoVolume(
"CemcSector", tubs, cemc->
GetMedium(
"air"));
148 TGeoTrd1 *tower =
new TGeoTrd1(
"CemcTower",
149 0.1 * cellFaceSize/2,
150 0.1 * towerRearSideSize/2,
151 0.1 * cellFaceSize/2,
154 new TGeoVolume(
"CemcTower", tower, cemc->
GetMedium(cemc->
mFiber ?
"WEpoxyMix" :
"WEpoxySciMix"));
155 TGeoRotation *
rr =
new TGeoRotation();
156 rr->SetAngles(90., 90., 0., 0., 90., 0.);
158 vtubs->AddNode(vtower, tw,
159 new TGeoCombiTrans(0.1 * (sectorMinR + cemc->
mCellLength/2), 0.,
160 0.1 * sliceStep * (tw - (sliceNum-1)/2.), rr));
162 #ifndef _NO_STRUCTURE_GEOMETRY_
166 TGeoTube *fiber =
new TGeoTube(
"CemcFiberCladding", 0.0, 0.1 * outerDiameter/2, 0.1 * fiberLength/2);
167 TGeoVolume *vfiber =
new TGeoVolume(
"CemcFiberCladding", fiber, cemc->
GetMedium(
"PMMA"));
177 TGeoRotation *frr =
new TGeoRotation();
179 double angle = atan(x0*(scalingFactor-1.)/(fiberLength/2.)) * 180. / TMath::Pi();
181 frr->SetAngles(90.+angle, 0., 90., 90., angle, 0.);
184 new TGeoCombiTrans(0.1 * x0 * scalingFactor,
189 TGeoTube *fcore =
new TGeoTube(
"CemcFiberCore", 0.0, 0.1 * fptr->
mFiberCoreDiameter/2,
190 0.1 * fiberLength/2);
191 TGeoVolume *vfcore =
new TGeoVolume(
"CemcFiberCore", fcore, cemc->
GetMedium(
"polystyrene"));
192 vfiber->AddNode(vfcore, 0,
new TGeoCombiTrans(0.0, 0.0, 0.0,
new TGeoRotation()));
198 #ifndef _NO_STRUCTURE_GEOMETRY_
212 UInt_t geant[4] = {0, 0, iz, sc}, group = 0, logical[3] = {sc, 0, iz};
216 cout <<
"Failed to set mapping table entry!" << endl;
224 TGeoRotation *qr =
new TGeoRotation();
225 qr->SetAngles(sc * sectorAlpha, 0., 0.);
227 cemc->
GetTopVolume()->AddNode(vtubs, sc,
new TGeoCombiTrans(0., 0., 0., qr));