10 #include <tracking/ckf/pxd/filters/relations/LayerPXDRelationFilter.dcl.h>
11 #include <tracking/trackFindingCDC/filters/base/RelationFilter.icc.h>
13 #include <tracking/trackFindingCDC/utilities/StringManipulation.h>
15 #include <tracking/spacePointCreation/SpacePoint.h>
16 #include <framework/core/ModuleParamList.templateDetails.h>
17 #include <vxd/geometry/GeoCache.h>
25 template <
class AFilter,
class APrefilter>
32 template <
class AFilter,
class APrefilter>
35 template <
class AFilter,
class APrefilter>
36 std::vector<CKFToPXDState*>
38 const std::vector<CKFToPXDState*>& states)
const
40 std::vector<CKFToPXDState*> possibleNextStates;
42 const CKFToPXDState::stateCache& currentStateCache = currentState->
getStateCache();
43 const unsigned int& currentLayer = currentStateCache.geoLayer;
44 const unsigned int& nextPossibleLayer = std::max(
static_cast<int>(currentLayer) - 1 - m_param_hitJumping, 0);
49 int numberOfLaddersForLayer[2] = {8, 12};
52 const CKFToPXDState::stateCache& nextStateCache = nextState->getStateCache();
53 const unsigned int nextLayer = nextStateCache.geoLayer;
54 if (nextLayer < std::min(currentLayer, nextPossibleLayer) or std::max(currentLayer, nextPossibleLayer) < nextLayer) {
58 if (currentLayer == nextLayer) {
61 const unsigned int fromLadderNumber = currentStateCache.ladder;
62 const unsigned int maximumLadderNumber = numberOfLaddersForLayer[currentLayer - 1];
69 const int direction = 1;
70 const unsigned int overlappingLadder =
71 ((fromLadderNumber + maximumLadderNumber - 1) + direction) % maximumLadderNumber + 1;
73 if (nextStateCache.ladder != overlappingLadder) {
88 if (currentStateCache.localNormalizedu <= 0.8) {
92 if (nextStateCache.localNormalizedu > 0.2) {
98 TrackFindingCDC::Weight weight = m_prefilter(std::make_pair(currentState, nextState));
99 if (std::isnan(weight)) {
103 possibleNextStates.push_back(nextState);
106 return possibleNextStates;
109 template <
class AFilter,
class APrefilter>
112 moduleParamList->addParameter(TrackFindingCDC::prefixed(prefix,
"hitJumping"), m_param_hitJumping,
113 "Make it possible to jump over N layers.", m_param_hitJumping);
115 m_filter.exposeParameters(moduleParamList, prefix);
116 m_prefilter.exposeParameters(moduleParamList, TrackFindingCDC::prefixed(
"pre", prefix));
119 template <
class AFilter,
class APrefilter>
122 return m_filter(std::make_pair(&from, &to));