File indexing completed on 2025-01-18 09:16:51
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 #ifndef ICRP110PhantomNestedParameterisation_HH
0033 #define ICRP110PhantomNestedParameterisation_HH
0034
0035 #include <vector>
0036 #include <map>
0037
0038 #include "G4Types.hh"
0039 #include "G4ThreeVector.hh"
0040 #include "G4VTouchable.hh"
0041 #include "G4VNestedParameterisation.hh"
0042
0043 class G4VPhysicalVolume;
0044 class G4VSolid;
0045 class G4Material;
0046 class G4VisAttributes;
0047
0048
0049 class G4Box;
0050 class G4Tubs;
0051 class G4Trd;
0052 class G4Trap;
0053 class G4Cons;
0054 class G4Sphere;
0055 class G4Ellipsoid;
0056 class G4Orb;
0057 class G4Torus;
0058 class G4Para;
0059 class G4Polycone;
0060 class G4Polyhedra;
0061 class G4Hype;
0062
0063
0064
0065 class ICRP110PhantomNestedParameterisation : public G4VNestedParameterisation
0066 {
0067 public:
0068
0069 explicit ICRP110PhantomNestedParameterisation(const G4ThreeVector& voxelSize,
0070 std::vector<G4Material*>& mat,
0071 G4int fnX_ = 0, G4int fnY_ = 0, G4int fnZ_ = 0);
0072
0073
0074
0075 ~ICRP110PhantomNestedParameterisation();
0076
0077
0078 virtual G4Material* ComputeMaterial(G4VPhysicalVolume *currentVol,
0079 const G4int repNo,
0080 const G4VTouchable *parentTouch );
0081 G4int GetNumberOfMaterials() const;
0082 G4Material* GetMaterial(G4int idx) const;
0083
0084 G4int GetMaterialIndex( G4int copyNo) const;
0085
0086 void SetMaterialIndices( size_t* matInd ){ fMaterialIndices = matInd;}
0087
0088
0089
0090 void SetNoVoxel( G4int nx, G4int ny, G4int nz );
0091
0092
0093
0094 void ComputeTransformation(const G4int no,
0095 G4VPhysicalVolume *currentPV) const;
0096
0097
0098
0099 void ComputeDimensions(G4Box &, const G4int,
0100 const G4VPhysicalVolume *) const;
0101
0102
0103 private:
0104
0105 void ComputeDimensions (G4Trd&, const G4int,
0106 const G4VPhysicalVolume*) const {}
0107 void ComputeDimensions (G4Trap&, const G4int,
0108 const G4VPhysicalVolume*) const {}
0109 void ComputeDimensions (G4Cons&, const G4int,
0110 const G4VPhysicalVolume*) const {}
0111 void ComputeDimensions (G4Sphere&, const G4int,
0112 const G4VPhysicalVolume*) const {}
0113 void ComputeDimensions (G4Ellipsoid&, const G4int,
0114 const G4VPhysicalVolume*) const {}
0115 void ComputeDimensions (G4Orb&, const G4int,
0116 const G4VPhysicalVolume*) const {}
0117 void ComputeDimensions (G4Torus&, const G4int,
0118 const G4VPhysicalVolume*) const {}
0119 void ComputeDimensions (G4Para&, const G4int,
0120 const G4VPhysicalVolume*) const {}
0121 void ComputeDimensions (G4Hype&, const G4int,
0122 const G4VPhysicalVolume*) const {}
0123 void ComputeDimensions (G4Tubs&, const G4int,
0124 const G4VPhysicalVolume*) const {}
0125 void ComputeDimensions (G4Polycone&, const G4int,
0126 const G4VPhysicalVolume*) const {}
0127 void ComputeDimensions (G4Polyhedra&, const G4int,
0128 const G4VPhysicalVolume*) const {}
0129
0130 void ReadColourData();
0131
0132 using G4VNestedParameterisation::ComputeMaterial;
0133
0134 private:
0135
0136 G4double fdX,fdY,fdZ;
0137 G4int fnX,fnY,fnZ;
0138 std::vector<G4Material*> fMaterials;
0139 size_t* fMaterialIndices;
0140 std::map<G4String,G4VisAttributes*> fColours;
0141 };
0142 #endif