Geant4 Cross Reference |
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 /// \file SAXSDetectorConstruction.hh 27 /// \brief Implementation of the SAXSDetectorConstruction class 28 // 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 30 31 #ifndef SAXSDetectorConstruction_h 32 # define SAXSDetectorConstruction_h 1 33 #endif 34 35 #include "SAXSDetectorConstructionMessenger.hh" 36 37 #include "G4Box.hh" 38 #include "G4Element.hh" 39 #include "G4ElementTable.hh" 40 #include "G4ExtendedMaterial.hh" 41 #include "G4LogicalVolume.hh" 42 #include "G4Material.hh" 43 #include "G4MaterialTable.hh" 44 #include "G4NistManager.hh" 45 #include "G4RunManager.hh" 46 #include "G4Tubs.hh" 47 #include "G4VPhysicalVolume.hh" 48 #include "G4VUserDetectorConstruction.hh" 49 #include "globals.hh" 50 51 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 52 53 /// Detector construction. 54 55 class SAXSDetectorConstruction : public G4VUserDetectorConstruction 56 { 57 public: 58 SAXSDetectorConstruction(); 59 ~SAXSDetectorConstruction(); 60 61 void DefineMaterials(); 62 void SetGeometricalVariables(); 63 64 virtual G4VPhysicalVolume* Construct(); 65 66 G4LogicalVolume* GetSensitiveVolume() const { return fSensitiveVolume; } 67 G4LogicalVolume* GetPhantom() const { return fPhantomLogic; } 68 69 protected: 70 G4LogicalVolume* fSensitiveVolume; 71 72 private: 73 virtual void ConstructSDandField(); 74 75 SAXSDetectorConstructionMessenger* fMessenger; 76 77 G4bool fIWantSlits; 78 79 //-----------------definition of Volumes------------------- 80 // World 81 G4Box* fWorldSolid; 82 G4LogicalVolume* fWorldLogic; 83 G4VPhysicalVolume* fWorldPhysical; 84 85 // Phantom 86 G4LogicalVolume* fPhantomLogic; 87 G4VPhysicalVolume* fPhantomPhysical; 88 G4Material* fPhantomMaterial; 89 G4int fPhantomMaterialIndex; 90 91 // Slits 92 G4LogicalVolume* fSlit1Logic; 93 G4LogicalVolume* fSlit2Logic; 94 G4LogicalVolume* fSlit3Logic; 95 G4LogicalVolume* fSlit4Logic; 96 G4VPhysicalVolume* fSlit1Physical; 97 G4VPhysicalVolume* fSlit2Physical; 98 G4VPhysicalVolume* fSlit3Physical; 99 G4VPhysicalVolume* fSlit4Physical; 100 101 // Detector 102 G4LogicalVolume* fDetectorLogic; 103 G4VPhysicalVolume* fDetectorPhysical; 104 105 // Shielding 106 G4LogicalVolume* fShieldingLogic; 107 G4VPhysicalVolume* fShieldingPhysical; 108 G4LogicalVolume* fShieldingBackLogic; 109 G4VPhysicalVolume* fShieldingBackPhysical; 110 111 //--------------------definition of Materials-------------- 112 // materials for MIFF study 113 G4Material* fFat; 114 G4Material* fWater; 115 G4Material* fBoneMatrix; 116 G4Material* fMineral; 117 G4Material* fMedMat; 118 G4Material* fPMMA; 119 G4Material* fAdipose; 120 G4Material* fGlandular; 121 G4Material* fBreast5050; 122 G4Material* fcarcinoma; 123 G4Material* fLexan; 124 G4Material* fKapton; 125 G4Material* fNylon; 126 G4Material* fPolyethylene; 127 G4Material* fPolystyrene; 128 G4Material* fGrayMatter; 129 G4Material* fWhiteMatter; 130 G4Material* fbeefBlood; 131 G4Material* fFormaline; 132 G4Material* fAcetone; 133 G4Material* fHperoxide; 134 G4Material* fCIRS3070; 135 G4Material* fCIRS5050; 136 G4Material* fCIRS7030; 137 G4Material* fRMI454; 138 G4Material* fBone; 139 G4Material* ffatLowX; 140 G4Material* fbonematrixLowX; 141 G4Material* fdryBoneLowX; 142 G4Material* fliver; 143 G4Material* fkidney; 144 145 // custom material 146 G4ExtendedMaterial* fCustomMat; 147 G4double fCustomMatDensity; 148 G4double fCustomMatHmassfract; 149 G4double fCustomMatCmassfract; 150 G4double fCustomMatNmassfract; 151 G4double fCustomMatOmassfract; 152 G4double fCustomMatNamassfract; 153 G4double fCustomMatPmassfract; 154 G4double fCustomMatSmassfract; 155 G4double fCustomMatClmassfract; 156 G4double fCustomMatKmassfract; 157 G4double fCustomMatCamassfract; 158 G4String fCustomMatFF; 159 160 // definitions of variables for MedMat composition 161 G4double fComp0, fComp1, fComp2, fComp3; 162 163 // other materials 164 G4Material* fAir; 165 G4Material* fTungsten; 166 G4Material* fLead; 167 G4Material* fGe; 168 169 //-------------definition of Geometrical Variables--------- 170 // World 171 G4double fWorldSize; 172 173 // Phantom 174 G4double fPhantomDiameter; 175 G4double fPhantomHeight; 176 G4double fPhantomZ; 177 178 // setup angle (rad) 179 G4double fthetaSetup; 180 181 // Slits 182 G4double fSlitSize; 183 G4double fSlit1Thickness; 184 G4double fSlit2Thickness; 185 G4double fSlit3Thickness; 186 G4double fSlit4Thickness; 187 G4double fSlit1SampleDistance; // center-center 188 G4double fSlit2SampleDistance; 189 G4double fSlit3SampleDistance; 190 G4double fSlit4SampleDistance; 191 G4double fSlit1xAperture; 192 G4double fSlit2xAperture; 193 G4double fSlit3xAperture; 194 G4double fSlit4xAperture; 195 G4double fSlit1yAperture; 196 G4double fSlit2yAperture; 197 G4double fSlit3yAperture; 198 G4double fSlit4yAperture; 199 200 // Detector 201 G4double fDetectorThickness; 202 G4double fDetectorSize; 203 G4double fDetectorSampleDistance; // center-center 204 205 // Shielding 206 G4double fShieldingThickness; 207 208 //-------------set methods for the messenger--------------- 209 public: 210 void SetCustomMatFF(const G4String& ffname) { fCustomMatFF = ffname; } 211 212 void SetCustomMatDensity(G4double csd) { fCustomMatDensity = csd; } 213 void SetCustomMatHmassfract(G4double csHmf) { fCustomMatHmassfract = csHmf; } 214 void SetCustomMatCmassfract(G4double csCmf) { fCustomMatCmassfract = csCmf; } 215 void SetCustomMatNmassfract(G4double csNmf) { fCustomMatNmassfract = csNmf; } 216 void SetCustomMatOmassfract(G4double csOmf) { fCustomMatOmassfract = csOmf; } 217 void SetCustomMatNamassfract(G4double csNamf) { fCustomMatNamassfract = csNamf; } 218 void SetCustomMatPmassfract(G4double csPmf) { fCustomMatPmassfract = csPmf; } 219 void SetCustomMatSmassfract(G4double csSmf) { fCustomMatSmassfract = csSmf; } 220 void SetCustomMatClmassfract(G4double csClmf) { fCustomMatClmassfract = csClmf; } 221 void SetCustomMatKmassfract(G4double csKmf) { fCustomMatKmassfract = csKmf; } 222 void SetCustomMatCamassfract(G4double csCamf) { fCustomMatCamassfract = csCamf; } 223 224 void SetPhantomMaterial(G4int mat) { fPhantomMaterialIndex = mat; } 225 226 void SetPhantomDiameter(G4double diam) { fPhantomDiameter = diam; } 227 void SetPhantomHeight(G4double ht) { fPhantomHeight = ht; } 228 void SetPhantomZ(G4double PhZ) { fPhantomZ = PhZ; } 229 230 void SetComp0(G4double c0) { fComp0 = c0; } 231 void SetComp1(G4double c1) { fComp1 = c1; } 232 void SetComp2(G4double c2) { fComp2 = c2; } 233 void SetComp3(G4double c3) { fComp3 = c3; } 234 235 void SetThetaSetup(G4double theta) { fthetaSetup = theta; } 236 237 void SetSlits(G4bool bslits) { fIWantSlits = bslits; } 238 void SetSlit1Thickness(G4double sl1th) { fSlit1Thickness = sl1th; } 239 void SetSlit2Thickness(G4double sl2th) { fSlit2Thickness = sl2th; } 240 void SetSlit3Thickness(G4double sl3th) { fSlit3Thickness = sl3th; } 241 void SetSlit4Thickness(G4double sl4th) { fSlit4Thickness = sl4th; } 242 void SetSlit1SampleDistance(G4double slSampleDist1) { fSlit1SampleDistance = slSampleDist1; } 243 void SetSlit2SampleDistance(G4double slSampleDist2) { fSlit2SampleDistance = slSampleDist2; } 244 void SetSlit3SampleDistance(G4double slSampleDist3) { fSlit3SampleDistance = slSampleDist3; } 245 void SetSlit4SampleDistance(G4double slSampleDist4) { fSlit4SampleDistance = slSampleDist4; } 246 void SetSlit1xAperture(G4double aperture1x) { fSlit1xAperture = aperture1x; } 247 void SetSlit2xAperture(G4double aperture2x) { fSlit2xAperture = aperture2x; } 248 void SetSlit3xAperture(G4double aperture3x) { fSlit3xAperture = aperture3x; } 249 void SetSlit4xAperture(G4double aperture4x) { fSlit4xAperture = aperture4x; } 250 void SetSlit1yAperture(G4double aperture1y) { fSlit1yAperture = aperture1y; } 251 void SetSlit2yAperture(G4double aperture2y) { fSlit2yAperture = aperture2y; } 252 void SetSlit3yAperture(G4double aperture3y) { fSlit3yAperture = aperture3y; } 253 void SetSlit4yAperture(G4double aperture4y) { fSlit4yAperture = aperture4y; } 254 255 void SetDetectorSize(G4double detSize) { fDetectorSize = detSize; } 256 void SetDetectorThickness(G4double detTh) { fDetectorThickness = detTh; } 257 void SetDetectorSampleDistance(G4double detDist) { fDetectorSampleDistance = detDist; } 258 }; 259 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 260