Belle II Software development
PathLengthToggledApplier.icc.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/vxdHoughTracking/findlets/PathLengthToggledApplier.dcl.h>
11#include <tracking/vxdHoughTracking/findlets/OnHitApplier.icc.h>
12#include <tracking/trackFindingCDC/utilities/StringManipulation.h>
13
14namespace Belle2 {
19 namespace vxdHoughTracking {
20
22 template <class AHit, class AFindlet>
24 {
29 }
30
32 template <class AHit, class AFindlet>
34 const std::string& prefix)
35 {
36 m_twoHitFilterFindlet.exposeParameters(moduleParamList, TrackFindingCDC::prefixed(prefix, "twoHit"));
37 m_threeHitFilterFindlet.exposeParameters(moduleParamList, TrackFindingCDC::prefixed(prefix, "threeHit"));
38 m_fourHitFilterFindlet.exposeParameters(moduleParamList, TrackFindingCDC::prefixed(prefix, "fourHit"));
39 m_fiveHitFilterFindlet.exposeParameters(moduleParamList, TrackFindingCDC::prefixed(prefix, "fiveHit"));
40 }
41
43 template <class AHit, class AFindlet>
45 std::vector<TrackFindingCDC::WithWeight<AHit*>>& childHits)
46 {
47 // if currentPath.size() == 1, including the single child hits makes the total path length 2, so use the twoHitFilter
48 // if currentPath.size() == 2, including the single child hits makes the total path length 3, so use the threeHitFilter
49 // if currentPath.size() == 3, including the single child hits makes the total path length 4, so use the fourHitFilter
50 // if currentPath.size() == 4, including the single child hits makes the total path length 5, so use the fiveHitFilter
51 // in the rare case that currentPath already contains five or more hits, it's very likely already that it's a valid track
52 // candidate, so no filter is applied here, but only the best N candidates sorted by quality are used further.
53 if (currentPath.size() == 1) {
54 m_twoHitFilterFindlet.apply(currentPath, childHits);
55 } else if (currentPath.size() == 2) {
56 m_threeHitFilterFindlet.apply(currentPath, childHits);
57 } else if (currentPath.size() == 3) {
58 m_fourHitFilterFindlet.apply(currentPath, childHits);
59 } else if (currentPath.size() == 4) {
60 m_fiveHitFilterFindlet.apply(currentPath, childHits);
61 }
62 }
63
64 }
66}
The Module parameter list class.
void addProcessingSignalListener(ProcessingSignalListener *psl)
Register a processing signal listener to be notified.
A mixin class to attach a weight to an object.
Definition: WithWeight.h:24
Helper findlet which applies its () operator to all pairs of path and hit with all hits in the given ...
AFindlet m_fiveHitFilterFindlet
Findlet used for currentPath.size() == 4.
AFindlet m_fourHitFilterFindlet
Findlet used for currentPath.size() == 3.
AFindlet m_threeHitFilterFindlet
Findlet used for currentPath.size() == 2.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) final
Expose parameters of the subfilters and the layer to change.
AFindlet m_twoHitFilterFindlet
Findlet used for currentPath.size() == 1.
void apply(const std::vector< TrackFindingCDC::WithWeight< const AHit * > > &currentPath, std::vector< TrackFindingCDC::WithWeight< AHit * > > &childHits) override
The weight is calculated using the subfilter based on the geometrical layer of the state.
Abstract base class for different kinds of events.