Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4PartialPhantomParameterisation.hh
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 //
27 // $Id: G4PartialPhantomParameterisation.hh 66356 2012-12-18 09:02:32Z gcosmo $
28 //
29 //
30 // class G4PartialPhantomParameterisation
31 //
32 // Class description:
33 //
34 // Describes partial regular parameterisations, i.e. the voxels do not
35 // completely fill the container in the three dimensions
36 
37 // History:
38 // - Created. P. Arce, September 2010
39 // *********************************************************************
40 
41 #ifndef G4PartialPhantomParameterisation_HH
42 #define G4PartialPhantomParameterisation_HH
43 
44 #include <vector>
45 #include <set>
46 #include <map>
47 
48 #include "G4Types.hh"
50 #include "G4AffineTransform.hh"
51 
52 class G4VPhysicalVolume;
53 class G4VTouchable;
54 class G4VSolid;
55 class G4Material;
56 
58 {
59  public: // with description
60 
63 
64  void ComputeTransformation(const G4int, G4VPhysicalVolume *) const;
65 
66  G4Material* ComputeMaterial(const G4int repNo,
67  G4VPhysicalVolume *currentVol,
68  const G4VTouchable *parentTouch=0);
69 
70  G4int GetReplicaNo( const G4ThreeVector& localPoint,
71  const G4ThreeVector& localDir );
72  // Get the voxel number corresponding to the point in the container
73  // frame. Use 'localDir' to avoid precision problems at the surfaces.
74 
75  G4ThreeVector GetTranslation(const G4int copyNo ) const;
76 
77  size_t GetMaterialIndex( size_t nx, size_t ny, size_t nz) const;
78  size_t GetMaterialIndex( size_t copyNo) const;
79 
80  G4Material* GetMaterial( size_t nx, size_t ny, size_t nz) const;
81  G4Material* GetMaterial( size_t copyNo ) const;
82 
83  void SetFilledIDs( std::multimap<G4int,G4int> fid ){
84  fFilledIDs = fid;
85  }
86 
87  void SetFilledMins( std::map< G4int, std::map<G4int,G4int> > fmins ) {
88  fFilledMins = fmins;
89  }
90 
91  void BuildContainerWalls();
92 
93  private:
94 
95  void ComputeVoxelIndices(const G4int copyNo, size_t& nx,
96  size_t& ny, size_t& nz ) const;
97  // Convert the copyNo to voxel numbers in x, y and z.
98 
99  void CheckCopyNo( const G4int copyNo ) const;
100  // Check that the copy number is within limits.
101 
102  private:
103 
104  std::multimap<G4int,G4int> fFilledIDs;
105  std::map< G4int, std::map<G4int,G4int> > fFilledMins;
106 };
107 
108 #endif
void ComputeTransformation(const G4int, G4VPhysicalVolume *) const
int G4int
Definition: G4Types.hh:78
void SetFilledIDs(std::multimap< G4int, G4int > fid)
G4int GetReplicaNo(const G4ThreeVector &localPoint, const G4ThreeVector &localDir)
void SetFilledMins(std::map< G4int, std::map< G4int, G4int > > fmins)
size_t GetMaterialIndex(size_t nx, size_t ny, size_t nz) const
G4Material * GetMaterial(size_t nx, size_t ny, size_t nz) const
G4ThreeVector GetTranslation(const G4int copyNo) const
G4Material * ComputeMaterial(const G4int repNo, G4VPhysicalVolume *currentVol, const G4VTouchable *parentTouch=0)