Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-17 09:13:49

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 // G4ParameterisationPara[X,Y,Z]
0027 //
0028 // Class description:
0029 //
0030 // These classes represent the parameterised positioning equivalent to 
0031 // dividing a G4Para along one of each axis X, Y, Z.
0032 
0033 // Author: Pedro Arce (CIEMAT), 09.05.2001 - Initial version
0034 //         Ivana Hrivnacova (Orsay), 08.04.2004 - Implemented reflection
0035 // --------------------------------------------------------------------
0036 #ifndef G4PARAMETERISATIONPARA_HH
0037 #define G4PARAMETERISATIONPARA_HH 1
0038 
0039 #include "G4VDivisionParameterisation.hh"
0040 
0041 class G4VSolid;
0042 class G4VPhysicalVolume;
0043 
0044 // Dummy declarations to get rid of warnings ...
0045 //
0046 class G4Cons;
0047 class G4Cons;
0048 class G4Sphere;
0049 class G4Orb;
0050 class G4Ellipsoid;
0051 class G4Torus;
0052 class G4Trd;
0053 class G4Hype;
0054 class G4Tubs;
0055 class G4Polycone;
0056 class G4Polyhedra;
0057 
0058 /**
0059  * @brief G4VParameterisationPara is the base class for the parameterised
0060  * positioning equivalent to dividing a G4Para along one of each axis X, Y, Z.
0061  */
0062 
0063 class G4VParameterisationPara : public G4VDivisionParameterisation
0064 { 
0065   public:
0066   
0067     /**
0068      * Initialises a parameterised para, given the axis of parameterisation
0069      * 'axis' and the number of divided copies 'nCopies'.
0070      *  @param[in] axis The axis along which apply the parameterisation.
0071      *  @param[in] nCopies The total number of divided copies.
0072      *  @param[in] offset Potential initial offset along the axis.
0073      *  @param[in] step The width of the divided entity.
0074      *  @param[in] pSolid Pointer to the original shape to parameterise.
0075      *  @param[in] divType String identifier for the kind of division.
0076      */
0077     G4VParameterisationPara( EAxis axis, G4int nCopies,
0078                              G4double offset, G4double step,
0079                              G4VSolid* pSolid, DivisionType divType );
0080   
0081     /**
0082      * Default Destructor.
0083      */
0084     ~G4VParameterisationPara() override;
0085 };
0086 
0087 /**
0088  * @brief G4ParameterisationParaX represents the parameterised positioning
0089  * equivalent to dividing a G4Para along X axis.
0090  */
0091 
0092 class G4ParameterisationParaX : public G4VParameterisationPara
0093 { 
0094   public:
0095 
0096     /**
0097      * Initialises a parameterised para along X axis.
0098      *  @param[in] axis The axis along which apply the parameterisation.
0099      *  @param[in] nCopies The total number of divided copies.
0100      *  @param[in] offset Potential initial offset along the axis.
0101      *  @param[in] step The width of the divided entity.
0102      *  @param[in] pSolid Pointer to the original shape to parameterise.
0103      *  @param[in] divType String identifier for the kind of division.
0104      */
0105     G4ParameterisationParaX( EAxis axis, G4int nCopies,
0106                              G4double offset, G4double step,
0107                              G4VSolid* pSolid, DivisionType divType );
0108 
0109     /**
0110      * Default Destructor.
0111      */
0112    ~G4ParameterisationParaX() override;
0113 
0114     /**
0115      * Returns the max width along X.
0116      *  @returns The maximum width of the solid to divide along the X axis.
0117      */
0118     G4double GetMaxParameter() const override;
0119 
0120     /**
0121      * Concrete methods implementing the parameterisation.
0122      */
0123     void ComputeTransformation( const G4int copyNo,
0124                                       G4VPhysicalVolume* physVol ) const override;
0125     void ComputeDimensions(G4Para& para, const G4int copyNo,
0126                            const G4VPhysicalVolume* pv) const override;
0127 
0128   
0129   private:  // Dummy declarations to get rid of warnings ...
0130 
0131     void ComputeDimensions (G4Cons&,const G4int,
0132                             const G4VPhysicalVolume*) const override {}
0133     void ComputeDimensions (G4Box&,const G4int,
0134                             const G4VPhysicalVolume*) const override {}
0135     void ComputeDimensions (G4Sphere&,const G4int,
0136                             const G4VPhysicalVolume*) const override {}
0137     void ComputeDimensions (G4Orb&,const G4int,
0138                             const G4VPhysicalVolume*) const override {}
0139     void ComputeDimensions (G4Ellipsoid&,const G4int,
0140                             const G4VPhysicalVolume*) const override {}
0141     void ComputeDimensions (G4Torus&,const G4int,
0142                             const G4VPhysicalVolume*) const override {}
0143     void ComputeDimensions (G4Trd&,const G4int,
0144                             const G4VPhysicalVolume*) const override {}
0145     void ComputeDimensions (G4Trap&,const G4int,
0146                             const G4VPhysicalVolume*) const override {}
0147     void ComputeDimensions (G4Hype&,const G4int,
0148                             const G4VPhysicalVolume*) const override {}
0149     void ComputeDimensions (G4Tubs&,const G4int,
0150                             const G4VPhysicalVolume*) const override {}
0151     void ComputeDimensions (G4Polycone&,const G4int,
0152                             const G4VPhysicalVolume*) const override {}
0153     void ComputeDimensions (G4Polyhedra&,const G4int,
0154                             const G4VPhysicalVolume*) const override {}
0155 };
0156 
0157 
0158 /**
0159  * @brief G4ParameterisationParaY represents the parameterised positioning
0160  * equivalent to dividing a G4Para along Y axis.
0161  */
0162 
0163 class G4ParameterisationParaY : public G4VParameterisationPara
0164 { 
0165   public:
0166 
0167     /**
0168      * Initialises a parameterised para along Y axis.
0169      *  @param[in] axis The axis along which apply the parameterisation.
0170      *  @param[in] nCopies The total number of divided copies.
0171      *  @param[in] offset Potential initial offset along the axis.
0172      *  @param[in] step The width of the divided entity.
0173      *  @param[in] pSolid Pointer to the original shape to parameterise.
0174      *  @param[in] divType String identifier for the kind of division.
0175      */
0176     G4ParameterisationParaY( EAxis axis, G4int nCopies,
0177                              G4double offset, G4double step,
0178                              G4VSolid* msolid, DivisionType divType );
0179 
0180     /**
0181      * Default Destructor.
0182      */
0183    ~G4ParameterisationParaY() override;
0184   
0185     /**
0186      * Returns the max width along Y.
0187      *  @returns The maximum width of the solid to divide along the Y axis.
0188      */
0189     G4double GetMaxParameter() const override;
0190 
0191     /**
0192      * Concrete methods implementing the parameterisation.
0193      */
0194     void ComputeTransformation( const G4int copyNo,
0195                                       G4VPhysicalVolume* physVol ) const override;
0196     void ComputeDimensions(G4Para& para, const G4int copyNo,
0197                            const G4VPhysicalVolume* pv) const override;
0198 
0199   
0200   private:  // Dummy declarations to get rid of warnings ...
0201 
0202     void ComputeDimensions (G4Cons&,const G4int,
0203                             const G4VPhysicalVolume*) const override {}
0204     void ComputeDimensions (G4Box&,const G4int,
0205                             const G4VPhysicalVolume*) const override {}
0206     void ComputeDimensions (G4Sphere&,const G4int,
0207                             const G4VPhysicalVolume*) const override {}
0208     void ComputeDimensions (G4Orb&,const G4int,
0209                             const G4VPhysicalVolume*) const override {}
0210     void ComputeDimensions (G4Ellipsoid&,const G4int,
0211                             const G4VPhysicalVolume*) const override {}
0212     void ComputeDimensions (G4Torus&,const G4int,
0213                             const G4VPhysicalVolume*) const override {}
0214     void ComputeDimensions (G4Trd&,const G4int,
0215                             const G4VPhysicalVolume*) const override {}
0216     void ComputeDimensions (G4Trap&,const G4int,
0217                             const G4VPhysicalVolume*) const override {}
0218     void ComputeDimensions (G4Hype&,const G4int,
0219                             const G4VPhysicalVolume*) const override {}
0220     void ComputeDimensions (G4Tubs&,const G4int,
0221                             const G4VPhysicalVolume*) const override {}
0222     void ComputeDimensions (G4Polycone&,const G4int,
0223                             const G4VPhysicalVolume*) const override {}
0224     void ComputeDimensions (G4Polyhedra&,const G4int,
0225                             const G4VPhysicalVolume*) const override {}
0226 };
0227 
0228 
0229 /**
0230  * @brief G4ParameterisationParaZ represents the parameterised positioning
0231  * equivalent to dividing a G4Para along Z axis.
0232  */
0233 
0234 class G4ParameterisationParaZ : public G4VParameterisationPara
0235 { 
0236   public:
0237 
0238     /**
0239      * Initialises a parameterised para along Z axis.
0240      *  @param[in] axis The axis along which apply the parameterisation.
0241      *  @param[in] nCopies The total number of divided copies.
0242      *  @param[in] offset Potential initial offset along the axis.
0243      *  @param[in] step The width of the divided entity.
0244      *  @param[in] pSolid Pointer to the original shape to parameterise.
0245      *  @param[in] divType String identifier for the kind of division.
0246      */
0247     G4ParameterisationParaZ( EAxis axis, G4int nCopies,
0248                              G4double offset, G4double step,
0249                              G4VSolid* msolid, DivisionType divType );
0250 
0251     /**
0252      * Default Destructor.
0253      */
0254    ~G4ParameterisationParaZ() override;
0255 
0256     /**
0257      * Returns the max width along Z.
0258      *  @returns The maximum width of the solid to divide along the Z axis.
0259      */
0260     G4double GetMaxParameter() const override;
0261 
0262     /**
0263      * Concrete methods implementing the parameterisation.
0264      */
0265     void ComputeTransformation( const G4int copyNo,
0266                                       G4VPhysicalVolume* physVol ) const override;
0267     void ComputeDimensions(G4Para& para, const G4int copyNo,
0268                            const G4VPhysicalVolume* pv) const override;
0269 
0270   
0271   private:  // Dummy declarations to get rid of warnings ...
0272 
0273     void ComputeDimensions (G4Cons&,const G4int,
0274                             const G4VPhysicalVolume*) const override {}
0275     void ComputeDimensions (G4Box&,const G4int,
0276                             const G4VPhysicalVolume*) const override {}
0277     void ComputeDimensions (G4Sphere&,const G4int,
0278                             const G4VPhysicalVolume*) const override {}
0279     void ComputeDimensions (G4Orb&,const G4int,
0280                             const G4VPhysicalVolume*) const override {}
0281     void ComputeDimensions (G4Ellipsoid&,const G4int,
0282                             const G4VPhysicalVolume*) const override {}
0283     void ComputeDimensions (G4Torus&,const G4int,
0284                             const G4VPhysicalVolume*) const override {}
0285     void ComputeDimensions (G4Trd&,const G4int,
0286                             const G4VPhysicalVolume*) const override {}
0287     void ComputeDimensions (G4Trap&,const G4int,
0288                             const G4VPhysicalVolume*) const override {}
0289     void ComputeDimensions (G4Hype&,const G4int,
0290                             const G4VPhysicalVolume*) const override {}
0291     void ComputeDimensions (G4Tubs&,const G4int,
0292                             const G4VPhysicalVolume*) const override {}
0293     void ComputeDimensions (G4Polycone&,const G4int,
0294                             const G4VPhysicalVolume*) const override {}
0295     void ComputeDimensions (G4Polyhedra&,const G4int,
0296                             const G4VPhysicalVolume*) const override {}
0297 };
0298 
0299 #endif