G4tgrVolume.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: G4tgrVolume.hh 69803 2013-05-15 15:24:50Z gcosmo $
00028 //
00029 //
00030 // class G4tgrVolume
00031 //
00032 // Class description:
00033 //
00034 // Abstract base class to manage the geometry info of any volume.
00035 // Volumes created in this class contain the information of a detector volume.
00036 // They have associated several detector placements that can be instances of
00037 // G4tgrPlace, G4tgrPlaceDivision, G4tgrPlaceDivRep or
00038 // G4tgrPlaceParameterisation.
00039 // Each detector positioning is done inside a parent. As there can be several
00040 // parents, one parent for each volume placement will be written, even if that
00041 // means that parents are repeated...
00042 
00043 // History:
00044 // - Created.                                 P.Arce, CIEMAT (November 2007)
00045 // -------------------------------------------------------------------------
00046 
00047 #ifndef G4tgrVolume_h
00048 #define G4tgrVolume_h
00049 
00050 #include "globals.hh"
00051 
00052 #include <vector>
00053 #include <map>
00054 
00055 class G4tgrSolid;
00056 class G4tgrPlace;
00057 class G4tgrPlaceDivRep;
00058 class G4tgrPlaceParameterisation;
00059 
00060 class G4tgrVolume
00061 {
00062   public:  // with description
00063 
00064     G4tgrVolume();
00065     G4tgrVolume( const std::vector<G4String>& wl );
00066     G4tgrVolume( const G4tgrVolume& vol );
00067     virtual ~G4tgrVolume();
00068 
00069     virtual G4tgrPlace* AddPlace( const std::vector<G4String>& wl );
00070       // Add a position with the data read from a ':place' tag
00071 
00072     G4tgrPlaceDivRep* AddPlaceReplica( const std::vector<G4String>& wl );
00073       // Add a replicated position
00074 
00075     G4tgrPlaceParameterisation* AddPlaceParam(const std::vector<G4String>& wl);
00076       // Add a parameterised position
00077 
00078     void AddVisibility( const std::vector<G4String>& wl );
00079       // Add visibility flag
00080 
00081     void AddRGBColour( const std::vector<G4String>& wl );
00082       // Add colour
00083 
00084     void AddCheckOverlaps( const std::vector<G4String>& wl );
00085       // Add check overlaps flag
00086 
00087     // Accessors
00088 
00089     const G4String& GetName() const {return theName;}
00090     void SetName(const G4String& name) {theName = name;}
00091     const G4String& GetType() const {return theType;}
00092     G4tgrSolid* GetSolid() const {return theSolid;}
00093     const G4String& GetMaterialName() const {return theMaterialName;}
00094 
00095     const std::vector<G4tgrPlace*> GetPlacements() const {return thePlacements;}
00096     G4bool GetVisibility() const {return theVisibility;}
00097     G4double* GetColour() const {return theRGBColour;}
00098     G4double* GetRGBColour() const {return theRGBColour;}
00099 
00100     G4bool GetCheckOverlaps() const {return theCheckOverlaps;}
00101 
00102     virtual G4tgrVolume* GetVolume( G4int ii ) const;
00103 
00104     friend std::ostream& operator<<(std::ostream& os, const G4tgrVolume& obj);
00105 
00106   protected:   
00107 
00108     G4String theName;   
00109       // Name of the volume
00110     G4String theType;   
00111       // Type of the volume    
00112     G4String theMaterialName;   
00113       // Material of which the corresponding PV will be made of
00114     G4tgrSolid* theSolid;
00115       // Solid 
00116     std::vector<G4tgrPlace*> thePlacements;
00117       // Vector of placements 
00118 
00119     G4bool theVisibility;
00120     G4double* theRGBColour;
00121     G4bool theCheckOverlaps;
00122 };
00123 
00124 #endif

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