File indexing completed on 2026-09-09 08:29:06
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
0043
0044 #ifndef NeuronLoadDataFile_H
0045 #define NeuronLoadDataFile_H 1
0046
0047 #include "G4Colour.hh"
0048 #include "G4Material.hh"
0049 #include "G4RotationMatrix.hh"
0050 #include "G4SystemOfUnits.hh"
0051 #include "G4ThreeVector.hh"
0052 #include "G4VSolid.hh"
0053 #include "G4VisAttributes.hh"
0054
0055 #include <vector>
0056
0057
0058 #include "G4Box.hh" // bounding volume
0059 #include "G4Cons.hh" // stubby spine, filopodia
0060 #include "G4Ellipsoid.hh" // soma compartments
0061 #include "G4EllipticalCone.hh"
0062 #include "G4EllipticalTube.hh"
0063 #include "G4Hype.hh" // thin spine neck
0064 #include "G4Orb.hh" // mushroom spine
0065 #include "G4Para.hh"
0066 #include "G4Polycone.hh"
0067 #include "G4Polyhedra.hh"
0068 #include "G4Sphere.hh" // soma compartments
0069 #include "G4Tet.hh"
0070 #include "G4Torus.hh"
0071 #include "G4Trap.hh"
0072 #include "G4Trd.hh"
0073 #include "G4Tubs.hh" // axon, dendrite compartments
0074 #include "G4TwistedBox.hh"
0075 #include "G4TwistedTrap.hh"
0076 #include "G4TwistedTrd.hh"
0077 #include "G4TwistedTubs.hh"
0078 #include "G4VPVParameterisation.hh"
0079
0080
0081
0082
0083 class NeuronLoadDataFile
0084
0085
0086
0087
0088
0089
0090 {
0091 public:
0092 NeuronLoadDataFile();
0093 ~NeuronLoadDataFile() = default;
0094
0095 void SingleNeuronSWCfile(const G4String& filename);
0096 void NeuralNetworkDATAfile(const G4String& filename);
0097
0098
0099 void ComputeTransformation(const G4int copyNo, G4VPhysicalVolume* physVol) const;
0100
0101 void ComputeDimensions(G4Tubs& cylinderComp, const G4int copyNo,
0102 const G4VPhysicalVolume*) const;
0103 G4double GetwidthB() const { return fwidthB; }
0104 G4double GetheightB() const { return fheightB; }
0105 G4double GetdepthB() const { return fdepthB; }
0106 G4double GetdiagnlLength() const { return fdiagnlLength; }
0107 G4double GetshiftX() const { return fshiftX; }
0108 G4double GetshiftY() const { return fshiftY; }
0109 G4double GetshiftZ() const { return fshiftZ; }
0110 G4double GetTypeN(G4int i) { return fTypeN[i]; }
0111
0112 G4int GetnbSomacomp() const { return fnbSomacomp; }
0113 G4double GetMassSomacomp(G4int i) const { return fMassSomacomp[i]; }
0114 G4double GetMassSomaTot() { return fMassSomaTot; }
0115 G4ThreeVector GetPosSomacomp(G4int i) const { return fPosSomacomp[i]; }
0116 G4double GetRadSomacomp(G4int i) const { return fRadSomacomp[i]; }
0117
0118 G4int GetnbDendritecomp() const { return fnbDendritecomp; }
0119 G4double GetMassDendcomp(G4int i) const { return fMassDendcomp[i]; }
0120 G4double GetMassDendTot() { return fMassDendTot; }
0121 G4ThreeVector GetPosDendcomp(G4int i) const { return fPosDendcomp[i]; }
0122 G4double GetRadDendcomp(G4int i) const { return fRadDendcomp[i]; }
0123 G4double GetHeightDendcomp(G4int i) const { return fHeightDendcomp[i]; }
0124 G4double GetDistADendSoma(G4int i) const { return fDistADendSoma[i]; }
0125 G4double GetDistBDendSoma(G4int i) const { return fDistBDendSoma[i]; }
0126 G4RotationMatrix GetRotDendcomp(G4int i) const { return fRotDendcomp[i]; }
0127
0128 G4int GetnbAxoncomp() const { return fnbAxoncomp; }
0129 G4double GetMassAxoncomp(G4int i) const { return fMassAxoncomp[i]; }
0130 G4double GetMassAxonTot() const { return fMassAxonTot; }
0131 G4ThreeVector GetPosAxoncomp(G4int i) const { return fPosAxoncomp[i]; }
0132 G4double GetRadAxoncomp(G4int i) const { return fRadAxoncomp[i]; }
0133 G4double GetHeightAxoncomp(G4int i) const { return fHeightAxoncomp[i]; }
0134 G4double GetDistAxonsoma(G4int i) const { return fDistAxonsoma[i]; }
0135 G4RotationMatrix GetRotAxoncomp(G4int i) const { return fRotAxoncomp[i]; }
0136
0137 G4int GetnbSpinecomp() const { return fnbSpinecomp; }
0138 G4double GetMassSpinecomp(G4int i) const { return fMassSpinecomp[i]; }
0139 G4double GetMassSpineTot() const { return fMassSpineTot; }
0140 G4ThreeVector GetPosSpinecomp(G4int i) const { return fPosSpinecomp[i]; }
0141 G4double GetRadSpinecomp(G4int i) const { return fRadSpinecomp[i]; }
0142 G4double GetHeightSpinecomp(G4int i) const { return fHeightSpinecomp[i]; }
0143 G4double GetDistSpinesoma(G4int i) { return fDistSpinesoma[i]; }
0144 G4RotationMatrix GetRotSpinecomp(G4int i) const { return fRotSpinecomp[i]; }
0145
0146 G4int GetnbNeuroncomp() const { return fnbNeuroncomp; }
0147
0148 G4double GetTotVolNeuron() const { return fTotVolNeuron; }
0149 G4double GetTotSurfNeuron() const { return fTotSurfNeuron; }
0150 G4double GetTotMassNeuron() const { return fTotMassNeuron; }
0151 G4double GetTotVolSlice() const { return fTotVolSlice; }
0152 G4double GetTotSurfSlice() const { return fTotSurfSlice; }
0153 G4double GetTotMassSlice() const { return fTotMassSlice; }
0154 G4double GetTotVolMedium() const { return fTotVolMedium; }
0155 G4double GetTotSurfMedium() const { return fTotSurfMedium; }
0156 G4double GetTotMassMedium() const { return fTotMassMedium; }
0157
0158 private:
0159
0160 G4String fNeuronFileNameSWC;
0161 G4String fNeuronFileNameDATA;
0162
0163 G4int fnbSomacomp{0};
0164 G4int fnbDendritecomp{0};
0165 G4int fnbAxoncomp{0};
0166 G4int fnbSpinecomp{0};
0167 G4int fnbNeuroncomp{0};
0168
0169 std::vector<G4int> fTypeN;
0170
0171
0172 G4double fshiftX{0.0};
0173 G4double fshiftY{0.0};
0174 G4double fshiftZ{0.0};
0175 G4double fwidthB{0.0};
0176 G4double fheightB{0.0};
0177 G4double fdepthB{0.0};
0178 G4double fdiagnlLength{0.0};
0179
0180 G4double fMassSomaTot{0.0};
0181 G4double fMassDendTot{0.0};
0182 G4double fMassAxonTot{0.0};
0183 G4double fMassSpineTot{0.0};
0184
0185 G4double fTotVolNeuron{0.0};
0186 G4double fTotSurfNeuron{0.0};
0187 G4double fTotMassNeuron{0.0};
0188 G4double fTotVolSlice{0.0};
0189 G4double fTotSurfSlice{0.0};
0190 G4double fTotMassSlice{0.0};
0191 G4double fTotVolMedium{0.0};
0192 G4double fTotSurfMedium{0.0};
0193 G4double fTotMassMedium{0.0};
0194
0195 std::vector<G4ThreeVector> fPosSomacomp;
0196 std::vector<G4double> fRadSomacomp;
0197 std::vector<G4double> fMassSomacomp;
0198
0199 std::vector<G4double> fRadDendcomp;
0200 std::vector<G4double> fDistADendSoma;
0201 std::vector<G4double> fDistBDendSoma;
0202 std::vector<G4double> fHeightDendcomp;
0203 std::vector<G4double> fMassDendcomp;
0204 std::vector<G4ThreeVector> fPosDendcomp;
0205 std::vector<G4RotationMatrix> fRotDendcomp;
0206
0207 std::vector<G4double> fRadAxoncomp;
0208 std::vector<G4double> fHeightAxoncomp;
0209 std::vector<G4double> fDistAxonsoma;
0210 std::vector<G4double> fMassAxoncomp;
0211 std::vector<G4ThreeVector> fPosAxoncomp;
0212 std::vector<G4RotationMatrix> fRotAxoncomp;
0213
0214 std::vector<G4double> fRadSpinecomp;
0215 std::vector<G4double> fHeightSpinecomp;
0216 std::vector<G4double> fDistSpinesoma;
0217 std::vector<G4double> fMassSpinecomp;
0218 std::vector<G4ThreeVector> fPosSpinecomp;
0219 std::vector<G4RotationMatrix> fRotSpinecomp;
0220
0221 std::vector<G4double> fRadNeuroncomp;
0222 std::vector<G4double> fHeightNeuroncomp;
0223 std::vector<G4double> fDistNeuronsoma;
0224 std::vector<G4double> fMassNeuroncomp;
0225 std::vector<G4ThreeVector> fPosNeuroncomp;
0226 std::vector<G4RotationMatrix> fRotNeuroncomp;
0227 };
0228
0229 #endif