Functions | |
TEveVector | calculateCentre (const float *vertices) |
float | calculateEt (const TEveVector ¢re, float e) |
bool | checkIntersect (const TEveVector &vec, float r) |
TEveVector | cross (const TEveVector &v1, const TEveVector &v2) |
float | dot (const TEveVector &v1, const TEveVector &v2) |
float | linearInterpolation (const TEveVector &p1, const TEveVector &p2, float r) |
TEveVector | lineCircleIntersect (const TEveVector &v1, const TEveVector &v2, float r) |
TEveVector | lineLineIntersect (const TEveVector &v1, const TEveVector &v2, const TEveVector &v3, const TEveVector &v4) |
float | sgn (float val) |
TEveVector FWPFMaths::calculateCentre | ( | const float * | vertices | ) |
float FWPFMaths::calculateEt | ( | const TEveVector & | centre, |
float | e | ||
) |
Definition at line 115 of file FWPFMaths.cc.
Referenced by FWPFClusterRPZProxyBuilder::build(), FWPFEcalRecHitLegoProxyBuilder::build(), FWPFEcalRecHitRPProxyBuilder::build(), FWPFClusterRPZUtils::buildRhoPhiClusterLineSet(), FWPFClusterRPZUtils::buildRhoZClusterLineSet(), FWPFBlockProxyBuilder::setupClusterElement(), and FWPFClusterRPZProxyBuilder::sharedBuild().
{ TEveVector vec = centre; float et; vec.Normalize(); vec *= e; et = vec.Perp(); return et; }
bool FWPFMaths::checkIntersect | ( | const TEveVector & | vec, |
float | r | ||
) |
Definition at line 103 of file FWPFMaths.cc.
References h, and mathSSE::sqrt().
Referenced by FWPFTrackUtils::getCollisionMarkers(), and FWPFTrackUtils::setupLegoTrack().
TEveVector FWPFMaths::cross | ( | const TEveVector & | v1, |
const TEveVector & | v2 | ||
) |
Definition at line 16 of file FWPFMaths.cc.
Referenced by lineLineIntersect().
{
TEveVector vec;
vec.fX = ( v1.fY * v2.fZ ) - ( v1.fZ * v2.fY );
vec.fY = ( v1.fZ * v2.fX ) - ( v1.fX * v2.fZ );
vec.fZ = ( v1.fX * v2.fY ) - ( v1.fY * v2.fX );
return vec;
}
float FWPFMaths::dot | ( | const TEveVector & | v1, |
const TEveVector & | v2 | ||
) |
Definition at line 29 of file FWPFMaths.cc.
References query::result.
Referenced by lineLineIntersect().
float FWPFMaths::linearInterpolation | ( | const TEveVector & | p1, |
const TEveVector & | p2, | ||
float | r | ||
) |
Definition at line 91 of file FWPFMaths.cc.
References detailsBasic3DVector::y, and z.
Referenced by FWPFTrackUtils::getCollisionMarkers(), and FWPFTrackUtils::setupLegoTrack().
TEveVector FWPFMaths::lineCircleIntersect | ( | const TEveVector & | v1, |
const TEveVector & | v2, | ||
float | r | ||
) |
Definition at line 38 of file FWPFMaths.cc.
References funct::D, query::result, sgn(), mathSSE::sqrt(), x, and detailsBasic3DVector::y.
Referenced by FWPFTrackUtils::getCollisionMarkers(), and FWPFTrackUtils::setupLegoTrack().
{ // Definitions float x, y; float dx = v1.fX - v2.fX; float dy = v1.fY - v2.fY; float dr = sqrt( ( dx * dx ) + ( dy * dy ) ); float D = ( ( v2.fX * v1.fY ) - ( v1.fX * v2.fY ) ); float rtDescrim = sqrt( ( ( r * r ) * ( dr * dr ) ) - ( D * D ) ); if( dy < 0 ) // Going down { x = ( D * dy ) - ( ( sgn(dy) * dx ) * rtDescrim ); x /= ( dr * dr ); y = ( -D * dx ) - ( fabs( dy ) * rtDescrim ); y /= ( dr * dr ); } else { x = ( D * dy ) + ( ( sgn(dy) * dx ) * rtDescrim ); x /= ( dr * dr ); y = ( -D * dx ) + ( fabs( dy ) * rtDescrim ); y /= ( dr * dr ); } TEveVector result = TEveVector( x, y, 0.001 ); return result; }
TEveVector FWPFMaths::lineLineIntersect | ( | const TEveVector & | v1, |
const TEveVector & | v2, | ||
const TEveVector & | v3, | ||
const TEveVector & | v4 | ||
) |
Definition at line 73 of file FWPFMaths.cc.
References a, b, trackerHits::c, cross(), dot(), p1, p3, query::result, and asciidump::s.
Referenced by FWPFTrackUtils::getCollisionMarkers(), and FWPFTrackUtils::setupLegoTrack().
float FWPFMaths::sgn | ( | float | val | ) |
Definition at line 9 of file FWPFMaths.cc.
Referenced by ThirdHitPredictionFromCircle::angle(), ThirdHitPredictionFromCircle::curvature(), lineCircleIntersect(), reco::TrackResiduals::pack_pull(), reco::TrackResiduals::pack_residual(), ThirdHitPredictionFromCircle::phi(), ThirdHitPredictionFromCircle::HelixRZ::rAtZ(), TopologyWorker::setPartList(), reco::TrackResiduals::unpack_pull(), reco::TrackResiduals::unpack_residual(), and ThirdHitPredictionFromCircle::HelixRZ::zAtR().
{
return ( val < 0 ) ? -1 : 1;
}