107 if (materialName==
"steel1")
117 else if (materialName==
"steel2")
128 else if (materialName==
"steel3")
139 else if (materialName==
"EZcut")
147 else if (materialName==
"W")
199 G4Box* targetA_box =
new G4Box(
"targetA_box",targetADim_x,targetADim_y,targetADim_z);
206 "targetA",targetA_log,
PVWorld,
false,0);
211 G4Box* targetB_box =
new G4Box(
"targetB_box",targetBDim_x,targetBDim_y,targetBDim_z);
218 "targetB",targetB_log,
PVWorld,
false,0);
266 rotateMatrix->rotateX(180.0*
deg);
276 G4Tubs* UpperCollimator =
new G4Tubs(
"UpperCollimator",innerRadiusOfTheTubeEx,
277 outerRadiusOfTheTubeEx,hightOfTheTubeEx,
278 startAngleOfTheTubeEx,spanningAngleOfTheTubeEx);
286 UpperCollimatorPosZ),
"UpperCollimator",
287 UpperCollimator_log,
PVWorld,
false,0);
301 G4Cons* collim_cone =
new G4Cons(
"collim_cone",pRmin1,pRmax1,pRmin2,
302 pRmax2,hightOfTheCone,startAngleOfTheCone,
303 spanningAngleOfTheCone);
312 G4Tubs* tracker_tube =
new G4Tubs(
"tracker_tube",innerRadiusOfTheTube,
313 outerRadiusOfTheTube,hightOfTheTube,
314 startAngleOfTheTube,spanningAngleOfTheTube);
319 tracker_tube,collim_cone);
326 "CylMinusCone",CylMinusCone_log,
PVWorld,
false,0);
394 regVol=
new G4Region(
"flatfilterR");
404 centre.set(0.,0.,z0);
443 regVol=
new G4Region(
"ionizationChamber");
448 G4Tubs* ICTubeW =
new G4Tubs(
"ionizationChamberTube", 0., 2.*2.54*10.*
mm, 0.016*25.4*
mm, 0.*
deg, 360.*
deg);
449 G4Tubs* ICTubeP =
new G4Tubs(
"ionizationChamberTube", 0., 2.*2.54*10.*
mm, 0.010*25.4*
mm, 0.*
deg, 360.*
deg);
453 centre.set(0.,0.,157.*
mm);
464 centre.set(0.,0.,158.*
mm);
475 centre.set(0.,0.,159.*
mm);
486 centre.set(0.,0.,160.*
mm);
497 centre.set(0.,0.,161.*
mm);
508 centre.set(0.,0.,162.*
mm);
536 cRotation->rotateY(12.0*
deg);
566 centre.set(z*sin(theta)+dx*cos(theta), y, z*cos(theta)-dx*sin(theta));
574 cRotation->rotateY(-theta);
575 halfSize.set(fabs(dx*cos(theta)+dz*sin(theta)), fabs(dy), fabs(dz*cos(theta)+dx*sin(theta)));
578 centre.set(-(z*sin(theta)+dx*cos(theta)), y, z*cos(theta)-dx*sin(theta));
586 cRotation->rotateY(theta);
587 halfSize.set(fabs(dx*cos(theta)+dz*sin(theta)), fabs(dy), fabs(dz*cos(theta)+dx*sin(theta)));
590 centre.set(x, z*sin(theta)+dy*cos(theta), z*cos(theta)-dy*sin(theta));
598 cRotation->rotateX(theta);
599 halfSize.set(fabs(dx), fabs(dy*cos(theta)+dz*sin(theta)), fabs(dz*cos(theta)+dy*sin(theta)));
602 centre.set(x, -(z*sin(theta)+dy*cos(theta)), z*cos(theta)-dy*sin(theta));
610 cRotation->rotateX(-theta);
611 halfSize.set(fabs(dx), fabs(dy*cos(theta)+dz*sin(theta)), fabs(dz*cos(theta)+dy*sin(theta)));
629 centre.set(0.,0.,(320.+80./2.)*
mm);
630 halfSize.set(45.*
mm, 93.*
mm, 78./2.*
mm);
631 box =
new G4Box(name+
"Box", halfSize.getX(), halfSize.getY(), halfSize.getZ());
642 logVol->SetRegion(regVol);
649 logVol->SetVisAttributes(simpleAlSVisAtt);
665 centre.set(0.,0.,(320.+80./2.)*
mm);
666 halfSize.set(45.*
mm, 93.*
mm, 78./2.*
mm);
667 box =
new G4Box(name+
"Box", halfSize.getX(), halfSize.getY(), halfSize.getZ());
678 logVol->SetRegion(regVol);
685 logVol->SetVisAttributes(simpleAlSVisAtt);
701 centre.set(0.,0.,(230.+80./2.)*
mm);
702 halfSize.set(93.*
mm, 35.*
mm, 78./2.*
mm);
703 box =
new G4Box(name+
"Box", halfSize.getX(), halfSize.getY(), halfSize.getZ());
714 logVol->SetRegion(regVol);
721 logVol->SetVisAttributes(simpleAlSVisAtt);
737 centre.set(0.,0.,(230.+80./2.)*
mm);
738 halfSize.set(93.*
mm, 35.*
mm, 78./2.*
mm);
739 box =
new G4Box(name+
"Box", halfSize.getX(), halfSize.getY(), halfSize.getZ());
751 logVol->SetRegion(regVol);
758 logVol->SetVisAttributes(simpleAlSVisAtt);
779 centreStart.set(0.,0.,(330.+600.)/2.*
mm);
781 boxSize.set(6./2.*
mm, 180./2.*
mm, 50./2.*
mm);
784 G4Box* boxLeaf =
new G4Box(
"LeafBox", boxSize.getX(), boxSize.getY(), boxSize.getZ());
792 leafLVA->SetVisAttributes(simpleAlSVisAtt);
793 leafLVA->SetRegion(regVol);
808 int nhalfLeaves=(int)(
leavesA.size()/2.);
809 centre= centreStart +
G4ThreeVector(-nhalfLeaves*boxSize.getX(), 0.,0.);
810 for (i=1;i<(int)
leavesA.size(); i++)
814 sprintf(appo,
"%d",i);
817 centre.setX(centre.getX()+boxSize.getX()*2.);
818 centre.setY(-boxSize.getY()-
leavesA[i]);
822 nhalfLeaves=(int)(
leavesB.size()/2.);
823 centre=centreStart+
G4ThreeVector(-nhalfLeaves*boxSize.getX(), 0.,0.);
824 for (i=1;i<(int)
leavesB.size(); i++)
828 sprintf(appo,
"%d",i);
831 centre.setX(centre.getX()+boxSize.getX()*2.);
832 centre.setY(+boxSize.getY()+
leavesB[i]);
G4Material * FindOrBuildMaterial(const G4String &name, G4bool isotopes=true, G4bool warning=false)
CML2Acc1Messenger * acc1Messenger
G4VPhysicalVolume * targetB_phys
G4VPhysicalVolume * BeWTubePV
G4VPhysicalVolume * targetA_phys
CLHEP::Hep3Vector G4ThreeVector
void AddRootLogicalVolume(G4LogicalVolume *lv)
CLHEP::HepRotation G4RotationMatrix
G4VPhysicalVolume * phVol1X
G4VPhysicalVolume * PCUtubeP2PV
void SetVisibility(G4bool)
static G4Colour Magenta()
void SetProductionCut(G4double cut, G4int index=-1)
G4VPhysicalVolume * PCUtubeP3PV
static CML2Acc1 * instance
G4VPhysicalVolume * MirrorTubePV
static G4NistManager * Instance()
G4VPhysicalVolume * UpperCollimator_phys
std::vector< G4double > leavesA
void Construct(G4VPhysicalVolume *PVWorld, G4double isoCentre)
void SetRegion(G4Region *reg)
void SetJawAperture(G4int idJaw, G4ThreeVector ¢re, G4ThreeVector halfSize, G4double aperture, G4RotationMatrix *cRotation)
G4VPhysicalVolume * phVol2Y
void setIsoCentre(G4double val)
G4VPhysicalVolume * phVol2X
static const G4double A[nN]
G4VPhysicalVolume * phVol1Y
G4VPhysicalVolume * PCUtubeP1PV
G4Material * otherMaterials(const G4String materialName)
std::vector< G4double > leavesB
G4VPhysicalVolume * PCUtubeW2PV
void SetProductionCuts(G4ProductionCuts *cut)
G4VPhysicalVolume * PCUtubeW1PV
G4VPhysicalVolume * leafPhys
G4VPhysicalVolume * FFL1A_1PV
static CML2Acc1 * GetInstance(void)
void SetVisAttributes(const G4VisAttributes *pVA)
G4VPhysicalVolume * PCUtubeW3PV
G4VPhysicalVolume * FFL2_1PV
G4VPhysicalVolume * CylMinusCone_phys
G4VPhysicalVolume * PVWorld