Back to home page

EIC code displayed by LXR

 
 

    


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

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 // Hadrontherapy advanced example for Geant4
0027 // See more at: https://twiki.cern.ch/twiki/bin/view/Geant4/AdvancedExamplesHadrontherapy
0028 
0029 //The detectior is devided in voxels. 
0030 //
0031 //
0032 #ifndef HadrontherapyDetectorROGeometry_h
0033 #define HadrontherapyDetectorROGeometry_h 
0034 
0035 //#include "G4VReadOutGeometry.hh"
0036 #include "G4VUserParallelWorld.hh"
0037 #include "G4ThreeVector.hh"
0038 #include "G4Box.hh"
0039 
0040 class HadrontherapyDetectorROGeometry : public G4VUserParallelWorld
0041 {
0042 public:
0043   HadrontherapyDetectorROGeometry(G4String);
0044   ~HadrontherapyDetectorROGeometry();
0045 
0046   void Initialize(G4ThreeVector detectorPos,
0047           G4double detectorDimX,
0048           G4double detectorDimY,
0049           G4double detectorDimZ,
0050           G4int numberOfVoxelsX,
0051           G4int numberOfVoxelsY,
0052           G4int numberOfVoxelsZ);
0053 
0054   void UpdateROGeometry();
0055 
0056   virtual void Construct();
0057   virtual void ConstructSD();
0058 
0059 private:  
0060   //Parameters used for the construction
0061   G4ThreeVector detectorToWorldPosition; 
0062   G4double detectorSizeX;
0063   G4double detectorSizeY; 
0064   G4double detectorSizeZ;
0065 
0066   G4int numberOfVoxelsAlongX;
0067   G4int numberOfVoxelsAlongY; 
0068   G4int numberOfVoxelsAlongZ; 
0069   
0070   //Solids that are updated on-the fly
0071   G4Box* RODetector;
0072   G4Box* RODetectorXDivision;
0073   G4Box* RODetectorYDivision;
0074   G4Box* RODetectorZDivision;
0075 
0076   //Logical volumes used for the re-build on-the-fly
0077   G4LogicalVolume* worldLogical;
0078   G4LogicalVolume* RODetectorLog;
0079   G4LogicalVolume* RODetectorXDivisionLog;
0080   G4LogicalVolume* RODetectorYDivisionLog;
0081   G4LogicalVolume* RODetectorZDivisionLog;
0082   G4LogicalVolume* sensitiveLogicalVolume;
0083 
0084 
0085   G4bool isBuilt;
0086   G4bool isInitialized;
0087 };
0088 #endif