G4tgbVolume.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: G4tgbVolume.hh 69803 2013-05-15 15:24:50Z gcosmo $
00028 //
00029 //
00030 // class G4tgbVolume
00031 //
00032 // Class description:
00033 //
00034 // Class to manage the geometry info of any detector unit. The detector units
00035 // created in this class are essentially transient copies of Geant4 physical
00036 // volumes. Thus, they are characterized by a name and the parameters of a
00037 // Geant4 physical volume. 
00038 // They have associated several detector positions, that can be instances of
00039 // G4tgrPlace, G4tgrPlaceDivRep or G4tgrPlaceParameterisation.
00040 // Each detector positioning is done inside a parent. As there can be several
00041 // parents, we will write one parent for each detector position, even if that
00042 // means that parents are repeated.
00043 
00044 // History:
00045 // - Created.                                 P.Arce, CIEMAT (November 2007)
00046 // -------------------------------------------------------------------------
00047 
00048 #ifndef G4tgbVolume_h
00049 #define G4tgbVolume_h
00050 
00051 #include "globals.hh"
00052 
00053 #include <vector>
00054 #include <map>
00055 
00056 #include "G4tgrVolume.hh"
00057 #include "geomdefs.hh"
00058 
00059 class G4tgrPlace;
00060 class G4tgrSolid;
00061 class G4VSolid;
00062 class G4LogicalVolume;
00063 class G4VPhysicalVolume;
00064 class G4AssemblyVolume;
00065 
00066 class G4tgbVolume
00067 {
00068   public:  // with description
00069 
00070     G4tgbVolume();
00071    ~G4tgbVolume();
00072     G4tgbVolume( G4tgrVolume* vol);
00073 
00074     void ConstructG4Volumes( const G4tgrPlace* place,
00075                              const G4LogicalVolume* parentLV );
00076       // Construct the G4VSolid, G4LogicalVolume and the G4VPhysicalVolume
00077       // of copy 'copyNo'
00078 
00079     G4VSolid* FindOrConstructG4Solid( const G4tgrSolid* vol);
00080       // Construct the G4VSolid from the data of the corresponding G4tgrVolume. 
00081       // Allow to use data from another G4tgrVolume, needed by Boolean solids
00082       // (that have to construct two solids and then do the Boolean operation)
00083 
00084     G4LogicalVolume* ConstructG4LogVol( const G4VSolid* solid );
00085       // Construct the G4LogicalVolume and then call the construction of
00086       // volumes that are positioned inside this LV
00087 
00088     G4VPhysicalVolume* ConstructG4PhysVol( const G4tgrPlace* place,
00089                                            const G4LogicalVolume* currentLV,
00090                                            const G4LogicalVolume* parentLV );
00091       // Construct the G4VPhysicalVolume placing 'curentLV' with position
00092       // given by the G4tgrPlace 'copyNo' inside 'parentLV'
00093 
00094     void SetCutsInRange( G4LogicalVolume* logvol,
00095                          std::map<G4String,G4double> cuts );
00096     void SetCutsInEnergy( G4LogicalVolume* logvol,
00097                          std::map<G4String,G4double> cuts );
00098 
00099 
00100     void CheckNoSolidParams( const G4String& solidType,
00101                              const unsigned int NoParamExpected,
00102                              const unsigned int NoParam );
00103       // Before building a solid of type 'solydType', check if the number
00104       // of paramenters is the expected one
00105 
00106   G4VSolid* BuildSolidForDivision( G4VSolid* parentSolid, EAxis axis );
00107 
00108     const G4String& GetName() const { return theTgrVolume->GetName(); }
00109     G4bool GetVisibility() const { return theTgrVolume->GetVisibility(); }
00110     const G4double* GetColour() const { return theTgrVolume->GetColour(); }
00111 
00112   private:
00113  
00114     G4tgrVolume* theTgrVolume;
00115       // The G4tgrVolume to which it corresponds
00116 
00117     G4AssemblyVolume* theG4AssemblyVolume;
00118 };
00119 
00120 #endif 

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