Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:16:57

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 // Code developed by
0027 // Silvia Pozzi (1), silvia.pozzi@iss.it
0028 // Barbara Caccia (1), barbara.caccia@iss.it
0029 // Carlo Mancini Terracciano (2), carlo.mancini.terracciano@roma1.infn.it
0030 // (1) Istituto Superiore di Sanita' and INFN Roma, Italy
0031 // (2) Univ. La Sapienza and INFN Roma, Italy
0032 
0033 #ifndef DETECTOR_CONSTRUCTION_HH
0034 #define DETECTOR_CONSTRUCTION_HH
0035 
0036 #include <G4VUserDetectorConstruction.hh>
0037 #include <G4RotationMatrix.hh>
0038 #include <G4Material.hh>
0039 #include <G4UnionSolid.hh>
0040 #include <G4PSDoseDeposit3D.hh>
0041 #include <G4MultiFunctionalDetector.hh>
0042 
0043 #include "DetectorMessenger.hh"
0044 
0045 class G4LogicalVolume;
0046 class DetectorMessenger;
0047 class DetectorConstruction : public G4VUserDetectorConstruction
0048 {
0049 public:
0050 
0051     G4VPhysicalVolume* Construct() override;
0052 
0053     void SetJaws(G4double value);
0054     void SetTargetPosition(G4double value);
0055     void SetPhantomSide(G4double value);
0056     void SetVoxelSide(G4double value);
0057     void SetVoxelDepth(G4double value);
0058 
0059     void UpdateGeometry(G4String, G4double);
0060 
0061     G4int GetNumberSideCells() const;
0062     G4int GetNumberDepthCells() const;
0063     G4int GetPhantomDepth() const;
0064 
0065     G4double GetFFilterRadius();
0066     G4double GetFFilterZ();
0067 
0068     G4double GetJaw1X();
0069     G4double GetTargetPosition();
0070     G4double GetAccOriginPosition();
0071     G4double GetVoxelDepthDim();
0072     
0073 private:
0074 
0075     void ConstructMaterials();
0076     G4Material* GetMaterial(G4String materialName);
0077 
0078     void ConstructPhantom();
0079     void ConstructPhantom_spess();
0080     void ConstructAccelerator();
0081     void ConstructTarget();
0082     void ConstructVacuumWindow();
0083     void ConstructIonizationChamber();
0084     void ConstructFlatteningFilter();
0085     void ConstructPrimaryCollimator();
0086     void ConstructJawsX();
0087     void ConstructJawsY();
0088     void PhantomSegmentation(G4LogicalVolume* phantom);
0089     G4int CheckPhantomSegmentation(G4int nCells);
0090 
0091     DetectorMessenger* detectorMessenger;
0092     G4VPhysicalVolume* world_phys;
0093     G4VPhysicalVolume* accWorld_phys;
0094     G4VPhysicalVolume* boxJaw1X_phys;
0095     G4VPhysicalVolume* boxJaw2X_phys;
0096     G4VPhysicalVolume* boxJaw1Y_phys;
0097     G4VPhysicalVolume* boxJaw2Y_phys;
0098     G4VPhysicalVolume* phantom_phys;
0099     G4LogicalVolume*   LVPhantomSens;
0100 
0101     G4Material* mat_Kapton;
0102     G4Material* mat_XC10;
0103     G4Material* mat_WNICU;
0104     G4Material* mat_Ssteel;
0105     G4ThreeVector accHalfSize;
0106     G4ThreeVector jaw1XInitialPos;
0107     G4ThreeVector jaw2XInitialPos;
0108     G4ThreeVector jaw1YInitialPos;
0109     G4ThreeVector jaw2YInitialPos;
0110     G4double jawAperture;
0111     G4double fieldSide;
0112     G4double sourceToSkinDistance;
0113     G4double phantomSideDim, voxelSideDim, voxelDepthDim;
0114     G4int nSideCells, nDepthCells;
0115     G4double tubeFFRadius, tubeFFFirstFaceZ;
0116     G4MultiFunctionalDetector* phantomDetector3D;
0117     G4VPrimitiveScorer* phantomScorer3D;
0118 };
0119 
0120 #endif