Warning, file /geant4/examples/advanced/dna/cellularPhantom/include/CellParameterisation.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
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 #ifndef CellParameterisation_H
0044 #define CellParameterisation_H 1
0045
0046 #include "G4VPVParameterisation.hh"
0047 #include "G4VPhysicalVolume.hh"
0048 #include "G4LogicalVolume.hh"
0049 #include "G4VisAttributes.hh"
0050 #include "G4SystemOfUnits.hh"
0051
0052
0053
0054 class CellParameterisation : public G4VPVParameterisation
0055 {
0056 public:
0057
0058 explicit CellParameterisation
0059 (G4String fileName,
0060 G4Material *RedMat, G4Material *GreenMat, G4Material *BlueMat,
0061 G4double shiftX, G4double shiftY, G4double shiftZ);
0062
0063 ~CellParameterisation() override;
0064
0065 void ComputeTransformation
0066 (const G4int copyNo, G4VPhysicalVolume *physVol) const override;
0067
0068 G4Material *ComputeMaterial (const G4int copyNo,
0069 G4VPhysicalVolume *physVol,
0070 const G4VTouchable *) override;
0071
0072 inline auto GetPhantomTotalPixels() const { return fPhantomTotalPixels; }
0073
0074 inline auto GetRedTotalPixels() const { return fRedTotalPixels; }
0075 inline auto GetGreenTotalPixels() const { return fGreenTotalPixels; }
0076 inline auto GetBlueTotalPixels() const { return fBlueTotalPixels; }
0077
0078 inline auto GetPixelSizeX() const { return fDimCellBoxX; }
0079 inline auto GetPixelSizeY() const { return fDimCellBoxY; }
0080 inline auto GetPixelSizeZ() const { return fDimCellBoxZ; }
0081
0082 inline auto GetRedMass() const { return fRedMass; }
0083 inline auto GetGreenMass() const { return fGreenMass; }
0084 inline auto GetBlueMass() const { return fBlueMass; }
0085
0086
0087
0088 inline auto GetVoxelThreeVectorOriginal(G4int i) const { return fMapCellOriginal[i]; }
0089
0090 inline auto GetMaterial(G4int i) const { return fMaterial[i]; }
0091
0092
0093 static CellParameterisation *Instance()
0094 {
0095 return gInstance;
0096 }
0097
0098 private:
0099
0100 void Initialize(const G4String&);
0101
0102 static CellParameterisation *gInstance;
0103
0104 G4double fDimCellBoxX = 0;
0105 G4double fDimCellBoxY = 0;
0106 G4double fDimCellBoxZ = 0;
0107
0108 G4double fSizeRealX = 0;
0109 G4double fSizeRealY = 0;
0110 G4double fSizeRealZ = 0;
0111
0112 G4Material *fRedMaterial = nullptr;
0113 G4Material *fGreenMaterial = nullptr;
0114 G4Material *fBlueMaterial = nullptr;
0115
0116 G4double fShiftX = 0.;
0117 G4double fShiftY = 0.;
0118 G4double fShiftZ = 0.;
0119
0120 G4VisAttributes *fRedAttributes = nullptr;
0121 G4VisAttributes *fGreenAttributes = nullptr;
0122 G4VisAttributes *fBlueAttributes = nullptr;
0123
0124 G4ThreeVector *fMapCell = nullptr;
0125 G4ThreeVector *fMapCellPxl = nullptr;
0126 G4ThreeVector *fMapCellOriginal = nullptr;
0127
0128 G4int *fMaterial = nullptr;
0129
0130 G4int fPhantomTotalPixels = 0;
0131 G4int fRedTotalPixels = 0;
0132 G4int fGreenTotalPixels = 0;
0133 G4int fBlueTotalPixels = 0;
0134
0135 G4double fRedMass = 0.;
0136 G4double fGreenMass = 0.;
0137 G4double fBlueMass = 0.;
0138
0139 char fRealUnit;
0140
0141 G4double fOffsetX = 0.;
0142 G4double fOffsetY = 0.;
0143 G4double fOffsetZ = 0.;
0144 };
0145
0146 #endif