File indexing completed on 2025-01-18 09:59:02
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050
0051
0052
0053
0054
0055
0056 #ifndef G4REPLICATEDSLICE_HH
0057 #define G4REPLICATEDSLICE_HH 1
0058
0059 #include "geomdefs.hh"
0060 #include "G4PVReplica.hh"
0061 #include "G4VDivisionParameterisation.hh"
0062
0063 class G4LogicalVolume;
0064 class G4VSolid;
0065
0066 class G4ReplicatedSlice : public G4PVReplica
0067 {
0068 public:
0069
0070 G4ReplicatedSlice(const G4String& pName,
0071 G4LogicalVolume* pLogical,
0072 G4LogicalVolume* pMotherLogical,
0073 const EAxis pAxis,
0074 const G4int nReplicas,
0075 const G4double width,
0076 const G4double half_gap,
0077 const G4double offset );
0078
0079
0080 G4ReplicatedSlice(const G4String& pName,
0081 G4LogicalVolume* pLogical,
0082 G4LogicalVolume* pMotherLogical,
0083 const EAxis pAxis,
0084 const G4int nReplicas,
0085 const G4double half_gap,
0086 const G4double offset );
0087
0088
0089 G4ReplicatedSlice(const G4String& pName,
0090 G4LogicalVolume* pLogical,
0091 G4LogicalVolume* pMotherLogical,
0092 const EAxis pAxis,
0093 const G4double width,
0094 const G4double half_gap,
0095 const G4double offset );
0096
0097
0098 G4ReplicatedSlice(const G4String& pName,
0099 G4LogicalVolume* pLogical,
0100 G4VPhysicalVolume* pMotherPhysical,
0101 const EAxis pAxis,
0102 const G4int nReplicas,
0103 const G4double width,
0104 const G4double half_gap,
0105 const G4double offset);
0106
0107
0108 G4ReplicatedSlice(const G4String& pName,
0109 G4LogicalVolume* pLogical,
0110 G4VPhysicalVolume* pMotherPhysical,
0111 const EAxis pAxis,
0112 const G4int nReplicas,
0113 const G4double half_gap,
0114 const G4double offset );
0115
0116
0117 G4ReplicatedSlice(const G4String& pName,
0118 G4LogicalVolume* pLogical,
0119 G4VPhysicalVolume* pMotherPhysical,
0120 const EAxis pAxis,
0121 const G4double width,
0122 const G4double half_gap,
0123 const G4double offset );
0124
0125
0126 ~G4ReplicatedSlice() override;
0127
0128 G4ReplicatedSlice(const G4ReplicatedSlice&) = delete;
0129 G4ReplicatedSlice& operator=(const G4ReplicatedSlice&) = delete;
0130
0131 G4bool IsMany() const override;
0132 G4bool IsReplicated() const override;
0133 G4int GetMultiplicity() const override;
0134 G4VPVParameterisation* GetParameterisation() const override;
0135 void GetReplicationData( EAxis& axis,
0136 G4int& nReplicas,
0137 G4double& width,
0138 G4double& offset,
0139 G4bool& consuming ) const override;
0140 EAxis GetDivisionAxis() const;
0141 G4bool IsParameterised() const override;
0142
0143 EVolume VolumeType() const final;
0144
0145
0146 G4bool IsRegularStructure() const override;
0147 G4int GetRegularStructureId() const override;
0148
0149
0150
0151 private:
0152
0153 void CheckAndSetParameters( const EAxis pAxis,
0154 const G4int nDivs,
0155 const G4double width,
0156 const G4double half_gap,
0157 const G4double offset,
0158 DivisionType divType,
0159 G4LogicalVolume* pMotherLogical,
0160 const G4LogicalVolume* pLogical );
0161
0162 void SetParameterisation( G4LogicalVolume* motherLogical,
0163 const EAxis pAxis,
0164 const G4int nReplicas,
0165 const G4double width,
0166 const G4double half_gap,
0167 const G4double offset,
0168 DivisionType divType );
0169
0170 void ErrorInAxis( EAxis axis, G4VSolid* solid );
0171
0172 protected:
0173
0174 EAxis faxis;
0175 EAxis fdivAxis;
0176 G4int fnReplicas = 0;
0177 G4double fwidth = 0.0, foffset = 0.0;
0178 G4VDivisionParameterisation* fparam = nullptr;
0179 };
0180
0181 #endif