Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:58:50

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 // G4ParameterisationPolycone[Rho/Phi/Z]
0027 //
0028 // Class description:
0029 //
0030 // These classes represent the parameterised positioning equivalent to 
0031 // dividing a G4Polycone along one of each axis Rho, Phi, Z.
0032 
0033 // 09.05.01 - P.Arce, Initial version
0034 // 08.04.04 - I.Hrivnacova, Implemented reflection
0035 //---------------------------------------------------------------------
0036 #ifndef G4PARAMETERISATIONPOLYCONE_HH
0037 #define G4PARAMETERISATIONPOLYCONE_HH 1
0038 
0039 #include "G4VDivisionParameterisation.hh"
0040 #include "G4Polycone.hh"
0041 
0042 class G4VPhysicalVolume;
0043 
0044 // Dummy declarations to get rid of warnings ...
0045 //
0046 class G4Trd;
0047 class G4Trap;
0048 class G4Cons;
0049 class G4Orb;
0050 class G4Ellipsoid;
0051 class G4Sphere;
0052 class G4Torus;
0053 class G4Para;
0054 class G4Hype;
0055 class G4Tubs;
0056 class G4Polyhedra;
0057 
0058 class G4VParameterisationPolycone : public G4VDivisionParameterisation
0059 { 
0060   public:  // with description
0061   
0062     G4VParameterisationPolycone( EAxis axis, G4int nCopies,
0063                             G4double offset, G4double step,
0064                             G4VSolid* msolid, DivisionType divType );
0065   
0066     ~G4VParameterisationPolycone() override;
0067 };
0068 
0069 //---------------------------------------------------------------------
0070 // Class G4ParameterisationPolyconeRho
0071 //---------------------------------------------------------------------
0072 
0073 class G4ParameterisationPolyconeRho : public G4VParameterisationPolycone
0074 { 
0075   public:  // with description
0076 
0077     G4ParameterisationPolyconeRho( EAxis axis, G4int nCopies,
0078                                    G4double offset, G4double step,
0079                                    G4VSolid* motherSolid,
0080                                    DivisionType divType );
0081    ~G4ParameterisationPolyconeRho() override;
0082 
0083     void CheckParametersValidity() override;
0084 
0085     G4double GetMaxParameter() const override;
0086 
0087     void ComputeTransformation( const G4int copyNo,
0088                                       G4VPhysicalVolume* physVol ) const override;
0089     void ComputeDimensions( G4Polycone& pcone, const G4int copyNo,
0090                             const G4VPhysicalVolume* physVol ) const override;
0091 
0092   private:  // Dummy declarations to get rid of warnings ...
0093 
0094     void ComputeDimensions (G4Trd&,const G4int,
0095                             const G4VPhysicalVolume*) const override {}
0096     void ComputeDimensions (G4Trap&,const G4int,
0097                             const G4VPhysicalVolume*) const override {}
0098     void ComputeDimensions (G4Box&,const G4int,
0099                             const G4VPhysicalVolume*) const override {}
0100     void ComputeDimensions (G4Orb&,const G4int,
0101                             const G4VPhysicalVolume*) const override {}
0102     void ComputeDimensions (G4Ellipsoid&,const G4int,
0103                             const G4VPhysicalVolume*) const override {}
0104     void ComputeDimensions (G4Sphere&,const G4int,
0105                             const G4VPhysicalVolume*) const override {}
0106     void ComputeDimensions (G4Torus&,const G4int,
0107                             const G4VPhysicalVolume*) const override {}
0108     void ComputeDimensions (G4Para&,const G4int,
0109                             const G4VPhysicalVolume*) const override {}
0110     void ComputeDimensions (G4Hype&,const G4int,
0111                             const G4VPhysicalVolume*) const override {}
0112     void ComputeDimensions (G4Tubs&,const G4int,
0113                             const G4VPhysicalVolume*) const override {}
0114     void ComputeDimensions (G4Cons&,const G4int,
0115                             const G4VPhysicalVolume*) const override {}
0116     void ComputeDimensions (G4Polyhedra&,const G4int,
0117                             const G4VPhysicalVolume*) const override {}
0118 };
0119 
0120 //---------------------------------------------------------------------
0121 // Class G4ParameterisationPolyconePhi
0122 //---------------------------------------------------------------------
0123 
0124 class G4ParameterisationPolyconePhi : public G4VParameterisationPolycone
0125 { 
0126   public:  // with description
0127 
0128     G4ParameterisationPolyconePhi( EAxis axis, G4int nCopies,
0129                                    G4double offset, G4double step,
0130                                    G4VSolid* motherSolid,
0131                                    DivisionType divType );
0132    ~G4ParameterisationPolyconePhi() override;
0133 
0134     G4double GetMaxParameter() const override;
0135 
0136     void ComputeTransformation( const G4int copyNo,
0137                                       G4VPhysicalVolume* physVol ) const override;
0138     void ComputeDimensions( G4Polycone& pcone, const G4int copyNo,
0139                             const G4VPhysicalVolume* physVol ) const override;
0140 
0141   private:  // Dummy declarations to get rid of warnings ...
0142 
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 (G4Box&,const G4int,
0148                             const G4VPhysicalVolume*) const override {}
0149     void ComputeDimensions (G4Orb&,const G4int,
0150                             const G4VPhysicalVolume*) const override {}
0151     void ComputeDimensions (G4Sphere&,const G4int,
0152                             const G4VPhysicalVolume*) const override {}
0153     void ComputeDimensions (G4Ellipsoid&,const G4int,
0154                             const G4VPhysicalVolume*) const override {}
0155     void ComputeDimensions (G4Torus&,const G4int,
0156                             const G4VPhysicalVolume*) const override {}
0157     void ComputeDimensions (G4Para&,const G4int,
0158                             const G4VPhysicalVolume*) const override {}
0159     void ComputeDimensions (G4Hype&,const G4int,
0160                             const G4VPhysicalVolume*) const override {}
0161     void ComputeDimensions (G4Tubs&,const G4int,
0162                             const G4VPhysicalVolume*) const override {}
0163     void ComputeDimensions (G4Cons&,const G4int,
0164                             const G4VPhysicalVolume*) const override {}
0165     void ComputeDimensions (G4Polyhedra&,const G4int,
0166                             const G4VPhysicalVolume*) const override {}
0167 };
0168 
0169 //---------------------------------------------------------------------
0170 // Class G4ParameterisationPolyconeZ
0171 //---------------------------------------------------------------------
0172 
0173 class G4ParameterisationPolyconeZ : public G4VParameterisationPolycone
0174 { 
0175   public:  // with description
0176 
0177     G4ParameterisationPolyconeZ( EAxis axis, G4int nCopies,
0178                                  G4double offset, G4double step,
0179                                  G4VSolid* motherSolid,
0180                                  DivisionType divType );
0181    ~G4ParameterisationPolyconeZ() override;
0182 
0183     void CheckParametersValidity() override;
0184 
0185     G4double GetMaxParameter() const override;
0186 
0187     void ComputeTransformation( const G4int copyNo,
0188                                       G4VPhysicalVolume* physVol ) const override;
0189     void ComputeDimensions( G4Polycone& pcone, const G4int copyNo,
0190                             const G4VPhysicalVolume* physVol ) const override;
0191 
0192   private:
0193 
0194     G4double GetR(G4double z, G4double z1, G4double r1,
0195                   G4double z2, G4double r2) const;
0196     G4double GetRmin(G4double z, G4int nsegment) const;
0197     G4double GetRmax(G4double z, G4int nsegment) const;
0198 
0199     // Dummy declarations to get rid of warnings ...
0200 
0201     void ComputeDimensions (G4Trd&,const G4int,
0202                             const G4VPhysicalVolume*) const override {}
0203     void ComputeDimensions (G4Trap&,const G4int,
0204                             const G4VPhysicalVolume*) const override {}
0205     void ComputeDimensions (G4Box&,const G4int,
0206                             const G4VPhysicalVolume*) const override {}
0207     void ComputeDimensions (G4Orb&,const G4int,
0208                             const G4VPhysicalVolume*) const override {}
0209     void ComputeDimensions (G4Sphere&,const G4int,
0210                             const G4VPhysicalVolume*) const override {}
0211     void ComputeDimensions (G4Ellipsoid&,const G4int,
0212                             const G4VPhysicalVolume*) const override {}
0213     void ComputeDimensions (G4Torus&,const G4int,
0214                             const G4VPhysicalVolume*) const override {}
0215     void ComputeDimensions (G4Para&,const G4int,
0216                             const G4VPhysicalVolume*) const override {}
0217     void ComputeDimensions (G4Hype&,const G4int,
0218                             const G4VPhysicalVolume*) const override {}
0219     void ComputeDimensions (G4Tubs&,const G4int,
0220                             const G4VPhysicalVolume*) const override {}
0221     void ComputeDimensions (G4Cons&,const G4int,
0222                             const G4VPhysicalVolume*) const override {}
0223     void ComputeDimensions (G4Polyhedra&,const G4int,
0224                             const G4VPhysicalVolume*) const override {}
0225   private:
0226 
0227     G4int fNSegment = 0;
0228     G4PolyconeHistorical* fOrigParamMother = nullptr;
0229 };
0230 
0231 #endif