00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041 #ifndef G4PartialPhantomParameterisation_HH
00042 #define G4PartialPhantomParameterisation_HH
00043
00044 #include <vector>
00045 #include <set>
00046 #include <map>
00047
00048 #include "G4Types.hh"
00049 #include "G4PhantomParameterisation.hh"
00050 #include "G4AffineTransform.hh"
00051
00052 class G4VPhysicalVolume;
00053 class G4VTouchable;
00054 class G4VSolid;
00055 class G4Material;
00056
00057 class G4PartialPhantomParameterisation : public G4PhantomParameterisation
00058 {
00059 public:
00060
00061 G4PartialPhantomParameterisation();
00062 ~G4PartialPhantomParameterisation();
00063
00064 void ComputeTransformation(const G4int, G4VPhysicalVolume *) const;
00065
00066 G4Material* ComputeMaterial(const G4int repNo,
00067 G4VPhysicalVolume *currentVol,
00068 const G4VTouchable *parentTouch=0);
00069
00070 G4int GetReplicaNo( const G4ThreeVector& localPoint,
00071 const G4ThreeVector& localDir );
00072
00073
00074
00075 G4ThreeVector GetTranslation(const G4int copyNo ) const;
00076
00077 size_t GetMaterialIndex( size_t nx, size_t ny, size_t nz) const;
00078 size_t GetMaterialIndex( size_t copyNo) const;
00079
00080 G4Material* GetMaterial( size_t nx, size_t ny, size_t nz) const;
00081 G4Material* GetMaterial( size_t copyNo ) const;
00082
00083 void SetFilledIDs( std::multimap<G4int,G4int> fid ){
00084 fFilledIDs = fid;
00085 }
00086
00087 void SetFilledMins( std::map< G4int, std::map<G4int,G4int> > fmins ) {
00088 fFilledMins = fmins;
00089 }
00090
00091 void BuildContainerWalls();
00092
00093 private:
00094
00095 void ComputeVoxelIndices(const G4int copyNo, size_t& nx,
00096 size_t& ny, size_t& nz ) const;
00097
00098
00099 void CheckCopyNo( const G4int copyNo ) const;
00100
00101
00102 private:
00103
00104 std::multimap<G4int,G4int> fFilledIDs;
00105 std::map< G4int, std::map<G4int,G4int> > fFilledMins;
00106 };
00107
00108 #endif