Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-10 10:18:06

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