Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4PVReplica.hh
Go to the documentation of this file.
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$
28//
29//
30// class G4PVReplica
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, and the elements completely fill the containing mother
37// volume.
38//
39// G4PVReplica(const G4String& pName,
40// G4LogicalVolume *pLogical,
41// G4LogicalVolume *pMother,
42// const EAxis pAxis,
43// const G4int nReplicas,
44// const G4double width,
45// const G4double offset=0);
46//
47// Replication may occur along:
48//
49// o Cartesian axes (kXAxis,kYAxis,kZAxis)
50//
51// The replications, of specified width have coordinates of
52// form (-width*(nReplicas-1)*0.5+n*width,0,0) where n=0.. nReplicas-1
53// for the case of kXAxis, and are unrotated.
54//
55// o Radial axis (cylindrical polar) (kRho)
56//
57// The replications are cons/tubs sections, centred on the origin
58// and are unrotated.
59// They have radii of width*n+offset to width*(n+1)+offset
60// where n=0..nReplicas-1
61//
62// o Phi axis (cylindrical polar) (kPhi)
63// The replications are `phi sections' or wedges, and of cons/tubs form
64// They have phi of offset+n*width to offset+(n+1)*width where
65// n=0..nReplicas-1
66
67// History:
68// 29.07.95 P.Kent First non-stub version
69// 26.10.97 J.Apostolakis Added constructor that takes mother logical volume
70// 16.02.98 J.Apostolakis Added copy number
71// ----------------------------------------------------------------------
72#ifndef G4PVREPLICA_HH
73#define G4PVREPLICA_HH
74
75#include "G4VPhysicalVolume.hh"
76
78{
79 public: // with description
80
81 G4PVReplica(const G4String& pName,
82 G4LogicalVolume* pLogical,
83 G4LogicalVolume* pMother,
84 const EAxis pAxis,
85 const G4int nReplicas,
86 const G4double width,
87 const G4double offset=0);
88
89 public: // without description
90
91 G4PVReplica(const G4String& pName,
92 G4LogicalVolume* pLogical,
93 G4VPhysicalVolume* pMother,
94 const EAxis pAxis,
95 const G4int nReplicas,
96 const G4double width,
97 const G4double offset=0);
98
99 G4PVReplica(__void__&);
100 // Fake default constructor for usage restricted to direct object
101 // persistency for clients requiring preallocation of memory for
102 // persistifiable objects.
103
104 public: // with description
105
106 virtual ~G4PVReplica();
107
108 G4bool IsMany() const;
109 G4bool IsReplicated() const;
110
111 virtual G4int GetCopyNo() const;
112 virtual void SetCopyNo(G4int CopyNo);
113 virtual G4bool IsParameterised() const;
115 virtual G4int GetMultiplicity() const;
116 virtual void GetReplicationData(EAxis& axis,
117 G4int& nReplicas,
118 G4double& width,
119 G4double& offset,
120 G4bool& consuming) const;
121
122 virtual void SetRegularStructureId( G4int Code );
123 // This method must set a unique code for each type of regular structure.
124 // - It must be called only during detector construction.
125 // - It can also be used to prepare any corresponding special
126 // navigation 'conditions'.
127
128 G4bool IsRegularStructure() const;
130 // Accessors for specialised geometries
131
132 protected:
133
138
139 private:
140
141 void CheckAndSetParameters(const EAxis pAxis, const G4int nReplicas,
142 const G4double width, const G4double offset);
143 G4PVReplica(const G4PVReplica&);
144 const G4PVReplica& operator=(const G4PVReplica&);
145
146 private:
147
148 G4int fRegularStructureCode;
149 G4int fRegularVolsId;
150};
151
152#endif
double G4double
Definition: G4Types.hh:64
int G4int
Definition: G4Types.hh:66
bool G4bool
Definition: G4Types.hh:67
G4int GetRegularStructureId() const
Definition: G4PVReplica.cc:237
G4bool IsMany() const
Definition: G4PVReplica.cc:182
G4double fwidth
Definition: G4PVReplica.hh:136
virtual void SetCopyNo(G4int CopyNo)
Definition: G4PVReplica.cc:192
G4bool IsReplicated() const
Definition: G4PVReplica.cc:197
virtual G4int GetMultiplicity() const
Definition: G4PVReplica.cc:212
G4int fnReplicas
Definition: G4PVReplica.hh:135
G4double foffset
Definition: G4PVReplica.hh:136
virtual G4VPVParameterisation * GetParameterisation() const
Definition: G4PVReplica.cc:207
virtual void GetReplicationData(EAxis &axis, G4int &nReplicas, G4double &width, G4double &offset, G4bool &consuming) const
Definition: G4PVReplica.cc:219
virtual G4bool IsParameterised() const
Definition: G4PVReplica.cc:202
G4bool IsRegularStructure() const
Definition: G4PVReplica.cc:232
virtual G4int GetCopyNo() const
Definition: G4PVReplica.cc:187
virtual void SetRegularStructureId(G4int Code)
Definition: G4PVReplica.cc:242
virtual ~G4PVReplica()
Definition: G4PVReplica.cc:174
#define Code
Definition: deflate.h:70
EAxis
Definition: geomdefs.hh:54