///////////////////////////////////////////////////////////// // PndGeoDskFLG // // Class for geometry of DskFLG // // Created 29/04/10 by Y. Liang, Giessen University // ///////////////////////////////////////////////////////////// #include "PndGeoDskFLG.h" #include "FairGeoNode.h" using std::endl; using std::cout; ClassImp(PndGeoDskFLG) // ----- Default constructor ------------------------------------------- PndGeoDskFLG::PndGeoDskFLG() { // Constructor fRadius = 1100;// mm, fix me. need to retrieve from geo in future fPosition_plate = 2000; //position of plate, fix me. need to retrieve from geo in future fThickness_plate = 20; //mm, fix me. need to retrieve from geo in future fNumber_focusing_part = 128;// 128 focusing parts, fix me. fReflectThreshold = 0.8; a0 = 0.; a1 = 0.; a2 = -14.37217*1.0E-4; a3 = -2.044957*1.0E-6; a4 = -1.998331*1.0E-8; a5 = -1.109226*1.0E-10; fVerbose = 1; } // ------------------------------------------------------------------------- // --------- Propagate cherenkov photon to focusing light guide void PndGeoDskFLG::Propagate(TVector3 pos, TVector3 dir,Int_t &i_FLG, Int_t &i_Pixel) { TVector3 Cylinder_point(1,0,0); LineCylinderInteraction(pos, dir, Cylinder_point); if(fVerbose > 1) cout<<"-I- PndGeoDskFLG::Propagate, Cylinder_point=("< 1) cout<<"-I- PndGeoDskFLG::Propagate, N_reflection: "< 1) cout<<"-I- PndGeoDskFLG::Propagate, i_phi: "<certain light guide TVector3 dir_in_focusing_coor(sin(dir.Theta())*cos(dir.Phi()-phi_foucsing_part), cos(dir.Theta()), sin(dir.Theta())*sin(dir.Phi()-phi_foucsing_part)); if(fVerbose > 1) cout<<"-I- PndGeoDskFLG::Propagate,theta, phi in new coordinate: "<1){ cout<<"-I- PndGeoDskFLG::Propagate, start Point: "<50./180*(TMath::Pi()) ) return; //do not deal with this Int_t i_loop = 0, max_loop = 2000; TVector3 NextPoint = StartPoint; do{ NextPoint = NextPoint + Direction*StepLength; i_loop++; if(fVerbose>1)cout<<"NextPoint: "<1)cout<<"NextPoint: "<1)cout<<"NextPoint: "<1)cout<<"slope: "<1)cout<<"NextPoint: "<1)cout<<"NextPoint: "<1)cout<<"NextPoint: "<TMath::Pi()/2.&&phi<=TMath::Pi())||(phi>=-1*TMath::Pi()&&phi<-1*TMath::Pi()/2.)) {x_cylinder = (-1*B_x-sqrt(B_x*B_x-4*A_xx*C_const))/(2*A_xx); } else {x_cylinder = (-1*B_x+sqrt(B_x*B_x-4*A_xx*C_const))/(2*A_xx); } y_cylinder = x_cylinder*slope + (pos.Y()-pos.X()*slope); z_cylinder = sqrt((y_cylinder-pos.Y())*(y_cylinder-pos.Y()) + (x_cylinder-pos.X())*(x_cylinder-pos.X()))/tan(dir.Theta())+pos.Z(); pos_interaction.SetXYZ(x_cylinder,y_cylinder,z_cylinder); } Bool_t PndGeoDskFLG::CurveFunction(TVector3 Point) // to judge whether the input point (x1, y1, z2) exceed the curve function { Double_t x1 = Point.X(); Double_t y1 = Point.Y(); return (y1 < (a0 + a1*x1 + a2*x1*x1 + a3*x1*x1*x1 + a4*x1*x1*x1*x1 + a5*x1*x1*x1*x1*x1)); } Bool_t PndGeoDskFLG::LineFunction(TVector3 Point) { Double_t x0 = 95.0000, y0 = -23.2129; Double_t x1 = 67.0518, y1 = -100.0000; Double_t x = Point.X(); Double_t y = Point.Y(); return (y > (y0 + (y1-y0)/(x1-x0)*(x-x0))); } Double_t PndGeoDskFLG::SlopeCurveFunction(TVector3 Point) // to judge whether the input point (x1, y1, z2) exceed the curve function { Double_t x1 = Point.X(); Double_t y1 = Point.Y(); return atan(a0*0. + a1 + 2*a2*x1 + 3*a3*x1*x1 + 4*a4*x1*x1*x1 + 5*a5*x1*x1*x1*x1); }