11#include <tracking/trackFindingVXD/filterMap/filterFramework/SelectionVariable.h>
12#include <tracking/trackFindingVXD/filterMap/threeHitVariables/SignCurvatureXY.h>
17#define ZIGGZAGGXY_NAME ZiggZaggXY
29 template <
typename Po
intType,
typename Po
intContainerType >
37 static int value(
const PointContainerType& hitContainer)
39 if (hitContainer.size() < 4)
return 1;
41 std::vector<int> chargeSigns;
42 chargeSigns.reserve(hitContainer.size() - 2);
44 auto iterPos = hitContainer.begin();
45 auto stopPos = hitContainer.end() - 2;
47 for (; iterPos < stopPos; ++iterPos) {
48 int signVal = SignCurvatureXY<PointType>::value(**iterPos, **(iterPos + 1), **(iterPos + 2));
49 chargeSigns.push_back(signVal);
52 std::sort(chargeSigns.begin(), chargeSigns.end());
53 auto newEnd = std::unique(chargeSigns.begin(), chargeSigns.end());
55 return std::distance(chargeSigns.begin(), newEnd);
Base class of the selection variable objects used for pair filtering.
checks whether chain of segments are zigg-zagging (changing sign of curvature of neighbouring segment...
static int value(const PointContainerType &hitContainer)
checks whether chain of segments are zigg-zagging (changing sign of curvature of neighbouring segment...
PUT_NAME_FUNCTION(ZIGGZAGGXY_NAME)
is replaced by "static const std:string name(void)" frunction which returns name of the Class
Abstract base class for different kinds of events.