54 idCurrentRotationX = 0;
59 delete acceleratorConstructionMessenger;
74 accelerator -> reset();
80 G4cout <<
"I'm building " << AcceleratorName <<
" accelerator" <<
G4endl;
81 bool bAccExists =
false;
82 if (AcceleratorName ==
"acc1")
87 else if (AcceleratorName ==
"acc2")
92 else if (AcceleratorName ==
"accSaturn")
98 if (bAccExists && AcceleratorMacFileName!=
"")
102 G4String command =
"/control/execute ";
106 if (rotationsX.size() < 1)
108 addAcceleratorRotationsX(0.);
120 acceleratorConstructionMessenger->SetReferenceWorld(bOnlyVisio);
124 initialCentre.
set(0.*
mm, 0.*
mm, -isoCentre);
129 simpleAlSVisAtt -> SetVisibility(
false);
130 accWorldLV -> SetVisAttributes(simpleAlSVisAtt);
132 PVAccWorld=
new G4PVPlacement(0, initialCentre,
"acceleratorBox", accWorldLV, PVWorld,
false, 0);
135 accelerator ->
Construct(PVAccWorld, isoCentre);
136 Z_Value_PhaseSpaceBeforeJaws = accelerator -> getBeforeJaws_Z_PhaseSpacePosition();
137 accelerator -> writeInfo();
151 G4cout <<
"Actual rotation: " << idCurrentRotationX <<
"/" << rotationsX.size() <<
" " <<
G4endl;
153 G4cout <<
"Accelerator angle: " << currentRotationX/
deg <<
" [deg]" <<
G4endl;
159 if (idCurrentRotationX <(
int) rotationsX.size())
161 currentRotationX = rotationsX[idCurrentRotationX];
162 rmInv = rotateAccelerator(currentRotationX);
163 idCurrentRotationX++;
173 currentRotationX = angleX;
178 PVAccWorld->SetTranslation(initialCentre);
179 PVAccWorld->SetRotation(rm);
185 PVAccWorld->SetRotation(rm);
187 NewCentre=*rmInv*initialCentre;
188 PVAccWorld->SetTranslation(NewCentre);
197 sprintf(cR,
"%d",cRI);
200 {rotationName=
"_Ro90Y"+rotationName;}
202 {rotationName=
"_Ro"+rotationName;}