Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2024-06-18 07:06:30

0001 
0002 #include <TRef.h>
0003 #include <TObject.h>
0004 
0005 #ifndef _OPTICAL_BOUNDARY_
0006 #define _OPTICAL_BOUNDARY_
0007 
0008 #include "CherenkovRadiator.h"
0009 class ParametricSurface;
0010 
0011 class OpticalBoundary: public TObject {
0012   friend class IRT;
0013 
0014  public:
0015  OpticalBoundary(): m_Radiator(0), m_Surface(0), m_Refractive(true) {};
0016   // The "0" as a radiator ptr implicitly says "there is no photon life beyond this boundary in IRT";
0017  OpticalBoundary(/*const*/ CherenkovRadiator *radiator, const ParametricSurface *surface, bool refractive): 
0018   m_Radiator(radiator), m_Surface(surface), m_Refractive(refractive) {};
0019   ~OpticalBoundary() {};
0020 
0021   CherenkovRadiator *GetRadiator( void ) const {
0022     return dynamic_cast<CherenkovRadiator*>(m_Radiator.GetObject());
0023   };
0024   const ParametricSurface *GetSurface( void ) const { return m_Surface; };
0025 
0026  private:
0027   // Radiator pointer (only need average refractive index from this base class in IRT);
0028   // it is assumed that the code which makes use of this class knows how to properly 
0029   // order the boundaries, so a new one in the respective std::vector has a preceding 
0030   // media with its own (and potentially different) m_Radiator pointer;
0031   TRef m_Radiator;
0032 
0033   // Boundary surface; either refractive or reflective; 
0034   const ParametricSurface *m_Surface;
0035   bool m_Refractive;
0036 
0037   // Working variables; FIXME: not multithreading friendly;
0038   static thread_local TVector3 m_ImpactPoint, m_IncomingDirection, m_OutgoingDirection; //!
0039 
0040 #ifndef DISABLE_ROOT_IO
0041   ClassDef(OpticalBoundary, 1);
0042 #endif
0043 };
0044 
0045 #endif