8#include <tracking/trackFindingCDC/filters/facet/MCFacetFilter.h>
10#include <tracking/trackFindingCDC/mclookup/CDCMCHitLookUp.h>
12#include <tracking/trackFindingCDC/eventdata/hits/CDCFacet.h>
13#include <tracking/trackFindingCDC/eventdata/hits/CDCRLWireHitTriple.h>
14#include <tracking/trackFindingCDC/eventdata/hits/CDCWireHit.h>
16#include <tracking/trackFindingCDC/filters/base/MCSymmetricFilter.icc.h>
21using namespace TrackFindingCDC;
32 const int maxInTrackHitIdDifference = 3;
33 bool isCorrectFacet =
operator()(facet, maxInTrackHitIdDifference);
35 bool isCorrectReverseFacet =
43 }
else if (isCorrectReverseFacet) {
54 int maxInTrackHitIdDifference)
67 if (startMCTrackId == INVALID_ITRACK or
68 middleMCTrackId == INVALID_ITRACK or
69 endMCTrackId == INVALID_ITRACK) {
73 if (not(startMCTrackId == middleMCTrackId and middleMCTrackId == endMCTrackId)) {
81 int startToMiddleInTrackDistance = middleInTrackId - startInTrackId;
82 int middleToEndInTrackDistance = endInTrackId - middleInTrackId;
85 bool distanceInTrackIsSufficientlyLow =
86 0 < startToMiddleInTrackDistance and startToMiddleInTrackDistance <= maxInTrackHitIdDifference and
87 0 < middleToEndInTrackDistance and middleToEndInTrackDistance <= maxInTrackHitIdDifference;
90 if (not distanceInTrackIsSufficientlyLow)
return false;
101 if (startRLInfo == mcStartRLInfo and middleRLInfo == mcMiddleRLInfo and endRLInfo == mcEndRLInfo) {
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.
Interface class to the Monte Carlo information for individual hits.
ITrackType getMCTrackId(const CDCHit *ptrHit) const
Returns the track id for the hit.
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.
ERightLeft getRLInfo(const CDCHit *ptrHit) const
Returns the true right left passage information.
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.
Weight operator()(const CDCFacet &facet) final
Main filter method returning the weight of the facet.
MCFacetFilter(bool allowReverse=true)
Constructor also setting the switch, if the reversed version of a facet (in comparison to MC truth) s...
Mixin for filters that use Monte Carlo information.
bool getAllowReverse() const
Getter for the allow reverse parameter.
bool isInvalid() const
Check it the line is in an invalid state.
ERightLeft
Enumeration to represent the distinct possibilities of the right left passage.
Abstract base class for different kinds of events.