|
||||
File indexing completed on 2025-01-18 09:59:10
0001 // 0002 // ******************************************************************** 0003 // * License and Disclaimer * 0004 // * * 0005 // * The Geant4 software is copyright of the Copyright Holders of * 0006 // * the Geant4 Collaboration. It is provided under the terms and * 0007 // * conditions of the Geant4 Software License, included in the file * 0008 // * LICENSE and available at http://cern.ch/geant4/license . These * 0009 // * include a list of copyright holders. * 0010 // * * 0011 // * Neither the authors of this software system, nor their employing * 0012 // * institutes,nor the agencies providing financial support for this * 0013 // * work make any representation or warranty, express or implied, * 0014 // * regarding this software system or assume any liability for its * 0015 // * use. Please see the license in the file LICENSE and URL above * 0016 // * for the full disclaimer and the limitation of liability. * 0017 // * * 0018 // * This code implementation is the result of the scientific and * 0019 // * technical work of the GEANT4 collaboration. * 0020 // * By using, copying, modifying or distributing the software (or * 0021 // * any work based on the software) you agree to acknowledge its * 0022 // * use in resulting scientific publications, and indicate your * 0023 // * acceptance of all terms of the Geant4 Software license. * 0024 // ******************************************************************** 0025 // 0026 // G4tgrVolume 0027 // 0028 // Class description: 0029 // 0030 // Abstract base class to manage the geometry info of any volume. 0031 // Volumes created in this class contain the information of a detector volume. 0032 // They have associated several detector placements that can be instances of 0033 // G4tgrPlace, G4tgrPlaceDivision, G4tgrPlaceDivRep or 0034 // G4tgrPlaceParameterisation. 0035 // Each detector positioning is done inside a parent. As there can be several 0036 // parents, one parent for each volume placement will be written, even if that 0037 // means that parents are repeated... 0038 0039 // Author: P.Arce, CIEMAT (November 2007) 0040 // -------------------------------------------------------------------- 0041 #ifndef G4tgrVolume_hh 0042 #define G4tgrVolume_hh 1 0043 0044 #include <vector> 0045 #include <map> 0046 0047 #include "globals.hh" 0048 0049 class G4tgrSolid; 0050 class G4tgrPlace; 0051 class G4tgrPlaceDivRep; 0052 class G4tgrPlaceParameterisation; 0053 0054 class G4tgrVolume 0055 { 0056 public: 0057 0058 G4tgrVolume(); 0059 G4tgrVolume(const std::vector<G4String>& wl); 0060 G4tgrVolume(const G4tgrVolume& vol); 0061 virtual ~G4tgrVolume(); 0062 0063 virtual G4tgrPlace* AddPlace(const std::vector<G4String>& wl); 0064 // Add a position with the data read from a ':place' tag 0065 0066 G4tgrPlaceDivRep* AddPlaceReplica(const std::vector<G4String>& wl); 0067 // Add a replicated position 0068 0069 G4tgrPlaceParameterisation* AddPlaceParam(const std::vector<G4String>& wl); 0070 // Add a parameterised position 0071 0072 void AddVisibility(const std::vector<G4String>& wl); 0073 // Add visibility flag 0074 0075 void AddRGBColour(const std::vector<G4String>& wl); 0076 // Add colour 0077 0078 void AddCheckOverlaps(const std::vector<G4String>& wl); 0079 // Add check overlaps flag 0080 0081 // Accessors 0082 0083 const G4String& GetName() const { return theName; } 0084 void SetName(const G4String& name) { theName = name; } 0085 const G4String& GetType() const { return theType; } 0086 G4tgrSolid* GetSolid() const { return theSolid; } 0087 const G4String& GetMaterialName() const { return theMaterialName; } 0088 0089 const std::vector<G4tgrPlace*> GetPlacements() const {return thePlacements;} 0090 G4bool GetVisibility() const { return theVisibility; } 0091 G4double* GetColour() const { return theRGBColour; } 0092 G4double* GetRGBColour() const { return theRGBColour; } 0093 0094 G4bool GetCheckOverlaps() const { return theCheckOverlaps; } 0095 0096 virtual G4tgrVolume* GetVolume(G4int ii) const; 0097 0098 friend std::ostream& operator<<(std::ostream& os, const G4tgrVolume& obj); 0099 0100 protected: 0101 0102 G4String theName = ""; 0103 // Name of the volume 0104 G4String theType = ""; 0105 // Type of the volume 0106 G4String theMaterialName = ""; 0107 // Material of which the corresponding PV will be made of 0108 G4tgrSolid* theSolid = nullptr; 0109 // Solid 0110 std::vector<G4tgrPlace*> thePlacements; 0111 // Vector of placements 0112 0113 G4bool theVisibility = false; 0114 G4double* theRGBColour = nullptr; 0115 G4bool theCheckOverlaps = false; 0116 }; 0117 0118 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |