8#include <tracking/trackFindingCDC/filters/segmentPair/MCSegmentPairFilter.h>
10#include <tracking/trackFindingCDC/mclookup/CDCMCSegment2DLookUp.h>
12#include <tracking/trackingUtilities/eventdata/tracks/CDCSegmentPair.h>
13#include <tracking/trackingUtilities/eventdata/segments/CDCSegment2D.h>
15#include <tracking/trackFindingCDC/filters/base/MCSymmetricFilter.icc.h>
17#include <framework/core/ModuleParamList.templateDetails.h>
20using namespace TrackFindingCDC;
21using namespace TrackingUtilities;
31 const std::string& prefix)
34 moduleParamList->
addParameter(prefixed(prefix,
"requireRLPure"),
36 "Switch to require the segment combination contain mostly correct rl information",
40 moduleParamList->
addParameter(prefixed(prefix,
"minSegmentSize"),
42 "Minimum segment size to pass as monte carlo truth",
52 assert(ptrFromSegment);
66 EForwardBackward pairFBInfo =
71 if (pairFBInfo == EForwardBackward::c_Invalid)
return NAN;
73 if (pairFBInfo == EForwardBackward::c_Forward or
77 if (fromNPassedSuperLayers == c_InvalidIndex)
return NAN;
80 if (toNPassedSuperLayers == c_InvalidIndex)
return NAN;
82 if (abs(fromNPassedSuperLayers - toNPassedSuperLayers) > 1)
return NAN;
87 if (pairFBInfo == EForwardBackward::c_Backward) {
92 return static_cast<double>(pairFBInfo) *
static_cast<Weight
>(fromSegment.size() + toSegment.size());
The Module parameter list class.
TrackingUtilities::EForwardBackward areAlignedInMCTrack(const ACDCHitCollection *ptrFromHits, const ACDCHitCollection *ptrToHits) const
Returns if the second collection of hits follows the first collection of hits in their common Monte C...
TrackingUtilities::Index getLastNPassedSuperLayers(const ACDCHitCollection *ptrHits) const
Getter for number of passed superlayer till the last hit the collection of hits which has the Monte C...
TrackingUtilities::Index getFirstNPassedSuperLayers(const ACDCHitCollection *ptrHits) const
Getter for number of passed superlayer till the first hit the collection of hits which has the Monte ...
TrackingUtilities::EForwardBackward areAlignedInMCTrackWithRLCheck(const ACDCHitCollection *ptrFromHits, const ACDCHitCollection *ptrToHits) const
Returns if the second collection of hits follows the first collection of hits in their common Monte C...
TrackingUtilities::CDCTrajectory3D getTrajectory3D(const ACDCHitCollection *ptrHits) const
Returns the trajectory of the collection of hits.
Specialisation of the lookup for the truth values of two dimensional segments.
static const CDCMCSegment2DLookUp & getInstance()
Getter for the singletone instance.
bool m_param_requireRLPure
Parameter : Switch to require the segment combination contain mostly correct rl information.
int m_param_minSegmentSize
Parameter : Minimum segment size to pass as monte carlo truth.
MCSegmentPairFilter(bool allowReverse=true)
Constructor.
MCSymmetric< BaseSegmentPairFilter > Super
Type of the super class.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) final
Expose the set of parameters of the filter to the module parameter list.
TrackingUtilities::Weight operator()(const TrackingUtilities::CDCSegmentPair &segmentPair) final
Checks if a axial stereo segment pair is a good combination.
Mixin for filters that use Monte Carlo information.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) override
bool getAllowReverse() const
A reconstructed sequence of two dimensional hits in one super layer.
Class representing a pair of one reconstructed axial segment and one stereo segment in adjacent super...
const CDCSegment2D * getToSegment() const
Getter for the to segment.
void setTrajectory3D(const CDCTrajectory3D &trajectory3D) const
Setter for the three dimensional trajectory.
CDCTrajectory3D & getTrajectory3D() const
Getter for the three dimensional trajectory.
const CDCSegment2D * getFromSegment() const
Getter for the from segment.
Particle full three dimensional trajectory.
void reverse()
Reverses the trajectory in place.
bool isFitted() const
Checks if the trajectory has already been set to a valid value.
void addParameter(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module list.
Abstract base class for different kinds of events.