File indexing completed on 2025-10-30 07:59:58
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 
0030 
0031 #ifndef SAXSDetectorConstruction_h
0032 #  define SAXSDetectorConstruction_h 1
0033 #endif
0034 
0035 #include "SAXSDetectorConstructionMessenger.hh"
0036 
0037 #include "G4Box.hh"
0038 #include "G4Element.hh"
0039 #include "G4ElementTable.hh"
0040 #include "G4ExtendedMaterial.hh"
0041 #include "G4LogicalVolume.hh"
0042 #include "G4Material.hh"
0043 #include "G4MaterialTable.hh"
0044 #include "G4NistManager.hh"
0045 #include "G4RunManager.hh"
0046 #include "G4Tubs.hh"
0047 #include "G4VPhysicalVolume.hh"
0048 #include "G4VUserDetectorConstruction.hh"
0049 #include "globals.hh"
0050 
0051 
0052 
0053 
0054 
0055 class SAXSDetectorConstruction : public G4VUserDetectorConstruction
0056 {
0057   public:
0058     SAXSDetectorConstruction();
0059     ~SAXSDetectorConstruction();
0060 
0061     void DefineMaterials();
0062     void SetGeometricalVariables();
0063 
0064     virtual G4VPhysicalVolume* Construct();
0065 
0066     G4LogicalVolume* GetSensitiveVolume() const { return fSensitiveVolume; }
0067     G4LogicalVolume* GetPhantom() const { return fPhantomLogic; }
0068 
0069   protected:
0070     G4LogicalVolume* fSensitiveVolume;
0071 
0072   private:
0073     virtual void ConstructSDandField();
0074 
0075     SAXSDetectorConstructionMessenger* fMessenger;
0076 
0077     G4bool fIWantSlits;
0078 
0079     
0080     
0081     G4Box* fWorldSolid;
0082     G4LogicalVolume* fWorldLogic;
0083     G4VPhysicalVolume* fWorldPhysical;
0084 
0085     
0086     G4LogicalVolume* fPhantomLogic;
0087     G4VPhysicalVolume* fPhantomPhysical;
0088     G4Material* fPhantomMaterial;
0089     G4int fPhantomMaterialIndex;
0090 
0091     
0092     G4LogicalVolume* fSlit1Logic;
0093     G4LogicalVolume* fSlit2Logic;
0094     G4LogicalVolume* fSlit3Logic;
0095     G4LogicalVolume* fSlit4Logic;
0096     G4VPhysicalVolume* fSlit1Physical;
0097     G4VPhysicalVolume* fSlit2Physical;
0098     G4VPhysicalVolume* fSlit3Physical;
0099     G4VPhysicalVolume* fSlit4Physical;
0100 
0101     
0102     G4LogicalVolume* fDetectorLogic;
0103     G4VPhysicalVolume* fDetectorPhysical;
0104 
0105     
0106     G4LogicalVolume* fShieldingLogic;
0107     G4VPhysicalVolume* fShieldingPhysical;
0108     G4LogicalVolume* fShieldingBackLogic;
0109     G4VPhysicalVolume* fShieldingBackPhysical;
0110 
0111     
0112     
0113     G4Material* fFat;
0114     G4Material* fWater;
0115     G4Material* fBoneMatrix;
0116     G4Material* fMineral;
0117     G4Material* fMedMat;
0118     G4Material* fPMMA;
0119     G4Material* fAdipose;
0120     G4Material* fGlandular;
0121     G4Material* fBreast5050;
0122     G4Material* fcarcinoma;
0123     G4Material* fLexan;
0124     G4Material* fKapton;
0125     G4Material* fNylon;
0126     G4Material* fPolyethylene;
0127     G4Material* fPolystyrene;
0128     G4Material* fGrayMatter;
0129     G4Material* fWhiteMatter;
0130     G4Material* fbeefBlood;
0131     G4Material* fFormaline;
0132     G4Material* fAcetone;
0133     G4Material* fHperoxide;
0134     G4Material* fCIRS3070;
0135     G4Material* fCIRS5050;
0136     G4Material* fCIRS7030;
0137     G4Material* fRMI454;
0138     G4Material* fBone;
0139     G4Material* ffatLowX;
0140     G4Material* fbonematrixLowX;
0141     G4Material* fdryBoneLowX;
0142     G4Material* fliver;
0143     G4Material* fkidney;
0144 
0145     
0146     G4ExtendedMaterial* fCustomMat;
0147     G4double fCustomMatDensity;
0148     G4double fCustomMatHmassfract;
0149     G4double fCustomMatCmassfract;
0150     G4double fCustomMatNmassfract;
0151     G4double fCustomMatOmassfract;
0152     G4double fCustomMatNamassfract;
0153     G4double fCustomMatPmassfract;
0154     G4double fCustomMatSmassfract;
0155     G4double fCustomMatClmassfract;
0156     G4double fCustomMatKmassfract;
0157     G4double fCustomMatCamassfract;
0158     G4String fCustomMatFF;
0159 
0160     
0161     G4double fComp0, fComp1, fComp2, fComp3;
0162 
0163     
0164     G4Material* fAir;
0165     G4Material* fTungsten;
0166     G4Material* fLead;
0167     G4Material* fGe;
0168 
0169     
0170     
0171     G4double fWorldSize;
0172 
0173     
0174     G4double fPhantomDiameter;
0175     G4double fPhantomHeight;
0176     G4double fPhantomZ;
0177 
0178     
0179     G4double fthetaSetup;
0180 
0181     
0182     G4double fSlitSize;
0183     G4double fSlit1Thickness;
0184     G4double fSlit2Thickness;
0185     G4double fSlit3Thickness;
0186     G4double fSlit4Thickness;
0187     G4double fSlit1SampleDistance;  
0188     G4double fSlit2SampleDistance;
0189     G4double fSlit3SampleDistance;
0190     G4double fSlit4SampleDistance;
0191     G4double fSlit1xAperture;
0192     G4double fSlit2xAperture;
0193     G4double fSlit3xAperture;
0194     G4double fSlit4xAperture;
0195     G4double fSlit1yAperture;
0196     G4double fSlit2yAperture;
0197     G4double fSlit3yAperture;
0198     G4double fSlit4yAperture;
0199 
0200     
0201     G4double fDetectorThickness;
0202     G4double fDetectorSize;
0203     G4double fDetectorSampleDistance;  
0204 
0205     
0206     G4double fShieldingThickness;
0207 
0208     
0209   public:
0210     void SetCustomMatFF(const G4String& ffname) { fCustomMatFF = ffname; }
0211 
0212     void SetCustomMatDensity(G4double csd) { fCustomMatDensity = csd; }
0213     void SetCustomMatHmassfract(G4double csHmf) { fCustomMatHmassfract = csHmf; }
0214     void SetCustomMatCmassfract(G4double csCmf) { fCustomMatCmassfract = csCmf; }
0215     void SetCustomMatNmassfract(G4double csNmf) { fCustomMatNmassfract = csNmf; }
0216     void SetCustomMatOmassfract(G4double csOmf) { fCustomMatOmassfract = csOmf; }
0217     void SetCustomMatNamassfract(G4double csNamf) { fCustomMatNamassfract = csNamf; }
0218     void SetCustomMatPmassfract(G4double csPmf) { fCustomMatPmassfract = csPmf; }
0219     void SetCustomMatSmassfract(G4double csSmf) { fCustomMatSmassfract = csSmf; }
0220     void SetCustomMatClmassfract(G4double csClmf) { fCustomMatClmassfract = csClmf; }
0221     void SetCustomMatKmassfract(G4double csKmf) { fCustomMatKmassfract = csKmf; }
0222     void SetCustomMatCamassfract(G4double csCamf) { fCustomMatCamassfract = csCamf; }
0223 
0224     void SetPhantomMaterial(G4int mat) { fPhantomMaterialIndex = mat; }
0225 
0226     void SetPhantomDiameter(G4double diam) { fPhantomDiameter = diam; }
0227     void SetPhantomHeight(G4double ht) { fPhantomHeight = ht; }
0228     void SetPhantomZ(G4double PhZ) { fPhantomZ = PhZ; }
0229 
0230     void SetComp0(G4double c0) { fComp0 = c0; }
0231     void SetComp1(G4double c1) { fComp1 = c1; }
0232     void SetComp2(G4double c2) { fComp2 = c2; }
0233     void SetComp3(G4double c3) { fComp3 = c3; }
0234 
0235     void SetThetaSetup(G4double theta) { fthetaSetup = theta; }
0236 
0237     void SetSlits(G4bool bslits) { fIWantSlits = bslits; }
0238     void SetSlit1Thickness(G4double sl1th) { fSlit1Thickness = sl1th; }
0239     void SetSlit2Thickness(G4double sl2th) { fSlit2Thickness = sl2th; }
0240     void SetSlit3Thickness(G4double sl3th) { fSlit3Thickness = sl3th; }
0241     void SetSlit4Thickness(G4double sl4th) { fSlit4Thickness = sl4th; }
0242     void SetSlit1SampleDistance(G4double slSampleDist1) { fSlit1SampleDistance = slSampleDist1; }
0243     void SetSlit2SampleDistance(G4double slSampleDist2) { fSlit2SampleDistance = slSampleDist2; }
0244     void SetSlit3SampleDistance(G4double slSampleDist3) { fSlit3SampleDistance = slSampleDist3; }
0245     void SetSlit4SampleDistance(G4double slSampleDist4) { fSlit4SampleDistance = slSampleDist4; }
0246     void SetSlit1xAperture(G4double aperture1x) { fSlit1xAperture = aperture1x; }
0247     void SetSlit2xAperture(G4double aperture2x) { fSlit2xAperture = aperture2x; }
0248     void SetSlit3xAperture(G4double aperture3x) { fSlit3xAperture = aperture3x; }
0249     void SetSlit4xAperture(G4double aperture4x) { fSlit4xAperture = aperture4x; }
0250     void SetSlit1yAperture(G4double aperture1y) { fSlit1yAperture = aperture1y; }
0251     void SetSlit2yAperture(G4double aperture2y) { fSlit2yAperture = aperture2y; }
0252     void SetSlit3yAperture(G4double aperture3y) { fSlit3yAperture = aperture3y; }
0253     void SetSlit4yAperture(G4double aperture4y) { fSlit4yAperture = aperture4y; }
0254 
0255     void SetDetectorSize(G4double detSize) { fDetectorSize = detSize; }
0256     void SetDetectorThickness(G4double detTh) { fDetectorThickness = detTh; }
0257     void SetDetectorSampleDistance(G4double detDist) { fDetectorSampleDistance = detDist; }
0258 };
0259