83 hadrontherapydetectorconstruction(0), physicTreatmentRoom(0),
84 PFirstTriplet(0),PSecondTriplet(0),PThirdTriplet(0),PFourthTriplet(0), physicFirstQuad(0),physicSecondQuad(0),physicThirdQuad(0),physicFourthQuad(0),
85 solidExternalChamber(0),logicExternalChamber(0),physicExternalChamber(0),
86 solidInternalChamber(0),logicInternalChamber(0),physicInternalChamber(0),
87 solidCollimator(0),logicCollimator(0),physicCollimator(0),
88 solidCollimatorHole(0),logicCollimatorHole(0),physicCollimatorHole(0),
89 solidFinalCollimator(0), logicFinalCollimator(0),physicFinalCollimator(0),
90 solidFinalCollimatorHole(0),logicFinalCollimatorHole(0),physicFinalCollimatorHole(0),
91 solidExternalMagnet_1(0),logicExternalMagnet_1(0),physicExternalMagnet_1(0), physicExternalMagnet_1Down(0),
92 solidMagnet_1(0),logicMagnet_1(0),physicMagnet_1Right(0),physicMagnet_1Left(0), solidExternalMagnet_2(0),logicExternalMagnet_2(0),
93 physicExternalMagnet_2(0),physicExternalMagnet_2Down(0),solidMagnet_2(0),logicMagnet_2(0),physicMagnet_2Right(0),physicMagnet_2Left(0), solidExternalMagnet_3(0),logicExternalMagnet_3(0),physicExternalMagnet_3(0),physicExternalMagnet_3Down(0),
94 solidMagnet_3(0),logicMagnet_3(0),physicMagnet_3Right(0),physicMagnet_3Left(0),
95 solidExternalMagnet_4(0),logicExternalMagnet_4(0),physicExternalMagnet_4(0),physicExternalMagnet_4Down(0),
96 solidMagnet_4(0),logicMagnet_4(0),physicMagnet_4Right(0),physicMagnet_4Left(0),
97 solidExternalSlit(0), logicExternalSlit(0), physicExternalSlit(0),
98 solidInternalSlit(0),logicInternalSlit(0),physicInternalSlit(0),
99 physicExitPipe(0),physicExitWindow(0),physicExithole(0),physicEntrancePipe(0),physicEntrancehole(0)
105 static G4String ROGeometryName =
"DetectorROGeometry";
108 G4cout <<
"Going to register Parallel world...";
118 delete hadrontherapydetectorconstruction;
125 SetDefaultDimensions();
128 ConstructLaserDrivenBeamLine();
131 if (!hadrontherapydetectorconstruction)
143 return physicTreatmentRoom;
146 void LaserDrivenBeamLine::SetDefaultDimensions()
151 white -> SetVisibility(
true);
152 white -> SetForceSolid(
true);
153 white -> SetForceWireframe(
true);
156 blue -> SetVisibility(
true);
160 gray-> SetVisibility(
true);
161 gray-> SetForceSolid(
true);
164 red-> SetVisibility(
true);
165 red-> SetForceSolid(
true);
169 yellow-> SetVisibility(
true);
170 yellow-> SetForceSolid(
true);
173 green -> SetVisibility(
true);
174 green -> SetForceWireframe(
true);
175 green -> SetForceSolid(
true);
178 black -> SetVisibility(
true);
179 black -> SetForceSolid(
true);
182 darkGreen -> SetVisibility(
true);
183 darkGreen -> SetForceSolid(
true);
186 darkOrange3 -> SetVisibility(
true);
187 darkOrange3 -> SetForceSolid(
true);
190 skyBlue -> SetVisibility(
true);
191 skyBlue -> SetForceSolid(
true);
196 InnerRadiusExitWindow=defaultInnerRadiusExitWindow;
198 G4double defaultExternalRadiusExitWindow=55*
mm;
199 ExternalRadiusExitWindow=defaultExternalRadiusExitWindow;
202 ExitWindowThickness=defaultExitWindowThickness;
204 G4double defaultExitWindowXPosition=-ExitWindowThickness/2.;
205 ExitWindowXPosition=defaultExitWindowXPosition;
207 G4double defaultExitWindowYPosition=0.;
208 ExitWindowYPosition=defaultExitWindowYPosition;
211 ExitWindowZPosition=defaultExitWindowZPosition;
214 startAngleExitWindow = defaultStartAngleExitWindow;
216 G4double defaultSpanningAngleExitWindow = 360.*
deg;
217 spanningAngleExitWindow = defaultSpanningAngleExitWindow;
220 ExitPipeheight=defaultExitPipeheight;
223 InnerRadiusExitPipe=defaultInnerRadiusExitPipe;
225 G4double defaultExternalRadiusExitPipe=55 *
mm;
226 ExternalRadiusExitPipe=defaultExternalRadiusExitPipe;
228 G4double defaultExitPipeXPosition=-ExitPipeheight/2-ExitWindowThickness;
229 ExitPipeXPosition=defaultExitPipeXPosition;
231 G4double defaultExitPipeYPosition=0;
232 ExitPipeYPosition=defaultExitPipeYPosition;
235 ExitPipeZPosition=defaultExitPipeZPosition;
238 startAngleExitPipe = defaultStartAngleExitPipe;
241 spanningAngleExitPipe = defaultSpanningAngleExitPipe;
243 G4double defaultExternalChamberXSize = 79.6*
cm;
244 externalChamberXSize = defaultExternalChamberXSize;
246 G4double defaultExternalChamberYSize = 50. *
cm;
247 externalChamberYSize = defaultExternalChamberYSize;
249 G4double defaultExternalChamberZSize = 50. *
cm;
250 externalChamberZSize = defaultExternalChamberZSize;
252 G4double defaultExternalChamberXPosition = -(externalChamberXSize/2.+ExitPipeheight/2.)+ ExitPipeXPosition;
253 externalChamberXPosition = defaultExternalChamberXPosition;
255 G4double defaultExternalChamberYPosition = 0.0 *
mm;
256 externalChamberYPosition = defaultExternalChamberYPosition;
258 G4double defaultExternalChamberZPosition = 0.0 *
mm;
259 externalChamberZPosition = defaultExternalChamberZPosition;
265 G4double defaultVaccumChamberWallThickness=5 *
mm;
266 VaccumChamberWallThickness=defaultVaccumChamberWallThickness;
268 G4double defaultInternalChamberXSize =externalChamberXSize - 2*VaccumChamberWallThickness;
269 internalChamberXSize = defaultInternalChamberXSize;
271 G4double defaultInternalChamberYSize =externalChamberYSize - 2*VaccumChamberWallThickness;
272 internalChamberYSize = defaultInternalChamberYSize;
274 G4double defaultInternalChamberZSize = externalChamberZSize - 2*VaccumChamberWallThickness;
275 internalChamberZSize = defaultInternalChamberZSize;
278 InnerRadiusExithole=defaultInnerRadiusExithole;
280 G4double defaultExternalRadiusExithole=50.*
mm;
281 ExternalRadiusExithole=defaultExternalRadiusExithole;
283 G4double defaultExitholeThickness=VaccumChamberWallThickness;
284 ExitholeThickness=defaultExitholeThickness;
286 G4double defaultExitholeXPosition=(externalChamberXSize/2.-ExitholeThickness/2.);
287 ExitholeXPosition=defaultExitholeXPosition;
289 G4double defaultExitholeYPosition=0.;
290 ExitholeYPosition=defaultExitholeYPosition;
293 ExitholeZPosition=defaultExitholeZPosition;
296 startAngleExithole= defaultStartAngleExithole;
299 spanningAngleExithole = defaultSpanningAngleExithole;
302 G4double defaultExitholeToFinalCollimator=70 *
mm;
303 ExitholeToFinalCollimator=defaultExitholeToFinalCollimator;
305 defaultInnerRadiusFinalCollimator = 0.0 *
mm;
306 innerRadiusFinalCollimator = defaultInnerRadiusFinalCollimator;
308 defaultOuterRadiusFinalCollimator = 2.50 *
mm;
309 outerRadiusFinalCollimator = defaultOuterRadiusFinalCollimator;
311 defaultFinalCollimatorThickness = 3.0 *
mm;
312 FinalCollimatorThickness = defaultFinalCollimatorThickness;
314 defaultStartAngleFinalCollimator = 0.0 *
deg;
315 startAngleFinalCollimator = defaultStartAngleFinalCollimator;
317 defaultSpanningAngleFinalCollimator = 360.*
deg;
318 spanningAngleFinalCollimator = defaultSpanningAngleFinalCollimator;
320 defaultFinalCollimatorXPosition = internalChamberXSize/2.-ExitholeToFinalCollimator-FinalCollimatorThickness/2.;
321 collimatorFinalBox_XPosition=defaultFinalCollimatorXPosition;
322 FinalcollimatorXPosition = 0.0*
mm;
324 defaultFinalCollimatorYPosition = 0.0*
mm;
325 collimatorFinalBox_YPosition=defaultFinalCollimatorYPosition;
326 FinalcollimatorYPosition = defaultFinalCollimatorYPosition;
328 defaultFinalCollimatorZPosition = 0.0*
mm;
329 collimatorFinalBox_ZPosition=0.0*
mm;
330 FinalcollimatorZPosition =defaultFinalCollimatorZPosition;
332 defaultThicknessCollimator =3.0 *
mm;
333 collimatorFinalBoxXSize=defaultFinalCollimatorThickness;
334 collimatorFinalBoxYSize=82.0*
mm;
335 collimatorFinalBoxZSize=210.0*
mm;
339 G4double defaultExternalMagnet_XSize = 88.0*
mm;
340 G4double defaultExternalMagnet_YSizeTotal=87.*
mm;
341 G4double defaultInternalMagnet_YSize = 10. *
mm;
342 G4double defaultExternalMagnet_YSize =(defaultExternalMagnet_YSizeTotal-defaultInternalMagnet_YSize)/2.;
343 G4double defaultExternalMagnet_ZSize = 104 *
mm;
345 G4double defaultExternalMagnet_YPosition =defaultInternalMagnet_YSize/2.+defaultExternalMagnet_YSize/2.;
346 G4double defaultExternalMagnet_ZPosition = 0.0 *
mm;
348 G4double defaultMagnet_XSize=defaultExternalMagnet_XSize;
349 G4double defaultMagnet_YSize=defaultExternalMagnet_YSizeTotal;
353 G4double defaultFinalCollimatorToMagnet4=25.*
mm;
354 FinalCollimatorToMagnet4=defaultFinalCollimatorToMagnet4;
356 externalMagnet_4XSize = defaultExternalMagnet_XSize;
357 externalMagnet_4YSize = defaultExternalMagnet_YSize;
358 externalMagnet_4ZSize = defaultExternalMagnet_ZSize;
360 Magnet_4XSize=defaultMagnet_XSize;
361 Magnet_4YSize=defaultMagnet_YSize;
362 Magnet_4ZSize=defaultMagnet_ZSize;
364 G4double defaultExternalMagnet_4XPosition = -(FinalCollimatorThickness/2.+FinalCollimatorToMagnet4+defaultExternalMagnet_XSize/2.)+ collimatorFinalBox_XPosition;
365 externalMagnet_4XPosition = defaultExternalMagnet_4XPosition;
367 externalMagnet_4YPosition = defaultExternalMagnet_YPosition;
368 externalMagnet_4ZPosition = defaultExternalMagnet_ZPosition;
370 Magnet_4XPosition=externalMagnet_4XPosition;
371 Magnet_4YPosition=0.0*
mm;
372 Magnet_4ZPosition=(defaultExternalMagnet_ZSize+defaultMagnet_ZSize)/2.;
375 externalMagnet_3XSize = defaultExternalMagnet_XSize;
376 externalMagnet_3YSize = defaultExternalMagnet_YSize;
377 externalMagnet_3ZSize = defaultExternalMagnet_ZSize;
379 Magnet_3XSize=defaultMagnet_XSize;
380 Magnet_3YSize=defaultMagnet_YSize;
381 Magnet_3ZSize=defaultMagnet_ZSize;
384 Magnet4ToMagnet3=defaultMagnet4ToMagnet3;
386 G4double defaultExternalMagnet_3XPosition =-(Magnet4ToMagnet3+defaultExternalMagnet_XSize/2.+defaultExternalMagnet_XSize/2.)+externalMagnet_4XPosition;
387 externalMagnet_3XPosition = defaultExternalMagnet_3XPosition;
389 externalMagnet_3YPosition =defaultExternalMagnet_YPosition;
390 externalMagnet_3ZPosition = defaultExternalMagnet_ZPosition;
393 Magnet_3XPosition=externalMagnet_3XPosition;
394 Magnet_3YPosition=0.0*
mm;
395 Magnet_3ZPosition=(defaultExternalMagnet_ZSize+defaultMagnet_ZSize)/2.;
398 externalMagnet_2XSize = defaultExternalMagnet_XSize;
399 externalMagnet_2YSize = defaultExternalMagnet_YSize;
400 externalMagnet_2ZSize = defaultExternalMagnet_ZSize;
402 Magnet_2XSize=defaultMagnet_XSize;
403 Magnet_2YSize=defaultMagnet_YSize;
404 Magnet_2ZSize=defaultMagnet_ZSize;
407 Magnet3ToMagnet2=defaultMagnet3ToMagnet2;
409 G4double defaultExternalMagnet_2XPosition =-(Magnet3ToMagnet2+defaultExternalMagnet_XSize/2.+defaultExternalMagnet_XSize/2.)+externalMagnet_3XPosition;
410 externalMagnet_2XPosition = defaultExternalMagnet_2XPosition;
412 externalMagnet_2YPosition = defaultExternalMagnet_YPosition;
413 externalMagnet_2ZPosition = defaultExternalMagnet_ZPosition;
415 Magnet_2XPosition=externalMagnet_2XPosition;
416 Magnet_2YPosition=0.0*
mm;
417 Magnet_2ZPosition=(defaultExternalMagnet_ZSize+defaultMagnet_ZSize)/2.;
420 externalMagnet_1XSize=defaultExternalMagnet_XSize;
421 externalMagnet_1YSize = defaultExternalMagnet_YSize;
422 externalMagnet_1ZSize = defaultExternalMagnet_ZSize;
424 Magnet_1XSize=defaultMagnet_XSize;
425 Magnet_1YSize=defaultMagnet_YSize;
426 Magnet_1ZSize=defaultMagnet_ZSize;
429 Magnet2ToMagnet1=defaultMagnet2ToMagnet1;
431 G4double defaultExternalMagnet_1XPosition = -(Magnet2ToMagnet1+defaultExternalMagnet_XSize/2.+defaultExternalMagnet_XSize/2.)+externalMagnet_2XPosition;
432 externalMagnet_1XPosition = defaultExternalMagnet_1XPosition;
434 externalMagnet_1YPosition = defaultExternalMagnet_YPosition;
435 externalMagnet_1ZPosition = defaultExternalMagnet_ZPosition;
437 Magnet_1XPosition=defaultExternalMagnet_1XPosition;
438 Magnet_1YPosition=0.0*
mm;
439 Magnet_1ZPosition=(defaultExternalMagnet_ZSize+defaultMagnet_ZSize)/2.;
443 externalSlitXSize = defaultExternalSlitXSize;
446 externalSlitYSize = defaultExternalSlitYSize;
449 externalSlitZSize = defaultExternalSlitZSize;
451 G4double defaultExternalSlitXPosition = -(Magnet3ToMagnet2/2.+defaultExternalMagnet_XSize/2.)+externalMagnet_3XPosition;
452 externalSlitXPosition = defaultExternalSlitXPosition;
454 G4double defaultExternalSlitYPosition = 0.0 *
mm;
455 externalSlitYPosition = defaultExternalSlitYPosition;
457 G4double defaultExternalSlitZPosition = 0.0 *
mm;
458 externalSlitZPosition = defaultExternalSlitZPosition;
461 internalSlitXSize = defaultExternalSlitXSize;
464 internalSlitYSize = defaultInternalSlitYSize;
467 internalSlitZSize = defaultInternalSlitZSize;
469 G4double defaultInternalSlitXPosition = 0.0 *
mm;
470 internalSlitXPosition = defaultInternalSlitXPosition;
472 G4double defaultInternalSlitYPosition = 0.0 *
mm;
473 internalSlitYPosition = defaultInternalSlitYPosition;
475 G4double defaultInternalSlitZPosition = 40.0 *
mm;
476 internalSlitZPosition = defaultInternalSlitZPosition;
481 defaultInnerRadiusCollimator = 0.0 *
mm;
482 innerRadiusCollimator = defaultInnerRadiusCollimator;
484 defaultOuterRadiusCollimator = 2.5 *
mm;
485 outerRadiusCollimator = defaultOuterRadiusCollimator;
487 thicknessCollimator = defaultThicknessCollimator;
489 defaultStartAngleCollimator = 0.0 *
deg;
490 startAngleCollimator = defaultStartAngleCollimator;
492 defaultSpanningAngleCollimator = 360.*
deg;
493 spanningAngleCollimator = defaultSpanningAngleCollimator;
495 G4double defultMagnet1ToFirstCollimator=25.*
mm;
496 Magnet1ToFirstCollimator=defultMagnet1ToFirstCollimator;
498 defaultCollimatorXPosition = -(thicknessCollimator/2.+Magnet1ToFirstCollimator+defaultExternalMagnet_XSize/2.)+externalMagnet_1XPosition;
499 collimatorBox_XPosition=defaultCollimatorXPosition;
500 collimatorXPosition = 0.0*
mm;
502 defaultCollimatorYPosition = 0.0*
mm;
503 collimatorBox_YPosition=defaultCollimatorYPosition;
504 collimatorYPosition = 0.0*
mm;
506 defaultCollimatorZPosition = 0.0*
mm;
507 collimatorBox_ZPosition=defaultCollimatorZPosition;
508 collimatorZPosition = 0.*
mm;
510 collimatorBoxYSize=82.0*
mm;
511 collimatorBoxZSize=210.0*
mm;
514 G4double defaultInnerRadiusEntrancehole=0. *
mm;
515 InnerRadiusEntrancehole=defaultInnerRadiusEntrancehole;
517 G4double defaultExternalRadiusEntrancehole=50.*
mm;
518 ExternalRadiusEntrancehole=defaultExternalRadiusEntrancehole;
520 G4double defaultEntranceholeThickness=VaccumChamberWallThickness;
521 EntranceholeThickness=defaultEntranceholeThickness;
523 G4double defaultEntranceholeXPosition=-(externalChamberXSize/2.-EntranceholeThickness/2.);
524 EntranceholeXPosition=defaultEntranceholeXPosition;
526 G4double defaultEntranceholeQuadXPosition=+(externalChamberXSize/2.-EntranceholeThickness/2.);
527 EntranceholeQuadXPosition=defaultEntranceholeQuadXPosition;
529 G4double defaultEntranceholeYPosition=0.;
530 EntranceholeYPosition=defaultEntranceholeYPosition;
533 EntranceholeZPosition=defaultEntranceholeZPosition;
536 startAngleEntrancehole= defaultStartAngleEntrancehole;
538 G4double defaultSpanningAngleEntrancehole= 360.*
deg;
539 spanningAngleEntrancehole=defaultSpanningAngleEntrancehole;
544 EntrancePipeheight=defaultEntrancePipeheight;
546 G4double defaultInnerRadiusEntrancePipe=50. *
mm;
547 InnerRadiusEntrancePipe=defaultInnerRadiusEntrancePipe;
549 G4double defaultExternalRadiusEntrancePipe=55 *
mm;
550 ExternalRadiusEntrancePipe=defaultExternalRadiusEntrancePipe;
552 G4double defaultEntrancePipeXPosition=-EntrancePipeheight/2-externalChamberXSize/2+externalChamberXPosition;
553 EntrancePipeXPosition=defaultEntrancePipeXPosition;
555 G4double defaultEntrancePipeYPosition=0;
556 EntrancePipeYPosition=defaultEntrancePipeYPosition;
559 EntrancePipeZPosition=defaultEntrancePipeZPosition;
562 startAngleEntrancePipe= defaultStartAngleEntrancePipe;
564 G4double defaultSpanningAngleEntrancePipe= 360.*
deg;
565 spanningAngleEntrancePipe=defaultSpanningAngleEntrancePipe;
568 G4double defaultQuadChamberWallPosX=-(externalChamberXSize/2.)-EntrancePipeheight/2.+EntrancePipeXPosition;
569 QuadChamberWallPosX=defaultQuadChamberWallPosX;
571 QuadChamberWallPosY=defaultQuadChamberWallPosY;
573 QuadChamberWallPosZ=defaultQuadChamberWallPosZ;
576 InnerRadiusQuad=defaultInnerRadiusQuad;
579 InnerRadiusTriplet=defaultInnerRadiusTriplet;
582 ExternalRadiusQuad=defaultExternalRadiusQuad;
585 FirstQuadThickness=defaultFirstQuadThickness;
587 SecondQuadThickness=defaultSecondQuadThickness;
589 ThirdQuadThickness=defaultThirdQuadThickness;
591 FourthQuadThickness=defaultFourthQuadThickness;
594 startAngleQuad = defaultStartAngleQuad;
597 spanningAngleQuad = defaultSpanningAngleQuad;
600 G4double defaultFourthQuadXPosition= internalChamberXSize/2.-distancefromQuadChamber-FourthQuadThickness/2.;
601 FourthQuadXPosition=defaultFourthQuadXPosition;
602 FourthQXPosition=0.0*
mm;
605 G4double defaultThirdQuadXPosition=-ThirdQuadThickness/2.-distanceFQuadTQuad-FourthQuadThickness/2.+FourthQuadXPosition;
606 ThirdQuadXPosition=defaultThirdQuadXPosition;
607 ThirdQXPosition=0.0*
mm;
610 G4double defaultSecondQuadXPosition=-SecondQuadThickness/2.-distanceTQuadSQuad-ThirdQuadThickness/2.+ThirdQuadXPosition;
611 SecondQuadXPosition=defaultSecondQuadXPosition;
612 SecondQXPosition=0.0*
mm;
615 G4double defaultFirstQuadXPosition=-FirstQuadThickness/2.-distanceSQuadFQuad-SecondQuadThickness/2.+SecondQuadXPosition;
616 FirstQuadXPosition=defaultFirstQuadXPosition;
617 FirstQXPosition=0.0*
mm;
620 QuadYPosition=defaultQuadYPosition;
621 QYPosition=defaultQuadYPosition;
624 QuadZPosition=defaultQuadTZPosition;
626 QZPosition=defaultQuadZPosition;
650 brass -> AddElement(zincNist, fractionmass = 30 *
perCent);
651 brass -> AddElement(copperNist, fractionmass = 70 *
perCent);
668 MotherMaterial=vacuum;
669 QuadMaterial=ironNist;
670 externalChamberMaterial = stainless_steelNist;
671 internalChamberMaterial = vacuum;
672 collimatorMaterial = aluminiumNist;
673 collimatorHoleMaterial=vacuum;
674 FinalcollimatorMaterial=aluminiumNist;
675 FinalcollimatorHoleMaterial=vacuum;
676 WindowMaterial=kaptonNist;
677 PipeMaterial=stainless_steelNist;
679 externalMagnet_1Material = ironNist;
680 externalMagnet_2Material = ironNist;
681 externalMagnet_3Material = ironNist;
682 externalMagnet_4Material = ironNist;
684 externalSlitMaterial = brass;
685 internalSlitMaterial =vacuum;
689 KaptonEntranceWindowMaterial=kaptonNist;
690 GuardRingMaterial=stainless_steelNist;
691 FaradayCupBottomMaterial=aluminiumNist;
692 CupMaterial=FaradayCupBottomMaterial;
693 MassRingMaterial=GuardRingMaterial;
698 void LaserDrivenBeamLine::ConstructLaserDrivenBeamLine()
708 solidTreatmentRoom =
new G4Box(
"TreatmentRoom",
715 "logicTreatmentRoom",
722 "physicalTreatmentRoom",
736 EnergySelectorChamber();
787 if(logicInternalChamber){
G4double xOffset =(internalChamberXSize/2.0)+externalSlitXPosition;
790 pFieldMgr -> SetDetectorField(PurgMagField);
791 G4cout <<
"DeltaStep "<< pFieldMgr -> GetDeltaOneStep()/
mm <<
"mm" <<endl;
792 pFieldMgr -> CreateChordFinder(PurgMagField);
796 pIntgrDriver =
new G4MagInt_Driver(1*
mm,fstepper,fstepper-> GetNumberOfVariables());
803 logicInternalChamber -> SetFieldManager(pFieldMgr, allLocal);}
806 if(LFourthTriplet){
G4double xOffsetFQ =-(QuadChamberWallPosX+FourthQuadXPosition);
809 pFieldMgrQuadFourth -> SetDetectorField(PurgMagFieldQuadFourth);
811 pFieldMgrQuadFourth -> CreateChordFinder(PurgMagFieldQuadFourth);
814 pIntgrDriverQuadFourth =
new G4MagInt_Driver(1*
mm,fstepperQuadFourth,fstepperQuadFourth-> GetNumberOfVariables());
816 pChordFinderQuadFourth =
new G4ChordFinder(pIntgrDriverQuadFourth);
821 LFourthTriplet -> SetFieldManager(pFieldMgrQuadFourth, allLocal);}
823 if(LThirdTriplet){
G4double xOffsetTQ =-(QuadChamberWallPosX+ThirdQuadXPosition);
826 pFieldMgrQuadThird -> SetDetectorField(PurgMagFieldQuadThird);
827 pFieldMgrQuadThird -> CreateChordFinder(PurgMagFieldQuadThird);
830 pIntgrDriverQuadThird =
new G4MagInt_Driver(1*
mm,fstepperQuadThird,fstepperQuadThird-> GetNumberOfVariables());
832 pChordFinderQuadThird =
new G4ChordFinder(pIntgrDriverQuadThird);
837 LThirdTriplet -> SetFieldManager(pFieldMgrQuadThird, allLocal);}
839 if(LSecondTriplet){
G4double xOffsetSQ =-(QuadChamberWallPosX+SecondQuadXPosition);
842 pFieldMgrQuadSecond -> SetDetectorField(PurgMagFieldQuadSecond);
843 pFieldMgrQuadSecond -> CreateChordFinder(PurgMagFieldQuadSecond);
846 pIntgrDriverQuadSecond =
new G4MagInt_Driver(1*
mm,fstepperQuadSecond,fstepperQuadSecond-> GetNumberOfVariables());
848 pChordFinderQuadSecond =
new G4ChordFinder(pIntgrDriverQuadSecond);
853 LSecondTriplet -> SetFieldManager(pFieldMgrQuadSecond, allLocal);}
855 if(LFirstTriplet) {
G4double xOffsetFirstQ =-(QuadChamberWallPosX+FirstQuadXPosition);
858 pFieldMgrQuadFirst -> SetDetectorField(PurgMagFieldQuadFirst);
859 pFieldMgrQuadFirst -> CreateChordFinder(PurgMagFieldQuadFirst);
862 pIntgrDriverQuadFirst =
new G4MagInt_Driver(1*
mm,fstepperQuadFirst,fstepperQuadFirst-> GetNumberOfVariables());
864 pChordFinderQuadFirst =
new G4ChordFinder(pIntgrDriverQuadFirst);
869 LFirstTriplet -> SetFieldManager(pFieldMgrQuadFirst, allLocal);}
871 if(logicVirtualMag) {
G4double exOffset= -20*
cm;
881 const G4int nvarElectric=8;
888 pEFieldmanager -> SetDetectorField(ElectricField);
889 pEFieldmanager -> SetChordFinder(fLocalChordFinder);
898 logicVirtualMag -> SetFieldManager(pEFieldmanager, allLocal);}
900 G4cout<<
" //....oooOO0OOooo.......... FIELDS HAVE BEEN IMPLEMENTED..........oooOO0OOooo...."<<
G4endl;
905 void LaserDrivenBeamLine::FaradayCup()
923 G4double VirtualLateralLength=FaradayCupBottomThickness+CupThickness+VirtualBottomThickness;
930 G4double KaptonEntranceWindowPosX=-virtualMagPosX+KaptonEntranceWindowThickness/2+FC_XOffset;
931 G4double MassRingPosX=KaptonEntranceWindowPosX+KaptonEntranceWindowThickness/2+MassRingThickness/2;
932 G4double VirtualWindowPosX=MassRingPosX+MassRingThickness/2+VirtualWindowThickness/2;
933 G4double GuardRingPosX=MassRingPosX+MassRingThickness/2+GuardRingThickness/2+2*
mm;
934 G4double VirtualMiddlePosX=GuardRingPosX+GuardRingThickness/2+VirtualMiddleThickness/2;
935 G4double FaradayCupBottomPosX=GuardRingPosX+GuardRingThickness/2+FaradayCupBottomThickness/2+1*
cm;
936 G4double VirtualBottomPosX=FaradayCupBottomPosX+FaradayCupBottomThickness/2+VirtualBottomThickness/2;
937 G4double CupPosX=VirtualBottomPosX+VirtualBottomThickness/2+CupThickness/2;
938 G4double VirtualOverBottomPosX=CupPosX+CupThickness/2+VirtualOverBottomThickness/2;
939 G4double VirtualLateralPosX=GuardRingPosX+GuardRingThickness/2+1*
cm+(FaradayCupBottomThickness+CupThickness+VirtualBottomThickness)/2;
944 virtualMag=
new G4Box(
"virtualMag", 31.*
cm, 6*
cm, 6*
cm );
947 internalChamberMaterial,
958 logicVirtualMag -> SetVisAttributes(blue);
980 "physicBeveledCylinder",
981 logicBeveledCylinder,
990 KaptonEntranceWindow=
new G4Tubs(
"KaptonEntranceWindow",
993 KaptonEntranceWindowThickness/2,
998 KaptonEntranceWindowMaterial,
999 "LKaptonEntranceWindow",
1003 "PhysicEntranceWindow",
1004 logicKaptonEntranceWindow,
1005 physicVirtualMag,
true,0);
1006 logicKaptonEntranceWindow -> SetVisAttributes(gray);
1010 MassRing=
new G4Tubs (
"MassRing",
1013 MassRingThickness/2,
1023 "PhysicMassRing",logicMassRing,
1027 logicMassRing -> SetVisAttributes(green);
1035 VirtualWindow=
new G4Tubs(
"VirtualWindow",
1038 VirtualWindowThickness/2,
1042 internalChamberMaterial,
1043 "logicVirtualWindow",
1048 "PhysicVirtualWindow",
1056 GuardRing=
new G4Tubs (
"GuardRing",
1059 GuardRingThickness/2,
1069 "PhysicGuardRing", logicGuardRing,
1073 logicGuardRing -> SetVisAttributes(red);
1079 VirtualMiddle=
new G4Tubs (
"VirtualMiddle",
1082 VirtualMiddleThickness/2,
1086 internalChamberMaterial,
1087 "logicVirtualMiddle",
1092 "PhysicVirtualMiddle", logicVirtualMiddle,
1101 FaradayCupBottom=
new G4Tubs (
"FaradayCupBottom",
1104 FaradayCupBottomThickness/2,
1108 FaradayCupBottomMaterial,
1109 "logicFaradayCupBottom",
1113 "PhysicFaradayCupBottom",logicFaradayCupBottom,
1116 logicFaradayCupBottom -> SetVisAttributes(yellow);
1121 VirtualBottom=
new G4Tubs (
"VirtualBottom",
1124 VirtualBottomThickness/2,
1128 internalChamberMaterial,
1129 "logicVirtualBottom",
1133 "PhysicVirtualBottom",
1154 "PhysicCup", logicCup,
1159 logicCup -> SetVisAttributes(darkGreen);
1164 VirtualOverBottom=
new G4Tubs (
"VirtualOverBottom",
1167 VirtualOverBottomThickness/2,
1171 internalChamberMaterial,
1172 "logicVirtualOverBottom",
1176 "PhysicVirtualOverBottom",logicVirtualOverBottom,
1186 VirtualLateral=
new G4Tubs (
"VirtualLateral",
1189 VirtualLateralLength/2,
1193 internalChamberMaterial,
1194 "logicVirtualLateral",
1198 "VirtualLateral",logicVirtualLateral,
1209 void LaserDrivenBeamLine::Quadrupole()
1216 SQuadChamberWall =
new G4Box(
"solidQuadChamberWall",externalChamberXSize/2., externalChamberYSize/2.,externalChamberZSize/2.);
1218 LQuadChamberWall =
new G4LogicalVolume(SQuadChamberWall, externalChamberMaterial,
"logicQuadChamberWall");
1221 "physQuadChamberWall", LQuadChamberWall,physicTreatmentRoom,
false, 0);
1224 SQuadChamber =
new G4Box(
"solidQuadChamber", internalChamberXSize/2., internalChamberYSize/2.,internalChamberZSize/2.);
1226 LQuadChamber =
new G4LogicalVolume(SQuadChamber, internalChamberMaterial,
"logicQuadChamber");
1229 "physQuadChamber", LQuadChamber,PQuadChamberWall,
false, 0);
1231 LQuadChamberWall -> SetVisAttributes(red);
1232 LQuadChamber -> SetVisAttributes(white);
1234 SFourthTriplet =
new G4Tubs(
"SolidTQuad", InnerRadiusTriplet, ExternalRadiusQuad,((FourthQuadThickness/2.)+1*
mm),
1235 startAngleQuad, spanningAngleQuad);
1237 LFourthTriplet =
new G4LogicalVolume(SFourthTriplet, internalChamberMaterial,
"LogicTQuad", 0, 0, 0);
1240 "PhysFourthTQuad", LFourthTriplet, PQuadChamber,
false, 0);
1242 solidFourthQuad =
new G4Tubs(
"SolidQuad", InnerRadiusQuad, ExternalRadiusQuad, FourthQuadThickness/2.,
1243 startAngleQuad, spanningAngleQuad);
1245 logicFourthQuad =
new G4LogicalVolume(solidFourthQuad, QuadMaterial,
"LogicQuad", 0, 0, 0);
1248 "PhysFourthQuad",logicFourthQuad, PFourthTriplet,
false, 0);
1250 LFourthTriplet -> SetVisAttributes(yellow);
1251 logicFourthQuad -> SetVisAttributes(green);
1253 SThirdTriplet =
new G4Tubs(
"SolidTTQuad", InnerRadiusTriplet, ExternalRadiusQuad, (ThirdQuadThickness/2.)+1*
mm,
1254 startAngleQuad, spanningAngleQuad);
1256 LThirdTriplet =
new G4LogicalVolume(SThirdTriplet, internalChamberMaterial,
"LogicTTQuad", 0, 0, 0);
1259 "PhysThirdTQuad",LThirdTriplet,PQuadChamber,
false, 0);
1261 solidThirdQuad =
new G4Tubs(
"SolidTQuad", InnerRadiusQuad, ExternalRadiusQuad, ThirdQuadThickness/2.,
1262 startAngleQuad, spanningAngleQuad);
1264 logicThirdQuad =
new G4LogicalVolume(solidThirdQuad, QuadMaterial,
"LogicTQuad", 0, 0, 0);
1267 "PhysThirdQuad",logicThirdQuad, PThirdTriplet,
false, 0);
1269 LThirdTriplet -> SetVisAttributes(yellow);
1270 logicThirdQuad -> SetVisAttributes(green);
1272 SSecondTriplet =
new G4Tubs(
"SolidTSQuad", InnerRadiusTriplet, ExternalRadiusQuad, (SecondQuadThickness/2.)+1*
mm,
1273 startAngleQuad, spanningAngleQuad);
1275 LSecondTriplet =
new G4LogicalVolume(SSecondTriplet, internalChamberMaterial,
"LogicTSQuad", 0, 0, 0);
1278 "PhysSecondTQuad", LSecondTriplet, PQuadChamber,
false, 0);
1280 solidSecondQuad =
new G4Tubs(
"SolidSQuad", InnerRadiusQuad, ExternalRadiusQuad, SecondQuadThickness/2.,
1281 startAngleQuad, spanningAngleQuad);
1283 logicSecondQuad =
new G4LogicalVolume(solidSecondQuad, QuadMaterial,
"LogicSQuad", 0, 0, 0);
1286 "PhysSecondQuad", logicSecondQuad, PSecondTriplet,
false, 0);
1288 LSecondTriplet -> SetVisAttributes(yellow);
1289 logicSecondQuad -> SetVisAttributes(green);
1291 SFirstTriplet =
new G4Tubs(
"SolidTQuad", InnerRadiusTriplet, ExternalRadiusQuad, (FirstQuadThickness/2.)+1*
mm,
1292 startAngleQuad, spanningAngleQuad);
1294 LFirstTriplet =
new G4LogicalVolume(SFirstTriplet, internalChamberMaterial,
"LogicTQuad", 0, 0, 0);
1297 "PhysFirstTQuad", LFirstTriplet, PQuadChamber,
false, 0);
1299 solidFirstQuad =
new G4Tubs(
"SolidQuad", InnerRadiusQuad, ExternalRadiusQuad, FirstQuadThickness/2.,
1300 startAngleQuad, spanningAngleQuad);
1302 logicFirstQuad =
new G4LogicalVolume(solidFirstQuad, QuadMaterial,
"LogicQuad", 0, 0, 0);
1305 "PhysFirstQuad",logicFirstQuad, PFirstTriplet,
false, 0);
1307 LFirstTriplet -> SetVisAttributes(yellow);
1308 logicFirstQuad -> SetVisAttributes(green);
1312 void LaserDrivenBeamLine::EnergySelectorChamber()
1318 solidExternalChamber =
new G4Box(
"ExternalChamber",
1319 externalChamberXSize/2.0,
1320 externalChamberYSize/2.0,
1321 externalChamberZSize/2.0);
1324 externalChamberMaterial,
1329 externalChamberYPosition,
1330 externalChamberZPosition),
1332 logicExternalChamber,
1333 physicTreatmentRoom,
1338 logicExternalChamber -> SetVisAttributes(red);
1341 solidInternalChamber =
new G4Box(
"SInternalChamber",
1342 internalChamberXSize/2.0,
1343 internalChamberYSize/2.0,
1344 internalChamberZSize/2.0);
1347 internalChamberMaterial,
1348 "LInternalChamber");
1353 logicInternalChamber,
1354 physicExternalChamber,
1357 logicInternalChamber -> SetVisAttributes(white);
1361 void LaserDrivenBeamLine::EntrancePipe()
1368 solidEntrancePipe =
new G4Tubs(
"EntrancePipe",
1369 InnerRadiusEntrancePipe,
1370 ExternalRadiusEntrancePipe,
1371 EntrancePipeheight/2.,
1372 startAngleEntrancePipe,
1373 spanningAngleEntrancePipe);
1384 EntrancePipeYPosition,
1385 EntrancePipeZPosition)),
1388 physicTreatmentRoom,
1392 logicEntrancePipe -> SetVisAttributes(red);
1397 void LaserDrivenBeamLine::Entrancehole()
1404 solidEntrancehole =
new G4Tubs(
"Entrancehole",
1405 InnerRadiusEntrancehole,
1406 ExternalRadiusEntrancehole,
1407 EntranceholeThickness/2.,
1408 startAngleEntrancehole,
1409 spanningAngleEntrancehole);
1412 internalChamberMaterial,
1420 EntranceholeYPosition,
1421 EntranceholeZPosition)),
1424 physicExternalChamber,
1430 EntranceholeYPosition,
1431 EntranceholeZPosition)),
1438 logicEntrancehole -> SetVisAttributes(skyBlue);
1443 void LaserDrivenBeamLine::Collimator()
1450 solidCollimator =
new G4Box(
"collimator",
1451 thicknessCollimator/2.0,
1452 collimatorBoxYSize/2.0,
1453 collimatorBoxZSize/2.0);
1461 collimatorBox_YPosition,
1462 collimatorBox_ZPosition),
1465 physicInternalChamber,
1469 logicCollimator -> SetVisAttributes(darkOrange3);
1471 solidCollimatorHole =
new G4Tubs(
"CollimatorHole",
1472 innerRadiusCollimator,
1473 outerRadiusCollimator,
1474 thicknessCollimator/2.,
1475 startAngleCollimator,
1476 spanningAngleCollimator);
1479 collimatorHoleMaterial,
1487 collimatorYPosition,
1488 collimatorZPosition)),
1490 logicCollimatorHole,
1495 logicCollimatorHole -> SetVisAttributes(skyBlue);
1500 void LaserDrivenBeamLine::Magnet_1()
1502 solidExternalMagnet_1 =
new G4Box(
"SolidExternalMagnet_1",
1503 externalMagnet_1XSize/2.0,
1504 externalMagnet_1YSize/2.0,
1505 externalMagnet_1ZSize/2.0);
1508 externalMagnet_1Material,
1509 "LogicExternalMagnet_1");
1513 externalMagnet_2YPosition,
1514 externalMagnet_2ZPosition),
1515 "PhysicExternalMagnet_1",
1516 logicExternalMagnet_1,
1517 physicInternalChamber,
1522 -externalMagnet_2YPosition,
1523 externalMagnet_2ZPosition),
1524 "PhysicExternalMagnet_1Down",
1525 logicExternalMagnet_1,
1526 physicInternalChamber,
1531 logicExternalMagnet_1 -> SetVisAttributes(gray);
1534 solidMagnet_1 =
new G4Box(
"SolidMagnet_1",
1540 externalMagnet_1Material,
1546 "PhysicMagnet_1Right",
1548 physicInternalChamber,
1553 -Magnet_1ZPosition),
1554 "PhysicMagnet_1Left",
1556 physicInternalChamber,
1560 logicMagnet_1 -> SetVisAttributes(gray);
1565 void LaserDrivenBeamLine::Magnet_2()
1568 solidExternalMagnet_2 =
new G4Box(
"SolidExternalMagnet_2",
1569 externalMagnet_2XSize/2.0,
1570 externalMagnet_2YSize/2.0,
1571 externalMagnet_2ZSize/2.0);
1574 externalMagnet_2Material,
1575 "LogicExternalMagnet_2");
1579 externalMagnet_2YPosition,
1580 (externalMagnet_2ZPosition+32*
mm)),
1581 "PhysicExternalMagnet_2",
1582 logicExternalMagnet_2,
1583 physicInternalChamber,
1589 -externalMagnet_2YPosition,
1590 (externalMagnet_2ZPosition+32*
mm)),
1591 "PhysicExternalMagnet_2Down",
1592 logicExternalMagnet_2,
1593 physicInternalChamber,
1598 logicExternalMagnet_2 -> SetVisAttributes(gray);
1601 solidMagnet_2 =
new G4Box(
"SolidMagnet_2",
1607 externalMagnet_2Material,
1612 (Magnet_2ZPosition)+32*
mm),
1613 "PhysicMagnet_2Right",
1615 physicInternalChamber,
1620 (-(Magnet_2ZPosition)+32*
mm)),
1621 "PhysicMagnet_2Left",
1623 physicInternalChamber,
1626 logicMagnet_2 -> SetVisAttributes(gray);
1631 void LaserDrivenBeamLine::Magnet_3()
1634 solidExternalMagnet_3 =
new G4Box(
"SolidExternalMagnet_3",
1635 externalMagnet_3XSize/2.0,
1636 externalMagnet_3YSize/2.0,
1637 externalMagnet_3ZSize/2.0);
1640 externalMagnet_3Material,
1641 "LogicExternalMagnet_3");
1645 externalMagnet_3YPosition,
1646 (externalMagnet_3ZPosition+32*
mm)),
1647 "PhysicExternalMagnet_3",
1648 logicExternalMagnet_3,
1649 physicInternalChamber,
1655 -externalMagnet_3YPosition,
1656 (externalMagnet_3ZPosition+32*
mm)),
1657 "PhysicExternalMagnet_3Down",
1658 logicExternalMagnet_3,
1659 physicInternalChamber,
1663 logicExternalMagnet_3 -> SetVisAttributes(gray);
1666 solidMagnet_3 =
new G4Box(
"SolidMagnet_3",
1672 externalMagnet_3Material,
1677 (Magnet_3ZPosition+32*
mm)),
1678 "PhysicMagnet_3Right",
1680 physicInternalChamber,
1685 (-(Magnet_3ZPosition)+32*
mm)),
1686 "PhysicMagnet_3Left",
1688 physicInternalChamber,
1691 logicMagnet_3 -> SetVisAttributes(gray);
1697 void LaserDrivenBeamLine::Magnet_4()
1700 solidExternalMagnet_4 =
new G4Box(
"SolidExternalMagnet_4",
1701 externalMagnet_4XSize/2.0,
1702 externalMagnet_4YSize/2.0,
1703 externalMagnet_4ZSize/2.0);
1706 externalMagnet_4Material,
1707 "LogicExternalMagnet_4");
1711 externalMagnet_4YPosition,
1712 externalMagnet_4ZPosition),
1713 "PhysicExternalMagnet_4",
1714 logicExternalMagnet_4,
1715 physicInternalChamber,
1721 -externalMagnet_4YPosition,
1722 externalMagnet_4ZPosition),
1723 "PhysicExternalMagnet_4Down",
1724 logicExternalMagnet_4,
1725 physicInternalChamber,
1729 logicExternalMagnet_4 -> SetVisAttributes(gray);
1732 solidMagnet_4 =
new G4Box(
"SolidMagnet_4",
1738 externalMagnet_4Material,
1744 "PhysicMagnet_4Right",
1746 physicInternalChamber,
1751 -Magnet_4ZPosition),
1752 "PhysicMagnet_4Left",
1754 physicInternalChamber,
1757 logicMagnet_4 -> SetVisAttributes(gray);
1762 void LaserDrivenBeamLine::Slit()
1764 solidExternalSlit =
new G4Box(
"ExternalSlit",
1765 externalSlitXSize/2.0,
1766 externalSlitYSize/2.0,
1767 externalSlitZSize/2.0);
1770 externalSlitMaterial,
1775 externalSlitYPosition,
1776 externalSlitZPosition),
1779 physicInternalChamber,
1783 logicExternalSlit -> SetVisAttributes(green);
1785 solidInternalSlit =
new G4Box(
"InternalSlit",
1786 internalSlitXSize/2.0,
1787 internalSlitYSize/2.0,
1788 internalSlitZSize/2.0);
1791 internalSlitMaterial,
1796 internalSlitYPosition,
1797 internalSlitZPosition),
1804 logicInternalSlit -> SetVisAttributes(skyBlue);
1808 void LaserDrivenBeamLine::FinalCollimator()
1815 solidFinalCollimator =
new G4Box(
"collimatorFinal",
1816 collimatorFinalBoxXSize/2.0,
1817 collimatorFinalBoxYSize/2.0,
1818 collimatorFinalBoxZSize/2.0);
1821 FinalcollimatorMaterial,
1826 collimatorFinalBox_YPosition,
1827 collimatorFinalBox_ZPosition),
1829 logicFinalCollimator,
1830 physicInternalChamber,
1833 logicFinalCollimator -> SetVisAttributes(darkOrange3);
1835 solidFinalCollimatorHole=
new G4Tubs(
"FinalCollimatorHole",
1836 innerRadiusFinalCollimator,
1837 outerRadiusFinalCollimator,
1838 FinalCollimatorThickness/2.,
1839 startAngleFinalCollimator,
1840 spanningAngleFinalCollimator);
1842 logicFinalCollimatorHole =
new G4LogicalVolume(solidFinalCollimatorHole,
1843 FinalcollimatorHoleMaterial,
1844 "FinalCollimatorHole",
1851 FinalcollimatorYPosition,
1852 FinalcollimatorZPosition)),
1853 "FinalCollimatorHole",
1854 logicFinalCollimatorHole,
1855 physicFinalCollimator,
1858 logicFinalCollimatorHole -> SetVisAttributes(skyBlue);
1861 void LaserDrivenBeamLine::ExitWindow()
1868 solidExitWindow =
new G4Tubs(
"ExitWindow",
1869 InnerRadiusExitWindow,
1870 ExternalRadiusExitWindow,
1871 ExitWindowThickness/2.,
1872 startAngleExitWindow,
1873 spanningAngleExitWindow);
1884 ExitWindowYPosition,
1885 ExitWindowZPosition)),
1888 physicTreatmentRoom,
1892 logicExitWindow -> SetVisAttributes(skyBlue);
1897 void LaserDrivenBeamLine::ExitPipe()
1904 solidExitPipe =
new G4Tubs(
"ExitPipe",
1905 InnerRadiusExitPipe,
1906 ExternalRadiusExitPipe,
1909 spanningAngleExitPipe);
1921 ExitPipeZPosition)),
1924 physicTreatmentRoom,
1928 logicExitPipe -> SetVisAttributes(red);
1933 void LaserDrivenBeamLine::Exithole()
1940 solidExithole =
new G4Tubs(
"Exithole",
1941 InnerRadiusExithole,
1942 ExternalRadiusExithole,
1943 ExitholeThickness/2.,
1945 spanningAngleExithole);
1948 internalChamberMaterial,
1957 ExitholeZPosition)),
1960 physicExternalChamber,
1964 logicExithole -> SetVisAttributes(skyBlue);
1972 if(physicMagnet_1Left) {
delete physicMagnet_1Left;
delete physicMagnet_1Right;
delete logicMagnet_1;
delete solidMagnet_1;}
1973 if(physicExternalMagnet_1Down){
delete physicExternalMagnet_1Down;
delete physicExternalMagnet_1;
delete logicExternalMagnet_1;
delete solidExternalMagnet_1;}
1974 if(physicMagnet_2Left){
delete physicMagnet_2Left;
delete physicMagnet_2Right;
delete logicMagnet_2;
delete solidMagnet_2;}
1975 if(physicExternalMagnet_2Down){
delete physicExternalMagnet_2Down;
delete physicExternalMagnet_2;
delete logicExternalMagnet_2;
delete solidExternalMagnet_2; }
1976 if(physicMagnet_3Left){
delete physicMagnet_3Left;
delete physicMagnet_3Right;
delete logicMagnet_3;
delete solidMagnet_3; }
1977 if(physicExternalMagnet_3Down){
delete physicExternalMagnet_3Down;
delete physicExternalMagnet_3;
delete logicExternalMagnet_3;
delete solidExternalMagnet_3; }
1978 if(physicMagnet_4Left) {
delete physicMagnet_4Left;
delete physicMagnet_4Right;
delete logicMagnet_4;
delete solidMagnet_4; }
1979 if(physicExternalMagnet_4Down){
delete physicExternalMagnet_4Down;
delete physicExternalMagnet_4;
delete logicExternalMagnet_4;
delete solidExternalMagnet_4; }
1980 if(physicCollimatorHole){
delete physicCollimatorHole;
delete logicCollimatorHole;
delete solidCollimatorHole; }
1981 if(physicCollimator) {
delete physicCollimator;
delete logicCollimator;
delete solidCollimator; }
1982 if(physicFinalCollimatorHole) {
delete physicFinalCollimatorHole;
delete logicFinalCollimatorHole;
delete solidFinalCollimatorHole; }
1983 if(physicFinalCollimator){
delete physicFinalCollimator;
delete logicFinalCollimator;
delete solidFinalCollimator; }
1984 if(physicInternalSlit){
delete physicInternalSlit;
delete logicInternalSlit;
delete solidInternalSlit; }
1985 if(physicExternalSlit){
delete physicExternalSlit;
delete logicExternalSlit;
delete solidExternalSlit; }
1986 if(physicExithole){
delete physicExithole;
delete logicExithole;
delete solidExithole;}
1987 if(physicExitWindow){
delete physicExitWindow;
delete logicExitWindow;
delete solidExitWindow;}
1988 if(physicExitPipe){
delete physicExitPipe;
delete logicExitPipe;
delete solidExitPipe;}
1989 if(physicEntranceholeESSChamber){
delete physicEntranceholeESSChamber;}
1990 if(physicInternalChamber){
delete physicInternalChamber;
delete logicInternalChamber;
delete solidInternalChamber;}
1991 if(physicExternalChamber) {
delete physicExternalChamber;
delete logicExternalChamber;
delete solidExternalChamber;}
1992 if(pFieldMgr) {
delete pFieldMgr;}
1996 G4cout <<
"****************************************************" <<
G4endl;
1997 G4cout <<
"************ The ESS has been disabled *************" <<
G4endl;
1998 G4cout <<
"****************************************************" <<
G4endl;
2008 solidCollimatorHole -> SetOuterRadius(radius);
2013 G4cout <<
"The first collimator aperture has been modified to "<< valueR/
mm <<
"mm in diameter" <<
G4endl;
2020 solidCollimator -> SetXHalfLength(thickness);
2021 solidCollimatorHole -> SetZHalfLength(thickness);
2026 G4cout <<
"The first collimator thickness has been modified to "<< valueC/
mm <<
" mm in thickness" <<
G4endl;
2032 physicCollimatorHole -> SetTranslation(
G4ThreeVector(0., 0., valueQ));
2037 G4cout <<
"The first collimator has been translated to "<< valueQ/
mm <<
"mm (along the z axis)" <<
G4endl;
2044 solidFinalCollimatorHole -> SetOuterRadius(radius);
2049 G4cout <<
"The second collimator aperture has been modified to "<< value/
mm <<
"mm in diameter" <<
G4endl;
2057 solidFinalCollimator -> SetXHalfLength(thickness);
2058 solidFinalCollimatorHole -> SetZHalfLength(thickness);
2063 G4cout <<
"The second collimator thickness has been modified to "<< value/
mm <<
" mm in thickness" <<
G4endl;
2069 physicFinalCollimatorHole -> SetTranslation(
G4ThreeVector(0., 0., value));
2074 G4cout <<
"The second collimator has been translated to "<< value/
mm <<
"mm (along the z axis)" <<
G4endl;
2081 if (value >(10.0*
mm)) {
2082 G4cout <<
"***************************************"<<
G4endl;
2083 G4cout <<
"******This is a warning messenger******"<<
G4endl;
2084 G4cout <<
"***************************************"<<
G4endl;
2085 G4cout <<
"The maximum value of the thickness of the slit is 10 mm, your value is >10 mm." <<
G4endl;
2086 G4cout <<
"The default thickness value is used, it is: " << ((solidExternalSlit -> GetXHalfLength())*2.)/
mm
2088 G4cout <<
"***************************************"<<
G4endl;
2093 solidExternalSlit -> SetXHalfLength(dimension);
2094 solidInternalSlit -> SetXHalfLength(dimension);
2099 G4cout <<
"The thickness of the slit is:" << ((solidExternalSlit -> GetXHalfLength())*2.)/
mm
2108 solidInternalSlit -> SetYHalfLength(hole);
2113 G4cout <<
"The hole of the Slit has been changed in the Y direction to "<< value/
mm <<
" mm" <<
G4endl;
2121 solidInternalSlit -> SetZHalfLength(hole);
2126 G4cout <<
"The hole of the Slit has been changed in the Z direction to "<< value/
mm <<
" mm" <<
G4endl;
2132 physicInternalSlit -> SetTranslation(
G4ThreeVector(0., 0., value));
2137 G4cout <<
"The hole of the slit has been translated to "<< value/
mm <<
" mm (along the Z axis)" <<
G4endl;
2146 {
delete solidFirstQuad;
delete logicFirstQuad;
delete physicFirstQuad;
delete SFirstTriplet;
delete LFirstTriplet;
delete PFirstTriplet;}
2147 if(physicSecondQuad)
2148 {
delete solidSecondQuad;
delete logicSecondQuad;
delete physicSecondQuad;
delete SSecondTriplet;
delete LSecondTriplet;
delete PSecondTriplet;}
2150 {
delete solidThirdQuad;
delete logicThirdQuad;
delete physicThirdQuad;
delete SThirdTriplet;
delete LThirdTriplet;
delete PThirdTriplet;}
2151 if(physicFourthQuad)
2152 {
delete solidFourthQuad;
delete logicFourthQuad;
delete physicFourthQuad;
delete SFourthTriplet;
delete LFourthTriplet;
delete PFourthTriplet;}
2153 if(pFieldMgrQuadFourth) {
delete pFieldMgrQuadFourth;}
2154 if(pFieldMgrQuadThird) {
delete pFieldMgrQuadThird;}
2155 if(pFieldMgrQuadSecond) {
delete pFieldMgrQuadSecond;}
2156 if(pFieldMgrQuadFirst) {
delete pFieldMgrQuadFirst;}
2159 G4cout <<
"******************************************************************" <<
G4endl;
2160 G4cout <<
"************ The Quadrupoles system has been disabled *************" <<
G4endl;
2161 G4cout <<
"******************************************************************" <<
G4endl;
G4Material * FindOrBuildMaterial(const G4String &name, G4bool isotopes=true, G4bool warning=false)
static constexpr double mm
CLHEP::Hep3Vector G4ThreeVector
HepRotation & rotateX(double delta)
CLHEP::HepRotation G4RotationMatrix
void SetSecondCollimatorRadius(G4double value)
static constexpr double perCent
HepRotation & rotateY(double delta)
void SetSecondCollimatorThickness(G4double value)
void SetChordFinder(G4ChordFinder *aChordFinder)
static G4NistManager * Instance()
void RegisterParallelWorld(G4VUserParallelWorld *)
static G4UImanager * GetUIpointer()
void SetSlitHolePositionZ(G4double value)
void SetMinimumEpsilonStep(G4double newEpsMin)
G4GLOB_DLL std::ostream G4cout
static constexpr double um
const XML_Char int const XML_Char * value
void SetThicknessSlit(G4double value)
static constexpr double cm
void SetSecondCollimatorPositionZ(G4double value)
void SetSlitHoleDimensionZ(G4double value)
static constexpr double kelvin
void SetFirstCollimatorPositionZ(G4double value)
G4VPhysicalVolume * Construct()
static constexpr double cm3
static G4RunManager * GetRunManager()
void SetSlitHoleDimensionY(G4double value)
static const G4VisAttributes Invisible
void ConstructSDandField()
void SetFirstCollimatorThickness(G4double value)
void SetMaximumEpsilonStep(G4double newEpsMax)
static constexpr double pi
void InitializeDetectorROGeometry(HadrontherapyDetectorROGeometry *, G4ThreeVector detectorToWorldPosition)
static constexpr double deg
G4Element * FindOrBuildElement(G4int Z, G4bool isotopes=true)
void SetDeltaOneStep(G4double valueD1step)
G4ThreeVector GetDetectorToWorldPosition()
static constexpr double mole
void SetVisAttributes(const G4VisAttributes *pVA)
void SetFirstCollimatorRadius(G4double value)