Belle II Software  release-05-02-19
CircleDist2IP.h
1 /**************************************************************************
2 * BASF2 (Belle Analysis Framework 2) *
3 * Copyright(C) 2014 - Belle II Collaboration *
4 * *
5 * Author: The Belle II Collaboration *
6 * Contributors: Jakob Lettenbichler (jakob.lettenbichler@oeaw.ac.at) *
7 * *
8 * This software is provided "as is" without any warranty. *
9 **************************************************************************/
10 
11 #pragma once
12 
13 #include <tracking/trackFindingVXD/filterMap/filterFramework/SelectionVariable.h>
14 #include <tracking/trackFindingVXD/filterMap/threeHitVariables/CircleCenterXY.h>
15 #include <tracking/trackFindingVXD/filterMap/threeHitVariables/CircleRadius.h>
16 #include <framework/geometry/B2Vector3.h>
17 #include <math.h>
18 
19 #define CIRCLEDIST2IP_NAME CircleDist2IP
20 
21 namespace Belle2 {
31  template <typename PointType >
32  class CIRCLEDIST2IP_NAME : public SelectionVariable< PointType , 3, double > {
33  public:
34 
37 
39  static double value(const PointType& outerHit, const PointType& centerHit, const PointType& innerHit)
40  {
41 
42  B2Vector3D cCenter = CircleCenterXY<PointType>::value(outerHit, centerHit, innerHit);
43  double circleRadius = CircleRadius<PointType>::calcAvgDistanceXY(outerHit, centerHit, innerHit, cCenter);
44 
45  // distance of closest approach of circle to the IP :
46  // WARNING only valid for IP=0,0,X
47  return (fabs(cCenter.Perp() - circleRadius));
48  } // return unit: cm
49  };
50 
52 }
Belle2::B2Vector3::Perp
DataType Perp() const
The transverse component (R in cylindrical coordinate system).
Definition: B2Vector3.h:199
Belle2::CIRCLEDIST2IP_NAME::PUT_NAME_FUNCTION
PUT_NAME_FUNCTION(CIRCLEDIST2IP_NAME)
is replaced by "static const std:string name(void)" frunction which returns name of the Class
Belle2::B2Vector3< double >
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::CIRCLEDIST2IP_NAME::value
static double value(const PointType &outerHit, const PointType &centerHit, const PointType &innerHit)
calculates the distance of the point of closest approach of circle to the IP, returning unit: cm
Definition: CircleDist2IP.h:39
Belle2::SelectionVariable
Base class of the selection variable objects used for pair filtering.
Definition: SelectionVariable.h:54
Belle2::CIRCLEDIST2IP_NAME
calculates the distance of the point of closest approach of circle to the IP, returning unit: cm
Definition: CircleDist2IP.h:32