Belle II Software development
Chi2BasedCDCPathPairFilter.h
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#pragma once
9
10#include <tracking/ckf/cdc/filters/pathPairs/BaseCDCPathPairFilter.h>
11
12#include <tracking/trackFindingCDC/numerics/Weight.h>
13
14namespace Belle2 {
21 public:
23 TrackFindingCDC::Weight operator()(const BaseCDCPathPairFilter::Object& pair) final
24 {
25 const auto& lhs = *pair.first;
26 const auto& rhs = *pair.second;
27
28 if (lhs.size() > rhs.size() + 2) {
29 return true;
30 } else if (lhs.size() + 2 < rhs.size()) {
31 return false;
32 }
33
34 // Order by chi2 of fit of last state
35 return lhs.back().getChi2() < rhs.back().getChi2();
36 }
37 };
39}
Prefers path with smallest sum dist^2 / length of path.
TrackFindingCDC::Weight operator()(const BaseCDCPathPairFilter::Object &pair) final
Input: pair of paths, returns 1 if pair.first to be selected, 0 otherwise.
Base class for filters on a generic object type.
Definition: Filter.dcl.h:31
AObject Object
Type of the object to be analysed.
Definition: Filter.dcl.h:35
Abstract base class for different kinds of events.