|
||||
File indexing completed on 2025-01-18 09:58:59
0001 // 0002 // ******************************************************************** 0003 // * License and Disclaimer * 0004 // * * 0005 // * The Geant4 software is copyright of the Copyright Holders of * 0006 // * the Geant4 Collaboration. It is provided under the terms and * 0007 // * conditions of the Geant4 Software License, included in the file * 0008 // * LICENSE and available at http://cern.ch/geant4/license . These * 0009 // * include a list of copyright holders. * 0010 // * * 0011 // * Neither the authors of this software system, nor their employing * 0012 // * institutes,nor the agencies providing financial support for this * 0013 // * work make any representation or warranty, express or implied, * 0014 // * regarding this software system or assume any liability for its * 0015 // * use. Please see the license in the file LICENSE and URL above * 0016 // * for the full disclaimer and the limitation of liability. * 0017 // * * 0018 // * This code implementation is the result of the scientific and * 0019 // * technical work of the GEANT4 collaboration. * 0020 // * By using, copying, modifying or distributing the software (or * 0021 // * any work based on the software) you agree to acknowledge its * 0022 // * use in resulting scientific publications, and indicate your * 0023 // * acceptance of all terms of the Geant4 Software license. * 0024 // ******************************************************************** 0025 // 0026 // G4PVParameterised 0027 // 0028 // Class description: 0029 // 0030 // Represents many touchable detector elements differing in their 0031 // positioning and dimensions. Both are calculated by means 0032 // of a G4VParameterisation object. The positioning is assumed to 0033 // be dominant along a cartesian axis (specified). 0034 0035 // 29.07.95, P.Kent - first non-stub version 0036 // ---------------------------------------------------------------------- 0037 #ifndef G4PVPARAMETERISED_HH 0038 #define G4PVPARAMETERISED_HH 1 0039 0040 #include "G4PVReplica.hh" 0041 0042 class G4PVParameterised : public G4PVReplica 0043 { 0044 public: 0045 0046 G4PVParameterised(const G4String& pName, 0047 G4LogicalVolume* pLogical, 0048 G4LogicalVolume* pMotherLogical, 0049 const EAxis pAxis, 0050 const G4int nReplicas, 0051 G4VPVParameterisation* pParam, 0052 G4bool pSurfChk = false); 0053 // Replicate the volume nReplicas Times using the paramaterisation pParam, 0054 // within the mother volume pMotherLogical. 0055 // The positioning of the replicas is dominant along the specified axis. 0056 // pSurfChk if true activates check for overlaps with existing volumes. 0057 0058 G4PVParameterised(const G4String& pName, 0059 G4LogicalVolume* pLogical, 0060 G4VPhysicalVolume* pMother, 0061 const EAxis pAxis, 0062 const G4int nReplicas, 0063 G4VPVParameterisation* pParam, 0064 G4bool pSurfChk = false); 0065 // Almost exactly similar to first constructor, changing only mother 0066 // pointer's type to PhysicalVolume. 0067 0068 G4PVParameterised(__void__&); 0069 // Fake default constructor for usage restricted to direct object 0070 // persistency for clients requiring preallocation of memory for 0071 // persistifiable objects. 0072 0073 ~G4PVParameterised() override; 0074 // Virtual empty destructor. 0075 0076 G4bool IsParameterised() const override; 0077 // Returns true to identify it is a parameterised physical volume. 0078 0079 EVolume VolumeType() const final; 0080 0081 G4VPVParameterisation* GetParameterisation() const override; 0082 // Returns the current pointer to the parameterisation. 0083 0084 void GetReplicationData(EAxis& axis, 0085 G4int& nReplicas, 0086 G4double& width, 0087 G4double& offset, 0088 G4bool& consuming) const override; 0089 // Fills arguments with the attributes from the base replica. 0090 0091 void SetRegularStructureId( G4int code ) override; 0092 // Method sets code and can prepare for special type of regular volumes. 0093 0094 G4bool CheckOverlaps(G4int res = 1000, G4double tol = 0., 0095 G4bool verbose = true, G4int maxErr = 1) override; 0096 // Verifies if each instance of the parameterised volume is overlapping 0097 // with other instances or with the mother volume. Provides default 0098 // resolution for the number of points to be generated and verified. 0099 // A tolerance for the precision of the overlap check can be specified, 0100 // by default it is set to maximum precision. 0101 // Reports a maximum of overlaps errors according to parameter in input. 0102 // Returns true if an overlap occurs. 0103 0104 private: 0105 0106 G4VPVParameterisation* fparam = nullptr; 0107 }; 0108 0109 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |