File indexing completed on 2025-01-31 09:22:16
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029 #ifndef LaserDrivenBeamLine_H
0030 #define LaserDrivenBeamLine_H 1
0031
0032 #include "globals.hh"
0033 #include "G4VUserDetectorConstruction.hh"
0034 #include "G4Box.hh"
0035 #include "G4Tubs.hh"
0036 #include "G4Sphere.hh"
0037 #include "G4VisAttributes.hh"
0038 #include "G4LogicalVolume.hh"
0039
0040 class G4VPhysicalVolume;
0041 class HadrontherapyDetectorConstruction;
0042 class LaserDrivenBeamLineMessenger;
0043 class G4Mag_UsualEqRhs;
0044 class G4MagIntegratorStepper;
0045 class G4ChordFinder;
0046 class G4UniformMagField;
0047 class G4MagInt_Driver;
0048 class G4EqMagElectricField;
0049
0050 class G4FieldManager;
0051 class G4MagneticField;
0052 class HadrontherapyMagneticField3D;
0053 class HadrontherapyDetectorROGeometry;
0054
0055 class HadrontherapyElectricTabulatedField3D;
0056
0057
0058 class LaserDrivenBeamLine : public G4VUserDetectorConstruction
0059 {
0060 public:
0061
0062 LaserDrivenBeamLine();
0063 ~LaserDrivenBeamLine();
0064
0065 G4VPhysicalVolume* Construct();
0066 void ConstructSDandField();
0067
0068 void RemoveESS();
0069 void SetFirstCollimatorRadius(G4double value);
0070 void SetFirstCollimatorThickness(G4double value);
0071 void SetFirstCollimatorPositionZ(G4double value);
0072 void SetSecondCollimatorRadius(G4double value);
0073 void SetSecondCollimatorThickness(G4double value);
0074 void SetSecondCollimatorPositionZ(G4double value);
0075 void SetThicknessSlit(G4double value);
0076 void SetSlitHoleDimensionY(G4double value);
0077 void SetSlitHoleDimensionZ(G4double value);
0078 void SetSlitHolePositionZ(G4double value);
0079 void RemoveQuads();
0080
0081 private:
0082 void SetDefaultDimensions();
0083 void ConstructLaserDrivenBeamLine();
0084 void EnergySelectorChamber();
0085 void Collimator();
0086 void Magnet_1();
0087 void Magnet_2();
0088 void Magnet_3();
0089 void Magnet_4();
0090 void Slit();
0091 void FinalCollimator();
0092 void ExitPipe();
0093 void ExitWindow();
0094 void Exithole();
0095 void Entrancehole();
0096 void EntrancePipe();
0097 void Quadrupole();
0098 void FaradayCup();
0099
0100 LaserDrivenBeamLineMessenger *laserDrivenMessenger;
0101 HadrontherapyDetectorConstruction* hadrontherapydetectorconstruction;
0102
0103 HadrontherapyDetectorROGeometry* RO;
0104
0105
0106
0107 G4Box *solidTreatmentRoom;
0108 G4LogicalVolume *logicTreatmentRoom;
0109 G4VPhysicalVolume *physicTreatmentRoom;
0110
0111
0112 G4Material *QuadMaterial;
0113
0114 G4double QuadChamberWallPosX;
0115 G4double QuadChamberWallPosY;
0116 G4double QuadChamberWallPosZ;
0117 G4Box *SQuadChamberWall, *SQuadChamber;
0118 G4LogicalVolume *LQuadChamberWall, *LQuadChamber;
0119 G4VPhysicalVolume *PQuadChamberWall, *PQuadChamber;
0120
0121 G4double InnerRadiusQuad;
0122 G4double InnerRadiusTriplet;
0123 G4double ExternalRadiusQuad;
0124 G4double FirstQuadThickness;
0125 G4double SecondQuadThickness;
0126 G4double ThirdQuadThickness;
0127 G4double FourthQuadThickness;
0128 G4double startAngleQuad;
0129 G4double spanningAngleQuad;
0130 G4double FirstQuadXPosition;
0131 G4double FirstQXPosition;
0132 G4double SecondQuadXPosition;
0133 G4double SecondQXPosition;
0134 G4double ThirdQuadXPosition;
0135 G4double ThirdQXPosition;
0136 G4double FourthQuadXPosition;
0137 G4double FourthQXPosition;
0138 G4double QuadYPosition;
0139 G4double QYPosition;
0140 G4double QuadZPosition;
0141 G4double QZPosition;
0142
0143 G4Tubs *SFirstTriplet, *SSecondTriplet, *SThirdTriplet, *SFourthTriplet;
0144 G4LogicalVolume *LFirstTriplet, *LSecondTriplet, *LThirdTriplet, *LFourthTriplet;
0145 G4VPhysicalVolume *PFirstTriplet, *PSecondTriplet, *PThirdTriplet, *PFourthTriplet;
0146
0147 G4Tubs *solidFirstQuad, *solidSecondQuad, *solidThirdQuad, *solidFourthQuad;
0148 G4LogicalVolume *logicFirstQuad, *logicSecondQuad, *logicThirdQuad, *logicFourthQuad;
0149 G4VPhysicalVolume *physicFirstQuad, *physicSecondQuad, *physicThirdQuad, *physicFourthQuad;
0150
0151
0152
0153 G4Material *externalChamberMaterial;
0154 G4Material *internalChamberMaterial;
0155
0156 G4Box *solidExternalChamber;
0157 G4LogicalVolume *logicExternalChamber;
0158 G4VPhysicalVolume *physicExternalChamber;
0159
0160 G4Box *solidInternalChamber;
0161 G4LogicalVolume *logicInternalChamber;
0162 G4VPhysicalVolume *physicInternalChamber;
0163
0164 G4double VaccumChamberWallThickness;
0165
0166
0167 G4FieldManager *pFieldMgr, *pFieldMgrQuadFourth, *pFieldMgrQuadThird, *pFieldMgrQuadSecond, *pFieldMgrQuadFirst;
0168 G4MagneticField* PurgMagField, *PurgMagFieldQuadFourth, *PurgMagFieldQuadThird, *PurgMagFieldQuadSecond, *PurgMagFieldQuadFirst;
0169 G4ChordFinder *pChordFinder, *pChordFinderQuadFourth, *pChordFinderQuadThird, *pChordFinderQuadSecond, *pChordFinderQuadFirst;
0170 G4Mag_UsualEqRhs* fEquation, *fEquationQuadFourth, *fEquationQuadThird, *fEquationQuadSecond, *fEquationQuadFirst;
0171 G4MagInt_Driver* pIntgrDriver, *pIntgrDriverQuadFourth, *pIntgrDriverQuadThird, *pIntgrDriverQuadSecond, *pIntgrDriverQuadFirst;
0172 G4MagIntegratorStepper* fstepper, *fstepperQuadFourth, *fstepperQuadThird, *fstepperQuadSecond, *fstepperQuadFirst;
0173
0174
0175 G4double InnerRadiusExitWindow;
0176 G4double ExternalRadiusExitWindow;
0177 G4double ExitWindowThickness;
0178
0179 G4double ExitWindowXPosition;
0180 G4double ExitWindowYPosition;
0181 G4double ExitWindowZPosition;
0182
0183 G4double startAngleExitWindow;
0184 G4double spanningAngleExitWindow;
0185
0186 G4double ExitPipeheight;
0187 G4double InnerRadiusExitPipe;
0188 G4double ExternalRadiusExitPipe;
0189
0190 G4double ExitPipeXPosition;
0191 G4double ExitPipeYPosition;
0192 G4double ExitPipeZPosition;
0193
0194 G4double startAngleExitPipe;
0195 G4double spanningAngleExitPipe;
0196
0197 G4double EntrancePipeheight;
0198 G4double InnerRadiusEntrancePipe;
0199 G4double ExternalRadiusEntrancePipe;
0200
0201 G4double EntrancePipeXPosition;
0202 G4double EntrancePipeYPosition;
0203 G4double EntrancePipeZPosition;
0204
0205 G4double startAngleEntrancePipe;
0206 G4double spanningAngleEntrancePipe;
0207
0208 G4double InnerRadiusExithole;
0209 G4double ExternalRadiusExithole;
0210 G4double ExitholeThickness;
0211 G4double ExitholeXPosition;
0212 G4double ExitholeYPosition;
0213 G4double ExitholeZPosition;
0214
0215 G4double startAngleExithole;
0216 G4double spanningAngleExithole;
0217
0218 G4double InnerRadiusEntrancehole;
0219 G4double ExternalRadiusEntrancehole;
0220 G4double EntranceholeThickness;
0221 G4double EntranceholeXPosition;
0222 G4double EntranceholeYPosition;
0223 G4double EntranceholeZPosition;
0224 G4double EntranceholeQuadXPosition;
0225
0226 G4double startAngleEntrancehole;
0227 G4double spanningAngleEntrancehole;
0228
0229
0230
0231 G4double ExitholeToFinalCollimator;
0232 G4double FinalCollimatorToMagnet4;
0233 G4double Magnet4ToMagnet3;
0234 G4double Magnet3ToMagnet2;
0235 G4double Magnet2ToMagnet1;
0236 G4double Magnet1ToFirstCollimator;
0237
0238
0239 G4double externalChamberXSize;
0240 G4double externalChamberYSize;
0241 G4double externalChamberZSize;
0242 G4double internalChamberXSize;
0243 G4double internalChamberYSize;
0244 G4double internalChamberZSize;
0245
0246 G4double externalChamberXPosition;
0247 G4double externalChamberYPosition;
0248 G4double externalChamberZPosition;
0249
0250
0251 G4double defaultInnerRadiusCollimator;
0252 G4double innerRadiusCollimator;
0253
0254 G4double defaultThicknessCollimator;
0255 G4double thicknessCollimator;
0256
0257 G4double defaultOuterRadiusCollimator;
0258 G4double outerRadiusCollimator;
0259
0260 G4double defaultStartAngleCollimator;
0261 G4double startAngleCollimator;
0262
0263 G4double defaultSpanningAngleCollimator;
0264 G4double spanningAngleCollimator;
0265
0266 G4double defaultCollimatorXPosition;
0267 G4double collimatorXPosition;
0268
0269 G4double defaultCollimatorYPosition;
0270 G4double collimatorYPosition;
0271
0272 G4double defaultCollimatorZPosition;
0273 G4double collimatorZPosition;
0274
0275 G4double collimatorBoxYSize;
0276 G4double collimatorBoxZSize;
0277
0278 G4double collimatorBox_XPosition;
0279 G4double collimatorBox_YPosition;
0280 G4double collimatorBox_ZPosition;
0281
0282 G4Box *solidCollimator;
0283 G4LogicalVolume *logicCollimator;
0284 G4VPhysicalVolume *physicCollimator;
0285
0286 G4Tubs *solidCollimatorHole;
0287 G4LogicalVolume *logicCollimatorHole;
0288 G4VPhysicalVolume *physicCollimatorHole;
0289
0290 G4Material *collimatorHoleMaterial;
0291 G4Material *collimatorMaterial;
0292
0293
0294 G4double defaultInnerRadiusFinalCollimator;
0295 G4double innerRadiusFinalCollimator;
0296
0297 G4double defaultFinalCollimatorThickness;
0298 G4double FinalCollimatorThickness;
0299
0300 G4double defaultOuterRadiusFinalCollimator;
0301 G4double outerRadiusFinalCollimator;
0302
0303 G4double defaultStartAngleFinalCollimator;
0304 G4double startAngleFinalCollimator;
0305
0306 G4double defaultSpanningAngleFinalCollimator;
0307 G4double spanningAngleFinalCollimator;
0308
0309 G4double defaultFinalCollimatorXPosition;
0310 G4double FinalcollimatorXPosition;
0311
0312 G4double defaultFinalCollimatorYPosition;
0313 G4double FinalcollimatorYPosition;
0314
0315 G4double defaultFinalCollimatorZPosition;
0316 G4double FinalcollimatorZPosition;
0317
0318 G4double collimatorFinalBoxXSize;
0319 G4double collimatorFinalBoxYSize;
0320 G4double collimatorFinalBoxZSize;
0321
0322 G4double collimatorFinalBox_XPosition;
0323 G4double collimatorFinalBox_YPosition;
0324 G4double collimatorFinalBox_ZPosition;
0325
0326 G4Box *solidFinalCollimator;
0327 G4LogicalVolume *logicFinalCollimator;
0328 G4VPhysicalVolume *physicFinalCollimator;
0329
0330 G4Tubs *solidFinalCollimatorHole;
0331 G4LogicalVolume *logicFinalCollimatorHole;
0332 G4VPhysicalVolume *physicFinalCollimatorHole;
0333
0334 G4Material *FinalcollimatorMaterial;
0335 G4Material *FinalcollimatorHoleMaterial;
0336
0337 G4Material *WindowMaterial;
0338
0339 G4Material *PipeMaterial;
0340
0341
0342
0343 G4Material *MotherMaterial;
0344
0345 G4Material *externalMagnet_1Material, *externalMagnet_2Material, *externalMagnet_3Material, *externalMagnet_4Material, *externalSlitMaterial, *internalSlitMaterial;
0346
0347 G4Box *solidExternalMagnet_1;
0348 G4LogicalVolume *logicExternalMagnet_1;
0349 G4VPhysicalVolume *physicExternalMagnet_1;
0350 G4VPhysicalVolume *physicExternalMagnet_1Down;
0351
0352 G4Box *solidMagnet_1;
0353 G4LogicalVolume *logicMagnet_1;
0354 G4VPhysicalVolume *physicMagnet_1Right;
0355 G4VPhysicalVolume *physicMagnet_1Left;
0356
0357 G4Box *solidExternalMagnet_2;
0358 G4LogicalVolume *logicExternalMagnet_2;
0359 G4VPhysicalVolume *physicExternalMagnet_2;
0360 G4VPhysicalVolume *physicExternalMagnet_2Down;
0361
0362 G4Box *solidMagnet_2;
0363 G4LogicalVolume *logicMagnet_2;
0364 G4VPhysicalVolume *physicMagnet_2Right;
0365 G4VPhysicalVolume *physicMagnet_2Left;
0366
0367 G4Box *solidExternalMagnet_3;
0368 G4LogicalVolume *logicExternalMagnet_3;
0369 G4VPhysicalVolume *physicExternalMagnet_3;
0370 G4VPhysicalVolume *physicExternalMagnet_3Down;
0371
0372 G4Box *solidMagnet_3;
0373 G4LogicalVolume *logicMagnet_3;
0374 G4VPhysicalVolume *physicMagnet_3Right;
0375 G4VPhysicalVolume *physicMagnet_3Left;
0376
0377 G4Box *solidExternalMagnet_4;
0378 G4LogicalVolume *logicExternalMagnet_4;
0379 G4VPhysicalVolume *physicExternalMagnet_4;
0380 G4VPhysicalVolume *physicExternalMagnet_4Down;
0381
0382 G4Box *solidMagnet_4;
0383 G4LogicalVolume *logicMagnet_4;
0384 G4VPhysicalVolume *physicMagnet_4Right;
0385 G4VPhysicalVolume *physicMagnet_4Left;
0386
0387 G4Box *solidExternalSlit;
0388 G4LogicalVolume *logicExternalSlit;
0389 G4VPhysicalVolume *physicExternalSlit;
0390
0391 G4Box *solidInternalSlit;
0392 G4LogicalVolume *logicInternalSlit;
0393 G4VPhysicalVolume *physicInternalSlit;
0394
0395
0396 G4double externalMagnet_1XSize;
0397 G4double externalMagnet_1YSize;
0398 G4double externalMagnet_1ZSize;
0399
0400 G4double externalMagnet_2XSize;
0401 G4double externalMagnet_2YSize;
0402 G4double externalMagnet_2ZSize;
0403
0404 G4double externalMagnet_3XSize;
0405 G4double externalMagnet_3YSize;
0406 G4double externalMagnet_3ZSize;
0407
0408 G4double externalMagnet_4XSize;
0409 G4double externalMagnet_4YSize;
0410 G4double externalMagnet_4ZSize;
0411
0412 G4double externalMagnet_1XPosition;
0413 G4double externalMagnet_1YPosition;
0414 G4double externalMagnet_1ZPosition;
0415
0416 G4double externalMagnet_2XPosition;
0417 G4double externalMagnet_2YPosition;
0418 G4double externalMagnet_2ZPosition;
0419
0420 G4double externalMagnet_3XPosition;
0421 G4double externalMagnet_3YPosition;
0422 G4double externalMagnet_3ZPosition;
0423
0424 G4double externalMagnet_4XPosition;
0425 G4double externalMagnet_4YPosition;
0426 G4double externalMagnet_4ZPosition;
0427
0428 G4double externalSlitXPosition;
0429 G4double externalSlitYPosition;
0430 G4double externalSlitZPosition;
0431
0432 G4double externalSlitXSize;
0433 G4double externalSlitYSize;
0434 G4double externalSlitZSize;
0435
0436 G4Tubs *solidExitPipe;
0437 G4LogicalVolume *logicExitPipe;
0438 G4VPhysicalVolume *physicExitPipe;
0439
0440 G4Tubs *solidExitWindow;
0441 G4LogicalVolume *logicExitWindow;
0442 G4VPhysicalVolume *physicExitWindow;
0443
0444 G4Tubs *solidExithole;
0445 G4LogicalVolume *logicExithole;
0446 G4VPhysicalVolume *physicExithole;
0447
0448 G4Tubs *solidEntrancePipe;
0449 G4LogicalVolume *logicEntrancePipe;
0450 G4VPhysicalVolume *physicEntrancePipe;
0451
0452 G4Tubs *solidEntrancehole;
0453 G4LogicalVolume *logicEntrancehole;
0454 G4VPhysicalVolume *physicEntrancehole;
0455 G4VPhysicalVolume *physicEntranceholeESSChamber;
0456
0457 G4double Magnet_1XPosition;
0458 G4double Magnet_1YPosition;
0459 G4double Magnet_1ZPosition;
0460
0461 G4double Magnet_1XSize;
0462 G4double Magnet_1YSize;
0463 G4double Magnet_1ZSize;
0464
0465 G4double Magnet_2XPosition;
0466 G4double Magnet_2YPosition;
0467 G4double Magnet_2ZPosition;
0468
0469 G4double Magnet_2XSize;
0470 G4double Magnet_2YSize;
0471 G4double Magnet_2ZSize;
0472
0473 G4double Magnet_3XPosition;
0474 G4double Magnet_3YPosition;
0475 G4double Magnet_3ZPosition;
0476
0477 G4double Magnet_3XSize;
0478 G4double Magnet_3YSize;
0479 G4double Magnet_3ZSize;
0480
0481 G4double Magnet_4XPosition;
0482 G4double Magnet_4YPosition;
0483 G4double Magnet_4ZPosition;
0484
0485 G4double Magnet_4XSize;
0486 G4double Magnet_4YSize;
0487 G4double Magnet_4ZSize;
0488
0489 G4double internalSlitXPosition;
0490 G4double internalSlitYPosition;
0491 G4double internalSlitZPosition;
0492
0493 G4double internalSlitXSize;
0494 G4double internalSlitYSize;
0495 G4double internalSlitZSize;
0496
0497
0498
0499
0500 G4Material *KaptonEntranceWindowMaterial;
0501 G4Material *MassRingMaterial;
0502 G4Material *GuardRingMaterial;
0503 G4Material *FaradayCupBottomMaterial;
0504 G4Material *CupMaterial;
0505
0506 G4Box *virtualMag;
0507 G4LogicalVolume *logicVirtualMag;
0508 G4VPhysicalVolume *physicVirtualMag;
0509
0510 G4Box*Box;
0511 G4Tubs*Cylinder;
0512 G4LogicalVolume* logicBeveledCylinder;
0513 G4VPhysicalVolume* physicBeveledCylinder;
0514
0515 G4Tubs *KaptonEntranceWindow;
0516 G4LogicalVolume *logicKaptonEntranceWindow;
0517 G4VPhysicalVolume *physicKaptonEntranceWindow;
0518
0519 G4Tubs *MassRing;
0520 G4LogicalVolume *logicMassRing;
0521 G4VPhysicalVolume *physicMassRing;
0522
0523 G4Tubs *VirtualWindow;
0524 G4LogicalVolume *logicVirtualWindow;
0525 G4VPhysicalVolume *physicVirtualWindow;
0526
0527 G4Tubs *GuardRing;
0528 G4LogicalVolume *logicGuardRing;
0529 G4VPhysicalVolume *physicGuardRing;
0530
0531 G4Tubs *VirtualMiddle;
0532 G4LogicalVolume *logicVirtualMiddle;
0533 G4VPhysicalVolume *physicVirtualMiddle;
0534
0535 G4Tubs *FaradayCupBottom;
0536 G4LogicalVolume *logicFaradayCupBottom;
0537 G4VPhysicalVolume *physicFaradayCupBottom;
0538
0539 G4Tubs *VirtualBottom;
0540 G4LogicalVolume *logicVirtualBottom;
0541 G4VPhysicalVolume *physicVirtualBottom;
0542
0543 G4Tubs *Cup;
0544 G4LogicalVolume *logicCup;
0545 G4VPhysicalVolume *physicCup;
0546
0547 G4Tubs *VirtualOverBottom;
0548 G4LogicalVolume *logicVirtualOverBottom;
0549 G4VPhysicalVolume *physicVirtualOverBottom;
0550
0551 G4Tubs *VirtualLateral;
0552 G4LogicalVolume *logicVirtualLateral;
0553 G4VPhysicalVolume *physicVirtualLateral;
0554
0555
0556 G4VisAttributes* blue;
0557 G4VisAttributes* gray;
0558 G4VisAttributes* white;
0559 G4VisAttributes* red;
0560 G4VisAttributes* yellow;
0561 G4VisAttributes* green;
0562 G4VisAttributes* darkGreen;
0563 G4VisAttributes* darkOrange3;
0564 G4VisAttributes* skyBlue;
0565 G4VisAttributes* black;
0566 };
0567 #endif