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