55 if (AcceleratorName==
"acc1")
56 {
delete accelerator1;}
59 delete acceleratorConstructionMessenger;
74 if (AcceleratorName==
"acc1")
76 accelerator1->
reset();
81 bool CML2AcceleratorConstruction::design(
void)
84 std::cout <<
"I'm building "<< AcceleratorName<<
" accelerator"<<
G4endl;
85 bool bAccExists=
false;
86 if (AcceleratorName==
"acc1")
89 if (bAccExists && AcceleratorMacFileName!=
"")
93 G4String command =
"/control/execute ";
97 if (rotationsX.size()<1)
112 initialCentre.
set(0.*
mm, 0.*
mm, -isoCentre);
119 accWorldLV->SetVisAttributes(simpleAlSVisAtt);
121 PVAccWorld=
new G4PVPlacement(0, initialCentre,
"acceleratorBox", accWorldLV, PVWorld,
false, 0);
124 if (AcceleratorName==
"acc1")
126 accelerator1->
Construct(PVAccWorld, isoCentre);
141 {std::cout <<
"Actual rotation: "<<idCurrentRotationX<<
"/"<<rotationsX.size() <<
" "<<
G4endl;}
142 std::cout <<
"Accelerator angle: "<< currentRotationX/
deg <<
" [deg]"<<
G4endl;
148 if (idCurrentRotationX <(
int) rotationsX.size())
150 currentRotationX=rotationsX[idCurrentRotationX];
152 idCurrentRotationX++;
160 currentRotationX=angleX;
171 NewCentre=*rmInv*initialCentre;
181 sprintf(cR,
"%d",cRI);
184 {rotationName=
"_Ro90Y"+rotationName;}
186 {rotationName=
"_Ro"+rotationName;}