75 G4cout <<
"----------------------------------------------------------------" <<
G4endl;;
77 G4cout <<
"\n\n\tnominal beam energy: "<<idEnergy <<
G4endl;
79 G4cout <<
"\tJaw X aperture: 1) "<< jaw1XAperture/
mm<<
"[mm]\t2) " << jaw2XAperture/
mm<<
" [mm]"<<
G4endl;
80 G4cout <<
"\tJaw Y aperture: 1) "<< jaw1YAperture/
mm<<
"[mm]\t2) " << jaw2YAperture/
mm<<
" [mm]\n"<<
G4endl;
81 if (vec_leavesA.size()>0)
84 for (
int i=0; i< (
int)vec_leavesA.size(); i++)
93 if (vec_leavesB.size()>0)
96 for (
int i=0; i< (
int)vec_leavesB.size(); i++)
105 G4cout <<
"______________________________________________________________" <<
G4endl;
142 theta=fabs(atan(jaw1XAperture/isoCentre));
148 theta=fabs(atan(jaw2XAperture/isoCentre));
154 theta=fabs(atan(jaw1YAperture/isoCentre));
160 theta=fabs(atan(jaw2YAperture/isoCentre));
170 bool bCreated =
false;
177 G4Box *targetABox =
new G4Box(
"targetABox", 5.*
mm, 5.*
mm, (.035*25.4/2.)*
mm);
181 G4Box *targetBBox =
new G4Box(
"targetABox", 5.*
mm, 5.*
mm, (0.062*25.4/2.)*
mm);
231 G4Box *targetABox =
new G4Box(
"targetABox", 5.*
mm, 5.*
mm, (.025*25.4/2.)*
mm);
235 G4Box *targetBBox =
new G4Box(
"targetABox", 5.*
mm, 5.*
mm, (0.312*25.4/2.)*
mm);
286 bool bCreated =
false;
304 new G4PVPlacement(0, centre,
"PrimaryCollimatorUTubePV", PCUTubeLV, PVWorld,
false, 0);
316 G4Cons* collimCone =
new G4Cons(
"PrimaryCollimatorLCone", 0., (16.*std::tan(coneAperture))*
mm, 0., (76.*std::tan(coneAperture))*mm, 30.*mm, 0.*
deg, 360.*
deg);
324 new G4PVPlacement(0, centre,
"TubeMinusConeLPV", collimConeLV, PCLTubePV,
false, 0);
341 bool bCreated =
false;
369 bool bCreated =
false;
374 G4double distanceLast = 116.3386 - 0.932*25.4/2.*
mm;
377 const int PointsNumber=22;
379 G4double xRadius[PointsNumber]={0.0000000001, .025, .050, .075, .1, .15, .2, .25, .3, .35, .4, .5, .6, .7, .8, .9, 1., 1.1, 1.205, 1.3, 1.325, 1.5};
380 G4double yHeight[PointsNumber]={.932, .92, .907, .892, .874, .83, .782, .736, .69, .645, .601, .516, .437, .361, .294, .22, .173, .118, .08, .08, .125, .125};
384 for (i = 0; i<PointsNumber; i++)
392 G4double halfHeigth, rMaxInf, rMaxSup, rMinInf, rMinSup;
404 for (i = 0 ; i < 19; i++)
408 halfHeigth = (yHeight[i]-yHeight[i+1])/2. ;
411 halfHeigth = yHeight[i]/2.;
414 rMaxInf = xRadius[i];
415 rMaxSup = xRadius[i+1];
418 centre.
set(0.,0.,distanceLast+halfHeigth); distanceLast+=halfHeigth*2.;
419 name =
"ffConeG"+iName;
420 cone =
new G4Cons(name, rMinInf, rMaxInf, rMinSup, rMaxSup, halfHeigth, angleStart, angleStop);
421 name =
"ffConeLV"+iName;
423 name =
"ffConePV"+iName;
424 new G4PVPlacement(0, centre, name, logVol, PVWorld,
false, 0);
435 halfHeigth = yHeight[19]/2. ;
436 rMaxInf = xRadius[21];
437 rMaxSup = xRadius[21];
440 centre.
set(0.,0., distanceLast+halfHeigth);
443 name =
"ffConeG"+iName;
444 cone =
new G4Cons(name, rMinInf, rMaxInf, rMinSup, rMaxSup, halfHeigth, angleStart, angleStop);
445 name =
"ffConeLV"+iName;
447 name =
"ffConePV"+iName;
448 new G4PVPlacement(0, centre, name, logVol, PVWorld,
false, 0);
455 simpleAlSVisAtt -> SetVisibility(
true);
456 logVol -> SetVisAttributes(simpleAlSVisAtt);
458 halfHeigth = (yHeight[20]-yHeight[19])/2. ;
459 rMaxInf = xRadius[21];
460 rMaxSup = xRadius[21];
461 rMinInf = xRadius[20];
462 rMinSup = xRadius[19];
463 centre.
set(0.,0., distanceLast-halfHeigth);
464 sprintf(a,
"%d", ++i);
466 name =
"ffConeG"+iName;
467 cone =
new G4Cons(name, rMinInf, rMaxInf, rMinSup, rMaxSup, halfHeigth, angleStart, angleStop);
468 name =
"ffConeLV"+iName;
470 name =
"ffConePV"+iName;
471 new G4PVPlacement(0, centre, name, logVol,PVWorld,
false, 0);
486 G4double distanceLast = 125.+.125*25.4 - 0.744*25.4/2.- 0.744*25.4/2.*
mm;
489 const int PointsNumber = 21;
491 G4double xRadius[PointsNumber] = {0.0000000001, 0.040, 0.078,
492 0.105, 0.131, 0.160, 0.205, 0.248, 0.343, 0.436, 0.531,
493 0.628, 0.727, 0.829, 0.880, 0.932, 0.983, 1.037, 1.250,
495 G4double yHeight[PointsNumber] = {0.744, 0.718, 0.682, 0.653,
496 0.622, 0.593, 0.547, 0.506, 0.427, 0.354, 0.287, 0.225,
497 0.168, 0.119, 0.090, 0.067, 0.047, 0.030, 0.030, 0.125,
502 for (i = 0; i < PointsNumber; i++)
510 G4double halfHeigth, rMaxInf, rMaxSup, rMinInf, rMinSup;
526 halfHeigth = (yHeight[i]-yHeight[i+1])/2. ;
529 halfHeigth = yHeight[i]/2.;
531 rMaxInf = xRadius[i];
532 rMaxSup = xRadius[i+1];
535 centre.
set(0.,0.,distanceLast+halfHeigth); distanceLast+=halfHeigth*2.;
536 name =
"ffConeG"+iName;
537 cone =
new G4Cons(name, rMinInf, rMaxInf, rMinSup, rMaxSup, halfHeigth, angleStart, angleStop);
538 name =
"ffConeLV"+iName;
540 name =
"ffConePV"+iName;
541 new G4PVPlacement(0, centre, name, logVol, PVWorld,
false, 0);
544 logVol -> SetRegion(regVol);
545 regVol -> AddRootLogicalVolume(logVol);
548 simpleAlSVisAtt -> SetVisibility(
true);
549 logVol -> SetVisAttributes(simpleAlSVisAtt);
552 halfHeigth = yHeight[18]/2. ;
553 rMaxInf = xRadius[20];
554 rMaxSup = xRadius[20];
557 centre.
set(0.,0., distanceLast+halfHeigth);
560 name =
"ffConeG"+iName;
561 cone =
new G4Cons(name, rMinInf, rMaxInf, rMinSup, rMaxSup, halfHeigth, angleStart, angleStop);
562 name =
"ffConeLV"+iName;
564 name =
"ffConePV"+iName;
565 new G4PVPlacement(0, centre, name, logVol, PVWorld,
false, 0);
568 logVol -> SetRegion(regVol);
569 regVol -> AddRootLogicalVolume(logVol);
572 simpleAlSVisAtt -> SetVisibility(
true);
573 logVol -> SetVisAttributes(simpleAlSVisAtt);
575 halfHeigth = (yHeight[19]-yHeight[18])/2. ;
576 rMaxInf = xRadius[20];
577 rMaxSup = xRadius[20];
578 rMinInf = xRadius[19];
579 rMinSup = xRadius[18];
580 centre.
set(0.,0., distanceLast-halfHeigth);
581 sprintf(a,
"%d", ++i);
583 name =
"ffConeG"+iName;
584 cone =
new G4Cons(name, rMinInf, rMaxInf, rMinSup, rMaxSup, halfHeigth, angleStart, angleStop);
585 name =
"ffConeLV"+iName;
587 name =
"ffConePV"+iName;
588 new G4PVPlacement(0, centre, name, logVol,PVWorld,
false, 0);
591 logVol -> SetRegion(regVol);
592 regVol -> AddRootLogicalVolume(logVol);
595 simpleAlSVisAtt -> SetVisibility(
true);
596 logVol -> SetVisAttributes(simpleAlSVisAtt);
606 bool bCreated =
false;
612 cuts -> SetProductionCut(0.1*
cm);
613 regVol -> SetProductionCuts(cuts);
618 G4Tubs* ICTubeW =
new G4Tubs(
"ionizationChamberTube", 0., 3.75*2.54*10.*
mm, 0.005*25.4*
mm, 0.*
deg, 360.*
deg);
619 G4Tubs* ICTubeP =
new G4Tubs(
"ionizationChamberTube", 0., 3.75*2.54*10.*
mm, 0.002*25.4*
mm, 0.*
deg, 360.*
deg);
623 centre.
set(0.,0.,148.35*
mm);
625 new G4PVPlacement(0, centre,
"ionizationChamberTubeW1PV", PCUTubeW1LV, PVWorld,
false, 0);
627 simpleAlSVisAtt -> SetVisibility(
true);
628 PCUTubeW1LV -> SetVisAttributes(simpleAlSVisAtt);
629 PCUTubeW1LV -> SetRegion(regVol);
630 regVol -> AddRootLogicalVolume(PCUTubeW1LV);
633 centre.
set(0.,0.,150.73*
mm);
635 new G4PVPlacement(0, centre,
"ionizationChamberTubeP1PV", PCUTubeP1LV, PVWorld,
false, 0);
637 simpleAlSVisAtt -> SetVisibility(
true);
638 PCUTubeP1LV -> SetVisAttributes(simpleAlSVisAtt);
639 PCUTubeP1LV -> SetRegion(regVol);
640 regVol -> AddRootLogicalVolume(PCUTubeP1LV);
643 centre.
set(0.,0.,155.5*
mm);
645 new G4PVPlacement(0, centre,
"ionizationChamberTubeW2PV", PCUTubeW2LV, PVWorld,
false, 0);
647 simpleAlSVisAtt -> SetVisibility(
true);
648 PCUTubeW2LV -> SetVisAttributes(simpleAlSVisAtt);
649 PCUTubeW2LV -> SetRegion(regVol);
650 regVol -> AddRootLogicalVolume(PCUTubeW2LV);
653 centre.
set(0.,0.,153.12*
mm);
655 new G4PVPlacement(0, centre,
"ionizationChamberTubeP2PV", PCUTubeP2LV, PVWorld,
false, 0);
663 centre.
set(0.,0.,162.65*
mm);
665 new G4PVPlacement(0, centre,
"ionizationChamberTubeW3PV", PCUTubeW3LV, PVWorld,
false, 0);
667 simpleAlSVisAtt -> SetVisibility(
true);
668 PCUTubeW3LV -> SetVisAttributes(simpleAlSVisAtt);
669 PCUTubeW3LV -> SetRegion(regVol);
670 regVol -> AddRootLogicalVolume(PCUTubeW3LV);
673 centre.
set(0.,0.,157.88*
mm);
675 new G4PVPlacement(0, centre,
"ionizationChamberTubeP3PV", PCUTubeP3LV, PVWorld,
false, 0);
677 simpleAlSVisAtt -> SetVisibility(
true);
678 PCUTubeP3LV -> SetVisAttributes(simpleAlSVisAtt);
679 PCUTubeP3LV -> SetRegion(regVol);
680 regVol -> AddRootLogicalVolume(PCUTubeP3LV);
683 centre.
set(0.,0.,160.27*
mm);
685 new G4PVPlacement(0, centre,
"ionizationChamberTubeP4PV", PCUTubeP4LV, PVWorld,
false, 0);
697 bool bCreated =
false;
704 cuts -> SetProductionCut(0.1*
cm);
705 regVol -> SetProductionCuts(cuts);
710 cRotation -> rotateY(35.0*
deg);
714 simpleAlSVisAtt -> SetVisibility(
true);
715 MirrorTubeLV -> SetVisAttributes(simpleAlSVisAtt);
716 MirrorTubeLV -> SetRegion(regVol);
717 regVol -> AddRootLogicalVolume(MirrorTubeLV);
724 bool bCreated =
false;
737 centre.
set(0.,0.,(367.+78./2.)*
mm);
741 SetJawAperture(1, centre, halfSize,cRotation);
742 new G4PVPlacement(cRotation, centre, name+
"PV", logVol, PVWorld,
false, 0);
745 logVol->SetRegion(regVol);
751 logVol->SetVisAttributes(simpleAlSVisAtt);
769 centre.
set(0.,0.,(367.+78./2.)*
mm);
773 SetJawAperture(2, centre, halfSize, cRotation);
774 new G4PVPlacement(cRotation, centre, name+
"PV", logVol, PVWorld,
false, 0);
777 logVol->SetRegion(regVol);
783 logVol->SetVisAttributes(simpleAlSVisAtt);
790 bool bCreated =
false;
802 centre.
set(0.,0.,(280.+78./2.)*
mm);
806 SetJawAperture(3, centre, halfSize, cRotation);
807 new G4PVPlacement(cRotation, centre, name+
"PV", logVol, PVWorld,
false, 0);
810 logVol->SetRegion(regVol);
816 logVol->SetVisAttributes(simpleAlSVisAtt);
823 bool bCreated =
false;
834 centre.
set(0.,0.,(280.+78./2.)*
mm);
838 SetJawAperture(4, centre, halfSize, cRotation);
839 new G4PVPlacement(cRotation, centre, name+
"PV", logVol, PVWorld,
false, 0);
842 logVol->SetRegion(regVol);
848 simpleAlSVisAtt -> SetVisibility(
true);
849 logVol -> SetVisAttributes(simpleAlSVisAtt);
858 bool bCreated =
false;
871 centreStart.
set(0.,0.,(482.5+535.5)/2.*
mm);
873 box1Size.
set(5.2883/2.*
mm, 167.488/2.*
mm, 61.2953/2.*
mm);
877 G4double externalYPartSize=circleRadiuos*(1-std::cos(alfa));
879 box2Size.
set(box1Size.
getX(), externalYPartSize/2., box1Size.
getZ());
887 rm->rotateY(90.*
deg);
895 rm -> rotateZ(180.*
deg);
900 halfSize.
set(0., box2Size.
getY()*2.-.1,0.);
927 for (i = 1; i < (
int)vec_leavesA.size(); i++)
931 PVname =
"leafA"+iName;
933 centre.
setY(-halfSize.
getY()-vec_leavesA[i]);
934 new G4PVPlacement(0, centre, PVname, leafLVA, PVWorld,
false, i);
938 for (i = 1; i < (
int)vec_leavesB.size(); i++)
942 PVname =
"leafB"+iName;
944 centre.
setY(+halfSize.
getY()+vec_leavesB[i]);
945 new G4PVPlacement(0, centre, PVname, leafLVB, PVWorld,
false, i);