source: trunk/source/geometry/volumes/include/G4PVParameterised.hh@ 1010

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

geant4.8.2 beta

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