Belle II Software development
DistanceCDCStateFilter.cc
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8#include <tracking/ckf/cdc/filters/states/DistanceCDCStateFilter.h>
9
10#include <tracking/ckf/cdc/entities/CDCCKFState.h>
11#include <tracking/trackFindingCDC/utilities/StringManipulation.h>
12
13using namespace Belle2;
14
15void DistanceCDCStateFilter::exposeParameters(ModuleParamList* moduleParamList, const std::string& prefix)
16{
17 moduleParamList->addParameter(TrackFindingCDC::prefixed(prefix, "maximalDistance"),
18 m_maximalDistance, "Maximal distance between track and hit post kalman update", m_maximalDistance);
19}
20
21
23{
24 const CDCCKFState& state = *(pair.second);
25
26 double dist = std::abs(state.getHitDistance());
27
28 if (dist > m_maximalDistance) {
29 return NAN;
30 }
31
32 return 1 / dist;
33}
Define states for CKF algorithm, which can be seed track or CDC wire hit.
Definition: CDCCKFState.h:25
double getHitDistance() const
Return hit distance to the trajectory.
Definition: CDCCKFState.h:106
double m_maximalDistance
Cut value for maximal distance.
TrackFindingCDC::Weight operator()(const BaseCDCStateFilter::Object &pair) final
Return the weight based on the distance.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) override
Expose the parameters.
The Module parameter list class.
AObject Object
Type of the object to be analysed.
Definition: Filter.dcl.h:35
void addParameter(const std::string &name, T &paramVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module list.
Abstract base class for different kinds of events.