G4PartialPhantomParameterisation.hh

Go to the documentation of this file.
00001 //
00002 // ********************************************************************
00003 // * License and Disclaimer                                           *
00004 // *                                                                  *
00005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
00006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
00007 // * conditions of the Geant4 Software License,  included in the file *
00008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
00009 // * include a list of copyright holders.                             *
00010 // *                                                                  *
00011 // * Neither the authors of this software system, nor their employing *
00012 // * institutes,nor the agencies providing financial support for this *
00013 // * work  make  any representation or  warranty, express or implied, *
00014 // * regarding  this  software system or assume any liability for its *
00015 // * use.  Please see the license in the file  LICENSE  and URL above *
00016 // * for the full disclaimer and the limitation of liability.         *
00017 // *                                                                  *
00018 // * This  code  implementation is the result of  the  scientific and *
00019 // * technical work of the GEANT4 collaboration.                      *
00020 // * By using,  copying,  modifying or  distributing the software (or *
00021 // * any work based  on the software)  you  agree  to acknowledge its *
00022 // * use  in  resulting  scientific  publications,  and indicate your *
00023 // * acceptance of all terms of the Geant4 Software license.          *
00024 // ********************************************************************
00025 //
00026 //
00027 // $Id$
00028 //
00029 //
00030 // class G4PartialPhantomParameterisation
00031 //
00032 // Class description:
00033 // 
00034 // Describes partial regular parameterisations, i.e. the voxels do not 
00035 // completely fill the container in the three dimensions
00036 
00037 // History:
00038 // - Created.    P. Arce, September 2010
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:  // with description
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       // Get the voxel number corresponding to the point in the container
00073       // frame. Use 'localDir' to avoid precision problems at the surfaces.
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       // Convert the copyNo to voxel numbers in x, y and z.
00098 
00099     void CheckCopyNo( const G4int copyNo ) const;
00100       // Check that the copy number is within limits.
00101 
00102   private:
00103 
00104     std::multimap<G4int,G4int> fFilledIDs;
00105     std::map< G4int, std::map<G4int,G4int> > fFilledMins;
00106 };
00107 
00108 #endif

Generated on Mon May 27 17:49:15 2013 for Geant4 by  doxygen 1.4.7