Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-31 09:22:33

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 // This example is provided by the Geant4-DNA collaboration
0027 // Any report or published results obtained using the Geant4-DNA software 
0028 // shall cite the following Geant4-DNA collaboration publication:
0029 // Med. Phys. 37 (2010) 4692-4708
0030 // The Geant4-DNA web site is available at http://geant4-dna.org
0031 // 
0032 // If you use this example, please cite the following publication:
0033 // Rad. Prot. Dos. 133 (2009) 2-11
0034 
0035 #ifndef DetectorConstruction_h
0036 #define DetectorConstruction_h 1
0037 
0038 #include "CellParameterisation.hh"
0039 #include "EMField.hh"
0040 #include "G4VUserDetectorConstruction.hh"
0041 #include "G4Box.hh"
0042 #include "G4Cons.hh"
0043 #include "G4Material.hh"
0044 #include "G4PVPlacement.hh"
0045 #include "G4UserLimits.hh"
0046 #include "G4PVParameterised.hh"
0047 #include "G4EqMagElectricField.hh"
0048 #include "G4PropagatorInField.hh"
0049 #include "G4TransportationManager.hh"
0050 #include "G4ChordFinder.hh"
0051 #include "G4ClassicalRK4.hh"
0052 
0053 class DetectorConstruction : public G4VUserDetectorConstruction
0054 {
0055 public:
0056 
0057   explicit DetectorConstruction();
0058   ~DetectorConstruction() override;
0059 
0060   G4VPhysicalVolume* Construct() override;
0061   
0062   void DefineMaterials();
0063   
0064   void ConstructSDandField() override;
0065      
0066   void SetMassNucleus(G4double mN) {fMassNucleus = mN;}
0067   G4double GetMassNucleus() const  {return fMassNucleus;}          
0068 
0069   void SetMassCytoplasm(G4double mC) {fMassCytoplasm = mC;}
0070   G4double GetMassCytoplasm() const  {return fMassCytoplasm;}          
0071 
0072   void SetNbOfPixelsInPhantom(G4int nP) {fNbOfPixelsInPhantom = nP;}
0073   G4int GetNbOfPixelsInPhantom() const {return fNbOfPixelsInPhantom;}          
0074 
0075   const G4LogicalVolume* GetLogicalCollDetYoke() const {return fLogicYoke2;};
0076   const G4LogicalVolume* GetLogicalIsobutane()   const {return fLogicBoiteIso;};
0077   const G4LogicalVolume* GetLogicalCollDetGap4() const {return fLogic4Gap;};
0078   const G4LogicalVolume* GetLogicalPolyprop()    const {return fLogicBoite3;};
0079   const G4LogicalVolume* GetLogicalKgm()         const {return fLogicKgm;};
0080   
0081   const G4Material * GetNucleusMaterial1()   const {return  fNucleusMaterial1;};
0082   const G4Material * GetNucleusMaterial2()   const {return  fNucleusMaterial2;};
0083   const G4Material * GetNucleusMaterial3()   const {return  fNucleusMaterial3;};
0084   const G4Material * GetCytoplasmMaterial1() const {return  fCytoplasmMaterial1;};
0085   const G4Material * GetCytoplasmMaterial2() const {return  fCytoplasmMaterial2;};
0086   const G4Material * GetCytoplasmMaterial3() const {return  fCytoplasmMaterial3;};
0087   
0088   const CellParameterisation * GetCellParameterisation() const 
0089         {return fMyCellParameterisation;};
0090         
0091   G4VPhysicalVolume* ConstructLine();     
0092   
0093 private:
0094   
0095   CellParameterisation * fMyCellParameterisation;
0096   
0097   // Materials
0098   G4Material* fDefaultMaterial;
0099   G4Material* fCollimatorMaterial;
0100   G4Material* fBoiteMaterial;
0101   G4Material* fCathodeMaterial;
0102   G4Material* fVerreMaterial;
0103   G4Material* fVerre2Material;
0104   G4Material* fKgmMaterial;
0105   G4Material* fBoite2Material;
0106   G4Material* fBoite3Material;
0107   G4Material* fNucleusMaterial1;
0108   G4Material* fCytoplasmMaterial1;
0109   G4Material* fNucleusMaterial2;
0110   G4Material* fCytoplasmMaterial2;
0111   G4Material* fNucleusMaterial3;
0112   G4Material* fCytoplasmMaterial3;
0113   
0114 // Volumes
0115 
0116   G4VPhysicalVolume* fPhysiWorld;
0117   G4LogicalVolume*   fLogicWorld;  
0118   G4Box*             fSolidWorld;
0119   
0120   G4VPhysicalVolume* fPhysiVol;
0121   G4LogicalVolume*   fLogicVol;  
0122   G4Box*             fSolidVol;
0123   
0124   G4VPhysicalVolume* fPhysiBoite;
0125   G4LogicalVolume*   fLogicBoite;  
0126   G4Box*             fSolidBoite;
0127   
0128   G4VPhysicalVolume* fPhysiYoke1;
0129   G4LogicalVolume*   fLogicYoke1;  
0130   G4Box*             fSolidYoke1;
0131 
0132   G4VPhysicalVolume* fPhysi1Gap;
0133   G4LogicalVolume*   fLogic1Gap;  
0134   G4Cons*            fSolid1Gap; 
0135 
0136   G4VPhysicalVolume* fPhysi2Gap;
0137   G4LogicalVolume*   fLogic2Gap;  
0138   G4Cons*            fSolid2Gap; 
0139   
0140   G4VPhysicalVolume* fPhysi3Gap;
0141   G4LogicalVolume*   fLogic3Gap;  
0142   G4Cons*            fSolid3Gap; 
0143   
0144   G4VPhysicalVolume* fPhysiYoke2;
0145   G4LogicalVolume*   fLogicYoke2;  
0146   G4Box*             fSolidYoke2;
0147   
0148   G4VPhysicalVolume* fPhysi4Gap;
0149   G4LogicalVolume*   fLogic4Gap;  
0150   G4Cons*            fSolid4Gap; 
0151 
0152   G4VPhysicalVolume* fPhysi5Gap;
0153   G4LogicalVolume*   fLogic5Gap;  
0154   G4Cons*            fSolid5Gap; 
0155     
0156   G4VPhysicalVolume* fPhysiBoiteIso;
0157   G4LogicalVolume*   fLogicBoiteIso;  
0158   G4Box*             fSolidBoiteIso;
0159   
0160   G4VPhysicalVolume* fPhysiCathode;
0161   G4LogicalVolume*   fLogicCathode;  
0162   G4Box*             fSolidCathode;
0163   
0164   G4VPhysicalVolume* fPhysiIso;
0165   G4LogicalVolume*   fLogicIso;  
0166   G4Box*             fSolidIso;
0167   
0168   G4VPhysicalVolume* fPhysiVerre;
0169   G4LogicalVolume*   fLogicVerre;  
0170   G4Box*             fSolidVerre;
0171 
0172   G4VPhysicalVolume* fPhysiBoite2;
0173   G4LogicalVolume*   fLogicBoite2;  
0174   G4Box*             fSolidBoite2;
0175 
0176   G4VPhysicalVolume* fPhysiBoite3;
0177   G4LogicalVolume*   fLogicBoite3;  
0178   G4Box*             fSolidBoite3;
0179   
0180   G4VPhysicalVolume* fPhysiKgm;
0181   G4LogicalVolume*   fLogicKgm;  
0182   G4Box*             fSolidKgm;
0183 
0184   G4VPhysicalVolume* fPhysiVerre2;
0185   G4LogicalVolume*   fLogicVerre2;  
0186   G4Box*             fSolidVerre2;
0187 
0188   // CELL PHANTOM
0189 
0190   G4VPhysicalVolume* fPhysiPhantom;
0191   G4LogicalVolume*   fLogicPhantom;  
0192   G4Box*             fSolidPhantom; 
0193 
0194   G4double fMassNucleus;
0195   G4double fMassCytoplasm;
0196 
0197   G4double fDensityPhantom;
0198   G4double fDensityNucleus;
0199   G4double fDensityCytoplasm;
0200     
0201   G4double fWorldSizeXY;
0202   G4double fWorldSizeZ;
0203   G4double fCollObjSizeXY;
0204   G4double fCollObjSizeZ;
0205 
0206   G4double fCiblePositionX;
0207   G4double fCiblePositionY;
0208   G4double fCiblePositionZ;
0209   
0210   G4double fLineAngle;
0211   
0212   G4int    fNbOfPixelsInPhantom;
0213 };
0214 
0215 #endif