Geant4 Cross Reference |
1 // 1 // 2 // ******************************************* 2 // ******************************************************************** 3 // * License and Disclaimer 3 // * License and Disclaimer * 4 // * 4 // * * 5 // * The Geant4 software is copyright of th 5 // * The Geant4 software is copyright of the Copyright Holders of * 6 // * the Geant4 Collaboration. It is provided 6 // * the Geant4 Collaboration. It is provided under the terms and * 7 // * conditions of the Geant4 Software License 7 // * conditions of the Geant4 Software License, included in the file * 8 // * LICENSE and available at http://cern.ch/ 8 // * LICENSE and available at http://cern.ch/geant4/license . These * 9 // * include a list of copyright holders. 9 // * include a list of copyright holders. * 10 // * 10 // * * 11 // * Neither the authors of this software syst 11 // * Neither the authors of this software system, nor their employing * 12 // * institutes,nor the agencies providing fin 12 // * institutes,nor the agencies providing financial support for this * 13 // * work make any representation or warran 13 // * work make any representation or warranty, express or implied, * 14 // * regarding this software system or assum 14 // * regarding this software system or assume any liability for its * 15 // * use. Please see the license in the file 15 // * use. Please see the license in the file LICENSE and URL above * 16 // * for the full disclaimer and the limitatio 16 // * for the full disclaimer and the limitation of liability. * 17 // * 17 // * * 18 // * This code implementation is the result 18 // * This code implementation is the result of the scientific and * 19 // * technical work of the GEANT4 collaboratio 19 // * technical work of the GEANT4 collaboration. * 20 // * By using, copying, modifying or distri 20 // * By using, copying, modifying or distributing the software (or * 21 // * any work based on the software) you ag 21 // * any work based on the software) you agree to acknowledge its * 22 // * use in resulting scientific publicati 22 // * use in resulting scientific publications, and indicate your * 23 // * acceptance of all terms of the Geant4 Sof 23 // * acceptance of all terms of the Geant4 Software license. * 24 // ******************************************* 24 // ******************************************************************** 25 // 25 // 26 /// \file SAXSDetectorConstruction.hh 26 /// \file SAXSDetectorConstruction.hh 27 /// \brief Implementation of the SAXSDetectorC 27 /// \brief Implementation of the SAXSDetectorConstruction class 28 // 28 // 29 //....oooOO0OOooo........oooOO0OOooo........oo 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 30 30 31 #ifndef SAXSDetectorConstruction_h 31 #ifndef SAXSDetectorConstruction_h 32 # define SAXSDetectorConstruction_h 1 << 32 #define SAXSDetectorConstruction_h 1 33 #endif 33 #endif 34 34 35 #include "SAXSDetectorConstructionMessenger.hh 35 #include "SAXSDetectorConstructionMessenger.hh" 36 36 >> 37 #include "G4VUserDetectorConstruction.hh" >> 38 37 #include "G4Box.hh" 39 #include "G4Box.hh" 38 #include "G4Element.hh" << 40 #include "G4Tubs.hh" 39 #include "G4ElementTable.hh" << 40 #include "G4ExtendedMaterial.hh" << 41 #include "G4LogicalVolume.hh" 41 #include "G4LogicalVolume.hh" >> 42 #include "G4VPhysicalVolume.hh" >> 43 >> 44 #include "G4RunManager.hh" >> 45 #include "globals.hh" >> 46 42 #include "G4Material.hh" 47 #include "G4Material.hh" 43 #include "G4MaterialTable.hh" 48 #include "G4MaterialTable.hh" >> 49 #include "G4Element.hh" >> 50 #include "G4ElementTable.hh" 44 #include "G4NistManager.hh" 51 #include "G4NistManager.hh" 45 #include "G4RunManager.hh" << 52 #include "G4ExtendedMaterial.hh" 46 #include "G4Tubs.hh" << 47 #include "G4VPhysicalVolume.hh" << 48 #include "G4VUserDetectorConstruction.hh" << 49 #include "globals.hh" << 50 53 51 //....oooOO0OOooo........oooOO0OOooo........oo 54 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 52 55 53 /// Detector construction. 56 /// Detector construction. 54 57 55 class SAXSDetectorConstruction : public G4VUse 58 class SAXSDetectorConstruction : public G4VUserDetectorConstruction 56 { 59 { 57 public: << 60 public: 58 SAXSDetectorConstruction(); << 61 SAXSDetectorConstruction(); 59 ~SAXSDetectorConstruction(); << 62 ~SAXSDetectorConstruction(); 60 << 63 61 void DefineMaterials(); << 64 void DefineMaterials(); 62 void SetGeometricalVariables(); << 65 void SetGeometricalVariables(); 63 << 66 64 virtual G4VPhysicalVolume* Construct(); << 67 virtual G4VPhysicalVolume* Construct(); 65 << 68 66 G4LogicalVolume* GetSensitiveVolume() cons << 69 G4LogicalVolume* GetSensitiveVolume() const {return fSensitiveVolume;} 67 G4LogicalVolume* GetPhantom() const { retu << 70 G4LogicalVolume* GetPhantom() const {return fPhantomLogic;} 68 << 71 69 protected: << 72 protected: 70 G4LogicalVolume* fSensitiveVolume; << 73 G4LogicalVolume* fSensitiveVolume; 71 74 72 private: << 75 private: 73 virtual void ConstructSDandField(); 76 virtual void ConstructSDandField(); 74 << 77 75 SAXSDetectorConstructionMessenger* fMessen << 78 SAXSDetectorConstructionMessenger* fMessenger; 76 << 79 77 G4bool fIWantSlits; 80 G4bool fIWantSlits; 78 << 81 79 //-----------------definition of Volumes-- << 82 //-----------------definition of Volumes------------------- 80 // World << 83 //World 81 G4Box* fWorldSolid; 84 G4Box* fWorldSolid; 82 G4LogicalVolume* fWorldLogic; 85 G4LogicalVolume* fWorldLogic; 83 G4VPhysicalVolume* fWorldPhysical; << 86 G4VPhysicalVolume* fWorldPhysical; 84 << 87 85 // Phantom << 88 //Phantom 86 G4LogicalVolume* fPhantomLogic; 89 G4LogicalVolume* fPhantomLogic; 87 G4VPhysicalVolume* fPhantomPhysical; << 90 G4VPhysicalVolume* fPhantomPhysical; 88 G4Material* fPhantomMaterial; 91 G4Material* fPhantomMaterial; 89 G4int fPhantomMaterialIndex; << 92 G4int fPhantomMaterialIndex; 90 << 93 91 // Slits << 94 //Slits 92 G4LogicalVolume* fSlit1Logic; 95 G4LogicalVolume* fSlit1Logic; 93 G4LogicalVolume* fSlit2Logic; 96 G4LogicalVolume* fSlit2Logic; 94 G4LogicalVolume* fSlit3Logic; 97 G4LogicalVolume* fSlit3Logic; 95 G4LogicalVolume* fSlit4Logic; 98 G4LogicalVolume* fSlit4Logic; 96 G4VPhysicalVolume* fSlit1Physical; 99 G4VPhysicalVolume* fSlit1Physical; 97 G4VPhysicalVolume* fSlit2Physical; 100 G4VPhysicalVolume* fSlit2Physical; 98 G4VPhysicalVolume* fSlit3Physical; 101 G4VPhysicalVolume* fSlit3Physical; 99 G4VPhysicalVolume* fSlit4Physical; 102 G4VPhysicalVolume* fSlit4Physical; 100 << 103 101 // Detector << 104 //Detector 102 G4LogicalVolume* fDetectorLogic; << 105 G4LogicalVolume* fDetectorLogic; 103 G4VPhysicalVolume* fDetectorPhysical; 106 G4VPhysicalVolume* fDetectorPhysical; 104 << 107 105 // Shielding << 108 //Shielding 106 G4LogicalVolume* fShieldingLogic; << 109 G4LogicalVolume* fShieldingLogic; 107 G4VPhysicalVolume* fShieldingPhysical; 110 G4VPhysicalVolume* fShieldingPhysical; 108 G4LogicalVolume* fShieldingBackLogic; 111 G4LogicalVolume* fShieldingBackLogic; 109 G4VPhysicalVolume* fShieldingBackPhysical; 112 G4VPhysicalVolume* fShieldingBackPhysical; 110 << 113 111 //--------------------definition of Materi 114 //--------------------definition of Materials-------------- 112 // materials for MIFF study << 115 //materials for MIFF study 113 G4Material* fFat; << 116 G4Material* fFat; 114 G4Material* fWater; << 117 G4Material* fWater; 115 G4Material* fBoneMatrix; << 118 G4Material* fBoneMatrix; 116 G4Material* fMineral; 119 G4Material* fMineral; 117 G4Material* fMedMat; 120 G4Material* fMedMat; 118 G4Material* fPMMA; 121 G4Material* fPMMA; 119 G4Material* fAdipose; << 122 G4Material* fAdipose; 120 G4Material* fGlandular; << 123 G4Material* fGlandular; 121 G4Material* fBreast5050; << 124 G4Material* fBreast5050; 122 G4Material* fcarcinoma; << 125 G4Material* fcarcinoma; 123 G4Material* fLexan; << 126 G4Material* fLexan; 124 G4Material* fKapton; << 127 G4Material* fKapton; 125 G4Material* fNylon; << 128 G4Material* fNylon; 126 G4Material* fPolyethylene; << 129 G4Material* fPolyethylene; 127 G4Material* fPolystyrene; << 130 G4Material* fPolystyrene; 128 G4Material* fGrayMatter; << 131 G4Material* fGrayMatter; 129 G4Material* fWhiteMatter; 132 G4Material* fWhiteMatter; 130 G4Material* fbeefBlood; << 133 G4Material* fbeefBlood; 131 G4Material* fFormaline; << 134 G4Material* fFormaline; 132 G4Material* fAcetone; << 135 G4Material* fAcetone; 133 G4Material* fHperoxide; << 136 G4Material* fHperoxide; 134 G4Material* fCIRS3070; << 137 G4Material* fCIRS3070; 135 G4Material* fCIRS5050; << 138 G4Material* fCIRS5050; 136 G4Material* fCIRS7030; << 139 G4Material* fCIRS7030; 137 G4Material* fRMI454; << 140 G4Material* fRMI454; 138 G4Material* fBone; << 141 G4Material* fBone; 139 G4Material* ffatLowX; << 142 G4Material* ffatLowX; 140 G4Material* fbonematrixLowX; << 143 G4Material* fbonematrixLowX; 141 G4Material* fdryBoneLowX; << 144 G4Material* fdryBoneLowX; 142 G4Material* fliver; << 145 G4Material* fliver; 143 G4Material* fkidney; << 146 G4Material* fkidney; 144 << 147 145 // custom material << 148 //custom material 146 G4ExtendedMaterial* fCustomMat; << 149 G4ExtendedMaterial* fCustomMat; 147 G4double fCustomMatDensity; << 150 G4double fCustomMatDensity; 148 G4double fCustomMatHmassfract; << 151 G4double fCustomMatHmassfract; 149 G4double fCustomMatCmassfract; << 152 G4double fCustomMatCmassfract; 150 G4double fCustomMatNmassfract; << 153 G4double fCustomMatNmassfract; 151 G4double fCustomMatOmassfract; << 154 G4double fCustomMatOmassfract; 152 G4double fCustomMatNamassfract; << 155 G4double fCustomMatNamassfract; 153 G4double fCustomMatPmassfract; << 156 G4double fCustomMatPmassfract; 154 G4double fCustomMatSmassfract; << 157 G4double fCustomMatSmassfract; 155 G4double fCustomMatClmassfract; << 158 G4double fCustomMatClmassfract; 156 G4double fCustomMatKmassfract; << 159 G4double fCustomMatKmassfract; 157 G4double fCustomMatCamassfract; << 160 G4double fCustomMatCamassfract; 158 G4String fCustomMatFF; << 161 G4String fCustomMatFF; 159 << 162 160 // definitions of variables for MedMat com << 163 //definitions of variables for MedMat composition 161 G4double fComp0, fComp1, fComp2, fComp3; << 164 G4double fComp0,fComp1,fComp2,fComp3; 162 << 165 163 // other materials << 166 //other materials 164 G4Material* fAir; << 167 G4Material* fAir; 165 G4Material* fTungsten; << 168 G4Material* fTungsten; 166 G4Material* fLead; << 169 G4Material* fLead; 167 G4Material* fGe; << 170 G4Material* fGe; 168 << 171 169 //-------------definition of Geometrical V 172 //-------------definition of Geometrical Variables--------- 170 // World << 173 //World 171 G4double fWorldSize; << 174 G4double fWorldSize; 172 << 175 173 // Phantom << 176 //Phantom 174 G4double fPhantomDiameter; 177 G4double fPhantomDiameter; 175 G4double fPhantomHeight; 178 G4double fPhantomHeight; 176 G4double fPhantomZ; << 179 G4double fPhantomZ; 177 << 180 178 // setup angle (rad) << 181 //setup angle (rad) 179 G4double fthetaSetup; 182 G4double fthetaSetup; 180 << 183 181 // Slits << 184 //Slits 182 G4double fSlitSize; 185 G4double fSlitSize; 183 G4double fSlit1Thickness; << 186 G4double fSlit1Thickness; 184 G4double fSlit2Thickness; << 187 G4double fSlit2Thickness; 185 G4double fSlit3Thickness; << 188 G4double fSlit3Thickness; 186 G4double fSlit4Thickness; << 189 G4double fSlit4Thickness; 187 G4double fSlit1SampleDistance; // center- << 190 G4double fSlit1SampleDistance; //center-center 188 G4double fSlit2SampleDistance; 191 G4double fSlit2SampleDistance; 189 G4double fSlit3SampleDistance; 192 G4double fSlit3SampleDistance; 190 G4double fSlit4SampleDistance; 193 G4double fSlit4SampleDistance; 191 G4double fSlit1xAperture; 194 G4double fSlit1xAperture; 192 G4double fSlit2xAperture; 195 G4double fSlit2xAperture; 193 G4double fSlit3xAperture; 196 G4double fSlit3xAperture; 194 G4double fSlit4xAperture; 197 G4double fSlit4xAperture; 195 G4double fSlit1yAperture; 198 G4double fSlit1yAperture; 196 G4double fSlit2yAperture; 199 G4double fSlit2yAperture; 197 G4double fSlit3yAperture; 200 G4double fSlit3yAperture; 198 G4double fSlit4yAperture; 201 G4double fSlit4yAperture; 199 202 200 // Detector << 203 //Detector 201 G4double fDetectorThickness; << 204 G4double fDetectorThickness; 202 G4double fDetectorSize; << 205 G4double fDetectorSize; 203 G4double fDetectorSampleDistance; // cent << 206 G4double fDetectorSampleDistance; //center-center 204 << 207 205 // Shielding << 208 //Shielding 206 G4double fShieldingThickness; << 209 G4double fShieldingThickness; 207 << 210 208 //-------------set methods for the messeng << 211 //-------------set methods for the messenger--------------- 209 public: << 212 public: 210 void SetCustomMatFF(const G4String& ffname << 213 void SetCustomMatFF(const G4String& ffname) {fCustomMatFF = ffname;} 211 << 214 212 void SetCustomMatDensity(G4double csd) { f << 215 void SetCustomMatDensity(G4double csd) {fCustomMatDensity = csd;} 213 void SetCustomMatHmassfract(G4double csHmf << 216 void SetCustomMatHmassfract(G4double csHmf) {fCustomMatHmassfract = csHmf;} 214 void SetCustomMatCmassfract(G4double csCmf << 217 void SetCustomMatCmassfract(G4double csCmf) {fCustomMatCmassfract = csCmf;} 215 void SetCustomMatNmassfract(G4double csNmf << 218 void SetCustomMatNmassfract(G4double csNmf) {fCustomMatNmassfract = csNmf;} 216 void SetCustomMatOmassfract(G4double csOmf << 219 void SetCustomMatOmassfract(G4double csOmf) {fCustomMatOmassfract = csOmf;} 217 void SetCustomMatNamassfract(G4double csNa << 220 void SetCustomMatNamassfract(G4double csNamf) {fCustomMatNamassfract = csNamf;} 218 void SetCustomMatPmassfract(G4double csPmf << 221 void SetCustomMatPmassfract(G4double csPmf) {fCustomMatPmassfract = csPmf;} 219 void SetCustomMatSmassfract(G4double csSmf << 222 void SetCustomMatSmassfract(G4double csSmf) {fCustomMatSmassfract = csSmf;} 220 void SetCustomMatClmassfract(G4double csCl << 223 void SetCustomMatClmassfract(G4double csClmf) {fCustomMatClmassfract = csClmf;} 221 void SetCustomMatKmassfract(G4double csKmf << 224 void SetCustomMatKmassfract(G4double csKmf) {fCustomMatKmassfract = csKmf;} 222 void SetCustomMatCamassfract(G4double csCa << 225 void SetCustomMatCamassfract(G4double csCamf) {fCustomMatCamassfract = csCamf;} 223 << 226 224 void SetPhantomMaterial(G4int mat) { fPhan << 227 void SetPhantomMaterial(G4int mat) {fPhantomMaterialIndex = mat;} 225 << 228 226 void SetPhantomDiameter(G4double diam) { f << 229 void SetPhantomDiameter(G4double diam) {fPhantomDiameter = diam;} 227 void SetPhantomHeight(G4double ht) { fPhan << 230 void SetPhantomHeight(G4double ht) {fPhantomHeight = ht;} 228 void SetPhantomZ(G4double PhZ) { fPhantomZ << 231 void SetPhantomZ(G4double PhZ) {fPhantomZ = PhZ;} 229 << 232 230 void SetComp0(G4double c0) { fComp0 = c0; << 233 void SetComp0(G4double c0) {fComp0 = c0;} 231 void SetComp1(G4double c1) { fComp1 = c1; << 234 void SetComp1(G4double c1) {fComp1 = c1;} 232 void SetComp2(G4double c2) { fComp2 = c2; << 235 void SetComp2(G4double c2) {fComp2 = c2;} 233 void SetComp3(G4double c3) { fComp3 = c3; << 236 void SetComp3(G4double c3) {fComp3 = c3;} 234 << 237 235 void SetThetaSetup(G4double theta) { fthet << 238 void SetThetaSetup(G4double theta) {fthetaSetup = theta;} 236 << 239 237 void SetSlits(G4bool bslits) { fIWantSlits << 240 void SetSlits(G4bool bslits) {fIWantSlits = bslits;} 238 void SetSlit1Thickness(G4double sl1th) { f << 241 void SetSlit1Thickness(G4double sl1th) {fSlit1Thickness = sl1th;} 239 void SetSlit2Thickness(G4double sl2th) { f << 242 void SetSlit2Thickness(G4double sl2th) {fSlit2Thickness = sl2th;} 240 void SetSlit3Thickness(G4double sl3th) { f << 243 void SetSlit3Thickness(G4double sl3th) {fSlit3Thickness = sl3th;} 241 void SetSlit4Thickness(G4double sl4th) { f << 244 void SetSlit4Thickness(G4double sl4th) {fSlit4Thickness = sl4th;} 242 void SetSlit1SampleDistance(G4double slSam << 245 void SetSlit1SampleDistance(G4double slSampleDist1) 243 void SetSlit2SampleDistance(G4double slSam << 246 {fSlit1SampleDistance = slSampleDist1;} 244 void SetSlit3SampleDistance(G4double slSam << 247 void SetSlit2SampleDistance(G4double slSampleDist2) 245 void SetSlit4SampleDistance(G4double slSam << 248 {fSlit2SampleDistance = slSampleDist2;} 246 void SetSlit1xAperture(G4double aperture1x << 249 void SetSlit3SampleDistance(G4double slSampleDist3) 247 void SetSlit2xAperture(G4double aperture2x << 250 {fSlit3SampleDistance = slSampleDist3;} 248 void SetSlit3xAperture(G4double aperture3x << 251 void SetSlit4SampleDistance(G4double slSampleDist4) 249 void SetSlit4xAperture(G4double aperture4x << 252 {fSlit4SampleDistance = slSampleDist4;} 250 void SetSlit1yAperture(G4double aperture1y << 253 void SetSlit1xAperture(G4double aperture1x) {fSlit1xAperture = aperture1x;} 251 void SetSlit2yAperture(G4double aperture2y << 254 void SetSlit2xAperture(G4double aperture2x) {fSlit2xAperture = aperture2x;} 252 void SetSlit3yAperture(G4double aperture3y << 255 void SetSlit3xAperture(G4double aperture3x) {fSlit3xAperture = aperture3x;} 253 void SetSlit4yAperture(G4double aperture4y << 256 void SetSlit4xAperture(G4double aperture4x) {fSlit4xAperture = aperture4x;} 254 << 257 void SetSlit1yAperture(G4double aperture1y) {fSlit1yAperture = aperture1y;} 255 void SetDetectorSize(G4double detSize) { f << 258 void SetSlit2yAperture(G4double aperture2y) {fSlit2yAperture = aperture2y;} 256 void SetDetectorThickness(G4double detTh) << 259 void SetSlit3yAperture(G4double aperture3y) {fSlit3yAperture = aperture3y;} 257 void SetDetectorSampleDistance(G4double de << 260 void SetSlit4yAperture(G4double aperture4y) {fSlit4yAperture = aperture4y;} >> 261 >> 262 void SetDetectorSize(G4double detSize) {fDetectorSize = detSize;} >> 263 void SetDetectorThickness(G4double detTh) {fDetectorThickness = detTh;} >> 264 void SetDetectorSampleDistance(G4double detDist) >> 265 {fDetectorSampleDistance = detDist;} >> 266 258 }; 267 }; 259 //....oooOO0OOooo........oooOO0OOooo........oo 268 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... >> 269 260 270