Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4PVParameterised.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 G4PVParameterised
31//
32// Class description:
33//
34// Represents many touchable detector elements differing in their
35// positioning and dimensions. Both are calculated by means
36// of a G4VParameterisation object. The positioning is assumed to
37// be dominant along a cartesian axis (specified).
38
39// History:
40// 29.07.95 P.Kent First non-stub version
41// ----------------------------------------------------------------------
42#ifndef G4PVPARAMETERISED_HH
43#define G4PVPARAMETERISED_HH
44
45#include "G4PVReplica.hh"
46
48{
49 public: // with description
50
51 G4PVParameterised(const G4String& pName,
52 G4LogicalVolume* pLogical,
53 G4LogicalVolume* pMotherLogical,
54 const EAxis pAxis,
55 const G4int nReplicas,
57 G4bool pSurfChk=false);
58 // Replicate the volume nReplicas Times using the paramaterisation pParam,
59 // within the mother volume pMotherLogical.
60 // The positioning of the replicas is dominant along the specified axis.
61 // pSurfChk if true activates check for overlaps with existing volumes.
62
63 public: // without description
64
65 G4PVParameterised(const G4String& pName,
66 G4LogicalVolume* pLogical,
67 G4VPhysicalVolume* pMother,
68 const EAxis pAxis,
69 const G4int nReplicas,
71 G4bool pSurfChk=false);
72 // Almost exactly similar to first constructor, changing only mother
73 // pointer's type to PhysicalVolume.
74
75 G4PVParameterised(__void__&);
76 // Fake default constructor for usage restricted to direct object
77 // persistency for clients requiring preallocation of memory for
78 // persistifiable objects.
79
80 public: // with description
81
82 virtual ~G4PVParameterised();
83 // Virtual empty destructor.
84
85 G4bool IsParameterised() const;
86 // Returns true to identify it is a parameterised physical volume.
87
89 // Returns the current pointer to the parameterisation.
90
91 void GetReplicationData(EAxis& axis,
92 G4int& nReplicas,
93 G4double& width,
94 G4double& offset,
95 G4bool& consuming) const;
96 // Fills arguments with the attributes from the base replica.
97 virtual void SetRegularStructureId( G4int Code );
98 // Method sets code and can prepare for special type of regular volumes.
99
100 G4bool CheckOverlaps(G4int res=1000, G4double tol=0., G4bool verbose=true);
101 // Verifies if each instance of the parameterised volume is overlapping
102 // with other instances or with the mother volume. Provides default
103 // resolution for the number of points to be generated and verified.
104 // A tolerance for the precision of the overlap check can be specified,
105 // by default it is set to maximum precision.
106 // Returns true if an overlap occurs.
107
108 private:
109
110 G4VPVParameterisation *fparam;
111};
112
113#endif
double G4double
Definition: G4Types.hh:64
int G4int
Definition: G4Types.hh:66
bool G4bool
Definition: G4Types.hh:67
G4bool CheckOverlaps(G4int res=1000, G4double tol=0., G4bool verbose=true)
G4bool IsParameterised() const
void GetReplicationData(EAxis &axis, G4int &nReplicas, G4double &width, G4double &offset, G4bool &consuming) const
G4VPVParameterisation * GetParameterisation() const
virtual void SetRegularStructureId(G4int Code)
#define Code
Definition: deflate.h:70
EAxis
Definition: geomdefs.hh:54