21 _point = CLHEP::Hep3Vector(0.,0.,0.);
33 CLHEP::Hep3Vector ZAxis(0.,0.,1.);
34 const CLHEP::HepRotation& rmt = opto->
rmGlob();
56 CLHEP::Hep3Vector _ZAxis(0.,0.,1.);
75 CLHEP::Hep3Vector
dir = vec2 -
vec1;
90 CLHEP::Hep3Vector ZAxis(0.,0.,1.);
91 const CLHEP::HepRotation& rmt = opto.
rmGlob();
112 std::cerr <<
" !!!! INTERSECTION NOT POSSIBLE: LightRay is perpendicular to plane " << std::endl;
125 dtemp = (vtemp * plane.
normal()) / dtemp;
128 std::cerr <<
"!!! LightRay: Intersect With Plane: plane and light ray parallel: no intersection" << std::endl;
132 CLHEP::Hep3Vector inters = vtemp +
_point;
149 std::cout <<
" cosang = " << cosang << std::endl;
166 std::cout <<
"% LR REFRACT: " <<
"refra_ind1 = " << refra_ind1 <<
" refra_ind2 = " << refra_ind2 <<std::endl;
167 std::cout <<
"@ First intersect with plate plane " << std::endl;
175 if( Axis1.mag() < 1.E-6 ) {
177 std::cout <<
" light ray normal to plane, no refraction " << std::endl;
180 dumpData(
"LightRay after refraction: ");
189 Axis1 = Axis1.cross( plate.
normal() );
190 Axis1 *= 1./Axis1.mag();
203 ALIdouble sinangp = sinang * refra_ind1 / refra_ind2;
205 std::cerr <<
" !!!EXITING LightRay::refract: incidence ray on plane too close to face, refraction will not allow entering " << std::endl;
208 std::cout <<
" refraction index first medium " << refra_ind1 <<
" refraction index second medium " << refra_ind2 << std::endl;
213 std::cout <<
"LightRay refract on plane 1: sin(ang) before = " << sinang
214 <<
" sinang after " << sinangp << std::endl;
224 dumpData(
"LightRay refract: direction before plate");
225 std::cout <<
" sign projection on plate normal " << signN <<
" sign projection on Axis1 " << sign1 << std::endl;
231 dumpData(
"LightRay refract: direction after plate");
264 std::cout <<
" shift X " << shiftX <<
" shift Y " << shiftY << std::endl;
265 std::cout <<
" devi X " << deviX <<
" devi Y " << deviY << std::endl;
277 CLHEP::Hep3Vector XAxis(1.,0.,0.);
278 CLHEP::Hep3Vector YAxis(0.,1.,0.);
279 CLHEP::Hep3Vector ZAxis(0.,0.,1.);
280 const CLHEP::HepRotation& rmt = opto->
rmGlob();
292 CLHEP::Hep3Vector pointold =
_point;
311 std::cout <<
" deviX " << deviX << std::endl;
316 std::cout <<
" deviY " << deviY << std::endl;
321 std::cout <<
" deviZ " << deviZ << std::endl;
void shiftAndDeviateWhileTraversing(const OpticalObject *opto, char behav)
static void dumprm(const CLHEP::HepRotation &rm, const std::string &msg, std::ostream &out=std::cout)
void refract(const ALIPlane &plate, const ALIdouble refra_ind1, const ALIdouble refra_ind2)
const CLHEP::HepRotation & rmGlob() const
void setDirection(const CLHEP::Hep3Vector &direc)
void setPoint(const CLHEP::Hep3Vector &point)
std::vector< double > vec1
Abs< T >::type abs(const T &t)
const ALIdouble findExtraEntryValue(const ALIstring &eename) const
const CLHEP::Hep3Vector & point() const
CLHEP::Hep3Vector _direction
static void dump3v(const CLHEP::Hep3Vector &vec, const std::string &msg)
void intersect(const ALIPlane &plane)
const CLHEP::Hep3Vector & centreGlob() const
void dumpData(const ALIstring &str) const
const ALIstring & name() const
void startLightRay(OpticalObject *opto)
void reflect(const ALIPlane &plane)
const CLHEP::Hep3Vector & normal() const
const CLHEP::Hep3Vector & direction() const
const ALIstring & type() const