File indexing completed on 2025-01-18 09:58:50
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 #ifndef G4PartialPhantomParameterisation_HH
0037 #define G4PartialPhantomParameterisation_HH
0038
0039 #include <map>
0040 #include <set>
0041 #include <utility>
0042 #include <vector>
0043
0044 #include "G4Types.hh"
0045 #include "G4PhantomParameterisation.hh"
0046 #include "G4AffineTransform.hh"
0047 #include "G4VTouchable.hh"
0048
0049 class G4VPhysicalVolume;
0050 class G4VSolid;
0051 class G4Material;
0052
0053 class G4PartialPhantomParameterisation : public G4PhantomParameterisation
0054 {
0055 public:
0056
0057 G4PartialPhantomParameterisation();
0058 ~G4PartialPhantomParameterisation() override;
0059
0060 void ComputeTransformation(const G4int, G4VPhysicalVolume *) const override;
0061
0062 G4Material* ComputeMaterial(const G4int repNo,
0063 G4VPhysicalVolume *currentVol,
0064 const G4VTouchable *parentTouch = nullptr) override;
0065
0066 G4int GetReplicaNo( const G4ThreeVector& localPoint,
0067 const G4ThreeVector& localDir ) override;
0068
0069
0070
0071 G4ThreeVector GetTranslation(const G4int copyNo ) const;
0072
0073 std::size_t GetMaterialIndex( std::size_t nx, std::size_t ny, std::size_t nz) const;
0074 std::size_t GetMaterialIndex( std::size_t copyNo) const;
0075
0076 G4Material* GetMaterial( std::size_t nx, std::size_t ny, std::size_t nz) const;
0077 G4Material* GetMaterial( std::size_t copyNo ) const;
0078
0079 void SetFilledIDs( std::multimap<G4int,G4int> fid )
0080 {
0081 fFilledIDs = std::move(fid);
0082 }
0083
0084 void SetFilledMins( std::map< G4int, std::map<G4int,G4int> > fmins )
0085 {
0086 fFilledMins = std::move(fmins);
0087 }
0088
0089 void BuildContainerWalls();
0090
0091 private:
0092
0093 void ComputeVoxelIndices(const G4int copyNo, std::size_t& nx,
0094 std::size_t& ny, std::size_t& nz ) const;
0095
0096
0097 void CheckCopyNo( const G4long copyNo ) const;
0098
0099
0100 private:
0101
0102 std::multimap<G4int,G4int> fFilledIDs;
0103 std::map< G4int, std::map<G4int,G4int> > fFilledMins;
0104 };
0105
0106 #endif