8#include <tracking/trackFindingCDC/filters/facet/FeasibleRLFacetFilter.h>
10#include <tracking/trackFindingCDC/eventdata/hits/CDCFacet.h>
11#include <tracking/trackFindingCDC/eventdata/hits/CDCRLWireHitTriple.h>
13#include <tracking/trackFindingCDC/numerics/Modulo.h>
15#include <tracking/trackFindingCDC/utilities/StringManipulation.h>
17#include <framework/core/ModuleParamList.templateDetails.h>
20using namespace TrackFindingCDC;
23 : m_param_hardRLCut(hardRLCut)
28 const std::string& prefix)
31 moduleParamList->
addParameter(prefixed(prefix,
"hardRLCut"),
33 "Switch to disallow the boarderline possible hit and "
34 "right left passage information.",
51 const short absOClockDelta = std::abs(oClockDelta);
54 if (cellExtend + absOClockDelta > 6) {
63 const short stableTwist = -sign(shape.
getOClockDelta()) * middleRLInfo;
64 const bool startToMiddleIsCrossing = startRLInfo != middleRLInfo;
65 const bool middleToEndIsCrossing = middleRLInfo != endRLInfo;
67 const bool bothAreCrossing = startToMiddleIsCrossing and middleToEndIsCrossing;
70 const bool shortArmIsCrossing = startToMiddleIsLong ? middleToEndIsCrossing : startToMiddleIsCrossing;
72 const bool onlyOneShortArm = isOdd(cellExtend);
73 const bool shortArmsAreCrossing = bothAreCrossing or (onlyOneShortArm and shortArmIsCrossing);
74 const bool noneAreCrossing = not startToMiddleIsCrossing and not middleToEndIsCrossing;
76 const bool orthoHard = stableTwist > 0 and shortArmsAreCrossing;
77 const bool ortho = stableTwist > 0 and not noneAreCrossing;
78 const bool meta = stableTwist > 0 or noneAreCrossing;
79 const bool para = not bothAreCrossing;
82 if (oClockDelta == 0) {
88 switch (absOClockDelta) {
104 switch (absOClockDelta) {
124 switch (absOClockDelta) {
The Module parameter list class.
Class representing a triple of neighboring oriented wire with additional trajectory information.
Type for the different shapes of a triple of neighboring wire hits.
short getMiddleToEndCellDistance() const
Getter for the middle to end cell distance.
short getCellExtend() const
Getter for the sum of cell distances from start to middle and middle to end.
short getOClockDelta() const
Getter for the o'clock direction difference from start to middle compared to middle to end.
short getStartToMiddleCellDistance() const
Getter for the start to middle cell distance.
Class representing a triple of neighboring wire hits.
ERightLeft getMiddleRLInfo() const
Getter for the right left passage information of the second oriented wire hit.
ERightLeft getStartRLInfo() const
Getter for the right left passage information of the first oriented wire hit.
ERightLeft getEndRLInfo() const
Getter for the right left passage information of the third oriented wire hit.
Shape getShape() const
Getter for the shape of this triple if all three oriented wire hits are neighbors....
FeasibleRLFacetFilter(bool hardRLCut=true)
Constructor taking a flag if borderline feasible cases should be excluded.
Weight operator()(const CDCFacet &facet) final
Main filter method returning the weight of the facet.
bool isFeasible(const CDCRLWireHitTriple &rlWireHitTriple) const
Check if the hit triplet is a feasible combination for shape and rl passage information.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) final
Expose the set of parameters of the filter to the module parameter list.
bool m_param_hardRLCut
Switch for hard selection.
virtual void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix)
Expose the set of parameters of the filter to the module parameter list.
void addParameter(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module list.
ERightLeft
Enumeration to represent the distinct possibilities of the right left passage.
Abstract base class for different kinds of events.