File indexing completed on 2024-11-15 10:02:33
0001
0002 #ifndef _CHERENKOV_MIRROR_
0003 #define _CHERENKOV_MIRROR_
0004
0005 #include "G4Object.h"
0006 #include "ParametricSurface.h"
0007
0008 class SurfaceCopy: public G4ObjectCopy {
0009 public:
0010 SurfaceCopy(G4VPhysicalVolume *phys = 0): G4ObjectCopy(phys), m_Surface(0) {};
0011 ~SurfaceCopy() {};
0012
0013 ParametricSurface *m_Surface;
0014
0015 #ifndef DISABLE_ROOT_IO
0016 ClassDef(SurfaceCopy, 1);
0017 #endif
0018 };
0019
0020 class CherenkovMirror: public G4Object {
0021 public:
0022 CherenkovMirror(G4VSolid *solid = 0, G4Material *material = 0): G4Object(solid, material), m_MirrorSurface(0) {};
0023 ~CherenkovMirror() {};
0024
0025 void SetReflectivity( void );
0026
0027 G4ObjectCopy *CreateCopy(G4VPhysicalVolume *phys) { return new SurfaceCopy(phys); };
0028
0029 void AdjustWedgeCopies(G4VPhysicalVolume *mother) {
0030 for(int iq=0; iq<6; iq++) {
0031 auto mcopy = dynamic_cast<SurfaceCopy*>(m_Copies[iq]);
0032
0033
0034
0035 mcopy->m_Surface = dynamic_cast<ParametricSurface*>(this)->_Clone((iq-1)*60*M_PI/180, TVector3(0,0,1));
0036 }
0037 };
0038
0039 G4OpticalSurface *GetMirrorSurface( void ) const { return m_MirrorSurface; };
0040
0041 private:
0042 G4OpticalSurface *m_MirrorSurface;
0043
0044 #ifndef DISABLE_ROOT_IO
0045 ClassDef(CherenkovMirror, 1);
0046 #endif
0047 };
0048
0049 class FlatMirror: public CherenkovMirror, public FlatSurface {
0050 public:
0051 FlatMirror() {};
0052 FlatMirror(G4VSolid *solid, G4Material *material, const TVector3 &x0, const TVector3 &nx, const TVector3 &ny,
0053 double sx = 0.0, double sy = 0.0):
0054 CherenkovMirror(solid, material), FlatSurface(x0, nx, ny, sx, sy) {};
0055 ~FlatMirror() {};
0056
0057 #ifndef DISABLE_ROOT_IO
0058 ClassDef(FlatMirror, 2);
0059 #endif
0060 };
0061
0062 class SphericalMirror: public CherenkovMirror, public SphericalSurface {
0063 public:
0064 SphericalMirror() {};
0065 SphericalMirror(G4VSolid *solid, G4Material *material, const TVector3 &x0, double r0):
0066 CherenkovMirror(solid, material), SphericalSurface(x0, r0) {};
0067 ~SphericalMirror() {};
0068
0069 #ifndef DISABLE_ROOT_IO
0070 ClassDef(SphericalMirror, 2);
0071 #endif
0072 };
0073
0074 class CherenkovMirrorGroup: public TObject {
0075 public:
0076 CherenkovMirrorGroup() {};
0077 ~CherenkovMirrorGroup() {};
0078
0079 void AddMirror(CherenkovMirror *mirror) { m_Mirrors.push_back(mirror); };
0080
0081 private:
0082 std::vector<CherenkovMirror*> m_Mirrors;
0083
0084 #ifndef DISABLE_ROOT_IO
0085 ClassDef(CherenkovMirrorGroup, 1);
0086 #endif
0087 };
0088
0089 #endif