Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /geant4/examples/extended/medical/dna/neuron/include/DetectorConstruction.hh was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

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 /// \file DetectorConstruction.hh
0027 /// \brief Definition of the DetectorConstruction class
0028 
0029 // This example is provided by the Geant4-DNA collaboration
0030 // Any report or published results obtained using the Geant4-DNA software
0031 // shall cite the following Geant4-DNA collaboration publication:
0032 // Med. Phys. 37 (2010) 4692-4708
0033 // and papers
0034 // M. Batmunkh et al. J Radiat Res Appl Sci 8 (2015) 498-507
0035 // O. Belov et al. Physica Medica 32 (2016) 1510-1520
0036 // The Geant4-DNA web site is available at http://geant4-dna.org
0037 //
0038 // -------------------------------------------------------------------
0039 // November 2016
0040 // -------------------------------------------------------------------
0041 //
0042 
0043 #ifndef DetectorConstruction_h
0044 #define DetectorConstruction_h 1
0045 
0046 #include "G4Box.hh"
0047 #include "G4LogicalVolume.hh"
0048 #include "G4Material.hh"
0049 #include "G4NistManager.hh"
0050 #include "G4PVPlacement.hh"
0051 #include "G4Sphere.hh"
0052 #include "G4UnionSolid.hh"
0053 #include "G4UserLimits.hh"
0054 #include "G4VPhysicalVolume.hh"
0055 #include "G4VSolid.hh"
0056 #include "G4VUserDetectorConstruction.hh"
0057 #include "G4VisAttributes.hh"
0058 //
0059 #include "NeuronLoadDataFile.hh"
0060 
0061 #include "G4Ellipsoid.hh"
0062 #include "G4LogicalVolumeStore.hh"
0063 #include "G4Orb.hh"
0064 #include "G4PVParameterised.hh"
0065 #include "G4PhysicalVolumeStore.hh"
0066 #include "G4SolidStore.hh"
0067 #include "G4Tubs.hh"
0068 
0069 #include <vector>
0070 
0071 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
0072 
0073 class G4Region;
0074 
0075 class DetectorConstruction : public G4VUserDetectorConstruction
0076 {
0077   public:
0078     DetectorConstruction();
0079     ~DetectorConstruction() override;
0080 
0081     G4VPhysicalVolume* Construct() override;
0082     G4Region* GetTargetRegion() const { return fpRegion; }
0083 
0084     NeuronLoadDataFile* GetNeuronLoadParamz() const { return fNeuronLoadParamz; };
0085     const G4VPhysicalVolume* GetsomaPV(G4int i) const { return fsomaPV[i]; };
0086     const G4VPhysicalVolume* GetdendritePV(G4int i) const { return fdendritePV[i]; };
0087     const G4VPhysicalVolume* GetaxonPV(G4int i) const { return faxonPV[i]; };
0088     G4Material* GetTargetMaterial() const { return fpWaterMaterial; };
0089 
0090     G4int GetnbSomacomp() const { return fnbSomacomp; }  //
0091     G4double GetMassSomacomp(G4int i) const { return fMassSomacomp[i]; }  //
0092     G4double GetMassSomaTot() const { return fMassSomaTot; }  //
0093     G4ThreeVector GetPosSomacomp(G4int i) const { return fPosSomacomp[i]; }  //
0094 
0095     G4int GetnbDendritecomp() const { return fnbDendritecomp; }  //
0096     G4double GetMassDendcomp(G4int i) const { return fMassDendcomp[i]; }  //
0097     G4double GetMassDendTot() const { return fMassDendTot; }  //
0098     G4ThreeVector GetPosDendcomp(G4int i) const { return fPosDendcomp[i]; }  //
0099     G4double GetDistADendSoma(G4int i) const { return fDistADendSoma[i]; }  //
0100     G4double GetDistBDendSoma(G4int i) const { return fDistBDendSoma[i]; }  //
0101 
0102     G4int GetnbAxoncomp() const { return fnbAxoncomp; }  //
0103     G4double GetMassAxoncomp(G4int i) const { return fMassAxoncomp[i]; }  //
0104     G4double GetMassAxonTot() const { return fMassAxonTot; }  //
0105     G4ThreeVector GetPosAxoncomp(G4int i) const { return fPosAxoncomp[i]; }  //
0106     G4double GetDistAxonsoma(G4int i) const { return fDistAxonsoma[i]; }  //
0107 
0108     G4double GetTotVolNeuron() const { return fTotVolNeuron; }
0109     G4double GetTotSurfNeuron() const { return fTotSurfNeuron; }
0110     G4double GetTotMassNeuron() const { return fTotMassNeuron; }  //
0111     G4double GetTotVolSlice() const { return fTotVolSlice; }
0112     G4double GetTotSurfSlice() const { return fTotSurfSlice; }
0113     G4double GetTotMassSlice() const { return fTotMassSlice; }  //
0114     G4double GetTotVolMedium() const { return fTotVolMedium; }
0115     G4double GetTotSurfMedium() const { return fTotSurfMedium; }  //
0116     G4double GetTotMassMedium() const { return fTotMassMedium; }  //
0117 
0118   private:
0119     void DefineMaterials();
0120 
0121     G4Material* fpWaterMaterial{nullptr};
0122     G4Material* fpWorldMaterial{nullptr};
0123     G4Region* fpRegion{nullptr};
0124 
0125     // For neuron constructions!
0126     NeuronLoadDataFile* fNeuronLoadParamz;
0127     G4bool fCheckOverlaps{false};
0128 
0129     std::vector<G4VSolid*> fsomaS;
0130     std::vector<G4VSolid*> fdendriteS;
0131     std::vector<G4VSolid*> faxonS;
0132     std::vector<G4LogicalVolume*> fsomaLV;
0133     std::vector<G4LogicalVolume*> fdendriteLV;
0134     std::vector<G4LogicalVolume*> faxonLV;
0135     std::vector<G4VPhysicalVolume*> fsomaPV;
0136     std::vector<G4VPhysicalVolume*> fdendritePV;
0137     std::vector<G4VPhysicalVolume*> faxonPV;
0138 
0139     G4VisAttributes* fSomaColour{nullptr};
0140     G4VisAttributes* fDendColour{nullptr};
0141     G4VisAttributes* fAxonColour{nullptr};
0142     G4VisAttributes* fSpineColour{nullptr};
0143     G4VisAttributes* fNeuronColour{nullptr};
0144 
0145     G4int fnbSomacomp{0};
0146     G4int fnbDendritecomp{0};
0147     G4int fnbAxoncomp{0};
0148 
0149     std::vector<G4ThreeVector> fPosSomacomp;
0150     std::vector<G4double> fMassSomacomp;
0151 
0152     std::vector<G4double> fDistADendSoma;
0153     std::vector<G4double> fDistBDendSoma;
0154     std::vector<G4double> fMassDendcomp;
0155     std::vector<G4ThreeVector> fPosDendcomp;
0156 
0157     std::vector<G4double> fDistAxonsoma;
0158     std::vector<G4double> fMassAxoncomp;
0159     std::vector<G4ThreeVector> fPosAxoncomp;
0160 
0161     G4double fMassSomaTot{0.0};
0162     G4double fMassDendTot{0.0};
0163     G4double fMassAxonTot{0.0};
0164 
0165     G4double fTotVolNeuron{0.0};
0166     G4double fTotSurfNeuron{0.0};
0167     G4double fTotMassNeuron{0.0};
0168     G4double fTotVolSlice{0.0};
0169     G4double fTotSurfSlice{0.0};
0170     G4double fTotMassSlice{0.0};
0171     G4double fTotVolMedium{0.0};
0172     G4double fTotSurfMedium{0.0};
0173     G4double fTotMassMedium{0.0};
0174 };
0175 
0176 #endif