Belle II Software development
Distance1DZSquared.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
13#define DISTANCE1DZSQUARED_NAME Distance1DZSquared
14
15namespace Belle2 {
22 template <typename PointType >
23 class DISTANCE1DZSQUARED_NAME : public SelectionVariable< PointType, 2, double > {
24 public:
27
29 static double value(const PointType& outerHit, const PointType& innerHit)
30 {
31 return std::pow(double(outerHit.Z() - innerHit.Z()), 2);
32 }
33 };
34
36}
DataType Z() const
access variable Z (= .at(2) without boundary check)
Definition: B2Vector3.h:435
This is the specialization for SpacePoints with returning floats, where value calculates the squared ...
static double value(const PointType &outerHit, const PointType &innerHit)
calculates the squared distance between the hits in Z (in 1D), returning unit: cm^2
PUT_NAME_FUNCTION(DISTANCE1DZSQUARED_NAME)
is replaced by "static const std:string name(void)" frunction which returns name of the Class (CLASS_...
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.