Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-23 09:22:17

0001 //
0002 // ********************************************************************
0003 // * License and Disclaimer                                           *
0004 // *                                                                  *
0005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
0006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
0007 // * conditions of the Geant4 Software License,  included in the file *
0008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
0009 // * include a list of copyright holders.                             *
0010 // *                                                                  *
0011 // * Neither the authors of this software system, nor their employing *
0012 // * institutes,nor the agencies providing financial support for this *
0013 // * work  make  any representation or  warranty, express or implied, *
0014 // * regarding  this  software system or assume any liability for its *
0015 // * use.  Please see the license in the file  LICENSE  and URL above *
0016 // * for the full disclaimer and the limitation of liability.         *
0017 // *                                                                  *
0018 // * This  code  implementation is the result of  the  scientific and *
0019 // * technical work of the GEANT4 collaboration.                      *
0020 // * By using,  copying,  modifying or  distributing the software (or *
0021 // * any work based  on the software)  you  agree  to acknowledge its *
0022 // * use  in  resulting  scientific  publications,  and indicate your *
0023 // * acceptance of all terms of the Geant4 Software license.          *
0024 // ********************************************************************
0025 //
0026 //
0027 /// \file medical/GammaTherapy/include/DetectorConstruction.hh
0028 /// \brief Definition of the DetectorConstruction class
0029 //
0030 #ifndef DetectorConstruction_h
0031 #define DetectorConstruction_h 1
0032 
0033 // -------------------------------------------------------------
0034 //      GEANT4  test  IBREM
0035 //
0036 // Authors: V.Grichine, V.Ivanchenko
0037 //
0038 // Modified:
0039 //
0040 // 18-02-03 V.Ivanchenko create
0041 //
0042 // -------------------------------------------------------------
0043 
0044 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0045 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0046 
0047 #include "G4Material.hh"
0048 #include "G4VPhysicalVolume.hh"
0049 #include "G4VUserDetectorConstruction.hh"
0050 
0051 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0052 
0053 class CheckVolumeSD;
0054 class PhantomSD;
0055 class TargetSD;
0056 class DetectorMessenger;
0057 class G4LogicalVolume;
0058 
0059 class DetectorConstruction : public G4VUserDetectorConstruction
0060 {
0061   public:
0062     DetectorConstruction();
0063     virtual ~DetectorConstruction();
0064 
0065     G4VPhysicalVolume* Construct();
0066 
0067     void SetTarget1Material(const G4String& m);
0068     void SetTarget2Material(const G4String& m);
0069 
0070     inline G4double GetGeneratorPosZ() const { return fGeneratorPosZ; };
0071 
0072     inline void SetGap(G4double val) { fDelta = val; };
0073     inline void SetTarget1Z(G4double val) { fTarget1Z = val; };
0074     inline void SetTarget2Z(G4double val) { fTarget2Z = val; };
0075     inline void SetMylarZ(G4double val) { fMylarVolumeZ = val; }
0076     inline void SetCheckShiftZ(G4double val) { fCheckShiftZ = val; }
0077     inline void SetAbsorberZ(G4double val) { fAbsorberZ = val; }
0078     inline void SetAbsorberShiftZ(G4double val) { fAbsorberShiftZ = val; }
0079 
0080     inline void SetNumberDivZ(G4int val) { fNumZ = val; };
0081     inline void SetNumberDivR(G4int val) { fNumR = val; };
0082 
0083     const G4VPhysicalVolume* GetCheckVolume() const { return fCheckVolume; }
0084     const G4VPhysicalVolume* GetGasVolume() const { return fGasVolume; }
0085     const G4VPhysicalVolume* GetPhantom() const { return fPhantom; }
0086     const G4VPhysicalVolume* GetTarget1() const { return fTarget1; }
0087     const G4VPhysicalVolume* GetTarget2() const { return fTarget2; }
0088 
0089     G4double GetAbsorberZ() const { return fPhantomZ; }
0090     G4double GetAbsorberR() const { return fAbsorberRadius; }
0091     G4double GetScoreZ() const { return fAbsorberShiftZ; }
0092 
0093     G4int GetNumberDivZ() const { return fNumZ; }
0094     G4int GetNumberDivR() const { return fNumR; }
0095 
0096     void SetMaxEnergy(G4double e) { fMaxEnergy = e; }
0097     inline G4double GetMaxEnergy() const { return fMaxEnergy; }
0098     G4int GetNumberDivE() const { return fNumE; }
0099     inline void SetNumberDivE(G4int val) { fNumE = val; };
0100 
0101     void SetVerbose(G4bool v) { fVerbose = v; }
0102     inline G4bool GetVerbose() const { return fVerbose; }
0103 
0104     void DumpGeometryParameters();
0105 
0106   private:
0107     void InitialiseGeometryParameters();
0108 
0109     DetectorConstruction& operator=(const DetectorConstruction& right);
0110     DetectorConstruction(const DetectorConstruction&);
0111     void ConstructSDandField();
0112 
0113     G4bool fVerbose;
0114 
0115     G4int fNumZ;
0116     G4int fNumR;
0117 
0118     G4int fNumE;
0119     G4double fMaxEnergy;
0120 
0121     G4LogicalVolume* fLogicCheckVolume;
0122     std::vector<G4LogicalVolume*> fLogicRing;
0123     G4LogicalVolume* fLogicPh;
0124     G4LogicalVolume* fLogicAbsorber;
0125 
0126     G4double fWorldXY, fWorldZ;
0127     G4double fDelta;
0128     G4double fGeneratorPosZ;
0129 
0130     G4double fTargetRadius, fTarget1Z, fTarget1PosZ;
0131     G4double fTarget2Z, fTarget2PosZ;
0132 
0133     G4double fGasVolumeRadius, fGasVolumeZ, fGasVolumePosZ;
0134     G4double fAirZ, fMylarVolumeZ, fMylarPosZ;
0135     G4double fCheckVolumeRadius, fCheckVolumeZ, fCheckShiftZ, fCheckVolumePosZ;
0136     G4double fTargetVolumeZ, fTargetVolumePosZ;
0137     G4double fShiftZPh;
0138 
0139     G4double fPhantomRadius, fPhantomZ, fPhantomPosZ;
0140     G4double fAbsorberRadius, fAbsorberZ, fAbsorberShiftZ, fAbsorberPosZ;
0141     G4double fDistanceVacuumTarget, fWindowZ, fWindowPosZ;
0142 
0143     G4Material* fWorldMaterial;
0144 
0145     G4Material* fTarget1Material;
0146     G4Material* fTarget2Material;
0147     G4Material* fMylar;
0148     G4Material* fWindowMaterial;
0149 
0150     G4Material* fLightMaterial;
0151     G4Material* fAbsorberMaterial;
0152 
0153     G4LogicalVolume* fLogicTarget1;
0154     G4LogicalVolume* fLogicTarget2;
0155 
0156     G4VPhysicalVolume* fCheckVolume;
0157     G4VPhysicalVolume* fGasVolume;
0158     G4VPhysicalVolume* fPhantom;
0159     G4VPhysicalVolume* fTarget1;
0160     G4VPhysicalVolume* fTarget2;
0161 
0162     DetectorMessenger* fMessenger;
0163 };
0164 
0165 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0166 
0167 #endif