8#include <tracking/trackFindingCDC/filters/facet/MCFacetFilter.h>
10#include <tracking/trackFindingCDC/mclookup/CDCMCHitLookUp.h>
12#include <tracking/trackingUtilities/eventdata/hits/CDCFacet.h>
13#include <tracking/trackingUtilities/eventdata/hits/CDCRLWireHitTriple.h>
14#include <tracking/trackingUtilities/eventdata/hits/CDCWireHit.h>
16#include <tracking/trackFindingCDC/filters/base/MCSymmetricFilter.icc.h>
21using namespace TrackFindingCDC;
22using namespace TrackingUtilities;
33 const int maxInTrackHitIdDifference = 3;
34 bool isCorrectFacet =
operator()(facet, maxInTrackHitIdDifference);
36 bool isCorrectReverseFacet =
44 }
else if (isCorrectReverseFacet) {
55 int maxInTrackHitIdDifference)
68 if (startMCTrackId == INVALID_ITRACK or
69 middleMCTrackId == INVALID_ITRACK or
70 endMCTrackId == INVALID_ITRACK) {
74 if (not(startMCTrackId == middleMCTrackId and middleMCTrackId == endMCTrackId)) {
82 int startToMiddleInTrackDistance = middleInTrackId - startInTrackId;
83 int middleToEndInTrackDistance = endInTrackId - middleInTrackId;
86 bool distanceInTrackIsSufficientlyLow =
87 0 < startToMiddleInTrackDistance and startToMiddleInTrackDistance <= maxInTrackHitIdDifference and
88 0 < middleToEndInTrackDistance and middleToEndInTrackDistance <= maxInTrackHitIdDifference;
91 if (not distanceInTrackIsSufficientlyLow)
return false;
98 ERightLeft mcStartRLInfo = mcHitLookUp.
getRLInfo(startWireHit.
getHit());
99 ERightLeft mcMiddleRLInfo = mcHitLookUp.
getRLInfo(middleWireHit.
getHit());
102 if (startRLInfo == mcStartRLInfo and middleRLInfo == mcMiddleRLInfo and endRLInfo == mcEndRLInfo) {
Interface class to the Monte Carlo information for individual hits.
ITrackType getMCTrackId(const CDCHit *ptrHit) const
Returns the track id for the hit.
TrackingUtilities::Index getInTrackId(const CDCHit *ptrHit) const
Returns the position of the wire hit in the track along the travel direction.
static const CDCMCHitLookUp & getInstance()
Getter for the singletone instance.
TrackingUtilities::ERightLeft getRLInfo(const CDCHit *ptrHit) const
Returns the true right left passage information.
MCSymmetric< BaseFacetFilter > Super
Type of the super class.
MCFacetFilter(bool allowReverse=true)
Constructor also setting the switch, if the reversed version of a facet (in comparison to MC truth) s...
TrackingUtilities::Weight operator()(const TrackingUtilities::CDCFacet &facet) final
Main filter method returning the weight of the facet.
Mixin for filters that use Monte Carlo information.
bool getAllowReverse() const
Class representing a triple of neighboring oriented wire with additional trajectory information.
void adjustFitLine() const
Adjusts the contained fit line to touch such that it touches the first and third hit.
const UncertainParameterLine2D & getFitLine() const
Getter for the contained line fit information.
CDCFacet reversed() const
Constructs the reverse triple from this one.
Class representing a triple of neighboring wire hits.
ERightLeft getMiddleRLInfo() const
Getter for the right left passage information of the second oriented wire hit.
const CDCWireHit & getMiddleWireHit() const
Getter for the hit wire of the second oriented wire hit.
ERightLeft getStartRLInfo() const
Getter for the right left passage information of the first oriented wire hit.
const CDCWireHit & getEndWireHit() const
Getter for the hit wire of the third oriented wire hit.
ERightLeft getEndRLInfo() const
Getter for the right left passage information of the third oriented wire hit.
const CDCWireHit & getStartWireHit() const
Getter for the hit wire of the first oriented wire hit.
Class representing a hit wire in the central drift chamber.
const CDCHit * getHit() const
Getter for the CDCHit pointer into the StoreArray.
bool isInvalid() const
Check it the line is in an invalid state.
Abstract base class for different kinds of events.