Belle II Software  release-05-02-19
CosDirectionXY.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 COSDIRECTIONXY_NAME CosDirectionXY
17 
18 namespace Belle2 {
26  template <typename PointType >
27  class COSDIRECTIONXY_NAME : public SelectionVariable< PointType , 2, double > {
28  public:
31 
33  static double value(const PointType& outerHit, const PointType& innerHit)
34  {
35  double result = (outerHit.X() * innerHit.X() + outerHit.Y() * innerHit.Y());
36  result /= sqrt(outerHit.X() * outerHit.X() + outerHit.Y() * outerHit.Y());
37  result /= sqrt(innerHit.X() * innerHit.X() + innerHit.Y() * innerHit.Y());
38  return result;
39  }
40  };
41 
43 }
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::COSDIRECTIONXY_NAME::value
static double value(const PointType &outerHit, const PointType &innerHit)
calculates the distance between the hits in z (1D), returning unit: cm
Definition: CosDirectionXY.h:33
Belle2::COSDIRECTIONXY_NAME::PUT_NAME_FUNCTION
PUT_NAME_FUNCTION(COSDIRECTIONXY_NAME)
is replaced by "static const std:string name(void)" frunction which returns name of the Class
Belle2::COSDIRECTIONXY_NAME
This is a specialization returning floats, where value calculates the cos of the angle of the segment...
Definition: CosDirectionXY.h:27