Belle II Software  release-05-01-25
DistanceCDCStateFilter.cc
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2017 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Nils Braun *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 #include <tracking/ckf/cdc/filters/states/DistanceCDCStateFilter.h>
11 
12 #include <tracking/ckf/cdc/entities/CDCCKFState.h>
13 #include <tracking/trackFindingCDC/utilities/StringManipulation.h>
14 
15 using namespace Belle2;
16 
17 void DistanceCDCStateFilter::exposeParameters(ModuleParamList* moduleParamList, const std::string& prefix)
18 {
19  moduleParamList->addParameter(TrackFindingCDC::prefixed(prefix, "maximalDistance"),
20  m_maximalDistance, "Maximal distance between track and hit post kalman update", m_maximalDistance);
21 }
22 
23 
25 {
26  const CDCCKFState& state = *(pair.second);
27 
28  double dist = std::abs(state.getHitDistance());
29 
30  if (dist > m_maximalDistance) {
31  return NAN;
32  }
33 
34  return 1 / dist;
35 }
Belle2::DistanceCDCStateFilter::exposeParameters
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) override
Expose the parameters.
Definition: DistanceCDCStateFilter.cc:17
Belle2::ModuleParamList::addParameter
void addParameter(const std::string &name, T &paramVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module list.
Definition: ModuleParamList.templateDetails.h:38
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::CDCCKFState::getHitDistance
double getHitDistance() const
Return hit distance to the trajectory.
Definition: CDCCKFState.h:118
Belle2::DistanceCDCStateFilter::operator()
TrackFindingCDC::Weight operator()(const BaseCDCStateFilter::Object &pair) final
Return the weight based on the distance.
Definition: DistanceCDCStateFilter.cc:24
Belle2::CDCCKFState
Define states for CKF algorithm, which can be seed track or CDC wire hit.
Definition: CDCCKFState.h:37
Belle2::ModuleParamList
The Module parameter list class.
Definition: ModuleParamList.h:46
Belle2::DistanceCDCStateFilter::m_maximalDistance
double m_maximalDistance
Cut value for maximal distance.
Definition: DistanceCDCStateFilter.h:38
Belle2::TrackFindingCDC::Filter::Object
AObject Object
Type of the object to be analysed.
Definition: Filter.dcl.h:43