ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4tgbVolume.hh
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file G4tgbVolume.hh
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 //
28 //
29 // class G4tgbVolume
30 //
31 // Class description:
32 //
33 // Class to manage the geometry info of any detector unit. The detector units
34 // created in this class are essentially transient copies of Geant4 physical
35 // volumes. Thus, they are characterized by a name and the parameters of a
36 // Geant4 physical volume.
37 // They have associated several detector positions, that can be instances of
38 // G4tgrPlace, G4tgrPlaceDivRep or G4tgrPlaceParameterisation.
39 // Each detector positioning is done inside a parent. As there can be several
40 // parents, we will write one parent for each detector position, even if that
41 // means that parents are repeated.
42 
43 // History:
44 // - Created. P.Arce, CIEMAT (November 2007)
45 // -------------------------------------------------------------------------
46 
47 #ifndef G4tgbVolume_h
48 #define G4tgbVolume_h
49 
50 #include "globals.hh"
51 
52 #include <vector>
53 #include <map>
54 
55 #include "G4tgrVolume.hh"
56 #include "geomdefs.hh"
57 
58 class G4tgrPlace;
59 class G4tgrSolid;
60 class G4VSolid;
61 class G4LogicalVolume;
62 class G4VPhysicalVolume;
63 class G4AssemblyVolume;
64 
66 {
67  public: // with description
68 
69  G4tgbVolume();
70  ~G4tgbVolume();
71  G4tgbVolume( G4tgrVolume* vol);
72 
73  void ConstructG4Volumes( const G4tgrPlace* place,
74  const G4LogicalVolume* parentLV );
75  // Construct the G4VSolid, G4LogicalVolume and the G4VPhysicalVolume
76  // of copy 'copyNo'
77 
79  // Construct the G4VSolid from the data of the corresponding G4tgrVolume.
80  // Allow to use data from another G4tgrVolume, needed by Boolean solids
81  // (that have to construct two solids and then do the Boolean operation)
82 
84  // Construct the G4LogicalVolume and then call the construction of
85  // volumes that are positioned inside this LV
86 
88  const G4LogicalVolume* currentLV,
89  const G4LogicalVolume* parentLV );
90  // Construct the G4VPhysicalVolume placing 'curentLV' with position
91  // given by the G4tgrPlace 'copyNo' inside 'parentLV'
92 
93  void SetCutsInRange( G4LogicalVolume* logvol,
94  std::map<G4String,G4double> cuts );
95  void SetCutsInEnergy( G4LogicalVolume* logvol,
96  std::map<G4String,G4double> cuts );
97 
98 
99  void CheckNoSolidParams( const G4String& solidType,
100  const unsigned int NoParamExpected,
101  const unsigned int NoParam );
102  // Before building a solid of type 'solydType', check if the number
103  // of paramenters is the expected one
104 
105  G4VSolid* BuildSolidForDivision( G4VSolid* parentSolid, EAxis axis );
106 
107  const G4String& GetName() const { return theTgrVolume->GetName(); }
109  const G4double* GetColour() const { return theTgrVolume->GetColour(); }
110 
111  private:
112 
114  // The G4tgrVolume to which it corresponds
115 
117 };
118 
119 #endif