Definition at line 16 of file ALILine.h.
CLHEP::Hep3Vector ALILine::intersect |
( |
const ALILine & |
l2, |
|
|
bool |
notParallel = 0 |
|
) |
| |
Definition at line 30 of file ALILine.cc.
References funct::abs(), ALI_DBL_MAX, MessageLogger_cfi::cerr, gather_cfg::cout, ALIUtils::debug, ALIUtils::dump3v(), MillePedeFileConverter_cfg::e, cmsRelvalreport::exit, fact, pt(), vec(), x, and z.
Referenced by OptOCOPS::getMeasFromInters(), OptODistancemeter::makeMeasurement(), and ~ALILine().
34 std::cout <<
"***** ALILine::intersect (constructor) two lines: " << std::endl
35 <<
" line1: " << *
this << std::endl
36 <<
" line2: " << l2 << std::endl;
38 CLHEP::Hep3Vector inters;
40 double acosvec =
vec().dot(l2.
vec()) /
vec().mag() / l2.
vec().mag();
44 std::cout <<
"\t Determination of acosvec = vec().dot(l2.vec()) / vec().mag() / l2.vec().mag() " 45 << std::endl << std::endl;
49 std::cout <<
"\t vec().mag() = " <<
vec().mag() << std::endl;
50 std::cout <<
"\t l2.vec().mag() = " << l2.
vec().mag() << std::endl << std::endl;
57 std::cerr <<
" !!!EXITING ALILine::intersect: two lines are parallel" 86 -
vec().y() *
pt().x() +
vec().x() *
pt().y() )
87 / (
vec().x() * l2.
vec().y() -
vec().y() * l2.
vec().x() );
92 std::cout << std::endl << std::endl <<
"*** START CALC OF FACT ***" << std::endl;
93 std::cout <<
" ==================" << std::endl << std::endl;
94 std::cout <<
"*** Determination of fact ->";
96 -
vec().y() *
pt().x() +
vec().x() *
pt().y() <<
"/";
123 fact = ( -1 *
vec().y() * l2.
pt().z() +
vec().z() * l2.
pt().y()
124 +
vec().y() *
pt().z() -
vec().z() *
pt().y() )
125 / ( -1*
vec().z() * l2.
vec().y() +
vec().y() * l2.
vec().z() );
129 old_fact_denominator2 = -1*
vec().z() * l2.
vec().y() +
vec().y() * l2.
vec().z();
136 if(
ALIUtils::debug >= 2 &&
std::abs(old_fact_denominator2) < 1.e-10)
std::cout <<
" ** Problem: old_fact_denominator2 -> " << old_fact_denominator2 << std::endl;
139 fact = ( -1*
vec().z() * l2.
pt().x() +
vec().x() * l2.
pt().z()
140 +
vec().z() *
pt().x() -
vec().x() *
pt().z() )
141 / ( -1*
vec().x() * l2.
vec().z() +
vec().z() * l2.
vec().x() );
157 l2.
pt().y() -
vec().y() *
pt().x() +
vec().x() *
pt().y() <<
" / " <<
vec().x() * l2.
vec().y()
158 -
vec().y()* l2.
vec().x() <<
" ) = " << fact << std::endl;
172 inters = l2.
pt() + fact * l2.
vec();
175 std::cout <<
"Determination of intersection = l2.pt() + fact * l2.vec()" << std::endl << std::endl;
177 std::cout <<
"\t --> fact = " << fact << std::endl;
178 std::cout <<
"\t --> l2.vec() = " << l2.
vec() << std::endl;
const CLHEP::Hep3Vector & pt() const
Abs< T >::type abs(const T &t)
static void dump3v(const CLHEP::Hep3Vector &vec, const std::string &msg)
const CLHEP::Hep3Vector & vec() const