Belle II Software  release-08-01-10
FiveHitFilter.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/vxdHoughTracking/filters/pathFilters/FiveHitFilter.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>
13 
14 using namespace Belle2;
15 using namespace TrackFindingCDC;
16 using namespace vxdHoughTracking;
17 
18 void FiveHitFilter::exposeParameters(ModuleParamList* moduleParamList, const std::string& prefix)
19 {
20  moduleParamList->addParameter(TrackFindingCDC::prefixed(prefix, "helixFitPocaDCut"), m_helixFitPocaDCut,
21  "Cut on the POCA difference in xy with the POCA obtained from a .",
22  m_helixFitPocaDCut);
23 }
24 
25 TrackFindingCDC::Weight
26 FiveHitFilter::operator()(const BasePathFilter::Object& pair)
27 {
28  const std::vector<TrackFindingCDC::WithWeight<const VXDHoughState*>>& previousHits = pair.first;
29 
30  // Do nothing if path is too short or too long
31  if (previousHits.size() != 4) {
32  return NAN;
33  }
34 
35  return 1.0;
36 }
The Module parameter list class.
AObject Object
Type of the object to be analysed.
Definition: Filter.dcl.h:33
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.