File indexing completed on 2025-01-18 09:58:50
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 #ifndef G4PARAMETERISATIONPOLYHEDRA_HH
0037 #define G4PARAMETERISATIONPOLYHEDRA_HH 1
0038
0039 #include "G4VDivisionParameterisation.hh"
0040 #include "G4Polyhedra.hh"
0041
0042 class G4VPhysicalVolume;
0043
0044
0045
0046 class G4Trd;
0047 class G4Trap;
0048 class G4Cons;
0049 class G4Sphere;
0050 class G4Orb;
0051 class G4Ellipsoid;
0052 class G4Torus;
0053 class G4Para;
0054 class G4Hype;
0055 class G4Tubs;
0056 class G4Polycone;
0057
0058 class G4VParameterisationPolyhedra : public G4VDivisionParameterisation
0059 {
0060 public:
0061
0062 G4VParameterisationPolyhedra( EAxis axis, G4int nCopies,
0063 G4double offset, G4double step,
0064 G4VSolid* msolid, DivisionType divType );
0065
0066 ~G4VParameterisationPolyhedra() override;
0067
0068 private:
0069
0070 G4double ConvertRadiusFactor(const G4Polyhedra& phedra) const;
0071
0072
0073 };
0074
0075
0076
0077
0078
0079 class G4ParameterisationPolyhedraRho : public G4VParameterisationPolyhedra
0080 {
0081 public:
0082
0083 G4ParameterisationPolyhedraRho( EAxis axis, G4int nCopies,
0084 G4double offset, G4double step,
0085 G4VSolid* motherSolid,
0086 DivisionType divType );
0087 ~G4ParameterisationPolyhedraRho() override;
0088
0089 void CheckParametersValidity() override;
0090
0091 G4double GetMaxParameter() const override;
0092
0093 void ComputeTransformation( const G4int copyNo,
0094 G4VPhysicalVolume* physVol ) const override;
0095 void ComputeDimensions( G4Polyhedra& phedra, const G4int copyNo,
0096 const G4VPhysicalVolume* physVol ) const override;
0097
0098 private:
0099
0100 void ComputeDimensions (G4Trd&,const G4int,
0101 const G4VPhysicalVolume*) const override {}
0102 void ComputeDimensions (G4Trap&,const G4int,
0103 const G4VPhysicalVolume*) const override {}
0104 void ComputeDimensions (G4Box&,const G4int,
0105 const G4VPhysicalVolume*) const override {}
0106 void ComputeDimensions (G4Sphere&,const G4int,
0107 const G4VPhysicalVolume*) const override {}
0108 void ComputeDimensions (G4Orb&,const G4int,
0109 const G4VPhysicalVolume*) const override {}
0110 void ComputeDimensions (G4Ellipsoid&,const G4int,
0111 const G4VPhysicalVolume*) const override {}
0112 void ComputeDimensions (G4Torus&,const G4int,
0113 const G4VPhysicalVolume*) const override {}
0114 void ComputeDimensions (G4Para&,const G4int,
0115 const G4VPhysicalVolume*) const override {}
0116 void ComputeDimensions (G4Hype&,const G4int,
0117 const G4VPhysicalVolume*) const override {}
0118 void ComputeDimensions (G4Tubs&,const G4int,
0119 const G4VPhysicalVolume*) const override {}
0120 void ComputeDimensions (G4Cons&,const G4int,
0121 const G4VPhysicalVolume*) const override {}
0122 void ComputeDimensions (G4Polycone&,const G4int,
0123 const G4VPhysicalVolume*) const override {}
0124 };
0125
0126
0127
0128
0129
0130 class G4ParameterisationPolyhedraPhi : public G4VParameterisationPolyhedra
0131 {
0132 public:
0133
0134 G4ParameterisationPolyhedraPhi( EAxis axis, G4int nCopies,
0135 G4double offset, G4double step,
0136 G4VSolid* motherSolid,
0137 DivisionType divType );
0138 ~G4ParameterisationPolyhedraPhi() override;
0139
0140 void CheckParametersValidity() override;
0141
0142 G4double GetMaxParameter() const override;
0143
0144 void ComputeTransformation( const G4int copyNo,
0145 G4VPhysicalVolume* physVol ) const override;
0146 void ComputeDimensions( G4Polyhedra& phedra, const G4int copyNo,
0147 const G4VPhysicalVolume* physVol ) const override;
0148
0149 private:
0150
0151 void ComputeDimensions (G4Trd&,const G4int,
0152 const G4VPhysicalVolume*) const override {}
0153 void ComputeDimensions (G4Trap&,const G4int,
0154 const G4VPhysicalVolume*) const override {}
0155 void ComputeDimensions (G4Box&,const G4int,
0156 const G4VPhysicalVolume*) const override {}
0157 void ComputeDimensions (G4Sphere&,const G4int,
0158 const G4VPhysicalVolume*) const override {}
0159 void ComputeDimensions (G4Orb&,const G4int,
0160 const G4VPhysicalVolume*) const override {}
0161 void ComputeDimensions (G4Ellipsoid&,const G4int,
0162 const G4VPhysicalVolume*) const override {}
0163 void ComputeDimensions (G4Torus&,const G4int,
0164 const G4VPhysicalVolume*) const override {}
0165 void ComputeDimensions (G4Para&,const G4int,
0166 const G4VPhysicalVolume*) const override {}
0167 void ComputeDimensions (G4Hype&,const G4int,
0168 const G4VPhysicalVolume*) const override {}
0169 void ComputeDimensions (G4Tubs&,const G4int,
0170 const G4VPhysicalVolume*) const override {}
0171 void ComputeDimensions (G4Cons&,const G4int,
0172 const G4VPhysicalVolume*) const override {}
0173 void ComputeDimensions (G4Polycone&,const G4int,
0174 const G4VPhysicalVolume*) const override {}
0175 };
0176
0177
0178
0179
0180
0181 class G4ParameterisationPolyhedraZ : public G4VParameterisationPolyhedra
0182 {
0183 public:
0184
0185 G4ParameterisationPolyhedraZ( EAxis axis, G4int nCopies,
0186 G4double offset, G4double step,
0187 G4VSolid* motherSolid,
0188 DivisionType divType );
0189 ~G4ParameterisationPolyhedraZ() override;
0190
0191 void CheckParametersValidity() override;
0192
0193 G4double GetMaxParameter() const override;
0194
0195 void ComputeTransformation( const G4int copyNo,
0196 G4VPhysicalVolume* physVol ) const override;
0197 void ComputeDimensions( G4Polyhedra& phedra, const G4int copyNo,
0198 const G4VPhysicalVolume* physVol ) const override;
0199
0200 private:
0201
0202 G4double GetR(G4double z, G4double z1, G4double r1,
0203 G4double z2, G4double r2) const;
0204 G4double GetRmin(G4double z, G4int nsegment) const;
0205 G4double GetRmax(G4double z, G4int nsegment) const;
0206
0207
0208 void ComputeDimensions (G4Trd&,const G4int,
0209 const G4VPhysicalVolume*) const override {}
0210 void ComputeDimensions (G4Trap&,const G4int,
0211 const G4VPhysicalVolume*) const override {}
0212 void ComputeDimensions (G4Box&,const G4int,
0213 const G4VPhysicalVolume*) const override {}
0214 void ComputeDimensions (G4Sphere&,const G4int,
0215 const G4VPhysicalVolume*) const override {}
0216 void ComputeDimensions (G4Orb&,const G4int,
0217 const G4VPhysicalVolume*) const override {}
0218 void ComputeDimensions (G4Ellipsoid&,const G4int,
0219 const G4VPhysicalVolume*) const override {}
0220 void ComputeDimensions (G4Torus&,const G4int,
0221 const G4VPhysicalVolume*) const override {}
0222 void ComputeDimensions (G4Para&,const G4int,
0223 const G4VPhysicalVolume*) const override {}
0224 void ComputeDimensions (G4Hype&,const G4int,
0225 const G4VPhysicalVolume*) const override {}
0226 void ComputeDimensions (G4Tubs&,const G4int,
0227 const G4VPhysicalVolume*) const override {}
0228 void ComputeDimensions (G4Cons&,const G4int,
0229 const G4VPhysicalVolume*) const override {}
0230 void ComputeDimensions (G4Polycone&,const G4int,
0231 const G4VPhysicalVolume*) const override {}
0232 private:
0233
0234 G4int fNSegment = 0;
0235 G4PolyhedraHistorical* fOrigParamMother = nullptr;
0236 };
0237
0238 #endif