Belle II Software development
CircleDist2IP.h
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#pragma once
10
11#include <tracking/trackFindingVXD/filterMap/filterFramework/SelectionVariable.h>
12#include <tracking/trackFindingVXD/filterMap/threeHitVariables/CircleCenterXY.h>
13#include <tracking/trackFindingVXD/filterMap/threeHitVariables/CircleRadius.h>
14#include <framework/geometry/B2Vector3.h>
15#include <math.h>
16
17#define CIRCLEDIST2IP_NAME CircleDist2IP
18
19namespace Belle2 {
29 template <typename PointType >
30 class CIRCLEDIST2IP_NAME : public SelectionVariable< PointType, 3, double > {
31 public:
32
35
37 static double value(const PointType& outerHit, const PointType& centerHit, const PointType& innerHit)
38 {
39
40 B2Vector3D cCenter = CircleCenterXY<PointType>::value(outerHit, centerHit, innerHit);
41 double circleRadius = CircleRadius<PointType>::calcAvgDistanceXY(outerHit, centerHit, innerHit, cCenter);
42
43 // distance of closest approach of circle to the IP :
44 // WARNING only valid for IP=0,0,X
45 return (fabs(cCenter.Perp() - circleRadius));
46 } // return unit: cm
47 };
48
50}
DataType Perp() const
The transverse component (R in cylindrical coordinate system).
Definition: B2Vector3.h:200
calculates the distance of the point of closest approach of circle to the IP, returning unit: cm
Definition: CircleDist2IP.h:30
PUT_NAME_FUNCTION(CIRCLEDIST2IP_NAME)
is replaced by "static const std:string name(void)" frunction which returns name of the Class
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:37
Base class of the selection variable objects used for pair filtering.
B2Vector3D outerHit(0, 0, 0)
testing out of range behavior
Abstract base class for different kinds of events.