10 #include <tracking/ckf/svd/filters/relations/SensorSVDPairFilter.h>
11 #include <tracking/trackFindingCDC/filters/base/Filter.icc.h>
13 #include <tracking/trackFindingCDC/utilities/StringManipulation.h>
14 #include <framework/core/ModuleParamList.templateDetails.h>
16 #include <vxd/geometry/GeoCache.h>
19 using namespace TrackFindingCDC;
21 TrackFindingCDC::Weight
27 const CKFToSVDState::stateCache& fromStateCache = fromState.
getStateCache();
28 const CKFToSVDState::stateCache& toStateCache = toState.
getStateCache();
30 B2ASSERT(
"You have filled the wrong states into this!", toStateCache.isHitState);
32 if (not fromStateCache.isHitState) {
35 double phiDiff = fromStateCache.phi - toStateCache.sensorCenterPhi;
36 while (phiDiff > M_PI) phiDiff -= 2. * M_PI;
37 while (phiDiff < -M_PI) phiDiff += 2. * M_PI;
39 if (fabs(phiDiff) < m_param_PhiRecoTrackToHitCut) {
49 if (fromStateCache.geoLayer == toStateCache.geoLayer and
50 fromStateCache.sensorID.getSensorNumber() == toStateCache.sensorID.getSensorNumber()) {
58 const int sensorNumberDifference =
59 static_cast<int>(fromStateCache.sensorID.getSensorNumber()) -
static_cast<int>(toStateCache.sensorID.getSensorNumber());
60 const int layerNumberDifference =
61 static_cast<int>(fromStateCache.geoLayer) -
static_cast<int>(toStateCache.geoLayer);
63 if ((abs(sensorNumberDifference) > 1 and layerNumberDifference == 1) or (abs(sensorNumberDifference) > 2)) {
67 double phiDiff = fromStateCache.sensorCenterPhi - toStateCache.sensorCenterPhi;
68 while (phiDiff > M_PI) phiDiff -= 2. * M_PI;
69 while (phiDiff < -M_PI) phiDiff += 2. * M_PI;
71 if (fabs(phiDiff) < m_param_PhiHitHitCut) {
80 moduleParamList->
addParameter(TrackFindingCDC::prefixed(prefix,
"phiRecoTrackToHitCut"), m_param_PhiRecoTrackToHitCut,
81 "Cut in phi for the difference between RecoTrack (seed) mSoP and current hit-based state.", m_param_PhiRecoTrackToHitCut);
82 moduleParamList->
addParameter(TrackFindingCDC::prefixed(prefix,
"phiHitHitCut"), m_param_PhiHitHitCut,
83 "Cut in phi between two hit-based states.", m_param_PhiHitHitCut);