#include using std::cout; using std::cerr; using std::cin; using std::endl; #include #include "TObject.h" #include "TVector3.h" #include "TRandom.h" #include "Math/Vector3D.h" using ROOT::Math::XYZVector; #include "Math/Point3D.h" using ROOT::Math::XYZPoint; #include "Math/Transform3D.h" using ROOT::Math::Transform3D; #include "Math/RotationX.h" using ROOT::Math::RotationX; #include "Math/RotationY.h" using ROOT::Math::RotationY; #include "Math/RotationZ.h" using ROOT::Math::RotationZ; #include "Math/Rotation3D.h" using ROOT::Math::Rotation3D; #include "DrcPhoton.h" #include "DrcOptReflAbs.h" #include "DrcOptReflSilver.h" //---------------------------------------------------------------------- DrcOptReflSilver* DrcOptReflSilver::clone() const { return new DrcOptReflSilver(*this); } //---------------------------------------------------------------------- const Drc::Reflectivity DrcOptReflSilver::reflectivity(DrcPhoton& ph, XYZVector normal) const { double lambda = ph.wavelength(); // assume reflectivity of 0.96 at 400 to 0.98 at 1000nm double ref_prob = 0.96 + (lambda-400.0)/600.0 * 0.02; if (ref_prob>0.98) ref_prob=0.98; double ran = m_ran.Uniform(0.0,1.0); if (ran>ref_prob || lambda<400) { return Drc::ReflAbsorbed; } else { return Drc::ReflReflected; } }