Belle II Software  release-05-02-19
DeltaPt.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 <tracking/trackFindingVXD/filterTools/SelectionVariableHelper.h>
17 #include <framework/geometry/B2Vector3.h>
18 
19 #define DELTAPT_NAME DeltaPt
20 
21 namespace Belle2 {
29  template <typename PointType >
30  class DELTAPT_NAME : public SelectionVariable< PointType , 4, double > {
31  public:
34 
35 
37  static double value(const PointType& outerHit, const PointType& outerCenterHit, const PointType& innerCenterHit,
38  const PointType& innerHit)
39  {
40  typedef SelVarHelper<PointType, double> Helper;
41 
42  B2Vector3<double> outerCircleCenter =
43  CircleCenterXY<PointType>::value(outerHit, outerCenterHit, innerCenterHit);
44  double outerCircleRadius =
45  CircleRadius<PointType>::calcAvgDistanceXY(outerHit, outerCenterHit, innerCenterHit, outerCircleCenter);
46 
47  B2Vector3<double> innerCircleCenter =
48  CircleCenterXY<PointType>::value(outerCenterHit, innerCenterHit, innerHit);
49  double innerCircleRadius =
50  CircleRadius<PointType>::calcAvgDistanceXY(outerCenterHit, innerCenterHit, innerHit, innerCircleCenter);
51 
52  return fabs(Helper::calcPt(outerCircleRadius - innerCircleRadius));
53  } // return unit: GeV/c
54  };
55 
57 }
Belle2::DELTAPT_NAME::PUT_NAME_FUNCTION
PUT_NAME_FUNCTION(DELTAPT_NAME)
is replaced by "static const std:string name(void)" frunction which returns name of the Class
Belle2::SelVarHelper
contains a collection of functions and related stuff needed for SelectionVariables implementing 2-,...
Definition: SelectionVariableHelper.h:31
Belle2::B2Vector3< double >
Belle2::DELTAPT_NAME
calculates dpt-value (dpt= difference in transverse momentum of 2 subsets of the hits),...
Definition: DeltaPt.h:30
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::DELTAPT_NAME::value
static double value(const PointType &outerHit, const PointType &outerCenterHit, const PointType &innerCenterHit, const PointType &innerHit)
calculates dpt-value (dpt= difference in transverse momentum of 2 subsets of the hits),...
Definition: DeltaPt.h:37