10#include "G4ThreeVector.hh"
40 BSCDz = emcPara.
GetBSCDz()-TaperRingThickness3;
46 BSCDz1 = emcPara.
GetBSCDz1()-TaperRingThickness3;
95 for(G4int i=0;i<BSCNbTheta*6;i++)
133 const G4double
delta=1.*mm;
134 TaperRingRmin1 = BSCRmax1-TaperRingThickness1;
135 TaperRingRmin2 = TaperRingRmin1+TaperRingDz*
tan(TaperRingTheta);
136 TaperRingDr = TaperRingThickness2/
cos(TaperRingTheta);
137 TaperRingOuterLength1 = TaperRingOuterLength+TaperRingThickness3*
tan(TaperRingTheta);
139 BSCRmax2 = TaperRingRmin2+TaperRingDr-TaperRingThickness3*
tan(TaperRingTheta);
140 BSCRmax = BSCRmin+33.8*cm;
141 BSCPhiDphi= 360.*deg/BSCNbPhi;
142 BSCPhiSphi= -BSCPhiDphi/2.;
144 BSCPhiRmax= BSCRmax-0.5*cm;
145 BSCPhiRmin= BSCRmin/
sin(90.*deg+BSCPhiDphi/2.)
146 *
sin(90.*deg+BSCPhiDphi/2.-BSCAngleRotat);
147 SPBarDphi=2*atan(SPBarwidth/(2*BSCRmax));
150 zHalfLength[0] = BSCCryLength/2.;
151 yHalfLength1[0]= BSCYFront0/2.;
152 xHalfLength1[0]= BSCPhiRmin*
tan(BSCPhiDphi)/2.;
153 xHalfLength2[0]= xHalfLength1[0];
154 G4double rminprojected=BSCRmin*
cos(BSCAngleRotat);
156 yHalfLength2[0]= yHalfLength1[0]
157 +(BSCYFront0-BSCPosition0)/rminprojected*BSCCryLength/2.;
158 xHalfLength3[0]= xHalfLength1[0]*(BSCPhiRmin+BSCCryLength)/BSCPhiRmin;
159 xHalfLength4[0]= xHalfLength2[0]*(BSCPhiRmin+BSCCryLength)/BSCPhiRmin;
161 thetaPosition[0]= 90.*deg;
162 xPosition[0] = BSCPhiRmin+BSCCryLength/2.;
164 -(xHalfLength1[0]+xHalfLength3[0]+xHalfLength2[0]+xHalfLength4[0])/4.;
165 zPosition[0] = (yHalfLength1[0]+yHalfLength2[0])/2.;
167 theta0= 90.*deg-atan((BSCYFront0-BSCPosition0)/rminprojected);
170 G4cout <<
"------------------------------------>1"<< G4endl
171 <<
"The direction of crystal is:"
172 << theta0/deg <<
"(deg)."<< G4endl;
175 rearBoxPosX[0] = xPosition[0]+BSCCryLength/2.+rearBoxDz/2.;
176 rearBoxPosY[0] = -(xHalfLength3[0]+xHalfLength4[0])/2.;
177 rearBoxPosZ[0] = yHalfLength2[0];
179 OCGirderRmin1[0] = rearBoxPosX[0]+rearBoxDz/2.+
delta;
180 OCGirderRmin2[0] = rearBoxPosX[0]+rearBoxDz/2.+
delta;
181 OCGirderDz[0] = rearBoxLength;
182 OCGirderPosZ[0] = rearBoxLength/2;
184 cableLength[0] = BSCDz-rearBoxPosZ[0];
185 cablePosX[0] = BSCPhiRmax-cableDr-2.*mm;
186 cablePosY[0] = rearBoxPosY[0]-3*cableDr;
187 cablePosZ[0] = BSCDz-cableLength[0]/2;
190 zHalfLength[1]= BSCCryLength/2.;
191 yHalfLength1[1]= BSCYFront0/2.;
192 G4double deltaR= BSCYFront0*
cos(theta0);
193 xHalfLength1[1]= xHalfLength1[0];
194 xHalfLength2[1]= xHalfLength1[1]*(BSCPhiRmin+deltaR)/BSCPhiRmin;
195 yHalfLength2[1]= yHalfLength1[1]
196 +
tan(theta0-atan(rminprojected/(BSCYFront0*(1.+1./
sin(theta0))-
197 BSCPosition1)))*BSCCryLength/2.;
198 deltaR=deltaR+BSCCryLength*
sin(theta0);
199 xHalfLength4[1]= xHalfLength1[1]*(BSCPhiRmin+deltaR)/BSCPhiRmin;
200 deltaR=deltaR-yHalfLength2[1]*2.*
cos(theta0);
201 xHalfLength3[1]= xHalfLength1[1]*(BSCPhiRmin+deltaR)/BSCPhiRmin;
203 thetaPosition[1]= theta0;
204 xPosition[1] = BSCPhiRmin+BSCCryLength/2.*
sin(theta0)
205 + (3.*yHalfLength1[1]-yHalfLength2[1])/2.*
cos(theta0);
207 -(xHalfLength1[1]+xHalfLength3[1]+xHalfLength2[1]+xHalfLength4[1])/4.;
208 zPosition[1] = yHalfLength1[0]*2.
209 + (yHalfLength1[1]*2./
tan(theta0)+BSCCryLength/2.)*
cos(theta0)
210 + (yHalfLength1[1]+yHalfLength2[1])/2.*
sin(theta0);
212 rearBoxPosX[1] = xPosition[1]+(BSCCryLength/2.+rearBoxDz/2.)*
sin(theta0);
213 rearBoxPosY[1] = -(xHalfLength3[1]+xHalfLength4[1])/2.;
214 rearBoxPosZ[1] = zPosition[1]+(BSCCryLength/2.+rearBoxDz/2.)*
cos(theta0);
216 OCGirderRmin1[1] = rearBoxPosX[1]+rearBoxDz*
sin(theta0)/2.+rearBoxLength*
cos(theta0)/2+
delta;
217 OCGirderRmin2[1] = rearBoxPosX[1]+rearBoxDz*
sin(theta0)/2.-rearBoxLength*
cos(theta0)/2+
delta;
218 OCGirderDz[1] = rearBoxLength*
sin(theta0);
219 OCGirderPosZ[1] = rearBoxPosZ[1]+rearBoxDz*
cos(theta0)/2.;
221 cableLength[1] = BSCDz-rearBoxPosZ[1];
222 cablePosX[1] = cablePosX[0];
223 cablePosY[1] = cablePosY[0]+2*cableDr;
224 cablePosZ[1] = BSCDz-cableLength[1]/2;
226 theta0= theta0-atan((yHalfLength2[1]-yHalfLength1[1])*2./BSCCryLength);
228 for(i=2;i<BSCNbTheta;i++)
232 G4cout <<
"------------------------------------>"<<i<< G4endl
233 <<
"The direction of crystal is:"
234 << theta0/deg <<
"(deg)." << G4endl;
237 zHalfLength[i]=zHalfLength[0];
238 yHalfLength1[i]=BSCYFront/2.;
240 {yHalfLength1[i]=BSCYFront1/2.;}
241 deltaR=yHalfLength1[i]*2.*
cos(theta0);
242 xHalfLength1[i]=xHalfLength1[0];
243 xHalfLength2[i]=xHalfLength1[i]/BSCPhiRmin*(BSCPhiRmin+deltaR);
244 yHalfLength2[i]=yHalfLength1[i]
245 *(1.+BSCCryLength/(rminprojected/
sin(theta0)
246 +yHalfLength1[i]*2./
tan(theta0)));
247 deltaR=deltaR+BSCCryLength*
sin(theta0);
248 xHalfLength4[i]=xHalfLength1[i]/BSCPhiRmin*(BSCPhiRmin+deltaR);
249 deltaR=deltaR-yHalfLength2[i]*2.*
cos(theta0);
250 xHalfLength3[i]=xHalfLength1[i]/BSCPhiRmin*(BSCPhiRmin+deltaR);
252 thetaPosition[i]=theta0;
253 xPosition[i]=BSCPhiRmin+zHalfLength[i]*
sin(theta0)
254 + (3.*yHalfLength1[i]-yHalfLength2[i])/2.*
cos(theta0);
256 -(xHalfLength1[i]+xHalfLength3[i]+xHalfLength2[i]+xHalfLength4[i])/4.;
257 zPosition[i]=BSCPosition1+rminprojected/
tan(theta0)
258 +(2.*yHalfLength1[i]/
tan(theta0)+zHalfLength[i])*
cos(theta0)
259 +(yHalfLength1[i]+yHalfLength2[i])/2.*
sin(theta0);
261 rearBoxPosX[i] = xPosition[i]+(BSCCryLength/2.+rearBoxDz/2.)*
sin(theta0);
262 rearBoxPosY[i] = -(xHalfLength3[i]+xHalfLength4[i])/2.;
263 rearBoxPosZ[i] = zPosition[i]+(BSCCryLength/2.+rearBoxDz/2.)*
cos(theta0);
265 OCGirderRmin1[i] = rearBoxPosX[i]+rearBoxDz*
sin(theta0)/2.+rearBoxLength*
cos(theta0)/2+
delta;
266 OCGirderRmin2[i] = rearBoxPosX[i]+rearBoxDz*
sin(theta0)/2.-rearBoxLength*
cos(theta0)/2+
delta;
267 OCGirderDz[i] = rearBoxLength*
sin(theta0);
268 OCGirderPosZ[i] = rearBoxPosZ[i]+rearBoxDz*
cos(theta0)/2.;
272 yCable = i-4*(G4int)(i/4);
273 cableLength[i] = BSCDz-(rearBoxPosZ[i]+rearBoxDz/2.*
cos(theta0));
274 cablePosX[i] = cablePosX[0]-xCable*2*cableDr;
275 cablePosY[i] = cablePosY[0]+yCable*2*cableDr;
276 cablePosZ[i] = BSCDz-cableLength[i]/2;
278 theta0=theta0-atan(2.*yHalfLength1[i]/(rminprojected/
sin(theta0)
279 +2.*yHalfLength1[i]/
tan(theta0)));
282 thetaPosition[BSCNbTheta]=theta0;
285 G4cout <<
"------------------------------------>"<<i<< G4endl
286 <<
"The direction of crystal is:"
287 << theta0/deg <<
"(deg)." << G4endl;
291 for(i=0;i<BSCNbTheta;i++)
293 oop=sqrt((yHalfLength2[i]-yHalfLength1[i])*(yHalfLength2[i]
295 +(xHalfLength3[i]+xHalfLength4[i]-xHalfLength1[i]
296 -xHalfLength2[i])*(xHalfLength3[i]+xHalfLength4[i]
297 -xHalfLength1[i]-xHalfLength2[i])/4);
298 thetaAxis[i]=atan(oop/BSCCryLength);
299 phiAxis[i] =180.*deg+atan((yHalfLength2[i]-yHalfLength1[i])
300 /(xHalfLength3[i]+xHalfLength4[i]
301 -xHalfLength1[i]-xHalfLength2[i])*2.);
302 tanAlpha2[i]=-(xHalfLength4[i]-xHalfLength3[i])/yHalfLength2[i]/2.;
303 tanAlpha1[i]=-(xHalfLength2[i]-xHalfLength1[i])/yHalfLength1[i]/2.;
332 G4double totalThickness=fTyvekThickness+fAlThickness+fMylarThickness;
333 G4double
delta=0.,angle1=0.*deg,angle2=0.*deg;
336 G4double rminprojected=BSCRmin*
cos(BSCAngleRotat);
337 rminprojected=BSCRmin;
340 for(i=0;i<BSCNbTheta;i++)
342 zHalfLength[BSCNbTheta+i]=totalThickness/2.;
343 yHalfLength1[BSCNbTheta+i]=yHalfLength1[i];
344 yHalfLength2[BSCNbTheta+i]=yHalfLength1[i]
345 +(yHalfLength2[i]-yHalfLength1[i])*totalThickness/BSCCryLength;
346 xHalfLength1[BSCNbTheta+i]=xHalfLength1[i];
347 xHalfLength2[BSCNbTheta+i]=xHalfLength2[i];
348 xHalfLength1[BSCNbTheta*2+i]=xHalfLength3[BSCNbTheta+i]=
349 xHalfLength1[i]*(BSCCryLength-totalThickness)/BSCCryLength
350 +xHalfLength3[i]*totalThickness/BSCCryLength;
351 xHalfLength2[BSCNbTheta*4+i]=xHalfLength4[BSCNbTheta+i]=
352 xHalfLength2[i]*(BSCCryLength-totalThickness)/BSCCryLength
353 +xHalfLength4[i]*totalThickness/BSCCryLength;
355 zHalfLength[BSCNbTheta*5+i]=zHalfLength[BSCNbTheta*4+i]=
356 zHalfLength[BSCNbTheta*3+i]=zHalfLength[BSCNbTheta*2+i]=
357 zHalfLength[i]-totalThickness/2.;
359 yHalfLength2[BSCNbTheta*2+i]=yHalfLength1[BSCNbTheta*2+i]=
360 totalThickness/
cos(thetaPosition[i+1]-thetaPosition[i])/2.;
361 xHalfLength3[BSCNbTheta*2+i]=xHalfLength3[i];
362 xHalfLength4[BSCNbTheta*2+i]=xHalfLength3[i]
363 +(xHalfLength4[i]-xHalfLength3[i])*yHalfLength2[BSCNbTheta*2+i]
365 xHalfLength2[BSCNbTheta*2+i]=xHalfLength3[BSCNbTheta+i]
366 +(xHalfLength4[BSCNbTheta+i]-xHalfLength3[BSCNbTheta+i])
367 *yHalfLength1[BSCNbTheta*2+i]/yHalfLength2[BSCNbTheta*1+i];
369 yHalfLength2[BSCNbTheta*4+i]=yHalfLength1[BSCNbTheta*4+i]=
371 xHalfLength4[BSCNbTheta*4+i]=xHalfLength4[i];
372 xHalfLength3[BSCNbTheta*4+i]=xHalfLength4[i]
373 -(xHalfLength4[i]-xHalfLength3[i])*yHalfLength2[BSCNbTheta*4+i]
375 xHalfLength1[BSCNbTheta*4+i]=xHalfLength4[BSCNbTheta+i]
376 -(xHalfLength4[BSCNbTheta+i]-xHalfLength3[BSCNbTheta+i])
377 *yHalfLength1[BSCNbTheta*4+i]/yHalfLength2[BSCNbTheta*1+i];
379 delta=totalThickness/2.+yHalfLength1[BSCNbTheta*2+i];
380 angle1=atan(yHalfLength2[i]/(xHalfLength4[i]-xHalfLength3[i]));
381 angle2=atan(2.*(xHalfLength4[i]-xHalfLength2[i])*
sin(angle1)
384 yHalfLength1[BSCNbTheta*5+i]=yHalfLength1[BSCNbTheta*3+i]=
385 yHalfLength1[i]-
delta;
386 yHalfLength2[BSCNbTheta*5+i]=yHalfLength2[BSCNbTheta*3+i]=
387 yHalfLength2[i]-
delta;
388 xHalfLength4[BSCNbTheta*3+i]=xHalfLength3[BSCNbTheta*3+i]=
389 xHalfLength2[BSCNbTheta*3+i]=xHalfLength1[BSCNbTheta*3+i]=
390 totalThickness/
cos(angle2)/
sin(angle1)/2.;
391 xHalfLength4[BSCNbTheta*5+i]=xHalfLength3[BSCNbTheta*5+i]=
392 xHalfLength2[BSCNbTheta*5+i]=xHalfLength1[BSCNbTheta*5+i]=
395 zHalfLength[i]=zHalfLength[i]-totalThickness/2.;
396 yHalfLength1[i]=yHalfLength1[i]-
delta;
397 yHalfLength2[i]=yHalfLength2[i]-
delta;
398 delta=totalThickness*(1.+1./
cos(angle2)/
sin(angle1))/2.;
399 xHalfLength1[i]=xHalfLength1[i]-
delta;
400 xHalfLength2[i]=xHalfLength2[i]-
delta;
401 xHalfLength3[i]=xHalfLength3[i]-
delta;
402 xHalfLength4[i]=xHalfLength4[i]-
delta;
404 oop=sqrt((yHalfLength2[i]-yHalfLength1[i])*(yHalfLength2[i]
406 +(xHalfLength3[i]+xHalfLength4[i]-xHalfLength1[i]
407 -xHalfLength2[i])*(xHalfLength3[i]+xHalfLength4[i]
408 -xHalfLength1[i]-xHalfLength2[i])/4);
409 thetaAxis[i]=atan(oop/BSCCryLength);
411 phiAxis[i] =180.*deg+atan((yHalfLength2[i]-yHalfLength1[i])
412 /(xHalfLength3[i]+xHalfLength4[i]
413 -xHalfLength1[i]-xHalfLength2[i])*2.);
415 oop=sqrt((yHalfLength2[BSCNbTheta+i]-yHalfLength1[BSCNbTheta+i])
416 *(yHalfLength2[BSCNbTheta+i]-yHalfLength1[BSCNbTheta+i])
417 +(xHalfLength3[BSCNbTheta+i]+xHalfLength4[BSCNbTheta+i]
418 -xHalfLength1[BSCNbTheta+i]-xHalfLength2[BSCNbTheta+i])
419 *(xHalfLength3[BSCNbTheta+i]+xHalfLength4[BSCNbTheta+i]
420 -xHalfLength1[BSCNbTheta+i]-xHalfLength2[BSCNbTheta+i])/4);
421 thetaAxis[BSCNbTheta+i]=atan(oop/totalThickness);
422 phiAxis [BSCNbTheta+i]=
423 -atan((yHalfLength2[BSCNbTheta+i]-yHalfLength1[BSCNbTheta+i])
424 /(xHalfLength3[BSCNbTheta+i]+xHalfLength4[BSCNbTheta+i]
425 -xHalfLength1[BSCNbTheta+i]-xHalfLength2[BSCNbTheta+i])*2.);
427 oop=sqrt((yHalfLength2[i]-yHalfLength1[i])*(yHalfLength2[i]
429 +(xHalfLength3[BSCNbTheta*2+i]+xHalfLength4[BSCNbTheta*2+i]
430 -xHalfLength1[BSCNbTheta*2+i]-xHalfLength2[BSCNbTheta*2+i])
431 *(xHalfLength3[BSCNbTheta*2+i]+xHalfLength4[BSCNbTheta*2+i]
432 -xHalfLength1[BSCNbTheta*2+i]-xHalfLength2[BSCNbTheta*2+i])
434 thetaAxis[BSCNbTheta*2+i]=atan(oop/(zHalfLength[BSCNbTheta*2+i]*2));
435 phiAxis [BSCNbTheta*2+i]=
436 -atan((yHalfLength2[i]-yHalfLength1[i])
437 /(xHalfLength3[BSCNbTheta*2+i]+xHalfLength4[BSCNbTheta*2+i]
438 -xHalfLength1[BSCNbTheta*2+i]-xHalfLength2[BSCNbTheta*2+i])*4);
440 oop=sqrt((yHalfLength2[i]-yHalfLength1[i])*(yHalfLength2[i]
442 +(xHalfLength4[i]-xHalfLength2[i])
443 *(xHalfLength4[i]-xHalfLength2[i])*4);
444 thetaAxis[BSCNbTheta*3+i]=atan(oop/(zHalfLength[BSCNbTheta*3+i]*2));
445 phiAxis [BSCNbTheta*3+i]=-atan((yHalfLength2[i]-yHalfLength1[i])
446 /(xHalfLength4[i]-xHalfLength2[i]));
448 thetaAxis[BSCNbTheta*4+i]=
449 atan((xHalfLength4[BSCNbTheta*4+i]+xHalfLength3[BSCNbTheta*4+i]
450 -xHalfLength2[BSCNbTheta*4+i]-xHalfLength1[BSCNbTheta*4+i])/2.
451 /(zHalfLength[BSCNbTheta*4+i]*2));
452 phiAxis [BSCNbTheta*4+i]=0;
454 thetaAxis[BSCNbTheta*5+i]=atan((xHalfLength3[BSCNbTheta*5+i]
455 -xHalfLength1[BSCNbTheta*5+i])
456 /(zHalfLength[BSCNbTheta*5+i]*2));
457 phiAxis [BSCNbTheta*5+i]=-90.*deg;
459 tanAlpha2[BSCNbTheta+i]=tanAlpha1[BSCNbTheta+i]=tanAlpha1[i]=
460 -(xHalfLength2[i]-xHalfLength1[i])/yHalfLength1[i]/2.;
461 tanAlpha1[BSCNbTheta*2+i]=(xHalfLength2[BSCNbTheta*2+i]
462 -xHalfLength1[BSCNbTheta*2+i])
463 /yHalfLength1[BSCNbTheta*2+i]/2.;
464 tanAlpha1[BSCNbTheta*3+i]=tanAlpha1[i]*2.;
465 tanAlpha1[BSCNbTheta*4+i]=(xHalfLength2[BSCNbTheta*4+i]
466 -xHalfLength1[BSCNbTheta*4+i])
467 /yHalfLength1[BSCNbTheta*4+i]/2.;
468 tanAlpha1[BSCNbTheta*5+i]=(xHalfLength2[BSCNbTheta*5+i]
469 -xHalfLength1[BSCNbTheta*5+i])
470 /yHalfLength1[BSCNbTheta*5+i]/2.;
472 tanAlpha2[i]=-(xHalfLength4[i]-xHalfLength3[i])/yHalfLength2[i]/2.;
474 tanAlpha2[BSCNbTheta*2+i]=(xHalfLength4[BSCNbTheta*2+i]
475 -xHalfLength3[BSCNbTheta*2+i])
476 /yHalfLength2[BSCNbTheta*2+i]/2.;
477 tanAlpha2[BSCNbTheta*3+i]=tanAlpha2[i]*2.;
478 tanAlpha2[BSCNbTheta*4+i]=(xHalfLength4[BSCNbTheta*4+i]
479 -xHalfLength3[BSCNbTheta*4+i])
480 /yHalfLength2[BSCNbTheta*4+i]/2.;
481 tanAlpha2[BSCNbTheta*5+i]=(xHalfLength4[BSCNbTheta*5+i]
482 -xHalfLength3[BSCNbTheta*5+i])
483 /yHalfLength2[BSCNbTheta*5+i]/2.;
485 zPosition[BSCNbTheta*5+i]=zPosition[BSCNbTheta*3+i]=zPosition[i]=
486 zPosition[i]+totalThickness/2.*
cos(thetaPosition[i])
487 -yHalfLength1[BSCNbTheta*2+i]*
sin(thetaPosition[i]);
488 zPosition[i]=totalThickness/2.;
489 xPosition[BSCNbTheta*5+i]=xPosition[BSCNbTheta*3+i]=xPosition[i]=
490 xPosition[i]+totalThickness/2.*
sin(thetaPosition[i])
491 +totalThickness*(1./
cos(thetaPosition[i+1]-thetaPosition[i])-1)/2.
492 *
cos(thetaPosition[i]);
493 xPosition[i]=totalThickness*(1.-1./
cos(angle2)/
sin(angle1))/2.;
495 yPosition[i]=yPosition[i]
496 +totalThickness*(1.-1./
cos(angle2)/
sin(angle1))/2.;
497 yPosition[i]=yHalfLength1[BSCNbTheta*2+i]-totalThickness/2.;
498 yPosition[BSCNbTheta*3+i]=yPosition[i]*2.+xHalfLength1[BSCNbTheta*3+i];
499 yPosition[BSCNbTheta*5+i]=xHalfLength1[BSCNbTheta*5+i];
501 xPosition[BSCNbTheta+i]=BSCPhiRmin
502 +zHalfLength[BSCNbTheta+i]*
sin(thetaPosition[i])
503 +(3.*yHalfLength1[BSCNbTheta+i]-yHalfLength2[BSCNbTheta+i])/2.
504 *
cos(thetaPosition[i]);
505 yPosition[BSCNbTheta+i]=(xHalfLength1[BSCNbTheta+i]
506 +xHalfLength3[BSCNbTheta+i]
507 +xHalfLength2[BSCNbTheta+i]
508 +xHalfLength4[BSCNbTheta+i])/4.;
509 zPosition[BSCNbTheta+i]=BSCPosition1+rminprojected/
tan(thetaPosition[i])
510 +(2.*yHalfLength1[BSCNbTheta+i]/
tan(thetaPosition[i])
511 +zHalfLength[BSCNbTheta+i])*
cos(thetaPosition[i])
512 +(yHalfLength1[BSCNbTheta+i]+yHalfLength2[BSCNbTheta+i])/2.
513 *
sin(thetaPosition[i]);
515 xPosition[BSCNbTheta*2+i]=xPosition[i]
516 +((yHalfLength1[i]+yHalfLength2[i])/2.+yHalfLength1[BSCNbTheta*2+i])
517 *
cos(thetaPosition[i]);
518 zPosition[BSCNbTheta*2+i]=zPosition[i]
519 -((yHalfLength1[i]+yHalfLength2[i])/2.+yHalfLength1[BSCNbTheta*2+i])
520 *
sin(thetaPosition[i]);
521 yPosition[BSCNbTheta*2+i]=(xHalfLength1[BSCNbTheta*2+i]
522 +xHalfLength3[BSCNbTheta*2+i]
523 +xHalfLength2[BSCNbTheta*2+i]
524 +xHalfLength4[BSCNbTheta*2+i])/4.;
526 xPosition[BSCNbTheta*4+i]=xPosition[i]
527 -((yHalfLength1[i]+yHalfLength2[i])/2.+yHalfLength1[BSCNbTheta*4+i])
528 *
cos(thetaPosition[i]);
529 zPosition[BSCNbTheta*4+i]=zPosition[i]
530 -((yHalfLength1[i]+yHalfLength2[i])/2.+yHalfLength1[BSCNbTheta*4+i])
531 *
sin(thetaPosition[i]);
532 yPosition[BSCNbTheta*4+i]=(xHalfLength1[BSCNbTheta*4+i]
533 +xHalfLength3[BSCNbTheta*4+i]
534 +xHalfLength2[BSCNbTheta*4+i]
535 +xHalfLength4[BSCNbTheta*4+i])/4.;
540 for(i=0;i<BSCNbTheta*6;i++)
542 G4cout <<
"The sizes of the " << i+1 <<
" crystal are:" << G4endl
543 <<
"zHalfLength =" << zHalfLength[i]/cm <<
"(cm)," << G4endl
544 <<
"thetaAxis =" << thetaAxis[i]/deg <<
"(deg),"<< G4endl
545 <<
"phiAxis =" << phiAxis[i]/deg <<
"(deg),"<< G4endl
546 <<
"yHalfLength1=" << yHalfLength1[i]/cm <<
"(cm)," << G4endl
547 <<
"xHalfLength1=" << xHalfLength1[i]/cm <<
"(cm)," << G4endl
548 <<
"xHalfLength2=" << xHalfLength2[i]/cm <<
"(cm)," << G4endl
549 <<
"tanAlpha1 =" << tanAlpha1[i] << G4endl
550 <<
"yHalfLength2=" << yHalfLength2[i]/cm <<
"(cm)," << G4endl
551 <<
"xHalfLength3=" << xHalfLength3[i]/cm <<
"(cm)," << G4endl
552 <<
"xHalfLength4=" << xHalfLength4[i]/cm <<
"(cm)," << G4endl
553 <<
"tanAlpha2 =" << tanAlpha2[i] <<
"." << G4endl
554 <<
"The position of the " << i+1 <<
" crystal is:" << G4endl
555 <<
"(" << xPosition[i]/cm <<
","
556 << yPosition[i]/cm <<
","
557 << zPosition[i]/cm <<
")cm" << G4endl;
565 fTyvekThickness = val(
'X');
566 fAlThickness = val(
'Y');
567 fMylarThickness = val(
'Z');
572 if(NbCrystal>=0&&NbCrystal<BSCNbTheta*6)
574 return xPosition[NbCrystal];
584 if(NbCrystal>=0&&NbCrystal<BSCNbTheta*6)
586 return yPosition[NbCrystal];
596 if(NbCrystal>=0&&NbCrystal<BSCNbTheta*6)
598 return zPosition[NbCrystal];
608 if(NbCrystal>=0&&NbCrystal<BSCNbTheta*6)
610 return thetaPosition[NbCrystal];
620 if(NbCrystal>=0&&NbCrystal<BSCNbTheta*6)
622 return zHalfLength[NbCrystal];
632 if(NbCrystal>=0&&NbCrystal<BSCNbTheta*6)
634 return thetaAxis[NbCrystal];
644 if(NbCrystal>=0&&NbCrystal<BSCNbTheta*6)
646 return phiAxis[NbCrystal];
656 if(NbCrystal>=0&&NbCrystal<BSCNbTheta*6)
658 return yHalfLength1[NbCrystal];
668 if(NbCrystal>=0&&NbCrystal<BSCNbTheta*6)
670 return xHalfLength1[NbCrystal];
680 if(NbCrystal>=0&&NbCrystal<BSCNbTheta*6)
682 return xHalfLength2[NbCrystal];
692 if(NbCrystal>=0&&NbCrystal<BSCNbTheta*6)
694 return tanAlpha1[NbCrystal];
704 if(NbCrystal>=0&&NbCrystal<BSCNbTheta*6)
706 return yHalfLength2[NbCrystal];
716 if(NbCrystal>=0&&NbCrystal<BSCNbTheta*6)
718 return xHalfLength3[NbCrystal];
728 if(NbCrystal>=0&&NbCrystal<BSCNbTheta*6)
730 return xHalfLength4[NbCrystal];
740 if(NbCrystal>=0&&NbCrystal<BSCNbTheta*6)
742 return tanAlpha2[NbCrystal];
752 if(NbCrystal>=0&&NbCrystal<BSCNbTheta*6)
754 return physiBSCCrystal[NbCrystal];
double tan(const BesAngle a)
double sin(const BesAngle a)
double cos(const BesAngle a)
G4double GetXHalfLength1(G4int NbCrystal)
G4double GetThetaAxis(G4int NbCrystal)
G4double GetTanAlpha2(G4int NbCrystal)
G4double GetThetaPosition(G4int NbCrystal)
G4double GetPhiAxis(G4int NbCrystal)
G4double GetTanAlpha1(G4int NbCrystal)
G4double GetYHalfLength2(G4int NbCrystal)
G4double GetYPosition(G4int NbCrystal)
void ComputeEMCParameters()
G4double GetZPosition(G4int NbCrystal)
G4double GetXHalfLength3(G4int NbCrystal)
void SetCasingThickness(G4ThreeVector)
G4VPhysicalVolume * GetPhysiBSCCrystal(G4int NbCrystal)
G4double GetZHalfLength(G4int NbCrystal)
G4double GetXHalfLength2(G4int NbCrystal)
void PrintEMCParameters()
G4double GetXHalfLength4(G4int NbCrystal)
G4double GetXPosition(G4int NbCrystal)
G4double GetYHalfLength1(G4int NbCrystal)
G4double GetTaperRingDz()
static ExtBesEmcParameter & GetInstance()
G4double GetSPBarThickness()
G4double GetTaperRingInnerLength()
G4double GetTaperRingThickness3()
G4double GetAlThickness()
G4double GetTyvekThickness()
G4double GetRearBoxLength()
G4double GetOrgGlassLengthX()
G4double GetOrgGlassLengthZ()
G4double GetRearCasingThickness()
G4double GetEndRingRmin()
G4double GetBSCPosition1()
G4double GetTaperRingThickness2()
G4double GetWaterPipeDr()
G4double GetTaperRingTheta()
G4double GetBSCPosition0()
G4double GetTaperRingThickness1()
G4double GetTaperRingOuterLength()
G4double GetSPBarThickness1()
G4double GetOrgGlassLengthY()
G4double GetWaterPipeThickness()
G4double GetCrystalLength()
G4double GetHangingPlateDz()
G4double GetPABoxThickness()
G4double GetBSCAngleRotat()
G4double GetOCGirderAngle()
G4double GetMylarThickness()