source: trunk/source/persistency/ascii/include/G4tgbVolume.hh @ 1347

Last change on this file since 1347 was 1347, checked in by garnier, 13 years ago

geant4 tag 9.4

File size: 4.9 KB
Line 
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// $Id: G4tgbVolume.hh,v 1.6 2010/10/13 07:56:55 gcosmo Exp $
28// GEANT4 tag $Name: geant4-09-04-ref-00 $
29//
30//
31// class G4tgbVolume
32//
33// Class description:
34//
35// Class to manage the geometry info of any detector unit. The detector units
36// created in this class are essentially transient copies of Geant4 physical
37// volumes. Thus, they are characterized by a name and the parameters of a
38// Geant4 physical volume.
39// They have associated several detector positions, that can be instances of
40// G4tgrPlace, G4tgrPlaceDivRep or G4tgrPlaceParameterisation.
41// Each detector positioning is done inside a parent. As there can be several
42// parents, we will write one parent for each detector position, even if that
43// means that parents are repeated.
44
45// History:
46// - Created.                                 P.Arce, CIEMAT (November 2007)
47// -------------------------------------------------------------------------
48
49#ifndef G4tgbVolume_h
50#define G4tgbVolume_h
51
52#include "globals.hh"
53
54#include <vector>
55#include <map>
56
57#include "G4tgrVolume.hh"
58#include "geomdefs.hh"
59
60class G4tgrPlace;
61class G4tgrSolid;
62class G4VSolid;
63class G4LogicalVolume;
64class G4VPhysicalVolume;
65class G4AssemblyVolume;
66
67class G4tgbVolume
68{
69  public:  // with description
70
71    G4tgbVolume();
72   ~G4tgbVolume();
73    G4tgbVolume( G4tgrVolume* vol);
74
75    void ConstructG4Volumes( const G4tgrPlace* place,
76                             const G4LogicalVolume* parentLV );
77      // Construct the G4VSolid, G4LogicalVolume and the G4VPhysicalVolume
78      // of copy 'copyNo'
79
80    G4VSolid* FindOrConstructG4Solid( const G4tgrSolid* vol);
81      // Construct the G4VSolid from the data of the corresponding G4tgrVolume.
82      // Allow to use data from another G4tgrVolume, needed by Boolean solids
83      // (that have to construct two solids and then do the Boolean operation)
84
85    G4LogicalVolume* ConstructG4LogVol( const G4VSolid* solid );
86      // Construct the G4LogicalVolume and then call the construction of
87      // volumes that are positioned inside this LV
88
89    G4VPhysicalVolume* ConstructG4PhysVol( const G4tgrPlace* place,
90                                           const G4LogicalVolume* currentLV,
91                                           const G4LogicalVolume* parentLV );
92      // Construct the G4VPhysicalVolume placing 'curentLV' with position
93      // given by the G4tgrPlace 'copyNo' inside 'parentLV'
94
95    void SetCutsInRange( G4LogicalVolume* logvol,
96                         std::map<G4String,G4double> cuts );
97    void SetCutsInEnergy( G4LogicalVolume* logvol,
98                         std::map<G4String,G4double> cuts );
99
100
101    void CheckNoSolidParams( const G4String& solidType,
102                             const unsigned int NoParamExpected,
103                             const unsigned int NoParam );
104      // Before building a solid of type 'solydType', check if the number
105      // of paramenters is the expected one
106
107  G4VSolid* BuildSolidForDivision( G4VSolid* parentSolid, EAxis axis );
108
109    const G4String& GetName() const { return theTgrVolume->GetName(); }
110    G4bool GetVisibility() const { return theTgrVolume->GetVisibility(); }
111    const G4double* GetColour() const { return theTgrVolume->GetColour(); }
112
113  private:
114 
115    G4tgrVolume* theTgrVolume;
116      // The G4tgrVolume to which it corresponds
117
118    G4AssemblyVolume* theG4AssemblyVolume;
119};
120
121#endif
Note: See TracBrowser for help on using the repository browser.