// ---------------------------------------------------- // This file belongs to the ray tracing framework // for the use with Cherenkov detectors // // created 2007 //----------------------------------------------------- #include "PndDrcOptMatF2G12.h" #include //#include "PndDrcOptMatAbs.h" // //#include "TObject.h" //#include "TVector3.h" //#include "TRandom.h" // #include using std::cout; using std::cerr; //using std::cin; using std::endl; // #include //#include //using std::valarray; // //#include //using std::fstream; // //#include //using std::string; // //#include //using std::list; //---------------------------------------------------------------------- PndDrcOptMatF2G12::PndDrcOptMatF2G12() { fName = "F2G12"; fB1 = 1.34702224; fB2 = 0.210037763; fB3 = 19.5350768; fC1 = 0.00980850553; fC2 = 0.0471788018; fC3 = 2279.1547; } //---------------------------------------------------------------------- PndDrcOptMatF2G12* PndDrcOptMatF2G12::Clone() const { return new PndDrcOptMatF2G12(*this); } //---------------------------------------------------------------------- void PndDrcOptMatF2G12::Copy(const PndDrcOptMatF2G12& mat) { fB1 = mat.fB1; fC1 = mat.fC1; fB2 = mat.fB2; fC2 = mat.fC2; fB3 = mat.fB3; fC3 = mat.fC3; }//---------------------------------------------------------------------- PndDrcOptMatF2G12::PndDrcOptMatF2G12(const PndDrcOptMatF2G12& mat) : PndDrcOptMatAbs(mat) { if (mat.fVerbosity>=1) cout<<" PndDrcOptMatF2G12::PndDrcOptMatF2G12" <<"(const PndDrcOptMatF2G12&) " <=1) cout<<" PndDrcOptMatF2G12::operator=" <<"(const PndDrcOptMatF2G12&) " <((*this)) = mat; // assignment of base class part. Copy(mat); } return *this; } //---------------------------------------------------------------------- double PndDrcOptMatF2G12::RefIndex(const double lambda) const { if (lambda<0) return 1.62; // average value. double lam2 = lambda/1000 * lambda/1000; // um2 return sqrt(1.0L + fB1*lam2/(lam2-fC1) + fB2*lam2/(lam2-fC2) + fB3*lam2/(lam2-fC3)); } //---------------------------------------------------------------------- double PndDrcOptMatF2G12::RefIndexDeriv(const double lambda) const { double lam = lambda/1000; double lam2 = lam*lam; //double lam3 = lam2*lam; return ( (-fB1*fC1*lam)/((lam2-fC1)*(lam2-fC1)) + (-fB2*fC2*lam)/((lam2-fC2)*(lam2-fC2)) + (-fB3*fC3*lam)/((lam2-fC3)*(lam2-fC3)) ) / RefIndex(lambda) / 1000; } //---------------------------------------------------------------------- bool PndDrcOptMatF2G12::AbsorptionFlag(double lambda, double length) const { // Rayleigh scattering. // data from Schott data sheets of 10mm sample for F2 not F2G12 // normally the Cerium doping shifts the spectrum towards red const static double kLam[14] = {1060, 700, 660, 620, 580, 546, 500, 460, 436, 420, 405, 400, 390, 380}; const static double kC[14] = {9999, 1995, 1662, 1245, 904.1, 661.7, 379.6, 153.7, 58.15, 27.27, 11.78, 8.897, 4.79, 2.52}; // C = -10mm /ln (t_i) double clarity; if (lambda>1060) { clarity=5000; } else if (lambda<380) { return true; // cut off } else { // find right bin int ibin=-1; for (int i=1; i<14; i++) { if (lambda=kLam[i]) { ibin = i; } } if (ibin==-1) { cerr<<" *** PndDrcOptMatF2G12::absorptionFlag: " <<"this line should never been hit"<Uniform(1.0); if (cmp>trans) { return true; // absorbed } return false; // no absorption. }