source: trunk/source/geometry/divisions/include/G4PVDivision.hh@ 1042

Last change on this file since 1042 was 1010, checked in by garnier, 17 years ago

update

File size: 6.5 KB
RevLine 
[831]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//
[1010]27// $Id: G4PVDivision.hh,v 1.14 2008/12/03 16:41:45 arce Exp $
28// GEANT4 tag $Name: geant4-09-02-ref-02 $
[831]29//
30// class G4PVDivision
31//
32// Class description:
33//
34// Represents many touchable detector elements differing only in their
35// positioning. The elements' positions are calculated by means of a simple
36// linear formula.
37//
38// G4PVDivision(const G4String& pName,
39// G4LogicalVolume* pLogical,
40// G4LogicalVolume* pMother,
41// const EAxis pAxis,
42// const G4int nReplicas,
43// const G4double width,
44// const G4double offset=0)
45//
46// Division may occur along:
47//
48// o Cartesian axes (kXAxis,kYAxis,kZAxis)
49//
50// The divisions, of specified width have coordinates of
51// form (-width*(nReplicas-1)*0.5+n*width,0,0) where n=0.. nReplicas-1
52// for the case of kXAxis, and are unrotated.
53//
54// o Radial axis (cylindrical polar) (kRho)
55//
56// The divisions are cons/tubs sections, centred on the origin
57// and are unrotated.
58// They have radii of width*n+offset to width*(n+1)+offset
59// where n=0..nReplicas-1
60//
61// o Phi axis (cylindrical polar) (kPhi)
62// The divisions are `phi sections' or wedges, and of cons/tubs form
63// They have phi of offset+n*width to offset+(n+1)*width where
64// n=0..nReplicas-1
65
66// History:
67// -------
68// 09.05.01 - P.Arce, Initial version
69// ----------------------------------------------------------------------
70#ifndef G4PVDIVISION_HH
71#define G4PVDIVISION_HH
72
73#include "geomdefs.hh"
74#include "G4VPhysicalVolume.hh"
75#include "G4VDivisionParameterisation.hh"
76
77class G4LogicalVolume;
78class G4VSolid;
79
80class G4PVDivision : public G4VPhysicalVolume
81{
82 public: // with description
83
84 G4PVDivision(const G4String& pName,
85 G4LogicalVolume* pLogical,
86 G4LogicalVolume* pMother,
87 const EAxis pAxis,
88 const G4int nReplicas,
89 const G4double width,
90 const G4double offset );
91 // Constructor with number of divisions and width
92
93 G4PVDivision(const G4String& pName,
94 G4LogicalVolume* pLogical,
95 G4LogicalVolume* pMotherLogical,
96 const EAxis pAxis,
97 const G4int nReplicas,
98 const G4double offset );
99 // Constructor with number of divisions
100
101 G4PVDivision(const G4String& pName,
102 G4LogicalVolume* pLogical,
103 G4LogicalVolume* pMotherLogical,
104 const EAxis pAxis,
105 const G4double width,
106 const G4double offset );
107 // Constructor with width
108
109 public: // without description
110
111 G4PVDivision(const G4String& pName,
112 G4LogicalVolume* pLogical,
113 G4VPhysicalVolume* pMother,
114 const EAxis pAxis,
115 const G4int nReplicas,
116 const G4double width,
117 const G4double offset);
118 // Constructor in mother physical volume
119
120 public: // with description
121
122 virtual ~G4PVDivision();
123
124 virtual G4bool IsMany() const;
125 virtual G4int GetCopyNo() const;
126 virtual void SetCopyNo(G4int CopyNo);
127 virtual G4bool IsReplicated() const;
128 virtual G4VPVParameterisation* GetParameterisation() const;
129 virtual void GetReplicationData( EAxis& axis,
130 G4int& nReplicas,
131 G4double& width,
132 G4double& offset,
133 G4bool& consuming ) const;
134 EAxis GetDivisionAxis() const;
135 G4bool IsParameterised() const;
136
137 public: // without description
138
139 G4bool IsRegularStructure() const;
140 G4int GetRegularStructureId() const;
141 // Methods to identify volume that can have revised 'regular' navigation.
142 // Currently divisions do not qualify for this.
143
144 private:
145
146 void CheckAndSetParameters( const EAxis pAxis,
[1010]147 const G4int nDivs,
148 const G4double width,
[831]149 const G4double offset,
[1010]150 DivisionType divType,
[831]151 const G4LogicalVolume* pMotherLogical );
152
153 G4PVDivision(const G4PVDivision&);
154 const G4PVDivision& operator=(const G4PVDivision&);
155
156 void SetParameterisation( G4LogicalVolume* motherLogical,
157 const EAxis pAxis,
158 const G4int nReplicas,
159 const G4double width,
160 const G4double offset,
161 DivisionType divType );
162 void ErrorInAxis( EAxis axis, G4VSolid* solid );
163
164 protected:
165
166 EAxis faxis; // axis of optimisation
167 EAxis fdivAxis; // axis of division
168 G4int fnReplicas;
169 G4double fwidth,foffset;
170 G4int fcopyNo;
171 G4VDivisionParameterisation *fparam;
172};
173
174#endif
Note: See TracBrowser for help on using the repository browser.