File indexing completed on 2025-02-23 09:22:03
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042 #ifndef DetectorConstruction_h
0043 #define DetectorConstruction_h 1
0044
0045 #include "G4Box.hh"
0046 #include "G4LogicalVolume.hh"
0047 #include "G4Material.hh"
0048 #include "G4NistManager.hh"
0049 #include "G4PVPlacement.hh"
0050 #include "G4Sphere.hh"
0051 #include "G4UnionSolid.hh"
0052 #include "G4UserLimits.hh"
0053 #include "G4VPhysicalVolume.hh"
0054 #include "G4VSolid.hh"
0055 #include "G4VUserDetectorConstruction.hh"
0056 #include "G4VisAttributes.hh"
0057
0058 #include "NeuronLoadDataFile.hh"
0059
0060 #include "G4Ellipsoid.hh"
0061 #include "G4LogicalVolumeStore.hh"
0062 #include "G4Orb.hh"
0063 #include "G4PVParameterised.hh"
0064 #include "G4PhysicalVolumeStore.hh"
0065 #include "G4SolidStore.hh"
0066 #include "G4Tubs.hh"
0067
0068 #include <vector>
0069
0070
0071
0072 class G4Region;
0073
0074 class DetectorConstruction : public G4VUserDetectorConstruction
0075 {
0076 public:
0077 DetectorConstruction();
0078 ~DetectorConstruction() override;
0079
0080 G4VPhysicalVolume* Construct() override;
0081 G4Region* GetTargetRegion() const { return fpRegion; }
0082
0083 NeuronLoadDataFile* GetNeuronLoadParamz() const { return fNeuronLoadParamz; };
0084 const G4VPhysicalVolume* GetsomaPV(G4int i) const { return fsomaPV[i]; };
0085 const G4VPhysicalVolume* GetdendritePV(G4int i) const { return fdendritePV[i]; };
0086 const G4VPhysicalVolume* GetaxonPV(G4int i) const { return faxonPV[i]; };
0087 G4Material* GetTargetMaterial() const { return fpWaterMaterial; };
0088
0089 G4int GetnbSomacomp() const { return fnbSomacomp; }
0090 G4double GetMassSomacomp(G4int i) const { return fMassSomacomp[i]; }
0091 G4double GetMassSomaTot() const { return fMassSomaTot; }
0092 G4ThreeVector GetPosSomacomp(G4int i) const { return fPosSomacomp[i]; }
0093
0094 G4int GetnbDendritecomp() const { return fnbDendritecomp; }
0095 G4double GetMassDendcomp(G4int i) const { return fMassDendcomp[i]; }
0096 G4double GetMassDendTot() const { return fMassDendTot; }
0097 G4ThreeVector GetPosDendcomp(G4int i) const { return fPosDendcomp[i]; }
0098 G4double GetDistADendSoma(G4int i) const { return fDistADendSoma[i]; }
0099 G4double GetDistBDendSoma(G4int i) const { return fDistBDendSoma[i]; }
0100
0101 G4int GetnbAxoncomp() const { return fnbAxoncomp; }
0102 G4double GetMassAxoncomp(G4int i) const { return fMassAxoncomp[i]; }
0103 G4double GetMassAxonTot() const { return fMassAxonTot; }
0104 G4ThreeVector GetPosAxoncomp(G4int i) const { return fPosAxoncomp[i]; }
0105 G4double GetDistAxonsoma(G4int i) const { return fDistAxonsoma[i]; }
0106
0107 G4double GetTotVolNeuron() const { return fTotVolNeuron; }
0108 G4double GetTotSurfNeuron() const { return fTotSurfNeuron; }
0109 G4double GetTotMassNeuron() const { return fTotMassNeuron; }
0110 G4double GetTotVolSlice() const { return fTotVolSlice; }
0111 G4double GetTotSurfSlice() const { return fTotSurfSlice; }
0112 G4double GetTotMassSlice() const { return fTotMassSlice; }
0113 G4double GetTotVolMedium() const { return fTotVolMedium; }
0114 G4double GetTotSurfMedium() const { return fTotSurfMedium; }
0115 G4double GetTotMassMedium() const { return fTotMassMedium; }
0116
0117 private:
0118 void DefineMaterials();
0119
0120 G4Material* fpWaterMaterial{nullptr};
0121 G4Material* fpWorldMaterial{nullptr};
0122 G4Region* fpRegion{nullptr};
0123
0124
0125 NeuronLoadDataFile* fNeuronLoadParamz;
0126 G4bool fCheckOverlaps{false};
0127
0128 std::vector<G4VSolid*> fsomaS;
0129 std::vector<G4VSolid*> fdendriteS;
0130 std::vector<G4VSolid*> faxonS;
0131 std::vector<G4LogicalVolume*> fsomaLV;
0132 std::vector<G4LogicalVolume*> fdendriteLV;
0133 std::vector<G4LogicalVolume*> faxonLV;
0134 std::vector<G4VPhysicalVolume*> fsomaPV;
0135 std::vector<G4VPhysicalVolume*> fdendritePV;
0136 std::vector<G4VPhysicalVolume*> faxonPV;
0137
0138 G4VisAttributes* fSomaColour{nullptr};
0139 G4VisAttributes* fDendColour{nullptr};
0140 G4VisAttributes* fAxonColour{nullptr};
0141 G4VisAttributes* fSpineColour{nullptr};
0142 G4VisAttributes* fNeuronColour{nullptr};
0143
0144 G4int fnbSomacomp{0};
0145 G4int fnbDendritecomp{0};
0146 G4int fnbAxoncomp{0};
0147
0148 std::vector<G4ThreeVector> fPosSomacomp;
0149 std::vector<G4double> fMassSomacomp;
0150
0151 std::vector<G4double> fDistADendSoma;
0152 std::vector<G4double> fDistBDendSoma;
0153 std::vector<G4double> fMassDendcomp;
0154 std::vector<G4ThreeVector> fPosDendcomp;
0155
0156 std::vector<G4double> fDistAxonsoma;
0157 std::vector<G4double> fMassAxoncomp;
0158 std::vector<G4ThreeVector> fPosAxoncomp;
0159
0160 G4double fMassSomaTot{0.0};
0161 G4double fMassDendTot{0.0};
0162 G4double fMassAxonTot{0.0};
0163
0164 G4double fTotVolNeuron{0.0};
0165 G4double fTotSurfNeuron{0.0};
0166 G4double fTotMassNeuron{0.0};
0167 G4double fTotVolSlice{0.0};
0168 G4double fTotSurfSlice{0.0};
0169 G4double fTotMassSlice{0.0};
0170 G4double fTotVolMedium{0.0};
0171 G4double fTotSurfMedium{0.0};
0172 G4double fTotMassMedium{0.0};
0173 };
0174
0175 #endif