57 buildMaterial_SSteel1();
76 G4cout <<
"\n\n\tnominal beam energy: "<<idEnergy <<
G4endl;
77 G4cout <<
"\tJaw X aperture: 1) "<< jaw1XAperture/
mm<<
"[mm]\t2) " << jaw2XAperture/
mm<<
" [mm]"<<
G4endl;
78 G4cout <<
"\tJaw Y aperture: 1) "<< jaw1YAperture/
mm<<
"[mm]\t2) " << jaw2YAperture/
mm<<
" [mm]\n"<<
G4endl;
90 steel1 -> AddElement(elFe, 0.935);
91 steel1 -> AddElement(elS, 0.01);
92 steel1 -> AddElement(elMn, 0.05);
93 steel1 -> AddElement(elC, 0.005);
115 bool bCreated =
false;
129 G4Box* targetA_box =
new G4Box(
"targetA_box",targetADim_x,targetADim_y,targetADim_z);
136 "targetA",targetA_log,PVWorld,
false,0);
141 G4Box* targetB_box =
new G4Box(
"targetB_box",targetBDim_x,targetBDim_y,targetBDim_z);
148 "targetB",targetB_log,PVWorld,
false,0);
157 targetA_log -> SetRegion(regVol);
158 regVol -> AddRootLogicalVolume(targetA_log);
159 targetB_log -> SetRegion(regVol);
160 regVol -> AddRootLogicalVolume(targetB_log);
165 simpleWSVisAtt -> SetVisibility(
true);
167 simpleCuSVisAtt -> SetVisibility(
true);
168 targetA_log -> SetVisAttributes(simpleWSVisAtt);
169 targetB_log -> SetVisAttributes(simpleCuSVisAtt);
194 innerRadiusOfTheTubeEx,
195 outerRadiusOfTheTubeEx,
197 startAngleOfTheTubeEx,
198 spanningAngleOfTheTubeEx);
205 G4ThreeVector(UpperCollimatorPosX, UpperCollimatorPosY, UpperCollimatorPosZ),
223 G4Cons* collim_cone =
new G4Cons(
"collim_cone",pRmin1,pRmax1,pRmin2,
224 pRmax2,hightOfTheCone,startAngleOfTheCone,
225 spanningAngleOfTheCone);
234 G4Tubs* tracker_tube =
new G4Tubs(
"tracker_tube",innerRadiusOfTheTube,
235 outerRadiusOfTheTube,hightOfTheTube,
236 startAngleOfTheTube,spanningAngleOfTheTube);
239 tracker_tube,collim_cone);
280 bool bCreated =
false;
296 simpleAlSVisAtt -> SetVisibility(
true);
297 BeWTubeLV -> SetVisAttributes(simpleAlSVisAtt);
298 BeWTubeLV -> SetRegion(regVol);
299 regVol -> AddRootLogicalVolume(BeWTubeLV);
306 bool bCreated =
false;
315 regVol=
new G4Region(
"flatfilterR");
325 centre.
set(0.,0.,z0);
328 new G4PVPlacement(0, centre,
"FFL1A_1PV", FFL1A_1LV, PVWorld,
false, 0);
338 new G4PVPlacement(0, centre,
"FFL2_1PV", FFL2_1LV, PVWorld,
false, 0);
358 bool bCreated =
false;
364 regVol=
new G4Region(
"ionizationChamber");
369 G4Tubs* ICTubeW =
new G4Tubs(
"ionizationChamberTube", 0., 2.*2.54*10.*
mm, 0.016*25.4*
mm, 0.*
deg, 360.*
deg);
370 G4Tubs* ICTubeP =
new G4Tubs(
"ionizationChamberTube", 0., 2.*2.54*10.*
mm, 0.010*25.4*
mm, 0.*
deg, 360.*
deg);
374 centre.
set(0.,0.,157.*
mm);
376 new G4PVPlacement(0, centre,
"ionizationChamberTubeW1PV", PCUTubeW1LV, PVWorld,
false, 0);
384 centre.
set(0.,0.,158.*
mm);
386 new G4PVPlacement(0, centre,
"ionizationChamberTubeP1PV", PCUTubeP1LV, PVWorld,
false, 0);
394 centre.
set(0.,0.,159.*
mm);
396 new G4PVPlacement(0, centre,
"ionizationChamberTubeW2PV", PCUTubeW2LV, PVWorld,
false, 0);
404 centre.
set(0.,0.,160.*
mm);
406 new G4PVPlacement(0, centre,
"ionizationChamberTubeP2PV", PCUTubeP2LV, PVWorld,
false, 0);
414 centre.
set(0.,0.,161.*
mm);
416 new G4PVPlacement(0, centre,
"ionizationChamberTubeW3PV", PCUTubeW3LV, PVWorld,
false, 0);
424 centre.
set(0.,0.,162.*
mm);
426 new G4PVPlacement(0, centre,
"ionizationChamberTubeP3PV", PCUTubeP3LV, PVWorld,
false, 0);
445 cuts -> SetProductionCut(0.1*
cm);
446 regVol -> SetProductionCuts(cuts);
451 cRotation -> rotateY(12.0*
deg);
455 simpleAlSVisAtt -> SetVisibility(
true);
456 MirrorTubeLV -> SetVisAttributes(simpleAlSVisAtt);
457 MirrorTubeLV -> SetRegion(regVol);
458 regVol -> AddRootLogicalVolume(MirrorTubeLV);
477 theta = fabs(atan(jaw1XAperture/isoCentre));
478 centre.
set(z*sin(theta)+dx*cos(theta), y, z*cos(theta)-dx*sin(theta));
480 halfSize.
set(fabs(dx*cos(theta)+dz*sin(theta)), fabs(dy), fabs(dz*cos(theta)+dx*sin(theta)));
484 theta = fabs(atan(jaw2XAperture/isoCentre));
485 centre.
set(-(z*sin(theta)+dx*cos(theta)), y, z*cos(theta)-dx*sin(theta));
487 halfSize.
set(fabs(dx*cos(theta)+dz*sin(theta)), fabs(dy), fabs(dz*cos(theta)+dx*sin(theta)));
491 theta = fabs(atan(jaw1YAperture/isoCentre));
492 centre.
set(x, z*sin(theta)+dy*cos(theta), z*cos(theta)-dy*sin(theta));
494 halfSize.
set(fabs(dx), fabs(dy*cos(theta)+dz*sin(theta)), fabs(dz*cos(theta)+dy*sin(theta)));
498 theta = fabs(atan(jaw2YAperture/isoCentre));
499 centre.
set(x, -(z*sin(theta)+dy*cos(theta)), z*cos(theta)-dy*sin(theta));
501 halfSize.
set(fabs(dx), fabs(dy*cos(theta)+dz*sin(theta)), fabs(dz*cos(theta)+dy*sin(theta)));
510 bool bCreated =
false;
520 centre.
set(0.,0.,(320.+80./2.)*
mm);
524 SetJawAperture(1, centre, halfSize, cRotation);
540 logVol->SetRegion(regVol);
545 simpleAlSVisAtt -> SetVisibility(
true);
546 logVol -> SetVisAttributes(simpleAlSVisAtt);
553 bool bCreated =
false;
563 centre.
set(0.,0.,(320.+80./2.)*
mm);
567 SetJawAperture(2, centre, halfSize, cRotation);
568 new G4PVPlacement(cRotation, centre, name+
"PV", logVol, PVWorld,
false, 0);
574 cuts -> SetProductionCut(2.*
cm);
575 regVol -> SetProductionCuts(cuts);
576 logVol -> SetRegion(regVol);
577 regVol -> AddRootLogicalVolume(logVol);
581 simpleAlSVisAtt -> SetVisibility(
true);
582 logVol->SetVisAttributes(simpleAlSVisAtt);
589 bool bCreated =
false;
599 centre.
set(0.,0.,(230.+80./2.)*
mm);
603 SetJawAperture(3, centre, halfSize, cRotation);
604 new G4PVPlacement(cRotation, centre, name+
"PV", logVol, PVWorld,
false, 0);
610 cuts -> SetProductionCut(2.*
cm);
611 regVol -> SetProductionCuts(cuts);
612 logVol -> SetRegion(regVol);
613 regVol -> AddRootLogicalVolume(logVol);
617 simpleAlSVisAtt -> SetVisibility(
true);
618 logVol -> SetVisAttributes(simpleAlSVisAtt);
625 bool bCreated =
false;
635 centre.
set(0.,0.,(230.+80./2.)*
mm);
639 SetJawAperture(4, centre, halfSize, cRotation);
640 new G4PVPlacement(cRotation, centre, name+
"PV", logVol, PVWorld,
false, 0);
646 cuts -> SetProductionCut(2.*
cm);
647 regVol -> SetProductionCuts(cuts);
648 logVol -> SetRegion(regVol);
649 regVol -> AddRootLogicalVolume(logVol);
653 simpleAlSVisAtt -> SetVisibility(
true);
654 logVol -> SetVisAttributes(simpleAlSVisAtt);
661 bool bCreated =
false;
669 cuts -> SetProductionCut(1.0*
cm);
670 regVol -> SetProductionCuts(cuts);
674 centreStart.
set(0.,0.,(330.+600.)/2.*
mm);
675 boxSize.
set(6./2.*
mm, 180./2.*
mm, 50./2.*
mm);
684 simpleAlSVisAtt -> SetVisibility(
true);
685 leafLVA -> SetVisAttributes(simpleAlSVisAtt);
686 leafLVA -> SetRegion(regVol);
687 regVol -> AddRootLogicalVolume(leafLVA);
690 simpleAlSVisAtt -> SetVisibility(
true);
691 leafLVB -> SetVisAttributes(simpleAlSVisAtt);
692 leafLVB -> SetRegion(regVol);
693 regVol -> AddRootLogicalVolume(leafLVB);
699 int nhalfLeaves = (
int)(vec_leavesA.size()/2.);
701 for (i = 1; i < (
int)vec_leavesA.size(); i++)
705 sprintf(appo,
"%d",i);
707 PVname =
"leafA"+str;
709 centre.
setY(-boxSize.
getY()-vec_leavesA[i]);
710 new G4PVPlacement(0, centre, PVname, leafLVA, PVWorld,
false, i);
713 nhalfLeaves = (
int)(vec_leavesB.size()/2.);
715 for (i = 1; i < (
int)vec_leavesB.size(); i++)
719 sprintf(appo,
"%d",i);
721 PVname =
"leafB"+str;
723 centre.
setY(+boxSize.
getY()+vec_leavesB[i]);
724 new G4PVPlacement(0, centre, PVname, leafLVB, PVWorld,
false, i);