G4VDivisionParameterisation.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: G4VDivisionParameterisation.hh 69784 2013-05-15 09:16:06Z gcosmo $
00028 //
00029 // class G4VDivisionParameterisation
00030 //
00031 // Class description:
00032 //
00033 // Base class for parameterisations defining divisions of volumes
00034 // for different kind of CSG and specific solids.
00035 
00036 // History:
00037 // -------
00038 // 09.05.01 - P.Arce, Initial version
00039 // 08.04.04 - I.Hrivnacova, Implemented reflection
00040 // 21.04.10 - M.Asai, Added gaps
00041 //---------------------------------------------------------------------
00042 #ifndef G4VDivisionParameterisation_H
00043 #define G4VDivisionParameterisation_H 1
00044 
00045 #include "G4Types.hh"
00046 #include "geomdefs.hh"
00047 #include "G4VPVParameterisation.hh"
00048 
00049 enum DivisionType { DivNDIVandWIDTH, DivNDIV, DivWIDTH };
00050 
00051 class G4VPhysicalVolume;
00052 class G4VSolid;
00053 
00054 class G4VDivisionParameterisation : public G4VPVParameterisation
00055 { 
00056   public:  // with description
00057   
00058     G4VDivisionParameterisation( EAxis axis, G4int nDiv, G4double width,
00059                                  G4double offset, DivisionType divType,
00060                                  G4VSolid* motherSolid = 0);
00061     virtual ~G4VDivisionParameterisation();
00062   
00063     virtual G4VSolid* ComputeSolid(const G4int, G4VPhysicalVolume *);
00064 
00065     virtual void ComputeTransformation(const G4int copyNo,
00066                                        G4VPhysicalVolume *physVol) const = 0;
00067   
00068     inline const G4String& GetType() const;
00069     inline EAxis GetAxis() const;
00070     inline G4int GetNoDiv() const;
00071     inline G4double GetWidth() const;
00072     inline G4double GetOffset() const;
00073     inline G4VSolid* GetMotherSolid() const;
00074     inline void SetType(const G4String& type);
00075     inline G4int VolumeFirstCopyNo() const;
00076     inline void SetHalfGap(G4double hg);
00077     inline G4double GetHalfGap() const;
00078 
00079   protected:  // with description
00080 
00081     void ChangeRotMatrix( G4VPhysicalVolume* physVol,
00082                           G4double rotZ = 0. ) const;
00083   
00084     G4int CalculateNDiv( G4double motherDim, G4double width,
00085                          G4double offset ) const;
00086     G4double CalculateWidth( G4double motherDim, G4int nDiv,
00087                              G4double offset ) const;
00088   
00089     virtual void CheckParametersValidity();
00090     void CheckOffset( G4double maxPar );
00091     void CheckNDivAndWidth( G4double maxPar );
00092     virtual G4double GetMaxParameter() const = 0;
00093     G4double OffsetZ() const;
00094 
00095   protected:
00096   
00097     G4String ftype;
00098     EAxis faxis;
00099     G4int fnDiv;
00100     G4double fwidth;
00101     G4double foffset;
00102     DivisionType fDivisionType;
00103     G4VSolid* fmotherSolid;
00104     G4bool fReflectedSolid;
00105     G4bool fDeleteSolid;
00106   
00107     static G4int verbose;
00108     G4int theVoluFirstCopyNo;
00109 
00110     G4double kCarTolerance;
00111 
00112     G4double fhgap;
00113 };
00114 
00115 #include "G4VDivisionParameterisation.icc"
00116 
00117 #endif

Generated on Mon May 27 17:50:11 2013 for Geant4 by  doxygen 1.4.7