Geant4 Cross Reference |
1 // 1 // 2 // ******************************************* 2 // ******************************************************************** 3 // * License and Disclaimer << 3 // * DISCLAIMER * 4 // * 4 // * * 5 // * The Geant4 software is copyright of th << 5 // * The following disclaimer summarizes all the specific disclaimers * 6 // * the Geant4 Collaboration. It is provided << 6 // * of contributors to this software. The specific disclaimers,which * 7 // * conditions of the Geant4 Software License << 7 // * govern, are listed with their locations in: * 8 // * LICENSE and available at http://cern.ch/ << 8 // * http://cern.ch/geant4/license * 9 // * include a list of copyright holders. << 10 // * 9 // * * 11 // * Neither the authors of this software syst 10 // * Neither the authors of this software system, nor their employing * 12 // * institutes,nor the agencies providing fin 11 // * institutes,nor the agencies providing financial support for this * 13 // * work make any representation or warran 12 // * work make any representation or warranty, express or implied, * 14 // * regarding this software system or assum 13 // * regarding this software system or assume any liability for its * 15 // * use. Please see the license in the file << 14 // * use. * 16 // * for the full disclaimer and the limitatio << 17 // * 15 // * * 18 // * This code implementation is the result << 16 // * This code implementation is the intellectual property of the * 19 // * technical work of the GEANT4 collaboratio << 17 // * GEANT4 collaboration. * 20 // * By using, copying, modifying or distri << 18 // * By copying, distributing or modifying the Program (or any work * 21 // * any work based on the software) you ag << 19 // * based on the Program) you indicate your acceptance of this * 22 // * use in resulting scientific publicati << 20 // * statement, and all its terms. * 23 // * acceptance of all terms of the Geant4 Sof << 24 // ******************************************* 21 // ******************************************************************** 25 // 22 // 26 // G4ParameterisationPolyhedra[Rho/Phi/Z] << 23 // >> 24 // $Id: G4ParameterisationPolyhedra.hh,v 1.6 2003/11/18 12:15:30 arce Exp $ >> 25 // GEANT4 tag $Name: geant4-06-00-patch-01 $ >> 26 // >> 27 // classes G4ParameterisationPolyhedraRho, >> 28 // G4ParameterisationPolyhedraPhi, >> 29 // G4ParameterisationPolyhedraZ 27 // 30 // 28 // Class description: 31 // Class description: 29 // 32 // 30 // These classes represent the parameterised p 33 // These classes represent the parameterised positioning equivalent to 31 // dividing a G4Polyhedra along one of each ax 34 // dividing a G4Polyhedra along one of each axis Rho, Phi, Z. 32 35 33 // 09.05.01 - P.Arce, Initial version << 36 // History: 34 // 08.04.04 - I.Hrivnacova, Implemented reflec << 37 // 09.05.01 - P.Arce First version 35 //-------------------------------------------- 38 //--------------------------------------------------------------------- 36 #ifndef G4PARAMETERISATIONPOLYHEDRA_HH << 39 #ifndef G4ParameterisationPolyhedra_H 37 #define G4PARAMETERISATIONPOLYHEDRA_HH 1 << 40 #define G4ParameterisationPolyhedra_H 1 38 41 39 #include "G4VDivisionParameterisation.hh" 42 #include "G4VDivisionParameterisation.hh" 40 #include "G4Polyhedra.hh" 43 #include "G4Polyhedra.hh" 41 44 42 class G4VPhysicalVolume; 45 class G4VPhysicalVolume; 43 46 44 // Dummy declarations to get rid of warnings . 47 // Dummy declarations to get rid of warnings ... 45 // << 46 class G4Trd; 48 class G4Trd; 47 class G4Trap; 49 class G4Trap; 48 class G4Cons; 50 class G4Cons; 49 class G4Sphere; 51 class G4Sphere; 50 class G4Orb; 52 class G4Orb; 51 class G4Ellipsoid; << 52 class G4Torus; 53 class G4Torus; 53 class G4Para; 54 class G4Para; 54 class G4Hype; 55 class G4Hype; 55 class G4Tubs; 56 class G4Tubs; 56 class G4Polycone; 57 class G4Polycone; 57 58 58 class G4VParameterisationPolyhedra : public G4 << 59 { << 60 public: // with description << 61 << 62 G4VParameterisationPolyhedra( EAxis axis, << 63 G4double offset, G << 64 G4VSolid* msolid, << 65 << 66 ~G4VParameterisationPolyhedra() override; << 67 << 68 private: << 69 << 70 G4double ConvertRadiusFactor(const G4Polyh << 71 // Converts radius of the sides to radiu << 72 // r_corners = r_sides/factor << 73 }; << 74 << 75 //-------------------------------------------- 59 //--------------------------------------------------------------------- 76 // Class G4ParameterisationPolyhedraRho 60 // Class G4ParameterisationPolyhedraRho 77 //-------------------------------------------- 61 //--------------------------------------------------------------------- 78 62 79 class G4ParameterisationPolyhedraRho : public << 63 class G4ParameterisationPolyhedraRho : public G4VDivisionParameterisation 80 { 64 { 81 public: // with description 65 public: // with description 82 66 83 G4ParameterisationPolyhedraRho( EAxis axis 67 G4ParameterisationPolyhedraRho( EAxis axis, G4int nCopies, 84 G4double o 68 G4double offset, G4double step, 85 G4VSolid* 69 G4VSolid* motherSolid, 86 DivisionTy 70 DivisionType divType ); 87 ~G4ParameterisationPolyhedraRho() override; << 71 virtual ~G4ParameterisationPolyhedraRho(); 88 72 89 void CheckParametersValidity() override; << 73 virtual void CheckParametersValidity(); 90 74 91 G4double GetMaxParameter() const override; << 75 virtual G4double GetMaxParameter() const; 92 76 93 void ComputeTransformation( const G4int co << 77 virtual void ComputeTransformation( const G4int copyNo, 94 G4VPhysi << 78 G4VPhysicalVolume* physVol ) const; 95 void ComputeDimensions( G4Polyhedra& phedr 79 void ComputeDimensions( G4Polyhedra& phedra, const G4int copyNo, 96 const G4VPhysicalV << 80 const G4VPhysicalVolume* physVol ) const; 97 81 98 private: // Dummy declarations to get rid o 82 private: // Dummy declarations to get rid of warnings ... 99 83 100 void ComputeDimensions (G4Trd&,const G4int 84 void ComputeDimensions (G4Trd&,const G4int, 101 const G4VPhysicalV << 85 const G4VPhysicalVolume*) const {} 102 void ComputeDimensions (G4Trap&,const G4in 86 void ComputeDimensions (G4Trap&,const G4int, 103 const G4VPhysicalV << 87 const G4VPhysicalVolume*) const {} 104 void ComputeDimensions (G4Box&,const G4int 88 void ComputeDimensions (G4Box&,const G4int, 105 const G4VPhysicalV << 89 const G4VPhysicalVolume*) const {} 106 void ComputeDimensions (G4Sphere&,const G4 90 void ComputeDimensions (G4Sphere&,const G4int, 107 const G4VPhysicalV << 91 const G4VPhysicalVolume*) const {} 108 void ComputeDimensions (G4Orb&,const G4int 92 void ComputeDimensions (G4Orb&,const G4int, 109 const G4VPhysicalV << 93 const G4VPhysicalVolume*) const {} 110 void ComputeDimensions (G4Ellipsoid&,const << 111 const G4VPhysicalV << 112 void ComputeDimensions (G4Torus&,const G4i 94 void ComputeDimensions (G4Torus&,const G4int, 113 const G4VPhysicalV << 95 const G4VPhysicalVolume*) const {} 114 void ComputeDimensions (G4Para&,const G4in 96 void ComputeDimensions (G4Para&,const G4int, 115 const G4VPhysicalV << 97 const G4VPhysicalVolume*) const {} 116 void ComputeDimensions (G4Hype&,const G4in 98 void ComputeDimensions (G4Hype&,const G4int, 117 const G4VPhysicalV << 99 const G4VPhysicalVolume*) const {} 118 void ComputeDimensions (G4Tubs&,const G4in 100 void ComputeDimensions (G4Tubs&,const G4int, 119 const G4VPhysicalV << 101 const G4VPhysicalVolume*) const {} 120 void ComputeDimensions (G4Cons&,const G4in 102 void ComputeDimensions (G4Cons&,const G4int, 121 const G4VPhysicalV << 103 const G4VPhysicalVolume*) const {} 122 void ComputeDimensions (G4Polycone&,const 104 void ComputeDimensions (G4Polycone&,const G4int, 123 const G4VPhysicalV << 105 const G4VPhysicalVolume*) const {} 124 }; 106 }; 125 107 126 //-------------------------------------------- 108 //--------------------------------------------------------------------- 127 // Class G4ParameterisationPolyhedraPhi 109 // Class G4ParameterisationPolyhedraPhi 128 //-------------------------------------------- 110 //--------------------------------------------------------------------- 129 111 130 class G4ParameterisationPolyhedraPhi : public << 112 class G4ParameterisationPolyhedraPhi : public G4VDivisionParameterisation 131 { 113 { 132 public: // with description 114 public: // with description 133 115 134 G4ParameterisationPolyhedraPhi( EAxis axis 116 G4ParameterisationPolyhedraPhi( EAxis axis, G4int nCopies, 135 G4double of 117 G4double offset, G4double step, 136 G4VSolid* m 118 G4VSolid* motherSolid, 137 DivisionTyp 119 DivisionType divType ); 138 ~G4ParameterisationPolyhedraPhi() override; << 120 virtual ~G4ParameterisationPolyhedraPhi(); 139 121 140 void CheckParametersValidity() override; << 122 virtual void CheckParametersValidity(); 141 123 142 G4double GetMaxParameter() const override; << 124 virtual G4double GetMaxParameter() const; 143 125 144 void ComputeTransformation( const G4int co << 126 virtual void ComputeTransformation( const G4int copyNo, 145 G4VPhysi << 127 G4VPhysicalVolume* physVol ) const; 146 void ComputeDimensions( G4Polyhedra& phedr 128 void ComputeDimensions( G4Polyhedra& phedra, const G4int copyNo, 147 const G4VPhysicalV << 129 const G4VPhysicalVolume* physVol ) const; 148 130 149 private: // Dummy declarations to get rid o 131 private: // Dummy declarations to get rid of warnings ... 150 132 151 void ComputeDimensions (G4Trd&,const G4int 133 void ComputeDimensions (G4Trd&,const G4int, 152 const G4VPhysicalV << 134 const G4VPhysicalVolume*) const {} 153 void ComputeDimensions (G4Trap&,const G4in 135 void ComputeDimensions (G4Trap&,const G4int, 154 const G4VPhysicalV << 136 const G4VPhysicalVolume*) const {} 155 void ComputeDimensions (G4Box&,const G4int 137 void ComputeDimensions (G4Box&,const G4int, 156 const G4VPhysicalV << 138 const G4VPhysicalVolume*) const {} 157 void ComputeDimensions (G4Sphere&,const G4 139 void ComputeDimensions (G4Sphere&,const G4int, 158 const G4VPhysicalV << 140 const G4VPhysicalVolume*) const {} 159 void ComputeDimensions (G4Orb&,const G4int 141 void ComputeDimensions (G4Orb&,const G4int, 160 const G4VPhysicalV << 142 const G4VPhysicalVolume*) const {} 161 void ComputeDimensions (G4Ellipsoid&,const << 162 const G4VPhysicalV << 163 void ComputeDimensions (G4Torus&,const G4i 143 void ComputeDimensions (G4Torus&,const G4int, 164 const G4VPhysicalV << 144 const G4VPhysicalVolume*) const {} 165 void ComputeDimensions (G4Para&,const G4in 145 void ComputeDimensions (G4Para&,const G4int, 166 const G4VPhysicalV << 146 const G4VPhysicalVolume*) const {} 167 void ComputeDimensions (G4Hype&,const G4in 147 void ComputeDimensions (G4Hype&,const G4int, 168 const G4VPhysicalV << 148 const G4VPhysicalVolume*) const {} 169 void ComputeDimensions (G4Tubs&,const G4in 149 void ComputeDimensions (G4Tubs&,const G4int, 170 const G4VPhysicalV << 150 const G4VPhysicalVolume*) const {} 171 void ComputeDimensions (G4Cons&,const G4in 151 void ComputeDimensions (G4Cons&,const G4int, 172 const G4VPhysicalV << 152 const G4VPhysicalVolume*) const {} 173 void ComputeDimensions (G4Polycone&,const 153 void ComputeDimensions (G4Polycone&,const G4int, 174 const G4VPhysicalV << 154 const G4VPhysicalVolume*) const {} 175 }; 155 }; 176 156 177 //-------------------------------------------- 157 //--------------------------------------------------------------------- 178 // Class G4ParameterisationPolyhedraZ 158 // Class G4ParameterisationPolyhedraZ 179 //-------------------------------------------- 159 //--------------------------------------------------------------------- 180 160 181 class G4ParameterisationPolyhedraZ : public G4 << 161 class G4ParameterisationPolyhedraZ : public G4VDivisionParameterisation 182 { 162 { 183 public: // with description 163 public: // with description 184 164 185 G4ParameterisationPolyhedraZ( EAxis axis, 165 G4ParameterisationPolyhedraZ( EAxis axis, G4int nCopies, 186 G4double off 166 G4double offset, G4double step, 187 G4VSolid* mo 167 G4VSolid* motherSolid, 188 DivisionType 168 DivisionType divType ); 189 ~G4ParameterisationPolyhedraZ() override; << 169 virtual ~G4ParameterisationPolyhedraZ(); 190 170 191 void CheckParametersValidity() override; << 171 virtual void CheckParametersValidity(); 192 172 193 G4double GetMaxParameter() const override; << 173 virtual G4double GetMaxParameter() const; 194 174 195 void ComputeTransformation( const G4int co << 175 virtual void ComputeTransformation( const G4int copyNo, 196 G4VPhysi << 176 G4VPhysicalVolume* physVol ) const; 197 void ComputeDimensions( G4Polyhedra& phedr 177 void ComputeDimensions( G4Polyhedra& phedra, const G4int copyNo, 198 const G4VPhysicalV << 178 const G4VPhysicalVolume* physVol ) const; 199 << 200 private: << 201 179 202 G4double GetR(G4double z, G4double z1, G4d << 180 private: // Dummy declarations to get rid of warnings ... 203 G4double z2, G4double r2) co << 204 G4double GetRmin(G4double z, G4int nsegmen << 205 G4double GetRmax(G4double z, G4int nsegmen << 206 181 207 // Dummy declarations to get rid of warnin << 208 void ComputeDimensions (G4Trd&,const G4int 182 void ComputeDimensions (G4Trd&,const G4int, 209 const G4VPhysicalV << 183 const G4VPhysicalVolume*) const {} 210 void ComputeDimensions (G4Trap&,const G4in 184 void ComputeDimensions (G4Trap&,const G4int, 211 const G4VPhysicalV << 185 const G4VPhysicalVolume*) const {} 212 void ComputeDimensions (G4Box&,const G4int 186 void ComputeDimensions (G4Box&,const G4int, 213 const G4VPhysicalV << 187 const G4VPhysicalVolume*) const {} 214 void ComputeDimensions (G4Sphere&,const G4 188 void ComputeDimensions (G4Sphere&,const G4int, 215 const G4VPhysicalV << 189 const G4VPhysicalVolume*) const {} 216 void ComputeDimensions (G4Orb&,const G4int 190 void ComputeDimensions (G4Orb&,const G4int, 217 const G4VPhysicalV << 191 const G4VPhysicalVolume*) const {} 218 void ComputeDimensions (G4Ellipsoid&,const << 219 const G4VPhysicalV << 220 void ComputeDimensions (G4Torus&,const G4i 192 void ComputeDimensions (G4Torus&,const G4int, 221 const G4VPhysicalV << 193 const G4VPhysicalVolume*) const {} 222 void ComputeDimensions (G4Para&,const G4in 194 void ComputeDimensions (G4Para&,const G4int, 223 const G4VPhysicalV << 195 const G4VPhysicalVolume*) const {} 224 void ComputeDimensions (G4Hype&,const G4in 196 void ComputeDimensions (G4Hype&,const G4int, 225 const G4VPhysicalV << 197 const G4VPhysicalVolume*) const {} 226 void ComputeDimensions (G4Tubs&,const G4in 198 void ComputeDimensions (G4Tubs&,const G4int, 227 const G4VPhysicalV << 199 const G4VPhysicalVolume*) const {} 228 void ComputeDimensions (G4Cons&,const G4in 200 void ComputeDimensions (G4Cons&,const G4int, 229 const G4VPhysicalV << 201 const G4VPhysicalVolume*) const {} 230 void ComputeDimensions (G4Polycone&,const 202 void ComputeDimensions (G4Polycone&,const G4int, 231 const G4VPhysicalV << 203 const G4VPhysicalVolume*) const {} 232 private: << 233 << 234 G4int fNSegment = 0; << 235 G4PolyhedraHistorical* fOrigParamMother = << 236 }; 204 }; 237 205 238 #endif 206 #endif 239 207