Belle II Software  release-05-02-19
AngleRZSimple.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/twoHitVariables/CosDirectionXY.h>
15 #include <framework/geometry/B2Vector3.h>
16 
17 #define ANGLERZSIMPLE_NAME AngleRZSimple
18 
19 namespace Belle2 {
30  template <typename PointType >
31  class ANGLERZSIMPLE_NAME : public SelectionVariable< PointType , 3, double > {
32  public:
35 
36 
38  static double value(const PointType& outerHit, const PointType& centerHit, const PointType& innerHit)
39  {
40 
41  B2Vector3D outerVector(outerHit.X() - centerHit.X(), outerHit.Y() - centerHit.Y(), outerHit.Z() - centerHit.Z());
42  B2Vector3D innerVector(centerHit.X() - innerHit.X(), centerHit.Y() - innerHit.Y(), centerHit.Z() - innerHit.Z());
43 
44  B2Vector3D rzVecAB(outerVector.Perp(), outerVector[2], 0.);
45  B2Vector3D rzVecBC(innerVector.Perp(), innerVector[2], 0.);
46 
47  return CosDirectionXY<B2Vector3D>::value(rzVecAB, rzVecBC);
48  } // return unit: none (calculation for degrees is incomplete, if you want readable numbers, use AngleRZFull instead)
49  };
50 
52 }
Belle2::B2Vector3::Perp
DataType Perp() const
The transverse component (R in cylindrical coordinate system).
Definition: B2Vector3.h:199
Belle2::B2Vector3< double >
Belle2::ANGLERZSIMPLE_NAME::value
static double value(const PointType &outerHit, const PointType &centerHit, const PointType &innerHit)
calculates the angle between the hits/vectors (RZ), returning unit: none (calculation for degrees is ...
Definition: AngleRZSimple.h:38
Belle2::ANGLERZSIMPLE_NAME::PUT_NAME_FUNCTION
PUT_NAME_FUNCTION(ANGLERZSIMPLE_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::ANGLERZSIMPLE_NAME
calculates the angle between the hits/vectors (RZ), returning unit: none (calculation for degrees is ...
Definition: AngleRZSimple.h:31