| 1 | //
|
|---|
| 2 | // ********************************************************************
|
|---|
| 3 | // * License and Disclaimer *
|
|---|
| 4 | // * *
|
|---|
| 5 | // * The Geant4 software is copyright of the Copyright Holders of *
|
|---|
| 6 | // * the Geant4 Collaboration. It is provided under the terms and *
|
|---|
| 7 | // * conditions of the Geant4 Software License, included in the file *
|
|---|
| 8 | // * LICENSE and available at http://cern.ch/geant4/license . These *
|
|---|
| 9 | // * include a list of copyright holders. *
|
|---|
| 10 | // * *
|
|---|
| 11 | // * Neither the authors of this software system, nor their employing *
|
|---|
| 12 | // * institutes,nor the agencies providing financial support for this *
|
|---|
| 13 | // * work make any representation or warranty, express or implied, *
|
|---|
| 14 | // * regarding this software system or assume any liability for its *
|
|---|
| 15 | // * use. Please see the license in the file LICENSE and URL above *
|
|---|
| 16 | // * for the full disclaimer and the limitation of liability. *
|
|---|
| 17 | // * *
|
|---|
| 18 | // * This code implementation is the result of the scientific and *
|
|---|
| 19 | // * technical work of the GEANT4 collaboration. *
|
|---|
| 20 | // * By using, copying, modifying or distributing the software (or *
|
|---|
| 21 | // * any work based on the software) you agree to acknowledge its *
|
|---|
| 22 | // * use in resulting scientific publications, and indicate your *
|
|---|
| 23 | // * acceptance of all terms of the Geant4 Software license. *
|
|---|
| 24 | // ********************************************************************
|
|---|
| 25 | //
|
|---|
| 26 | //
|
|---|
| 27 | //
|
|---|
| 28 | //
|
|---|
| 29 |
|
|---|
| 30 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
|---|
| 31 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
|---|
| 32 |
|
|---|
| 33 | #ifndef F04DetectorConstruction_h
|
|---|
| 34 | #define F04DetectorConstruction_h 1
|
|---|
| 35 |
|
|---|
| 36 | #include "globals.hh"
|
|---|
| 37 | #include "G4ios.hh"
|
|---|
| 38 |
|
|---|
| 39 | #include "G4RotationMatrix.hh"
|
|---|
| 40 |
|
|---|
| 41 | class G4Tubs;
|
|---|
| 42 |
|
|---|
| 43 | class G4LogicalVolume;
|
|---|
| 44 | class G4VPhysicalVolume;
|
|---|
| 45 |
|
|---|
| 46 | class F04Materials;
|
|---|
| 47 | class G4Material;
|
|---|
| 48 |
|
|---|
| 49 | class F04SimpleSolenoid;
|
|---|
| 50 | class F04FocusSolenoid;
|
|---|
| 51 |
|
|---|
| 52 | class F04DetectorMessenger;
|
|---|
| 53 |
|
|---|
| 54 | #include "G4VUserDetectorConstruction.hh"
|
|---|
| 55 |
|
|---|
| 56 | class F04DetectorConstruction : public G4VUserDetectorConstruction
|
|---|
| 57 | {
|
|---|
| 58 | public:
|
|---|
| 59 |
|
|---|
| 60 | F04DetectorConstruction();
|
|---|
| 61 | ~F04DetectorConstruction();
|
|---|
| 62 |
|
|---|
| 63 | G4VPhysicalVolume* Construct();
|
|---|
| 64 | G4VPhysicalVolume* ConstructDetector();
|
|---|
| 65 |
|
|---|
| 66 | void UpdateGeometry();
|
|---|
| 67 |
|
|---|
| 68 | // stringToRotationMatrix() converts a string "X90,Y45" into a
|
|---|
| 69 | // G4RotationMatrix.
|
|---|
| 70 | // This is an active rotation, in that the object is first rotated
|
|---|
| 71 | // around the parent's X axis by 90 degrees, then the object is
|
|---|
| 72 | // further rotated around the parent's Y axis by 45 degrees.
|
|---|
| 73 | // The return value points to a G4RotationMatrix on the heap, so
|
|---|
| 74 | // it is persistent. Angles are in degrees, can have decimals,
|
|---|
| 75 | // and can be negative. Axes are X, Y, Z.
|
|---|
| 76 |
|
|---|
| 77 | static G4RotationMatrix stringToRotationMatrix(G4String rotation);
|
|---|
| 78 |
|
|---|
| 79 | public:
|
|---|
| 80 |
|
|---|
| 81 | void SetWorldMaterial(G4String);
|
|---|
| 82 | void SetWorldSizeZ(G4double);
|
|---|
| 83 | void SetWorldSizeR(G4double);
|
|---|
| 84 |
|
|---|
| 85 | void SetCaptureMgntRadius(G4double);
|
|---|
| 86 | void SetCaptureMgntLength(G4double);
|
|---|
| 87 | void SetCaptureMgntB1(G4double);
|
|---|
| 88 | void SetCaptureMgntB2(G4double);
|
|---|
| 89 |
|
|---|
| 90 | void SetTransferMgntRadius(G4double);
|
|---|
| 91 | void SetTransferMgntLength(G4double);
|
|---|
| 92 | void SetTransferMgntB(G4double);
|
|---|
| 93 | void SetTransferMgntPos(G4double);
|
|---|
| 94 |
|
|---|
| 95 | void SetTargetMaterial (G4String);
|
|---|
| 96 | void SetTargetThickness(G4double);
|
|---|
| 97 | void SetTargetRadius(G4double);
|
|---|
| 98 | void SetTargetPos(G4double);
|
|---|
| 99 | void SetTargetAngle(G4int);
|
|---|
| 100 |
|
|---|
| 101 | void SetDegraderMaterial (G4String);
|
|---|
| 102 | void SetDegraderThickness(G4double);
|
|---|
| 103 | void SetDegraderRadius(G4double);
|
|---|
| 104 | void SetDegraderPos(G4double);
|
|---|
| 105 |
|
|---|
| 106 | public:
|
|---|
| 107 |
|
|---|
| 108 | G4Material* GetWorldMaterial() {return WorldMaterial;};
|
|---|
| 109 | G4double GetWorldSizeZ() {return WorldSizeZ;};
|
|---|
| 110 | G4double GetWorldSizeR() {return WorldSizeR;};
|
|---|
| 111 |
|
|---|
| 112 | G4double GetCaptureMgntRadius() {return CaptureMgntRadius;};
|
|---|
| 113 | G4double GetCaptureMgntLength() {return CaptureMgntLength;};
|
|---|
| 114 | G4double GetCaptureMgntB1() {return CaptureMgntB1;};
|
|---|
| 115 | G4double GetCaptureMgntB2() {return CaptureMgntB2;};
|
|---|
| 116 |
|
|---|
| 117 | G4double GetTransferMgntRadius() {return TransferMgntRadius;};
|
|---|
| 118 | G4double GetTransferMgntLength() {return TransferMgntLength;};
|
|---|
| 119 | G4double GetTransferMgntB() {return TransferMgntB;};
|
|---|
| 120 | G4double GetTransferMgntPos() {return TransferMgntPos;};
|
|---|
| 121 |
|
|---|
| 122 | G4Material* GetTargetMaterial() {return TargetMaterial;};
|
|---|
| 123 | G4double GetTargetRadius() {return TargetRadius;};
|
|---|
| 124 | G4double GetTargetThickness() {return TargetThickness;};
|
|---|
| 125 | G4double GetTargetPos() {return TargetPos;};
|
|---|
| 126 | G4int GetTargetAngle() {return TargetAngle;};
|
|---|
| 127 |
|
|---|
| 128 | G4Material* GetDegraderMaterial() {return DegraderMaterial;};
|
|---|
| 129 | G4double GetDegraderRadius() {return DegraderRadius;};
|
|---|
| 130 | G4double GetDegraderThickness() {return DegraderThickness;};
|
|---|
| 131 | G4double GetDegraderPos() {return DegraderPos;};
|
|---|
| 132 |
|
|---|
| 133 | private:
|
|---|
| 134 |
|
|---|
| 135 | F04Materials* materials;
|
|---|
| 136 |
|
|---|
| 137 | G4Material* Vacuum;
|
|---|
| 138 |
|
|---|
| 139 | G4Tubs* solidWorld;
|
|---|
| 140 | G4LogicalVolume* logicWorld;
|
|---|
| 141 | G4VPhysicalVolume* physiWorld;
|
|---|
| 142 |
|
|---|
| 143 | G4Tubs* solidTarget;
|
|---|
| 144 | G4LogicalVolume* logicTarget;
|
|---|
| 145 | G4VPhysicalVolume* physiTarget;
|
|---|
| 146 |
|
|---|
| 147 | G4Tubs* solidDegrader;
|
|---|
| 148 | G4LogicalVolume* logicDegrader;
|
|---|
| 149 | G4VPhysicalVolume* physiDegrader;
|
|---|
| 150 |
|
|---|
| 151 | G4Tubs* solidCaptureMgnt;
|
|---|
| 152 | G4LogicalVolume* logicCaptureMgnt;
|
|---|
| 153 | G4VPhysicalVolume* physiCaptureMgnt;
|
|---|
| 154 |
|
|---|
| 155 | G4Tubs* solidTransferMgnt;
|
|---|
| 156 | G4LogicalVolume* logicTransferMgnt;
|
|---|
| 157 | G4VPhysicalVolume* physiTransferMgnt;
|
|---|
| 158 |
|
|---|
| 159 | G4Material* WorldMaterial;
|
|---|
| 160 | G4double WorldSizeR;
|
|---|
| 161 | G4double WorldSizeZ;
|
|---|
| 162 |
|
|---|
| 163 | G4double CaptureMgntLength;
|
|---|
| 164 | G4double CaptureMgntRadius;
|
|---|
| 165 | G4double CaptureMgntB1;
|
|---|
| 166 | G4double CaptureMgntB2;
|
|---|
| 167 |
|
|---|
| 168 | G4double TransferMgntLength;
|
|---|
| 169 | G4double TransferMgntRadius;
|
|---|
| 170 | G4double TransferMgntB;
|
|---|
| 171 | G4double TransferMgntPos;
|
|---|
| 172 |
|
|---|
| 173 | G4Material* TargetMaterial;
|
|---|
| 174 | G4double TargetThickness;
|
|---|
| 175 | G4double TargetRadius;
|
|---|
| 176 | G4double TargetPos;
|
|---|
| 177 | G4int TargetAngle;
|
|---|
| 178 |
|
|---|
| 179 | G4Material* DegraderMaterial;
|
|---|
| 180 | G4double DegraderThickness;
|
|---|
| 181 | G4double DegraderRadius;
|
|---|
| 182 | G4double DegraderPos;
|
|---|
| 183 |
|
|---|
| 184 | F04FocusSolenoid* focusSolenoid;
|
|---|
| 185 | F04SimpleSolenoid* simpleSolenoid;
|
|---|
| 186 |
|
|---|
| 187 | private:
|
|---|
| 188 |
|
|---|
| 189 | void DefineMaterials();
|
|---|
| 190 |
|
|---|
| 191 | F04DetectorMessenger* detectorMessenger; // pointer to the Messenger
|
|---|
| 192 |
|
|---|
| 193 | };
|
|---|
| 194 |
|
|---|
| 195 | #endif
|
|---|