00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
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:
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:
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