Belle II Software development
ImpactSweeped.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#pragma once
9
10#include <tracking/trackFindingCDC/hough/perigee/ImpactRep.h>
11#include <tracking/trackFindingCDC/hough/boxes/SweepBox.h>
12#include <tracking/trackFindingCDC/hough/baseelements/SameSignChecker.h>
13#include <tracking/trackFindingCDC/topology/ILayer.h>
14
15namespace Belle2 {
20 namespace TrackFindingCDC {
21
25 template<class T, class AImpact = ContinuousImpact>
26 class AImpactSweeped : public T {
27
28 public:
30 using T::T;
31
32 public:
34 using HoughBox = SweepBox<AImpact, typename T::HoughBox>;
35
37 using SubordinaryHoughBox = typename T::HoughBox;
38
39 public:
43 float x,
44 float y,
45 float signedDriftLength,
46 float dxdz = 0,
47 float dydz = 0,
48 ILayer iCLayer = -1) const
49 {
50 float lowerImpact(houghBox.template getLowerBound<AImpact>());
51 float upperImpact(houghBox.template getUpperBound<AImpact>());
52 const SubordinaryHoughBox& subordinaryHoughBox = houghBox.getSubordinaryBox();
53
54 const float lowerY = y - lowerImpact;
55 const ESign lowerDistSign = T::getDistanceSign(subordinaryHoughBox,
56 x, lowerY,
57 signedDriftLength,
58 dxdz, dydz,
59 iCLayer);
60
61 const float upperY = y - upperImpact;
62 const ESign upperDistSign = T::getDistanceSign(subordinaryHoughBox,
63 x, upperY,
64 signedDriftLength,
65 dxdz, dydz,
66 iCLayer);
67
68 return ESignUtil::common(lowerDistSign, upperDistSign);
69 }
70 };
71 }
73}
Takes a basic object and sweeps it by some d0 range in the y direction.
Definition: ImpactSweeped.h:26
ESign getDistanceSign(const HoughBox &houghBox, float x, float y, float signedDriftLength, float dxdz=0, float dydz=0, ILayer iCLayer=-1) const
Function that gives the sign of the distance from an observed drift circle to the sweeped object.
Definition: ImpactSweeped.h:42
SweepBox< AImpact, typename T::HoughBox > HoughBox
The box to which this object corresponds.
Definition: ImpactSweeped.h:34
typename T::HoughBox SubordinaryHoughBox
The hough box without the sweep in d0.
Definition: ImpactSweeped.h:37
ESign
Enumeration for the distinct sign values of floating point variables.
Definition: ESign.h:27
static ESign common(ESign n1, ESign n2)
Check if two values have a common sign.
Definition: ESign.h:57
Abstract base class for different kinds of events.