Back to home page

EIC code displayed by LXR

 
 

    


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

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 #ifndef TrentoPassiveProtonBeamLine_H
0030 #define TrentoPassiveProtonBeamLine_H 1
0031 
0032 #include "globals.hh"
0033 #include "G4VUserDetectorConstruction.hh"
0034 #include "G4Box.hh"
0035 #include "G4Tubs.hh"
0036 #include "G4VisAttributes.hh"
0037 #include "G4LogicalVolume.hh"
0038 
0039 class G4VPhysicalVolume;
0040 class HadrontherapyDetectorConstruction;
0041 class HadrontherapyModulator;
0042 class TrentoPassiveProtonBeamLineMessenger;
0043 class HadrontherapyDetectorROGeometry;
0044 
0045 class TrentoPassiveProtonBeamLine : public G4VUserDetectorConstruction
0046 {
0047 public:
0048     
0049     //TrentoPassiveProtonBeamLine(G4VPhysicalVolume*);
0050     TrentoPassiveProtonBeamLine();
0051     ~TrentoPassiveProtonBeamLine();
0052   // static G4bool doCalculation;
0053     
0054     G4VPhysicalVolume* Construct();
0055     //
0056     static TrentoPassiveProtonBeamLine* GetInstance();
0057     
0058     //
0059     void HadrontherapyBeamLineSupport();
0060     // Definition of the beam line support
0061     
0062     void HadrontherapyBeamMonitoring();
0063     //Definition of the monitor chamber
0064     
0065     void HadrontherapyBeamScatteringFoils();
0066     // Definition of the first scattering foil made of tantalum
0067     
0068     void HadrontherapyBeamCollimators();
0069     // Definition of the pre collimator made of plastic
0070     // and the collimator in front of the detector
0071     
0072     void HadrontherapyRidgeFilter();
0073     // The following methods allow to change parameters
0074     // of some beam line components (through Messenger files)
0075 
0076     void SetScatteringFoilXSize(G4double);
0077     // This method allows to change the size of the scattering foil
0078     // along the X axis
0079     
0080     void SetPreCollimatorXSize(G4double);
0081     // This method allows to change the size of the pre collimator along
0082     // the Z axis
0083     
0084     void SetPreCollimatorXPosition(G4double);
0085     // This method allows to change the position of the pre collimator along
0086     // the X axis
0087     
0088     void SetAirTubeYSize(G4double);
0089     // This method allows to change the y side of
0090     // air tube
0091     
0092     void SetAirTubeZSize(G4double);
0093     // This method allows to change the z side of
0094     // the air tube
0095     
0096     void SetScattererMaterial(G4String);
0097     // This method permit to change
0098     //the material of scatterer
0099     
0100 private:
0101     static TrentoPassiveProtonBeamLine* instance;
0102     //passive proton line dimensions
0103     void SetDefaultDimensions();
0104     void ConstructTrentoPassiveProtonBeamLine();
0105       
0106     // geometry component
0107     TrentoPassiveProtonBeamLineMessenger* TrentoPassiveMessenger;
0108     G4LogicalVolume* logicTreatmentRoom;
0109     G4VPhysicalVolume* physicalTreatmentRoom;
0110     HadrontherapyDetectorConstruction* hadrontherapyDetectorConstruction;
0111     
0112 
0113     G4Material* kapton;
0114     
0115     G4double ScatteringFoilXSize;
0116     G4double ScatteringFoilYSize;
0117     G4double ScatteringFoilZSize;
0118     G4double ScatteringFoilXPosition;
0119     G4double ScatteringFoilYPosition;
0120     G4double ScatteringFoilZPosition;
0121     
0122     G4double preCollimatorXHalfSide;
0123     G4double preCollimatorXPosition;
0124     G4double preCollimatorYPosition;
0125     G4double preCollimatorZPosition;
0126    
0127     G4double YHalfSideAirTube;
0128     G4double ZHalfSideAirTube;
0129     
0130     G4VPhysicalVolume* physiBeamLineSupport;
0131     G4VPhysicalVolume* physiBeamLineCover;
0132     G4VPhysicalVolume* physiBeamLineCover2;
0133     
0134     G4VPhysicalVolume* physiMonitorLayer1;
0135     G4VPhysicalVolume* physiMonitorLayer2;
0136     
0137     G4VPhysicalVolume* internalMonitorStructurePV;
0138     G4VPhysicalVolume* firstFoilPV;
0139     G4VPhysicalVolume* secondFoilPV;
0140     G4VPhysicalVolume* airgapPV;
0141     
0142     G4Box* ScatteringFoil;
0143     G4LogicalVolume* logicScatteringFoil;
0144     G4VPhysicalVolume* physiScatteringFoil;
0145     
0146     G4VPhysicalVolume* ridgeFilterPhys;
0147     
0148     G4Box* preCollimator;
0149     G4VPhysicalVolume* physiPreCollimator;
0150     
0151     G4Box* Collimator;
0152     G4VPhysicalVolume* physiCollimator;
0153     
0154     G4Box* solidAirTube;
0155     G4Box* solidAirPreTube;
0156     
0157     G4VPhysicalVolume* mother;
0158     G4VPhysicalVolume* physiAirTube;
0159     G4VPhysicalVolume* physiAirPreTube;
0160     
0161     G4VisAttributes* blue;
0162     G4VisAttributes* gray;
0163     G4VisAttributes* white;
0164     G4VisAttributes* red;
0165     G4VisAttributes* yellow;
0166     G4VisAttributes* green;
0167     G4VisAttributes* darkGreen;
0168     G4VisAttributes* darkOrange3;
0169     G4VisAttributes* skyBlue;
0170     
0171     G4Material* beamLineSupportMaterial;
0172     G4Material* vacuumZoneMaterial;
0173     G4Material* layerMonitorChamberMaterial;
0174     G4Material* layerDefaultMaterial;
0175     G4Material* FoilMaterial;
0176     G4Material* internalStructureMaterial;
0177     G4Material* airgapMaterial;
0178     G4Material* ScatteringFoilMaterial;
0179     G4Material* singleTrapMaterial;
0180     G4Material* CollimatorMaterial;
0181     G4Material* preCollimatorMaterial;
0182     G4Material* airTubeMaterial;
0183     G4Material* airTube2Material;
0184     G4Material* airTube3Material;
0185     G4Material* ridgeFilterMaterial;
0186     
0187     HadrontherapyDetectorROGeometry* RO;
0188     
0189     
0190 };
0191 #endif