G4ParameterisationPolyhedra.hh

Go to the documentation of this file.
00001 //
00002 // ********************************************************************
00003 // * License and Disclaimer                                           *
00004 // *                                                                  *
00005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
00006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
00007 // * conditions of the Geant4 Software License,  included in the file *
00008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
00009 // * include a list of copyright holders.                             *
00010 // *                                                                  *
00011 // * Neither the authors of this software system, nor their employing *
00012 // * institutes,nor the agencies providing financial support for this *
00013 // * work  make  any representation or  warranty, express or implied, *
00014 // * regarding  this  software system or assume any liability for its *
00015 // * use.  Please see the license in the file  LICENSE  and URL above *
00016 // * for the full disclaimer and the limitation of liability.         *
00017 // *                                                                  *
00018 // * This  code  implementation is the result of  the  scientific and *
00019 // * technical work of the GEANT4 collaboration.                      *
00020 // * By using,  copying,  modifying or  distributing the software (or *
00021 // * any work based  on the software)  you  agree  to acknowledge its *
00022 // * use  in  resulting  scientific  publications,  and indicate your *
00023 // * acceptance of all terms of the Geant4 Software license.          *
00024 // ********************************************************************
00025 //
00026 //
00027 // $Id: G4ParameterisationPolyhedra.hh 69784 2013-05-15 09:16:06Z gcosmo $
00028 // 
00029 // classes G4ParameterisationPolyhedraRho,
00030 //         G4ParameterisationPolyhedraPhi,
00031 //         G4ParameterisationPolyhedraZ
00032 //
00033 // Class description:
00034 //
00035 // These classes represent the parameterised positioning equivalent to 
00036 // dividing a G4Polyhedra along one of each axis Rho, Phi, Z.
00037 
00038 // History:
00039 // -------
00040 // 09.05.01 - P.Arce, Initial version
00041 // 08.04.04 - I.Hrivnacova, Implemented reflection
00042 //---------------------------------------------------------------------
00043 #ifndef G4ParameterisationPolyhedra_H
00044 #define G4ParameterisationPolyhedra_H 1
00045 
00046 #include "G4VDivisionParameterisation.hh"
00047 #include "G4Polyhedra.hh"
00048 
00049 class G4VPhysicalVolume;
00050 
00051 // Dummy declarations to get rid of warnings ...
00052 //
00053 class G4Trd;
00054 class G4Trap;
00055 class G4Cons;
00056 class G4Sphere;
00057 class G4Orb;
00058 class G4Torus;
00059 class G4Para;
00060 class G4Hype;
00061 class G4Tubs;
00062 class G4Polycone;
00063 
00064 class G4VParameterisationPolyhedra : public G4VDivisionParameterisation
00065 { 
00066   public:  // with description
00067   
00068     G4VParameterisationPolyhedra( EAxis axis, G4int nCopies,
00069                             G4double offset, G4double step,
00070                             G4VSolid* msolid, DivisionType divType );
00071   
00072     virtual ~G4VParameterisationPolyhedra();
00073 
00074   private:
00075 
00076     G4double ConvertRadiusFactor(const G4Polyhedra& phedra) const;
00077       // Converts radius of the sides to radius of the corners:
00078       // r_corners = r_sides/factor
00079 };
00080 
00081 //---------------------------------------------------------------------
00082 // Class G4ParameterisationPolyhedraRho
00083 //---------------------------------------------------------------------
00084 
00085 class G4ParameterisationPolyhedraRho : public G4VParameterisationPolyhedra
00086 { 
00087   public:  // with description
00088 
00089     G4ParameterisationPolyhedraRho( EAxis axis, G4int nCopies,
00090                                     G4double offset, G4double step,
00091                                     G4VSolid* motherSolid,
00092                                     DivisionType divType );
00093    ~G4ParameterisationPolyhedraRho();
00094 
00095     void CheckParametersValidity();
00096 
00097     G4double GetMaxParameter() const;
00098 
00099     void ComputeTransformation( const G4int copyNo,
00100                                       G4VPhysicalVolume* physVol ) const;
00101     void ComputeDimensions( G4Polyhedra& phedra, const G4int copyNo,
00102                             const G4VPhysicalVolume* physVol ) const;
00103 
00104   private:  // Dummy declarations to get rid of warnings ...
00105 
00106     void ComputeDimensions (G4Trd&,const G4int,
00107                             const G4VPhysicalVolume*) const {}
00108     void ComputeDimensions (G4Trap&,const G4int,
00109                             const G4VPhysicalVolume*) const {}
00110     void ComputeDimensions (G4Box&,const G4int,
00111                             const G4VPhysicalVolume*) const {}
00112     void ComputeDimensions (G4Sphere&,const G4int,
00113                             const G4VPhysicalVolume*) const {}
00114     void ComputeDimensions (G4Orb&,const G4int,
00115                             const G4VPhysicalVolume*) const {}
00116     void ComputeDimensions (G4Torus&,const G4int,
00117                             const G4VPhysicalVolume*) const {}
00118     void ComputeDimensions (G4Para&,const G4int,
00119                             const G4VPhysicalVolume*) const {}
00120     void ComputeDimensions (G4Hype&,const G4int,
00121                             const G4VPhysicalVolume*) const {}
00122     void ComputeDimensions (G4Tubs&,const G4int,
00123                             const G4VPhysicalVolume*) const {}
00124     void ComputeDimensions (G4Cons&,const G4int,
00125                             const G4VPhysicalVolume*) const {}
00126     void ComputeDimensions (G4Polycone&,const G4int,
00127                             const G4VPhysicalVolume*) const {}
00128 };
00129 
00130 //---------------------------------------------------------------------
00131 // Class G4ParameterisationPolyhedraPhi
00132 //---------------------------------------------------------------------
00133 
00134 class G4ParameterisationPolyhedraPhi : public G4VParameterisationPolyhedra
00135 { 
00136   public:  // with description
00137 
00138     G4ParameterisationPolyhedraPhi( EAxis axis, G4int nCopies,
00139                                    G4double offset, G4double step,
00140                                    G4VSolid* motherSolid,
00141                                    DivisionType divType );
00142    ~G4ParameterisationPolyhedraPhi();
00143 
00144     void CheckParametersValidity();
00145 
00146     G4double GetMaxParameter() const;
00147 
00148     void ComputeTransformation( const G4int copyNo,
00149                                       G4VPhysicalVolume* physVol ) const;
00150     void ComputeDimensions( G4Polyhedra& phedra, const G4int copyNo,
00151                             const G4VPhysicalVolume* physVol ) const;
00152 
00153   private:  // Dummy declarations to get rid of warnings ...
00154 
00155     void ComputeDimensions (G4Trd&,const G4int,
00156                             const G4VPhysicalVolume*) const {}
00157     void ComputeDimensions (G4Trap&,const G4int,
00158                             const G4VPhysicalVolume*) const {}
00159     void ComputeDimensions (G4Box&,const G4int,
00160                             const G4VPhysicalVolume*) const {}
00161     void ComputeDimensions (G4Sphere&,const G4int,
00162                             const G4VPhysicalVolume*) const {}
00163     void ComputeDimensions (G4Orb&,const G4int,
00164                             const G4VPhysicalVolume*) const {}
00165     void ComputeDimensions (G4Torus&,const G4int,
00166                             const G4VPhysicalVolume*) const {}
00167     void ComputeDimensions (G4Para&,const G4int,
00168                             const G4VPhysicalVolume*) const {}
00169     void ComputeDimensions (G4Hype&,const G4int,
00170                             const G4VPhysicalVolume*) const {}
00171     void ComputeDimensions (G4Tubs&,const G4int,
00172                             const G4VPhysicalVolume*) const {}
00173     void ComputeDimensions (G4Cons&,const G4int,
00174                             const G4VPhysicalVolume*) const {}
00175     void ComputeDimensions (G4Polycone&,const G4int,
00176                             const G4VPhysicalVolume*) const {}
00177 };
00178 
00179 //---------------------------------------------------------------------
00180 // Class G4ParameterisationPolyhedraZ
00181 //---------------------------------------------------------------------
00182 
00183 class G4ParameterisationPolyhedraZ : public G4VParameterisationPolyhedra
00184 { 
00185   public:  // with description
00186 
00187     G4ParameterisationPolyhedraZ( EAxis axis, G4int nCopies,
00188                                   G4double offset, G4double step,
00189                                   G4VSolid* motherSolid,
00190                                   DivisionType divType );
00191    ~G4ParameterisationPolyhedraZ();
00192 
00193     void CheckParametersValidity();
00194 
00195     G4double GetMaxParameter() const;
00196 
00197     void ComputeTransformation( const G4int copyNo,
00198                                       G4VPhysicalVolume* physVol ) const;
00199     void ComputeDimensions( G4Polyhedra& phedra, const G4int copyNo,
00200                             const G4VPhysicalVolume* physVol ) const;
00201 
00202   private:
00203 
00204     G4double GetR(G4double z, G4double z1, G4double r1,
00205                   G4double z2, G4double r2) const;
00206     G4double GetRmin(G4double z, G4int nsegment) const;
00207     G4double GetRmax(G4double z, G4int nsegment) const;
00208 
00209     // Dummy declarations to get rid of warnings ...
00210     void ComputeDimensions (G4Trd&,const G4int,
00211                             const G4VPhysicalVolume*) const {}
00212     void ComputeDimensions (G4Trap&,const G4int,
00213                             const G4VPhysicalVolume*) const {}
00214     void ComputeDimensions (G4Box&,const G4int,
00215                             const G4VPhysicalVolume*) const {}
00216     void ComputeDimensions (G4Sphere&,const G4int,
00217                             const G4VPhysicalVolume*) const {}
00218     void ComputeDimensions (G4Orb&,const G4int,
00219                             const G4VPhysicalVolume*) const {}
00220     void ComputeDimensions (G4Torus&,const G4int,
00221                             const G4VPhysicalVolume*) const {}
00222     void ComputeDimensions (G4Para&,const G4int,
00223                             const G4VPhysicalVolume*) const {}
00224     void ComputeDimensions (G4Hype&,const G4int,
00225                             const G4VPhysicalVolume*) const {}
00226     void ComputeDimensions (G4Tubs&,const G4int,
00227                             const G4VPhysicalVolume*) const {}
00228     void ComputeDimensions (G4Cons&,const G4int,
00229                             const G4VPhysicalVolume*) const {}
00230     void ComputeDimensions (G4Polycone&,const G4int,
00231                             const G4VPhysicalVolume*) const {}
00232   private:
00233 
00234     G4int fNSegment;
00235     G4PolyhedraHistorical* fOrigParamMother;
00236 };
00237 
00238 #endif

Generated on Mon May 27 17:49:15 2013 for Geant4 by  doxygen 1.4.7