Newer
Older
#ifndef _CHERENKOV_MIRROR_
#define _CHERENKOV_MIRROR_
#include <G4Object.h>
#include <ParametricSurface.h>
Alexander Kiselev
committed
class SurfaceCopy: public G4ObjectCopy {
Alexander Kiselev
committed
SurfaceCopy(G4VPhysicalVolume *phys = 0): G4ObjectCopy(phys), m_Surface(0) {};
~SurfaceCopy() {};
Alexander Kiselev
committed
ClassDef(SurfaceCopy, 1);
};
class CherenkovMirror: public G4Object {
public:
CherenkovMirror(G4VSolid *solid = 0, G4Material *material = 0): G4Object(solid, material), m_MirrorSurface(0) {};
~CherenkovMirror() {};
void SetReflectivity( void );
Alexander Kiselev
committed
G4ObjectCopy *CreateCopy(G4VPhysicalVolume *phys) { return new SurfaceCopy(phys); };
void AdjustWedgeCopies(G4VPhysicalVolume *mother) {
for(int iq=0; iq<6; iq++) {
Alexander Kiselev
committed
auto mcopy = dynamic_cast<SurfaceCopy*>(m_Copies[iq]);
// FIXME: well, one-off here because originally the "top 60 degree wedge is defined
// as a basic shape everywhere; however want to count them starting from 0 degrees;
mcopy->m_Surface = dynamic_cast<ParametricSurface*>(this)->_Clone((iq-1)*60*M_PI/180, TVector3(0,0,1));
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
} //for iq
};
G4OpticalSurface *GetMirrorSurface( void ) const { return m_MirrorSurface; };
private:
G4OpticalSurface *m_MirrorSurface; //!
ClassDef(CherenkovMirror, 1);
};
class FlatMirror: public CherenkovMirror, public FlatSurface {
public:
FlatMirror() {};
FlatMirror(G4VSolid *solid, G4Material *material, const TVector3 &x0, const TVector3 &nx, const TVector3 &ny,
double sx = 0.0, double sy = 0.0):
CherenkovMirror(solid, material), FlatSurface(x0, nx, ny, sx, sy) {};
~FlatMirror() {};
ClassDef(FlatMirror, 2);
};
class SphericalMirror: public CherenkovMirror, public SphericalSurface {
public:
SphericalMirror() {};
SphericalMirror(G4VSolid *solid, G4Material *material, const TVector3 &x0, double r0):
CherenkovMirror(solid, material), SphericalSurface(x0, r0) {};
~SphericalMirror() {};
ClassDef(SphericalMirror, 2);
};
class CherenkovMirrorGroup: public TObject {
public:
CherenkovMirrorGroup() {};
~CherenkovMirrorGroup() {};
void AddMirror(CherenkovMirror *mirror) { m_Mirrors.push_back(mirror); };
private:
std::vector<CherenkovMirror*> m_Mirrors;
ClassDef(CherenkovMirrorGroup, 1);
};
#endif