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#include <framework/core/ModuleParamList.h>
13
14using namespace Belle2;
15
16void DistanceCDCStateFilter::exposeParameters(ModuleParamList* moduleParamList, const std::string& prefix)
17{
18 moduleParamList->addParameter(TrackFindingCDC::prefixed(prefix, "maximalDistance"),
19 m_maximalDistance, "Maximal distance between track and hit post kalman update", m_maximalDistance);
20}
21
22
24{
25 const CDCCKFState& state = *(pair.second);
26
27 double dist = std::abs(state.getHitDistance());
28
29 if (dist > m_maximalDistance) {
30 return NAN;
31 }
32
33 return 1 / dist;
34}
Define states for CKF algorithm, which can be seed track or CDC wire hit.
Definition CDCCKFState.h:24
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.
STL class.
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.