134 const G4double
delta=1.*mm;
135 TaperRingRmin1 = BSCRmax1-TaperRingThickness1;
136 TaperRingRmin2 = TaperRingRmin1+TaperRingDz*
tan(TaperRingTheta);
137 TaperRingDr = TaperRingThickness2/
cos(TaperRingTheta);
138 TaperRingOuterLength1 = TaperRingOuterLength+TaperRingThickness3*
tan(TaperRingTheta);
140 BSCRmax2 = TaperRingRmin2+TaperRingDr-TaperRingThickness3*
tan(TaperRingTheta);
141 BSCRmax = BSCRmin+33.8*cm;
142 BSCPhiDphi= 360.*deg/BSCNbPhi;
143 BSCPhiSphi= -BSCPhiDphi/2.;
145 BSCPhiRmax= BSCRmax-0.5*cm;
146 BSCPhiRmin= BSCRmin/
sin(90.*deg+BSCPhiDphi/2.)
147 *
sin(90.*deg+BSCPhiDphi/2.-BSCAngleRotat);
148 SPBarDphi=2*atan(SPBarwidth/(2*BSCRmax));
151 zHalfLength[0] = BSCCryLength/2.;
152 yHalfLength1[0]= BSCYFront0/2.;
153 xHalfLength1[0]= BSCPhiRmin*
tan(BSCPhiDphi)/2.;
154 xHalfLength2[0]= xHalfLength1[0];
155 G4double rminprojected=BSCRmin*
cos(BSCAngleRotat);
157 yHalfLength2[0]= yHalfLength1[0]
158 +(BSCYFront0-BSCPosition0)/rminprojected*BSCCryLength/2.;
159 xHalfLength3[0]= xHalfLength1[0]*(BSCPhiRmin+BSCCryLength)/BSCPhiRmin;
160 xHalfLength4[0]= xHalfLength2[0]*(BSCPhiRmin+BSCCryLength)/BSCPhiRmin;
162 thetaPosition[0]= 90.*deg;
163 xPosition[0] = BSCPhiRmin+BSCCryLength/2.;
165 -(xHalfLength1[0]+xHalfLength3[0]+xHalfLength2[0]+xHalfLength4[0])/4.;
166 zPosition[0] = (yHalfLength1[0]+yHalfLength2[0])/2.;
168 theta0= 90.*deg-atan((BSCYFront0-BSCPosition0)/rminprojected);
171 G4cout <<
"------------------------------------>1"<< G4endl
172 <<
"The direction of crystal is:"
173 << theta0/deg <<
"(deg)."<< G4endl;
176 rearBoxPosX[0] = xPosition[0]+BSCCryLength/2.+rearBoxDz/2.;
177 rearBoxPosY[0] = -(xHalfLength3[0]+xHalfLength4[0])/2.;
178 rearBoxPosZ[0] = yHalfLength2[0];
180 OCGirderRmin1[0] = rearBoxPosX[0]+rearBoxDz/2.+
delta;
181 OCGirderRmin2[0] = rearBoxPosX[0]+rearBoxDz/2.+
delta;
182 OCGirderDz[0] = rearBoxLength;
183 OCGirderPosZ[0] = rearBoxLength/2;
185 cableLength[0] = BSCDz-rearBoxPosZ[0];
186 cablePosX[0] = BSCPhiRmax-cableDr-2.*mm;
187 cablePosY[0] = rearBoxPosY[0]-3*cableDr;
188 cablePosZ[0] = BSCDz-cableLength[0]/2;
191 zHalfLength[1]= BSCCryLength/2.;
192 yHalfLength1[1]= BSCYFront0/2.;
193 G4double deltaR= BSCYFront0*
cos(theta0);
194 xHalfLength1[1]= xHalfLength1[0];
195 xHalfLength2[1]= xHalfLength1[1]*(BSCPhiRmin+deltaR)/BSCPhiRmin;
196 yHalfLength2[1]= yHalfLength1[1]
197 +
tan(theta0-atan(rminprojected/(BSCYFront0*(1.+1./
sin(theta0))-
198 BSCPosition1)))*BSCCryLength/2.;
199 deltaR=deltaR+BSCCryLength*
sin(theta0);
200 xHalfLength4[1]= xHalfLength1[1]*(BSCPhiRmin+deltaR)/BSCPhiRmin;
201 deltaR=deltaR-yHalfLength2[1]*2.*
cos(theta0);
202 xHalfLength3[1]= xHalfLength1[1]*(BSCPhiRmin+deltaR)/BSCPhiRmin;
204 thetaPosition[1]= theta0;
205 xPosition[1] = BSCPhiRmin+BSCCryLength/2.*
sin(theta0)
206 + (3.*yHalfLength1[1]-yHalfLength2[1])/2.*
cos(theta0);
208 -(xHalfLength1[1]+xHalfLength3[1]+xHalfLength2[1]+xHalfLength4[1])/4.;
209 zPosition[1] = yHalfLength1[0]*2.
210 + (yHalfLength1[1]*2./
tan(theta0)+BSCCryLength/2.)*
cos(theta0)
211 + (yHalfLength1[1]+yHalfLength2[1])/2.*
sin(theta0);
213 rearBoxPosX[1] = xPosition[1]+(BSCCryLength/2.+rearBoxDz/2.)*
sin(theta0);
214 rearBoxPosY[1] = -(xHalfLength3[1]+xHalfLength4[1])/2.;
215 rearBoxPosZ[1] = zPosition[1]+(BSCCryLength/2.+rearBoxDz/2.)*
cos(theta0);
217 OCGirderRmin1[1] = rearBoxPosX[1]+rearBoxDz*
sin(theta0)/2.+rearBoxLength*
cos(theta0)/2+
delta;
218 OCGirderRmin2[1] = rearBoxPosX[1]+rearBoxDz*
sin(theta0)/2.-rearBoxLength*
cos(theta0)/2+
delta;
219 OCGirderDz[1] = rearBoxLength*
sin(theta0);
220 OCGirderPosZ[1] = rearBoxPosZ[1]+rearBoxDz*
cos(theta0)/2.;
222 cableLength[1] = BSCDz-rearBoxPosZ[1];
223 cablePosX[1] = cablePosX[0];
224 cablePosY[1] = cablePosY[0]+2*cableDr;
225 cablePosZ[1] = BSCDz-cableLength[1]/2;
227 theta0= theta0-atan((yHalfLength2[1]-yHalfLength1[1])*2./BSCCryLength);
229 for(i=2;i<BSCNbTheta;i++)
233 G4cout <<
"------------------------------------>"<<i<< G4endl
234 <<
"The direction of crystal is:"
235 << theta0/deg <<
"(deg)." << G4endl;
238 zHalfLength[i]=zHalfLength[0];
239 yHalfLength1[i]=BSCYFront/2.;
241 {yHalfLength1[i]=BSCYFront1/2.;}
242 deltaR=yHalfLength1[i]*2.*
cos(theta0);
243 xHalfLength1[i]=xHalfLength1[0];
244 xHalfLength2[i]=xHalfLength1[i]/BSCPhiRmin*(BSCPhiRmin+deltaR);
245 yHalfLength2[i]=yHalfLength1[i]
246 *(1.+BSCCryLength/(rminprojected/
sin(theta0)
247 +yHalfLength1[i]*2./
tan(theta0)));
248 deltaR=deltaR+BSCCryLength*
sin(theta0);
249 xHalfLength4[i]=xHalfLength1[i]/BSCPhiRmin*(BSCPhiRmin+deltaR);
250 deltaR=deltaR-yHalfLength2[i]*2.*
cos(theta0);
251 xHalfLength3[i]=xHalfLength1[i]/BSCPhiRmin*(BSCPhiRmin+deltaR);
253 thetaPosition[i]=theta0;
254 xPosition[i]=BSCPhiRmin+zHalfLength[i]*
sin(theta0)
255 + (3.*yHalfLength1[i]-yHalfLength2[i])/2.*
cos(theta0);
257 -(xHalfLength1[i]+xHalfLength3[i]+xHalfLength2[i]+xHalfLength4[i])/4.;
258 zPosition[i]=BSCPosition1+rminprojected/
tan(theta0)
259 +(2.*yHalfLength1[i]/
tan(theta0)+zHalfLength[i])*
cos(theta0)
260 +(yHalfLength1[i]+yHalfLength2[i])/2.*
sin(theta0);
262 rearBoxPosX[i] = xPosition[i]+(BSCCryLength/2.+rearBoxDz/2.)*
sin(theta0);
263 rearBoxPosY[i] = -(xHalfLength3[i]+xHalfLength4[i])/2.;
264 rearBoxPosZ[i] = zPosition[i]+(BSCCryLength/2.+rearBoxDz/2.)*
cos(theta0);
266 OCGirderRmin1[i] = rearBoxPosX[i]+rearBoxDz*
sin(theta0)/2.+rearBoxLength*
cos(theta0)/2+
delta;
267 OCGirderRmin2[i] = rearBoxPosX[i]+rearBoxDz*
sin(theta0)/2.-rearBoxLength*
cos(theta0)/2+
delta;
268 OCGirderDz[i] = rearBoxLength*
sin(theta0);
269 OCGirderPosZ[i] = rearBoxPosZ[i]+rearBoxDz*
cos(theta0)/2.;
273 yCable = i-4*(G4int)(i/4);
274 cableLength[i] = BSCDz-(rearBoxPosZ[i]+rearBoxDz/2.*
cos(theta0));
275 cablePosX[i] = cablePosX[0]-xCable*2*cableDr;
276 cablePosY[i] = cablePosY[0]+yCable*2*cableDr;
277 cablePosZ[i] = BSCDz-cableLength[i]/2;
279 theta0=theta0-atan(2.*yHalfLength1[i]/(rminprojected/
sin(theta0)
280 +2.*yHalfLength1[i]/
tan(theta0)));
283 thetaPosition[BSCNbTheta]=theta0;
286 G4cout <<
"------------------------------------>"<<i<< G4endl
287 <<
"The direction of crystal is:"
288 << theta0/deg <<
"(deg)." << G4endl;
292 for(i=0;i<BSCNbTheta;i++)
294 oop=sqrt((yHalfLength2[i]-yHalfLength1[i])*(yHalfLength2[i]
296 +(xHalfLength3[i]+xHalfLength4[i]-xHalfLength1[i]
297 -xHalfLength2[i])*(xHalfLength3[i]+xHalfLength4[i]
298 -xHalfLength1[i]-xHalfLength2[i])/4);
299 thetaAxis[i]=atan(oop/BSCCryLength);
300 phiAxis[i] =180.*deg+atan((yHalfLength2[i]-yHalfLength1[i])
301 /(xHalfLength3[i]+xHalfLength4[i]
302 -xHalfLength1[i]-xHalfLength2[i])*2.);
303 tanAlpha2[i]=-(xHalfLength4[i]-xHalfLength3[i])/yHalfLength2[i]/2.;
304 tanAlpha1[i]=-(xHalfLength2[i]-xHalfLength1[i])/yHalfLength1[i]/2.;
333 G4double totalThickness=fTyvekThickness+fAlThickness+fMylarThickness;
334 G4double
delta=0.,angle1=0.*deg,angle2=0.*deg;
337 G4double rminprojected=BSCRmin*
cos(BSCAngleRotat);
338 rminprojected=BSCRmin;
341 for(i=0;i<BSCNbTheta;i++)
343 zHalfLength[BSCNbTheta+i]=totalThickness/2.;
344 yHalfLength1[BSCNbTheta+i]=yHalfLength1[i];
345 yHalfLength2[BSCNbTheta+i]=yHalfLength1[i]
346 +(yHalfLength2[i]-yHalfLength1[i])*totalThickness/BSCCryLength;
347 xHalfLength1[BSCNbTheta+i]=xHalfLength1[i];
348 xHalfLength2[BSCNbTheta+i]=xHalfLength2[i];
349 xHalfLength1[BSCNbTheta*2+i]=xHalfLength3[BSCNbTheta+i]=
350 xHalfLength1[i]*(BSCCryLength-totalThickness)/BSCCryLength
351 +xHalfLength3[i]*totalThickness/BSCCryLength;
352 xHalfLength2[BSCNbTheta*4+i]=xHalfLength4[BSCNbTheta+i]=
353 xHalfLength2[i]*(BSCCryLength-totalThickness)/BSCCryLength
354 +xHalfLength4[i]*totalThickness/BSCCryLength;
356 zHalfLength[BSCNbTheta*5+i]=zHalfLength[BSCNbTheta*4+i]=
357 zHalfLength[BSCNbTheta*3+i]=zHalfLength[BSCNbTheta*2+i]=
358 zHalfLength[i]-totalThickness/2.;
360 yHalfLength2[BSCNbTheta*2+i]=yHalfLength1[BSCNbTheta*2+i]=
361 totalThickness/
cos(thetaPosition[i+1]-thetaPosition[i])/2.;
362 xHalfLength3[BSCNbTheta*2+i]=xHalfLength3[i];
363 xHalfLength4[BSCNbTheta*2+i]=xHalfLength3[i]
364 +(xHalfLength4[i]-xHalfLength3[i])*yHalfLength2[BSCNbTheta*2+i]
366 xHalfLength2[BSCNbTheta*2+i]=xHalfLength3[BSCNbTheta+i]
367 +(xHalfLength4[BSCNbTheta+i]-xHalfLength3[BSCNbTheta+i])
368 *yHalfLength1[BSCNbTheta*2+i]/yHalfLength2[BSCNbTheta*1+i];
370 yHalfLength2[BSCNbTheta*4+i]=yHalfLength1[BSCNbTheta*4+i]=
372 xHalfLength4[BSCNbTheta*4+i]=xHalfLength4[i];
373 xHalfLength3[BSCNbTheta*4+i]=xHalfLength4[i]
374 -(xHalfLength4[i]-xHalfLength3[i])*yHalfLength2[BSCNbTheta*4+i]
376 xHalfLength1[BSCNbTheta*4+i]=xHalfLength4[BSCNbTheta+i]
377 -(xHalfLength4[BSCNbTheta+i]-xHalfLength3[BSCNbTheta+i])
378 *yHalfLength1[BSCNbTheta*4+i]/yHalfLength2[BSCNbTheta*1+i];
380 delta=totalThickness/2.+yHalfLength1[BSCNbTheta*2+i];
381 angle1=atan(yHalfLength2[i]/(xHalfLength4[i]-xHalfLength3[i]));
382 angle2=atan(2.*(xHalfLength4[i]-xHalfLength2[i])*
sin(angle1)
385 yHalfLength1[BSCNbTheta*5+i]=yHalfLength1[BSCNbTheta*3+i]=
386 yHalfLength1[i]-
delta;
387 yHalfLength2[BSCNbTheta*5+i]=yHalfLength2[BSCNbTheta*3+i]=
388 yHalfLength2[i]-
delta;
389 xHalfLength4[BSCNbTheta*3+i]=xHalfLength3[BSCNbTheta*3+i]=
390 xHalfLength2[BSCNbTheta*3+i]=xHalfLength1[BSCNbTheta*3+i]=
391 totalThickness/
cos(angle2)/
sin(angle1)/2.;
392 xHalfLength4[BSCNbTheta*5+i]=xHalfLength3[BSCNbTheta*5+i]=
393 xHalfLength2[BSCNbTheta*5+i]=xHalfLength1[BSCNbTheta*5+i]=
396 zHalfLength[i]=zHalfLength[i]-totalThickness/2.;
397 yHalfLength1[i]=yHalfLength1[i]-
delta;
398 yHalfLength2[i]=yHalfLength2[i]-
delta;
399 delta=totalThickness*(1.+1./
cos(angle2)/
sin(angle1))/2.;
400 xHalfLength1[i]=xHalfLength1[i]-
delta;
401 xHalfLength2[i]=xHalfLength2[i]-
delta;
402 xHalfLength3[i]=xHalfLength3[i]-
delta;
403 xHalfLength4[i]=xHalfLength4[i]-
delta;
405 oop=sqrt((yHalfLength2[i]-yHalfLength1[i])*(yHalfLength2[i]
407 +(xHalfLength3[i]+xHalfLength4[i]-xHalfLength1[i]
408 -xHalfLength2[i])*(xHalfLength3[i]+xHalfLength4[i]
409 -xHalfLength1[i]-xHalfLength2[i])/4);
410 thetaAxis[i]=atan(oop/BSCCryLength);
412 phiAxis[i] =180.*deg+atan((yHalfLength2[i]-yHalfLength1[i])
413 /(xHalfLength3[i]+xHalfLength4[i]
414 -xHalfLength1[i]-xHalfLength2[i])*2.);
416 oop=sqrt((yHalfLength2[BSCNbTheta+i]-yHalfLength1[BSCNbTheta+i])
417 *(yHalfLength2[BSCNbTheta+i]-yHalfLength1[BSCNbTheta+i])
418 +(xHalfLength3[BSCNbTheta+i]+xHalfLength4[BSCNbTheta+i]
419 -xHalfLength1[BSCNbTheta+i]-xHalfLength2[BSCNbTheta+i])
420 *(xHalfLength3[BSCNbTheta+i]+xHalfLength4[BSCNbTheta+i]
421 -xHalfLength1[BSCNbTheta+i]-xHalfLength2[BSCNbTheta+i])/4);
422 thetaAxis[BSCNbTheta+i]=atan(oop/totalThickness);
423 phiAxis [BSCNbTheta+i]=
424 -atan((yHalfLength2[BSCNbTheta+i]-yHalfLength1[BSCNbTheta+i])
425 /(xHalfLength3[BSCNbTheta+i]+xHalfLength4[BSCNbTheta+i]
426 -xHalfLength1[BSCNbTheta+i]-xHalfLength2[BSCNbTheta+i])*2.);
428 oop=sqrt((yHalfLength2[i]-yHalfLength1[i])*(yHalfLength2[i]
430 +(xHalfLength3[BSCNbTheta*2+i]+xHalfLength4[BSCNbTheta*2+i]
431 -xHalfLength1[BSCNbTheta*2+i]-xHalfLength2[BSCNbTheta*2+i])
432 *(xHalfLength3[BSCNbTheta*2+i]+xHalfLength4[BSCNbTheta*2+i]
433 -xHalfLength1[BSCNbTheta*2+i]-xHalfLength2[BSCNbTheta*2+i])
435 thetaAxis[BSCNbTheta*2+i]=atan(oop/(zHalfLength[BSCNbTheta*2+i]*2));
436 phiAxis [BSCNbTheta*2+i]=
437 -atan((yHalfLength2[i]-yHalfLength1[i])
438 /(xHalfLength3[BSCNbTheta*2+i]+xHalfLength4[BSCNbTheta*2+i]
439 -xHalfLength1[BSCNbTheta*2+i]-xHalfLength2[BSCNbTheta*2+i])*4);
441 oop=sqrt((yHalfLength2[i]-yHalfLength1[i])*(yHalfLength2[i]
443 +(xHalfLength4[i]-xHalfLength2[i])
444 *(xHalfLength4[i]-xHalfLength2[i])*4);
445 thetaAxis[BSCNbTheta*3+i]=atan(oop/(zHalfLength[BSCNbTheta*3+i]*2));
446 phiAxis [BSCNbTheta*3+i]=-atan((yHalfLength2[i]-yHalfLength1[i])
447 /(xHalfLength4[i]-xHalfLength2[i]));
449 thetaAxis[BSCNbTheta*4+i]=
450 atan((xHalfLength4[BSCNbTheta*4+i]+xHalfLength3[BSCNbTheta*4+i]
451 -xHalfLength2[BSCNbTheta*4+i]-xHalfLength1[BSCNbTheta*4+i])/2.
452 /(zHalfLength[BSCNbTheta*4+i]*2));
453 phiAxis [BSCNbTheta*4+i]=0;
455 thetaAxis[BSCNbTheta*5+i]=atan((xHalfLength3[BSCNbTheta*5+i]
456 -xHalfLength1[BSCNbTheta*5+i])
457 /(zHalfLength[BSCNbTheta*5+i]*2));
458 phiAxis [BSCNbTheta*5+i]=-90.*deg;
460 tanAlpha2[BSCNbTheta+i]=tanAlpha1[BSCNbTheta+i]=tanAlpha1[i]=
461 -(xHalfLength2[i]-xHalfLength1[i])/yHalfLength1[i]/2.;
462 tanAlpha1[BSCNbTheta*2+i]=(xHalfLength2[BSCNbTheta*2+i]
463 -xHalfLength1[BSCNbTheta*2+i])
464 /yHalfLength1[BSCNbTheta*2+i]/2.;
465 tanAlpha1[BSCNbTheta*3+i]=tanAlpha1[i]*2.;
466 tanAlpha1[BSCNbTheta*4+i]=(xHalfLength2[BSCNbTheta*4+i]
467 -xHalfLength1[BSCNbTheta*4+i])
468 /yHalfLength1[BSCNbTheta*4+i]/2.;
469 tanAlpha1[BSCNbTheta*5+i]=(xHalfLength2[BSCNbTheta*5+i]
470 -xHalfLength1[BSCNbTheta*5+i])
471 /yHalfLength1[BSCNbTheta*5+i]/2.;
473 tanAlpha2[i]=-(xHalfLength4[i]-xHalfLength3[i])/yHalfLength2[i]/2.;
475 tanAlpha2[BSCNbTheta*2+i]=(xHalfLength4[BSCNbTheta*2+i]
476 -xHalfLength3[BSCNbTheta*2+i])
477 /yHalfLength2[BSCNbTheta*2+i]/2.;
478 tanAlpha2[BSCNbTheta*3+i]=tanAlpha2[i]*2.;
479 tanAlpha2[BSCNbTheta*4+i]=(xHalfLength4[BSCNbTheta*4+i]
480 -xHalfLength3[BSCNbTheta*4+i])
481 /yHalfLength2[BSCNbTheta*4+i]/2.;
482 tanAlpha2[BSCNbTheta*5+i]=(xHalfLength4[BSCNbTheta*5+i]
483 -xHalfLength3[BSCNbTheta*5+i])
484 /yHalfLength2[BSCNbTheta*5+i]/2.;
486 zPosition[BSCNbTheta*5+i]=zPosition[BSCNbTheta*3+i]=zPosition[i]=
487 zPosition[i]+totalThickness/2.*
cos(thetaPosition[i])
488 -yHalfLength1[BSCNbTheta*2+i]*
sin(thetaPosition[i]);
489 zPosition[i]=totalThickness/2.;
490 xPosition[BSCNbTheta*5+i]=xPosition[BSCNbTheta*3+i]=xPosition[i]=
491 xPosition[i]+totalThickness/2.*
sin(thetaPosition[i])
492 +totalThickness*(1./
cos(thetaPosition[i+1]-thetaPosition[i])-1)/2.
493 *
cos(thetaPosition[i]);
494 xPosition[i]=totalThickness*(1.-1./
cos(angle2)/
sin(angle1))/2.;
496 yPosition[i]=yPosition[i]
497 +totalThickness*(1.-1./
cos(angle2)/
sin(angle1))/2.;
498 yPosition[i]=yHalfLength1[BSCNbTheta*2+i]-totalThickness/2.;
499 yPosition[BSCNbTheta*3+i]=yPosition[i]*2.+xHalfLength1[BSCNbTheta*3+i];
500 yPosition[BSCNbTheta*5+i]=xHalfLength1[BSCNbTheta*5+i];
502 xPosition[BSCNbTheta+i]=BSCPhiRmin
503 +zHalfLength[BSCNbTheta+i]*
sin(thetaPosition[i])
504 +(3.*yHalfLength1[BSCNbTheta+i]-yHalfLength2[BSCNbTheta+i])/2.
505 *
cos(thetaPosition[i]);
506 yPosition[BSCNbTheta+i]=(xHalfLength1[BSCNbTheta+i]
507 +xHalfLength3[BSCNbTheta+i]
508 +xHalfLength2[BSCNbTheta+i]
509 +xHalfLength4[BSCNbTheta+i])/4.;
510 zPosition[BSCNbTheta+i]=BSCPosition1+rminprojected/
tan(thetaPosition[i])
511 +(2.*yHalfLength1[BSCNbTheta+i]/
tan(thetaPosition[i])
512 +zHalfLength[BSCNbTheta+i])*
cos(thetaPosition[i])
513 +(yHalfLength1[BSCNbTheta+i]+yHalfLength2[BSCNbTheta+i])/2.
514 *
sin(thetaPosition[i]);
516 xPosition[BSCNbTheta*2+i]=xPosition[i]
517 +((yHalfLength1[i]+yHalfLength2[i])/2.+yHalfLength1[BSCNbTheta*2+i])
518 *
cos(thetaPosition[i]);
519 zPosition[BSCNbTheta*2+i]=zPosition[i]
520 -((yHalfLength1[i]+yHalfLength2[i])/2.+yHalfLength1[BSCNbTheta*2+i])
521 *
sin(thetaPosition[i]);
522 yPosition[BSCNbTheta*2+i]=(xHalfLength1[BSCNbTheta*2+i]
523 +xHalfLength3[BSCNbTheta*2+i]
524 +xHalfLength2[BSCNbTheta*2+i]
525 +xHalfLength4[BSCNbTheta*2+i])/4.;
527 xPosition[BSCNbTheta*4+i]=xPosition[i]
528 -((yHalfLength1[i]+yHalfLength2[i])/2.+yHalfLength1[BSCNbTheta*4+i])
529 *
cos(thetaPosition[i]);
530 zPosition[BSCNbTheta*4+i]=zPosition[i]
531 -((yHalfLength1[i]+yHalfLength2[i])/2.+yHalfLength1[BSCNbTheta*4+i])
532 *
sin(thetaPosition[i]);
533 yPosition[BSCNbTheta*4+i]=(xHalfLength1[BSCNbTheta*4+i]
534 +xHalfLength3[BSCNbTheta*4+i]
535 +xHalfLength2[BSCNbTheta*4+i]
536 +xHalfLength4[BSCNbTheta*4+i])/4.;
541 for(i=0;i<BSCNbTheta*6;i++)
543 G4cout <<
"The sizes of the " << i+1 <<
" crystal are:" << G4endl
544 <<
"zHalfLength =" << zHalfLength[i]/cm <<
"(cm)," << G4endl
545 <<
"thetaAxis =" << thetaAxis[i]/deg <<
"(deg),"<< G4endl
546 <<
"phiAxis =" << phiAxis[i]/deg <<
"(deg),"<< G4endl
547 <<
"yHalfLength1=" << yHalfLength1[i]/cm <<
"(cm)," << G4endl
548 <<
"xHalfLength1=" << xHalfLength1[i]/cm <<
"(cm)," << G4endl
549 <<
"xHalfLength2=" << xHalfLength2[i]/cm <<
"(cm)," << G4endl
550 <<
"tanAlpha1 =" << tanAlpha1[i] << G4endl
551 <<
"yHalfLength2=" << yHalfLength2[i]/cm <<
"(cm)," << G4endl
552 <<
"xHalfLength3=" << xHalfLength3[i]/cm <<
"(cm)," << G4endl
553 <<
"xHalfLength4=" << xHalfLength4[i]/cm <<
"(cm)," << G4endl
554 <<
"tanAlpha2 =" << tanAlpha2[i] <<
"." << G4endl
555 <<
"The position of the " << i+1 <<
" crystal is:" << G4endl
556 <<
"(" << xPosition[i]/cm <<
","
557 << yPosition[i]/cm <<
","
558 << zPosition[i]/cm <<
")cm" << G4endl;