Belle II Software  release-05-01-25
Distance3DNormed.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 <cmath>
15 
16 #define DISTANCE3DNORMED_NAME Distance3DNormed
17 namespace Belle2 {
24  template <typename PointType >
25  class DISTANCE3DNORMED_NAME : public SelectionVariable< PointType , 2, double > {
26  public:
27 
30 
31 
32 
39  static double value(const PointType& outerHit, const PointType& innerHit)
40  {
41 
42  double result =
43  (std::pow(outerHit.X() - innerHit.X() , 2)
44  + std::pow(outerHit.Y() - innerHit.Y() , 2))
45  /
46  (std::pow(outerHit.X() - innerHit.X() , 2)
47  + std::pow(outerHit.Y() - innerHit.Y() , 2)
48  + std::pow(outerHit.Z() - innerHit.Z() , 2));
49 
50  return
51  (std::isnan(result) || std::isinf(result)) ? 0 : result;
52  }
53 
54 
55  };
56 
58 }
Belle2::DISTANCE3DNORMED_NAME::value
static double value(const PointType &outerHit, const PointType &innerHit)
calculates the normed distance between the hits (3D), returning unit: none.
Definition: Distance3DNormed.h:39
Belle2::DISTANCE3DNORMED_NAME::PUT_NAME_FUNCTION
PUT_NAME_FUNCTION(DISTANCE3DNORMED_NAME)
is replaced by "static const std:string name(void)" frunction which returns name of the Class
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::SelectionVariable
Base class of the selection variable objects used for pair filtering.
Definition: SelectionVariable.h:54
Belle2::DISTANCE3DNORMED_NAME
This is the specialization for SpacePoints with returning floats, where value calculates the normed d...
Definition: Distance3DNormed.h:25