File indexing completed on 2025-12-10 10:18:05
0001 #pragma once
0002
0003 #include "G4Object.h"
0004 #include "FlatSurface.h"
0005 #include "SphericalSurface.h"
0006 #include "CylindricalSurface.h"
0007 #include "ConicalSurface.h"
0008 #include "ParametricSurface.h"
0009
0010 class CherenkovWaveLengthRange;
0011
0012 namespace IRT2 {
0013
0014 class SurfaceCopy: public G4ObjectCopy {
0015 public:
0016 SurfaceCopy(G4VPhysicalVolume *phys = 0): G4ObjectCopy(phys), m_Surface(0) {};
0017 ~SurfaceCopy() {};
0018
0019 ParametricSurface *m_Surface;
0020
0021 #ifndef DISABLE_ROOT_IO
0022 ClassDef(SurfaceCopy, 1);
0023 #endif
0024 };
0025
0026 class CherenkovMirror: public G4Object {
0027 public:
0028 CherenkovMirror(G4VSolid *solid = 0, G4Material *material = 0): G4Object(solid, material), m_MirrorSurface(0) {};
0029 ~CherenkovMirror() {};
0030
0031 void SetReflectivity(double reflectivity, CherenkovWaveLengthRange *wlrange);
0032
0033 G4ObjectCopy *CreateCopy(G4VPhysicalVolume *phys) { return new SurfaceCopy(phys); };
0034
0035 void AdjustWedgeCopies(G4VPhysicalVolume *mother) {
0036 for(int iq=0; iq<6; iq++) {
0037 auto mcopy = dynamic_cast<SurfaceCopy*>(m_Copies[iq]);
0038
0039
0040
0041 mcopy->m_Surface = dynamic_cast<ParametricSurface*>(this)->_Clone((iq-1)*60*M_PI/180, TVector3(0,0,1));
0042 }
0043 };
0044
0045 G4OpticalSurface *GetMirrorSurface( void ) const { return m_MirrorSurface; };
0046
0047 private:
0048 G4OpticalSurface *m_MirrorSurface;
0049
0050 #ifndef DISABLE_ROOT_IO
0051 ClassDef(CherenkovMirror, 1);
0052 #endif
0053 };
0054
0055 class FlatMirror: public CherenkovMirror, public FlatSurface {
0056 public:
0057 FlatMirror() {};
0058 FlatMirror(G4VSolid *solid, G4Material *material, const TVector3 &x0, const TVector3 &nx, const TVector3 &ny,
0059 double sx = 0.0, double sy = 0.0):
0060 CherenkovMirror(solid, material), FlatSurface(x0, nx, ny, sx, sy) {};
0061 ~FlatMirror() {};
0062
0063 #ifndef DISABLE_ROOT_IO
0064 ClassDef(FlatMirror, 2);
0065 #endif
0066 };
0067
0068 class SphericalMirror: public CherenkovMirror, public SphericalSurface {
0069 public:
0070 SphericalMirror() {};
0071 SphericalMirror(G4VSolid *solid, G4Material *material, const TVector3 &x0, double r0):
0072 CherenkovMirror(solid, material), SphericalSurface(x0, r0) {};
0073 ~SphericalMirror() {};
0074
0075 #ifndef DISABLE_ROOT_IO
0076 ClassDef(SphericalMirror, 2);
0077 #endif
0078 };
0079
0080 class CylindricalMirror: public CherenkovMirror, public CylindricalSurface {
0081 public:
0082 CylindricalMirror() {};
0083 CylindricalMirror(G4VSolid *solid, G4Material *material, const TVector3 &x0, const TVector3 &nz, double r0, double dz):
0084 CherenkovMirror(solid, material), CylindricalSurface(x0, nz, r0, dz) {};
0085 ~CylindricalMirror() {};
0086
0087 #ifndef DISABLE_ROOT_IO
0088 ClassDef(CylindricalMirror, 1);
0089 #endif
0090 };
0091
0092 class ConicalMirror: public CherenkovMirror, public ConicalSurface {
0093 public:
0094 ConicalMirror() {};
0095 ConicalMirror(G4VSolid *solid, G4Material *material, const TVector3 &x0, const TVector3 &nz, double r0, double r1, double dz):
0096 CherenkovMirror(solid, material), ConicalSurface(x0, nz, r0, r1, dz) {};
0097 ~ConicalMirror() {};
0098
0099 #ifndef DISABLE_ROOT_IO
0100 ClassDef(ConicalMirror, 1);
0101 #endif
0102 };
0103
0104 }