11#include <tracking/trackFindingVXD/filterMap/filterFramework/SelectionVariable.h>
12#include <tracking/trackFindingVXD/filterMap/threeHitVariables/SignCurvatureXYError.h>
17#define ZIGGZAGGXYWITHSIGMA_NAME ZiggZaggXYWithSigma
29 template <
typename Po
intType,
typename Po
intContainerType >
37 static int value(
const PointContainerType& hitContainer)
39 if (hitContainer.size() < 4)
return 1;
42 std::vector<int> chargeSigns;
43 chargeSigns.reserve(hitContainer.size() - 2);
45 auto iterPos = hitContainer.begin();
46 auto stopPos = hitContainer.end() - 2;
48 for (; iterPos < stopPos; ++iterPos) {
49 int signVal = SignCurvatureXYError<PointType>::value(**iterPos, **(iterPos + 1), **(iterPos + 2));
50 chargeSigns.push_back(signVal);
53 std::sort(chargeSigns.begin(), chargeSigns.end());
54 auto endAfterRemove = std::remove(chargeSigns.begin(), chargeSigns.end(), 0);
55 auto finalEnd = std::unique(chargeSigns.begin(), endAfterRemove);
57 return std::distance(chargeSigns.begin(), finalEnd);
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(ZIGGZAGGXYWITHSIGMA_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.