10#include "G4ThreeVector.hh"
15#include "G4SystemOfUnits.hh"
39 BSCDz = emcPara.
GetBSCDz()-TaperRingThickness3;
45 BSCDz1 = emcPara.
GetBSCDz1()-TaperRingThickness3;
95 for(G4int i=0;i<BSCNbTheta*6;i++)
133 const G4double
delta=1.*mm;
134 TaperRingRmin1 = BSCRmax1-TaperRingThickness1;
135 TaperRingDr = TaperRingThickness2/
cos(TaperRingTheta);
136 TaperRingRmin2 = BSCRmax1-TaperRingDr+TaperRingDz*
tan(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];
156 G4double rminprojected=BSCRmin*
cos(BSCAngleRotat);
157 rminprojected=BSCRmin;
159 yHalfLength2[0]= yHalfLength1[0]
160 +(BSCYFront0-BSCPosition0)/rminprojected*BSCCryLength/2.;
161 xHalfLength3[0]= xHalfLength1[0]*(BSCPhiRmin+BSCCryLength)/BSCPhiRmin;
162 xHalfLength4[0]= xHalfLength2[0]*(BSCPhiRmin+BSCCryLength)/BSCPhiRmin;
164 thetaPosition[0]= 90.*deg;
165 xPosition[0] = BSCPhiRmin+BSCCryLength/2.;
167 -(xHalfLength1[0]+xHalfLength3[0]+xHalfLength2[0]+xHalfLength4[0])/4.;
168 zPosition[0] = (yHalfLength1[0]+yHalfLength2[0])/2.;
170 theta0= 90.*deg-atan((BSCYFront0-BSCPosition0)/rminprojected);
173 G4cout <<
"------------------------------------>1"<< G4endl
174 <<
"The direction of crystal is:"
175 << theta0/deg <<
"(deg)."<< G4endl;
178 rearBoxPosX[0] = xPosition[0]+BSCCryLength/2.+rearBoxDz/2.;
179 rearBoxPosY[0] = -std::min(xHalfLength3[0], xHalfLength4[0]);
180 rearBoxPosZ[0] = yHalfLength2[0];
182 OCGirderRmin1[0] = rearBoxPosX[0]+rearBoxDz/2.+
delta;
183 OCGirderRmin2[0] = rearBoxPosX[0]+rearBoxDz/2.+
delta;
184 OCGirderDz[0] = rearBoxLength;
185 OCGirderPosZ[0] = rearBoxLength/2;
187 cableLength[0] = BSCDz-rearBoxPosZ[0];
188 cablePosX[0] = BSCPhiRmax-cableDr-2.*mm;
189 cablePosY[0] = rearBoxPosY[0]-3*cableDr;
190 cablePosZ[0] = BSCDz-cableLength[0]/2;
193 zHalfLength[1]= BSCCryLength/2.;
194 yHalfLength1[1]= BSCYFront0/2.;
195 G4double deltaR= BSCYFront0*
cos(theta0);
196 xHalfLength1[1]= xHalfLength1[0];
197 xHalfLength2[1]= xHalfLength1[1]*(BSCPhiRmin+deltaR)/BSCPhiRmin;
198 yHalfLength2[1]= yHalfLength1[1]
199 +
tan(theta0-atan(rminprojected/(BSCYFront0*(1.+1./
sin(theta0))-
200 BSCPosition1)))*BSCCryLength/2.;
201 deltaR=deltaR+BSCCryLength*
sin(theta0);
202 xHalfLength4[1]= xHalfLength1[1]*(BSCPhiRmin+deltaR)/BSCPhiRmin;
203 deltaR=deltaR-yHalfLength2[1]*2.*
cos(theta0);
204 xHalfLength3[1]= xHalfLength1[1]*(BSCPhiRmin+deltaR)/BSCPhiRmin;
206 thetaPosition[1]= theta0;
207 xPosition[1] = BSCPhiRmin+BSCCryLength/2.*
sin(theta0)
208 + (3.*yHalfLength1[1]-yHalfLength2[1])/2.*
cos(theta0);
210 -(xHalfLength1[1]+xHalfLength3[1]+xHalfLength2[1]+xHalfLength4[1])/4.;
211 zPosition[1] = yHalfLength1[0]*2.
212 + (yHalfLength1[1]*2./
tan(theta0)+BSCCryLength/2.)*
cos(theta0)
213 + (yHalfLength1[1]+yHalfLength2[1])/2.*
sin(theta0);
215 rearBoxPosX[1] = xPosition[1]+(BSCCryLength/2.+rearBoxDz/2.)*
sin(theta0);
216 rearBoxPosY[1] = -std::min(xHalfLength3[1], xHalfLength4[1]);
217 rearBoxPosZ[1] = zPosition[1]+(BSCCryLength/2.+rearBoxDz/2.)*
cos(theta0);
219 OCGirderRmin1[1] = rearBoxPosX[1]+rearBoxDz*
sin(theta0)/2.+rearBoxLength*
cos(theta0)/2+
delta;
220 OCGirderRmin2[1] = rearBoxPosX[1]+rearBoxDz*
sin(theta0)/2.-rearBoxLength*
cos(theta0)/2+
delta;
221 OCGirderDz[1] = rearBoxLength*
sin(theta0);
222 OCGirderPosZ[1] = rearBoxPosZ[1]+rearBoxDz*
cos(theta0)/2.;
224 cableLength[1] = BSCDz-rearBoxPosZ[1];
225 cablePosX[1] = cablePosX[0];
226 cablePosY[1] = cablePosY[0]+2*cableDr;
227 cablePosZ[1] = BSCDz-cableLength[1]/2;
229 theta0= theta0-atan((yHalfLength2[1]-yHalfLength1[1])*2./BSCCryLength);
231 for(i=2;i<BSCNbTheta;i++)
235 G4cout <<
"------------------------------------>"<<i<< G4endl
236 <<
"The direction of crystal is:"
237 << theta0/deg <<
"(deg)." << G4endl;
242 CryLength=BSCCryLength1;
243 yHalfLength1[i]=BSCYFront1/2.;
246 CryLength=BSCCryLength;
247 yHalfLength1[i]=BSCYFront/2.;
249 zHalfLength[i]=CryLength/2;
251 deltaR=yHalfLength1[i]*2.*
cos(theta0);
252 xHalfLength1[i]=xHalfLength1[0];
253 xHalfLength2[i]=xHalfLength1[i]/BSCPhiRmin*(BSCPhiRmin+deltaR);
254 yHalfLength2[i]=yHalfLength1[i]
255 *(1.+CryLength/(rminprojected/
sin(theta0)
256 +yHalfLength1[i]*2./
tan(theta0)));
257 deltaR=deltaR+CryLength*
sin(theta0);
258 xHalfLength4[i]=xHalfLength1[i]/BSCPhiRmin*(BSCPhiRmin+deltaR);
259 deltaR=deltaR-yHalfLength2[i]*2.*
cos(theta0);
260 xHalfLength3[i]=xHalfLength1[i]/BSCPhiRmin*(BSCPhiRmin+deltaR);
262 thetaPosition[i]=theta0;
263 xPosition[i]=BSCPhiRmin+zHalfLength[i]*
sin(theta0)
264 + (3.*yHalfLength1[i]-yHalfLength2[i])/2.*
cos(theta0);
266 -(xHalfLength1[i]+xHalfLength3[i]+xHalfLength2[i]+xHalfLength4[i])/4.;
267 zPosition[i]=BSCPosition1+rminprojected/
tan(theta0)
268 +(2.*yHalfLength1[i]/
tan(theta0)+zHalfLength[i])*
cos(theta0)
269 +(yHalfLength1[i]+yHalfLength2[i])/2.*
sin(theta0);
271 rearBoxPosX[i] = xPosition[i]+(CryLength/2.+rearBoxDz/2.)*
sin(theta0);
272 rearBoxPosY[i] = -std::min(xHalfLength3[i], xHalfLength4[i]);
273 rearBoxPosZ[i] = zPosition[i]+(CryLength/2.+rearBoxDz/2.)*
cos(theta0);
275 OCGirderRmin1[i] = rearBoxPosX[i]+rearBoxDz*
sin(theta0)/2.+rearBoxLength*
cos(theta0)/2+
delta;
276 OCGirderRmin2[i] = rearBoxPosX[i]+rearBoxDz*
sin(theta0)/2.-rearBoxLength*
cos(theta0)/2+
delta;
277 OCGirderDz[i] = rearBoxLength*
sin(theta0);
278 OCGirderPosZ[i] = rearBoxPosZ[i]+rearBoxDz*
cos(theta0)/2.;
282 yCable = i-4*(G4int)(i/4);
283 cableLength[i] = BSCDz-(rearBoxPosZ[i]+rearBoxDz/2.*
cos(theta0));
284 cablePosX[i] = cablePosX[0]-xCable*2*cableDr;
285 cablePosY[i] = cablePosY[0]+yCable*2*cableDr;
286 cablePosZ[i] = BSCDz-cableLength[i]/2;
288 theta0=theta0-atan(2.*yHalfLength1[i]/(rminprojected/
sin(theta0)
289 +2.*yHalfLength1[i]/
tan(theta0)));
292 thetaPosition[BSCNbTheta]=theta0;
295 G4cout <<
"------------------------------------>"<<i<< G4endl
296 <<
"The direction of crystal is:"
297 << theta0/deg <<
"(deg)." << G4endl;
301 G4double dx=0.001*mm;
302 for(i=0;i<BSCNbTheta;i++)
314 CryLength=BSCCryLength1;
316 CryLength=BSCCryLength;
318 oop=sqrt((yHalfLength2[i]-yHalfLength1[i])*(yHalfLength2[i]
320 +(xHalfLength3[i]+xHalfLength4[i]-xHalfLength1[i]
321 -xHalfLength2[i])*(xHalfLength3[i]+xHalfLength4[i]
322 -xHalfLength1[i]-xHalfLength2[i])/4);
323 thetaAxis[i]=atan(oop/CryLength);
324 phiAxis[i] =180.*deg+atan((yHalfLength2[i]-yHalfLength1[i])
325 /(xHalfLength3[i]+xHalfLength4[i]
326 -xHalfLength1[i]-xHalfLength2[i])*2.);
327 tanAlpha2[i]=-(xHalfLength4[i]-xHalfLength3[i])/yHalfLength2[i]/2.;
328 tanAlpha1[i]=-(xHalfLength2[i]-xHalfLength1[i])/yHalfLength1[i]/2.;
357 G4double totalThickness=fTyvekThickness+fAlThickness+fMylarThickness;
358 G4double
delta=0.,angle1=0.*deg,angle2=0.*deg;
361 G4double rminprojected=BSCRmin*
cos(BSCAngleRotat);
362 rminprojected=BSCRmin;
366 for(i=0;i<BSCNbTheta;i++)
371 CryLength=BSCCryLength1;
373 CryLength=BSCCryLength;
375 zHalfLength[BSCNbTheta+i]=totalThickness/2.;
376 yHalfLength1[BSCNbTheta+i]=yHalfLength1[i];
377 yHalfLength2[BSCNbTheta+i]=yHalfLength1[i]
378 +(yHalfLength2[i]-yHalfLength1[i])*totalThickness/CryLength;
379 xHalfLength1[BSCNbTheta+i]=xHalfLength1[i];
380 xHalfLength2[BSCNbTheta+i]=xHalfLength2[i];
381 xHalfLength1[BSCNbTheta*2+i]=xHalfLength3[BSCNbTheta+i]=
382 xHalfLength1[i]*(CryLength-totalThickness)/CryLength
383 +xHalfLength3[i]*totalThickness/CryLength;
384 xHalfLength2[BSCNbTheta*4+i]=xHalfLength4[BSCNbTheta+i]=
385 xHalfLength2[i]*(CryLength-totalThickness)/CryLength
386 +xHalfLength4[i]*totalThickness/CryLength;
388 zHalfLength[BSCNbTheta*5+i]=zHalfLength[BSCNbTheta*4+i]=
389 zHalfLength[BSCNbTheta*3+i]=zHalfLength[BSCNbTheta*2+i]=
390 zHalfLength[i]-totalThickness/2.;
392 yHalfLength2[BSCNbTheta*2+i]=yHalfLength1[BSCNbTheta*2+i]=
393 totalThickness/
cos(thetaPosition[i+1]-thetaPosition[i])/2.;
394 xHalfLength3[BSCNbTheta*2+i]=xHalfLength3[i];
395 xHalfLength4[BSCNbTheta*2+i]=xHalfLength3[i]
396 +(xHalfLength4[i]-xHalfLength3[i])*yHalfLength2[BSCNbTheta*2+i]
398 xHalfLength2[BSCNbTheta*2+i]=xHalfLength3[BSCNbTheta+i]
399 +(xHalfLength4[BSCNbTheta+i]-xHalfLength3[BSCNbTheta+i])
400 *yHalfLength1[BSCNbTheta*2+i]/yHalfLength2[BSCNbTheta*1+i];
402 yHalfLength2[BSCNbTheta*4+i]=yHalfLength1[BSCNbTheta*4+i]=
404 xHalfLength4[BSCNbTheta*4+i]=xHalfLength4[i];
405 xHalfLength3[BSCNbTheta*4+i]=xHalfLength4[i]
406 -(xHalfLength4[i]-xHalfLength3[i])*yHalfLength2[BSCNbTheta*4+i]
408 xHalfLength1[BSCNbTheta*4+i]=xHalfLength4[BSCNbTheta+i]
409 -(xHalfLength4[BSCNbTheta+i]-xHalfLength3[BSCNbTheta+i])
410 *yHalfLength1[BSCNbTheta*4+i]/yHalfLength2[BSCNbTheta*1+i];
412 delta=totalThickness/2.+yHalfLength1[BSCNbTheta*2+i];
413 angle1=atan(yHalfLength2[i]/(xHalfLength4[i]-xHalfLength3[i]));
414 angle2=atan(2.*(xHalfLength4[i]-xHalfLength2[i])*
sin(angle1)
417 yHalfLength1[BSCNbTheta*5+i]=yHalfLength1[BSCNbTheta*3+i]=
418 yHalfLength1[i]-
delta;
419 yHalfLength2[BSCNbTheta*5+i]=yHalfLength2[BSCNbTheta*3+i]=
420 yHalfLength2[i]-
delta;
421 xHalfLength4[BSCNbTheta*3+i]=xHalfLength3[BSCNbTheta*3+i]=
422 xHalfLength2[BSCNbTheta*3+i]=xHalfLength1[BSCNbTheta*3+i]=
423 totalThickness/
cos(angle2)/
sin(angle1)/2.;
424 xHalfLength4[BSCNbTheta*5+i]=xHalfLength3[BSCNbTheta*5+i]=
425 xHalfLength2[BSCNbTheta*5+i]=xHalfLength1[BSCNbTheta*5+i]=
428 zHalfLength[i]=zHalfLength[i]-totalThickness/2.;
429 yHalfLength1[i]=yHalfLength1[i]-
delta;
430 yHalfLength2[i]=yHalfLength2[i]-
delta;
431 delta=totalThickness*(1.+1./
cos(angle2)/
sin(angle1))/2.;
432 xHalfLength1[i]=xHalfLength1[i]-
delta;
433 xHalfLength2[i]=xHalfLength2[i]-
delta;
434 xHalfLength3[i]=xHalfLength3[i]-
delta;
435 xHalfLength4[i]=xHalfLength4[i]-
delta;
437 oop=sqrt((yHalfLength2[i]-yHalfLength1[i])*(yHalfLength2[i]
439 +(xHalfLength3[i]+xHalfLength4[i]-xHalfLength1[i]
440 -xHalfLength2[i])*(xHalfLength3[i]+xHalfLength4[i]
441 -xHalfLength1[i]-xHalfLength2[i])/4);
442 thetaAxis[i]=atan(oop/CryLength);
444 phiAxis[i] =180.*deg+atan((yHalfLength2[i]-yHalfLength1[i])
445 /(xHalfLength3[i]+xHalfLength4[i]
446 -xHalfLength1[i]-xHalfLength2[i])*2.);
448 oop=sqrt((yHalfLength2[BSCNbTheta+i]-yHalfLength1[BSCNbTheta+i])
449 *(yHalfLength2[BSCNbTheta+i]-yHalfLength1[BSCNbTheta+i])
450 +(xHalfLength3[BSCNbTheta+i]+xHalfLength4[BSCNbTheta+i]
451 -xHalfLength1[BSCNbTheta+i]-xHalfLength2[BSCNbTheta+i])
452 *(xHalfLength3[BSCNbTheta+i]+xHalfLength4[BSCNbTheta+i]
453 -xHalfLength1[BSCNbTheta+i]-xHalfLength2[BSCNbTheta+i])/4);
454 thetaAxis[BSCNbTheta+i]=atan(oop/totalThickness);
455 phiAxis [BSCNbTheta+i]=
456 -atan((yHalfLength2[BSCNbTheta+i]-yHalfLength1[BSCNbTheta+i])
457 /(xHalfLength3[BSCNbTheta+i]+xHalfLength4[BSCNbTheta+i]
458 -xHalfLength1[BSCNbTheta+i]-xHalfLength2[BSCNbTheta+i])*2.);
460 oop=sqrt((yHalfLength2[i]-yHalfLength1[i])*(yHalfLength2[i]
462 +(xHalfLength3[BSCNbTheta*2+i]+xHalfLength4[BSCNbTheta*2+i]
463 -xHalfLength1[BSCNbTheta*2+i]-xHalfLength2[BSCNbTheta*2+i])
464 *(xHalfLength3[BSCNbTheta*2+i]+xHalfLength4[BSCNbTheta*2+i]
465 -xHalfLength1[BSCNbTheta*2+i]-xHalfLength2[BSCNbTheta*2+i])
467 thetaAxis[BSCNbTheta*2+i]=atan(oop/(zHalfLength[BSCNbTheta*2+i]*2));
468 phiAxis [BSCNbTheta*2+i]=
469 -atan((yHalfLength2[i]-yHalfLength1[i])
470 /(xHalfLength3[BSCNbTheta*2+i]+xHalfLength4[BSCNbTheta*2+i]
471 -xHalfLength1[BSCNbTheta*2+i]-xHalfLength2[BSCNbTheta*2+i])*4);
473 oop=sqrt((yHalfLength2[i]-yHalfLength1[i])*(yHalfLength2[i]
475 +(xHalfLength4[i]-xHalfLength2[i])
476 *(xHalfLength4[i]-xHalfLength2[i])*4);
477 thetaAxis[BSCNbTheta*3+i]=atan(oop/(zHalfLength[BSCNbTheta*3+i]*2));
478 phiAxis [BSCNbTheta*3+i]=-atan((yHalfLength2[i]-yHalfLength1[i])
479 /(xHalfLength4[i]-xHalfLength2[i]));
481 thetaAxis[BSCNbTheta*4+i]=
482 atan((xHalfLength4[BSCNbTheta*4+i]+xHalfLength3[BSCNbTheta*4+i]
483 -xHalfLength2[BSCNbTheta*4+i]-xHalfLength1[BSCNbTheta*4+i])/2.
484 /(zHalfLength[BSCNbTheta*4+i]*2));
485 phiAxis [BSCNbTheta*4+i]=0;
487 thetaAxis[BSCNbTheta*5+i]=atan((xHalfLength3[BSCNbTheta*5+i]
488 -xHalfLength1[BSCNbTheta*5+i])
489 /(zHalfLength[BSCNbTheta*5+i]*2));
490 phiAxis [BSCNbTheta*5+i]=-90.*deg;
492 tanAlpha2[BSCNbTheta+i]=tanAlpha1[BSCNbTheta+i]=tanAlpha1[i]=
493 -(xHalfLength2[i]-xHalfLength1[i])/yHalfLength1[i]/2.;
494 tanAlpha1[BSCNbTheta*2+i]=(xHalfLength2[BSCNbTheta*2+i]
495 -xHalfLength1[BSCNbTheta*2+i])
496 /yHalfLength1[BSCNbTheta*2+i]/2.;
497 tanAlpha1[BSCNbTheta*3+i]=tanAlpha1[i]*2.;
498 tanAlpha1[BSCNbTheta*4+i]=(xHalfLength2[BSCNbTheta*4+i]
499 -xHalfLength1[BSCNbTheta*4+i])
500 /yHalfLength1[BSCNbTheta*4+i]/2.;
501 tanAlpha1[BSCNbTheta*5+i]=(xHalfLength2[BSCNbTheta*5+i]
502 -xHalfLength1[BSCNbTheta*5+i])
503 /yHalfLength1[BSCNbTheta*5+i]/2.;
505 tanAlpha2[i]=-(xHalfLength4[i]-xHalfLength3[i])/yHalfLength2[i]/2.;
507 tanAlpha2[BSCNbTheta*2+i]=(xHalfLength4[BSCNbTheta*2+i]
508 -xHalfLength3[BSCNbTheta*2+i])
509 /yHalfLength2[BSCNbTheta*2+i]/2.;
510 tanAlpha2[BSCNbTheta*3+i]=tanAlpha2[i]*2.;
511 tanAlpha2[BSCNbTheta*4+i]=(xHalfLength4[BSCNbTheta*4+i]
512 -xHalfLength3[BSCNbTheta*4+i])
513 /yHalfLength2[BSCNbTheta*4+i]/2.;
514 tanAlpha2[BSCNbTheta*5+i]=(xHalfLength4[BSCNbTheta*5+i]
515 -xHalfLength3[BSCNbTheta*5+i])
516 /yHalfLength2[BSCNbTheta*5+i]/2.;
518 zPosition[BSCNbTheta*5+i]=zPosition[BSCNbTheta*3+i]=zPosition[i]=
519 zPosition[i]+totalThickness/2.*
cos(thetaPosition[i])
520 -yHalfLength1[BSCNbTheta*2+i]*
sin(thetaPosition[i]);
521 zPosition[i]=totalThickness/2.;
522 xPosition[BSCNbTheta*5+i]=xPosition[BSCNbTheta*3+i]=xPosition[i]=
523 xPosition[i]+totalThickness/2.*
sin(thetaPosition[i])
524 +totalThickness*(1./
cos(thetaPosition[i+1]-thetaPosition[i])-1)/2.
525 *
cos(thetaPosition[i]);
526 xPosition[i]=totalThickness*(1.-1./
cos(angle2)/
sin(angle1))/2.;
528 yPosition[i]=yPosition[i]
529 +totalThickness*(1.-1./
cos(angle2)/
sin(angle1))/2.;
530 yPosition[i]=yHalfLength1[BSCNbTheta*2+i]-totalThickness/2.;
531 yPosition[BSCNbTheta*3+i]=yPosition[i]*2.+xHalfLength1[BSCNbTheta*3+i];
532 yPosition[BSCNbTheta*5+i]=xHalfLength1[BSCNbTheta*5+i];
534 xPosition[BSCNbTheta+i]=BSCPhiRmin
535 +zHalfLength[BSCNbTheta+i]*
sin(thetaPosition[i])
536 +(3.*yHalfLength1[BSCNbTheta+i]-yHalfLength2[BSCNbTheta+i])/2.
537 *
cos(thetaPosition[i]);
538 yPosition[BSCNbTheta+i]=(xHalfLength1[BSCNbTheta+i]
539 +xHalfLength3[BSCNbTheta+i]
540 +xHalfLength2[BSCNbTheta+i]
541 +xHalfLength4[BSCNbTheta+i])/4.;
542 zPosition[BSCNbTheta+i]=BSCPosition1+rminprojected/
tan(thetaPosition[i])
543 +(2.*yHalfLength1[BSCNbTheta+i]/
tan(thetaPosition[i])
544 +zHalfLength[BSCNbTheta+i])*
cos(thetaPosition[i])
545 +(yHalfLength1[BSCNbTheta+i]+yHalfLength2[BSCNbTheta+i])/2.
546 *
sin(thetaPosition[i]);
548 xPosition[BSCNbTheta*2+i]=xPosition[i]
549 +((yHalfLength1[i]+yHalfLength2[i])/2.+yHalfLength1[BSCNbTheta*2+i])
550 *
cos(thetaPosition[i]);
551 zPosition[BSCNbTheta*2+i]=zPosition[i]
552 -((yHalfLength1[i]+yHalfLength2[i])/2.+yHalfLength1[BSCNbTheta*2+i])
553 *
sin(thetaPosition[i]);
554 yPosition[BSCNbTheta*2+i]=(xHalfLength1[BSCNbTheta*2+i]
555 +xHalfLength3[BSCNbTheta*2+i]
556 +xHalfLength2[BSCNbTheta*2+i]
557 +xHalfLength4[BSCNbTheta*2+i])/4.;
559 xPosition[BSCNbTheta*4+i]=xPosition[i]
560 -((yHalfLength1[i]+yHalfLength2[i])/2.+yHalfLength1[BSCNbTheta*4+i])
561 *
cos(thetaPosition[i]);
562 zPosition[BSCNbTheta*4+i]=zPosition[i]
563 -((yHalfLength1[i]+yHalfLength2[i])/2.+yHalfLength1[BSCNbTheta*4+i])
564 *
sin(thetaPosition[i]);
565 yPosition[BSCNbTheta*4+i]=(xHalfLength1[BSCNbTheta*4+i]
566 +xHalfLength3[BSCNbTheta*4+i]
567 +xHalfLength2[BSCNbTheta*4+i]
568 +xHalfLength4[BSCNbTheta*4+i])/4.;
573 for(i=0;i<BSCNbTheta*6;i++)
575 G4cout <<
"The sizes of the " << i+1 <<
" crystal are:" << G4endl
576 <<
"zHalfLength =" << zHalfLength[i]/cm <<
"(cm)," << G4endl
577 <<
"thetaAxis =" << thetaAxis[i]/deg <<
"(deg),"<< G4endl
578 <<
"phiAxis =" << phiAxis[i]/deg <<
"(deg),"<< G4endl
579 <<
"yHalfLength1=" << yHalfLength1[i]/cm <<
"(cm)," << G4endl
580 <<
"xHalfLength1=" << xHalfLength1[i]/cm <<
"(cm)," << G4endl
581 <<
"xHalfLength2=" << xHalfLength2[i]/cm <<
"(cm)," << G4endl
582 <<
"tanAlpha1 =" << tanAlpha1[i] << G4endl
583 <<
"yHalfLength2=" << yHalfLength2[i]/cm <<
"(cm)," << G4endl
584 <<
"xHalfLength3=" << xHalfLength3[i]/cm <<
"(cm)," << G4endl
585 <<
"xHalfLength4=" << xHalfLength4[i]/cm <<
"(cm)," << G4endl
586 <<
"tanAlpha2 =" << tanAlpha2[i] <<
"." << G4endl
587 <<
"The position of the " << i+1 <<
" crystal is:" << G4endl
588 <<
"(" << xPosition[i]/cm <<
","
589 << yPosition[i]/cm <<
","
590 << zPosition[i]/cm <<
")cm" << G4endl;
598 fTyvekThickness = val(
'X');
599 fAlThickness = val(
'Y');
600 fMylarThickness = val(
'Z');
605 if(NbCrystal>=0&&NbCrystal<BSCNbTheta*6)
607 return xPosition[NbCrystal];
617 if(NbCrystal>=0&&NbCrystal<BSCNbTheta*6)
619 return yPosition[NbCrystal];
629 if(NbCrystal>=0&&NbCrystal<BSCNbTheta*6)
631 return zPosition[NbCrystal];
641 if(NbCrystal>=0&&NbCrystal<BSCNbTheta*6)
643 return thetaPosition[NbCrystal];
653 if(NbCrystal>=0&&NbCrystal<BSCNbTheta*6)
655 return zHalfLength[NbCrystal];
665 if(NbCrystal>=0&&NbCrystal<BSCNbTheta*6)
667 return thetaAxis[NbCrystal];
677 if(NbCrystal>=0&&NbCrystal<BSCNbTheta*6)
679 return phiAxis[NbCrystal];
689 if(NbCrystal>=0&&NbCrystal<BSCNbTheta*6)
691 return yHalfLength1[NbCrystal];
701 if(NbCrystal>=0&&NbCrystal<BSCNbTheta*6)
703 return xHalfLength1[NbCrystal];
713 if(NbCrystal>=0&&NbCrystal<BSCNbTheta*6)
715 return xHalfLength2[NbCrystal];
725 if(NbCrystal>=0&&NbCrystal<BSCNbTheta*6)
727 return tanAlpha1[NbCrystal];
737 if(NbCrystal>=0&&NbCrystal<BSCNbTheta*6)
739 return yHalfLength2[NbCrystal];
749 if(NbCrystal>=0&&NbCrystal<BSCNbTheta*6)
751 return xHalfLength3[NbCrystal];
761 if(NbCrystal>=0&&NbCrystal<BSCNbTheta*6)
763 return xHalfLength4[NbCrystal];
773 if(NbCrystal>=0&&NbCrystal<BSCNbTheta*6)
775 return tanAlpha2[NbCrystal];
785 if(NbCrystal>=0&&NbCrystal<BSCNbTheta*6)
787 return physiBSCCrystal[NbCrystal];
double tan(const BesAngle a)
double sin(const BesAngle a)
double cos(const BesAngle a)
void ComputeEMCParameters()
G4double GetThetaPosition(G4int NbCrystal)
G4double GetYPosition(G4int NbCrystal)
G4double GetZHalfLength(G4int NbCrystal)
G4double GetXHalfLength2(G4int NbCrystal)
G4double GetTanAlpha2(G4int NbCrystal)
G4double GetTanAlpha1(G4int NbCrystal)
G4double GetYHalfLength1(G4int NbCrystal)
G4double GetThetaAxis(G4int NbCrystal)
G4double GetXHalfLength4(G4int NbCrystal)
G4double GetYHalfLength2(G4int NbCrystal)
G4VPhysicalVolume * GetPhysiBSCCrystal(G4int NbCrystal)
G4double GetXPosition(G4int NbCrystal)
G4double GetZPosition(G4int NbCrystal)
void SetCasingThickness(G4ThreeVector)
G4double GetXHalfLength1(G4int NbCrystal)
G4double GetPhiAxis(G4int NbCrystal)
void PrintEMCParameters()
G4double GetXHalfLength3(G4int NbCrystal)
G4double GetOrgGlassLengthY()
G4double GetBSCPosition1()
G4double GetCrystalLength()
G4double GetRearCasingThickness()
G4double GetOrgGlassLengthZ()
G4double GetOCGirderAngle()
G4double GetSPBarThickness()
G4double GetBSCPosition0()
G4double GetTaperRingInnerLength()
G4double GetTaperRingThickness1()
static BesEmcParameter & GetInstance()
G4double GetTyvekThickness()
G4double GetOrgGlassLengthX()
G4double GetTaperRingDz()
G4double GetTaperRingThickness3()
G4double GetMylarThickness()
G4double GetWaterPipeThickness()
G4double GetWaterPipeDr()
G4double GetTaperRingTheta()
G4double GetHangingPlateDz()
G4double GetRearBoxLength()
G4double GetEndRingRmin()
G4double GetCrystalLength1()
G4double GetSPBarThickness1()
G4double GetTaperRingThickness2()
G4double GetTaperRingOuterLength()
G4double GetAlThickness()
G4double GetPABoxThickness()
G4double GetBSCAngleRotat()