source: trunk/source/geometry/navigation/include/G4PartialPhantomParameterisation.hh @ 1358

Last change on this file since 1358 was 1350, checked in by garnier, 14 years ago

update to last version 4.9.4

  • Property svn:executable set to *
File size: 4.0 KB
Line 
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,v 1.2 2010/11/10 11:20:45 gcosmo Exp $
28// GEANT4 tag $Name: geant4-09-04-ref-00 $
29//
30//
31// class G4PartialPhantomParameterisation
32//
33// Class description:
34//
35// Describes partial regular parameterisations, i.e. the voxels do not
36// completely fill the container in the three dimensions
37
38// History:
39// - Created.    P. Arce, September 2010
40// *********************************************************************
41
42#ifndef G4PartialPhantomParameterisation_HH
43#define G4PartialPhantomParameterisation_HH
44
45#include <vector>
46#include <set>
47#include <map>
48
49#include "G4Types.hh"
50#include "G4PhantomParameterisation.hh"
51#include "G4AffineTransform.hh"
52
53class G4VPhysicalVolume;
54class G4VTouchable; 
55class G4VSolid;
56class G4Material;
57
58class G4PartialPhantomParameterisation : public G4PhantomParameterisation
59{
60  public:  // with description
61
62    G4PartialPhantomParameterisation();
63   ~G4PartialPhantomParameterisation();
64
65    void ComputeTransformation(const G4int, G4VPhysicalVolume *) const;
66 
67    G4Material* ComputeMaterial(const G4int repNo, 
68                                      G4VPhysicalVolume *currentVol,
69                                const G4VTouchable *parentTouch=0);
70
71    G4int GetReplicaNo( const G4ThreeVector& localPoint,
72                        const G4ThreeVector& localDir );
73      // Get the voxel number corresponding to the point in the container
74      // frame. Use 'localDir' to avoid precision problems at the surfaces.
75
76    G4ThreeVector GetTranslation(const G4int copyNo ) const;
77
78    size_t GetMaterialIndex( size_t nx, size_t ny, size_t nz) const;
79    size_t GetMaterialIndex( size_t copyNo) const;
80
81    G4Material* GetMaterial( size_t nx, size_t ny, size_t nz) const;
82    G4Material* GetMaterial( size_t copyNo ) const;
83
84    void SetFilledIDs(   std::multimap<G4int,G4int> fid ){
85      fFilledIDs = fid; 
86    }
87
88    void SetFilledMins( std::map< G4int, std::map<G4int,G4int> > fmins ) {
89      fFilledMins = fmins;
90    }
91
92    void BuildContainerWalls();
93
94  private:
95
96    void ComputeVoxelIndices(const G4int copyNo, size_t& nx,
97                                   size_t& ny, size_t& nz ) const;
98      // Convert the copyNo to voxel numbers in x, y and z.
99
100    void CheckCopyNo( const G4int copyNo ) const;
101      // Check that the copy number is within limits.
102
103  private:
104
105    std::multimap<G4int,G4int> fFilledIDs;
106    std::map< G4int, std::map<G4int,G4int> > fFilledMins;
107};
108
109#endif
Note: See TracBrowser for help on using the repository browser.