8 #include <tracking/vxdHoughTracking/filters/pathFilters/FourHitFilter.h>
9 #include <tracking/trackFindingCDC/filters/base/Filter.icc.h>
10 #include <tracking/trackFindingCDC/utilities/StringManipulation.h>
11 #include <framework/core/ModuleParamList.templateDetails.h>
12 #include <framework/geometry/BFieldManager.h>
15 using namespace TrackFindingCDC;
16 using namespace vxdHoughTracking;
18 void FourHitFilter::exposeParameters(
ModuleParamList* moduleParamList,
const std::string& prefix)
20 moduleParamList->
addParameter(TrackFindingCDC::prefixed(prefix,
"circleRadiusDifferenceCut"), m_CircleRadiusDifferenceCut,
21 "Cut on the difference of the radii of the two circles that can be defined by two hit triplets.",
22 m_CircleRadiusDifferenceCut);
24 moduleParamList->
addParameter(TrackFindingCDC::prefixed(prefix,
"circleCenterPositionDifferenceCut"),
25 m_CircleCenterPositionDifferenceCut,
26 "Cut on the difference between the center positions of the two circles that can be defined by two hit triplets.",
27 m_CircleCenterPositionDifferenceCut);
30 void FourHitFilter::beginRun()
33 m_fourHitVariables.setBFieldZ(bFieldZ);
36 TrackFindingCDC::Weight
39 const std::vector<TrackFindingCDC::WithWeight<const VXDHoughState*>>& previousHits = pair.first;
42 if (previousHits.size() != 3) {
46 const B2Vector3D& firstHitPos = previousHits.
at(0)->getHit()->getPosition();
47 const B2Vector3D& secondHitPos = previousHits.
at(1)->getHit()->getPosition();
48 const B2Vector3D& thirdHitPos = previousHits.
at(2)->getHit()->getPosition();
49 const B2Vector3D& currentHitPos = pair.second->getHit()->getPosition();
51 m_fourHitVariables.setHits(firstHitPos, secondHitPos, thirdHitPos, currentHitPos);
53 if (m_fourHitVariables.getCircleRadiusDifference() > m_CircleRadiusDifferenceCut) {
56 if (m_fourHitVariables.getCircleCenterPositionDifference() > m_CircleCenterPositionDifferenceCut) {
60 return fabs(1.0 / m_fourHitVariables.getCircleRadiusDifference());
The Module parameter list class.
AObject Object
Type of the object to be analysed.
static const double T
[tesla]
void addParameter(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module list.
DataType at(unsigned i) const
safe member access (with boundary check!)
static void getField(const double *pos, double *field)
return the magnetic field at a given position.
Abstract base class for different kinds of events.