Belle II Software  release-08-01-10
ThreeHitFilters.cc
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 
9 #include "tracking/vxdCaTracking/ThreeHitFilters.h"
10 // #include <boost/math/special_functions/fpclassify.hpp>
11 // #include <TMathBase.h>
12 // #include <math.h>
13 #include <boost/math/special_functions/sign.hpp>
14 
15 using namespace Belle2;
16 using boost::math::sign;
17 
18 int ThreeHitFilters::calcSign(const B2Vector3D& a, const B2Vector3D& b, const B2Vector3D& c)
19 {
20  B2Vector3D ba = a - b; ba.SetZ(0.);
21  B2Vector3D bc = b - c; bc.SetZ(0.);
22  return sign(bc.Orthogonal() * ba); //normal vector of m_vecBC times segment of ba
23 }
void SetZ(DataType z)
set Z/3rd-coordinate
Definition: B2Vector3.h:461
B2Vector3< DataType > Orthogonal() const
Vector orthogonal to this one.
Definition: B2Vector3.h:277
int calcSign(const B2Vector3D &a, const B2Vector3D &b, const B2Vector3D &c)
calculates calculates the sign of the curvature of given 3-hit-tracklet.
Abstract base class for different kinds of events.