Belle II Software development
OverlapResolver.dcl.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/trackFindingCDC/findlets/base/Findlet.h>
11#include <tracking/trackFindingCDC/numerics/WithWeight.h>
12
13#include <vector>
14#include <string>
15
16namespace Belle2 {
21 class ModuleParamList;
22
24 template<class AFilter>
25 class OverlapResolver : public TrackFindingCDC::Findlet<typename AFilter::Object, typename AFilter::Object> {
26 public:
28 using Object = typename AFilter::Object;
29
32
35
37 void exposeParameters(ModuleParamList* moduleParamList, const std::string& prefix) final;
38
40 void apply(std::vector<Object>& results, std::vector<Object>& filteredResult) override;
41
42 private:
44 AFilter m_filter;
45
46 // Temporary vectors
48 std::vector<TrackFindingCDC::WithWeight<Object*>> m_resultsWithWeight;
49
50 // Parameters
54 unsigned long m_param_useBestNInSeed = 3;
55 };
57}
The Module parameter list class.
Simple findlet for searching the best candidate for a given seed aplying the given filter.
std::vector< TrackFindingCDC::WithWeight< Object * > > m_resultsWithWeight
temporary results vector with weights, out of which the overlaps will be build.
typename AFilter::Object Object
The object to filter.
unsigned long m_param_useBestNInSeed
Parameter: In seed mode, use only the best seeds.
bool m_param_enableOverlapResolving
Parameter: Enable overlap.
AFilter m_filter
Subfindlet for filtering.
Interface for a minimal algorithm part that wants to expose some parameters to a module.
Definition: Findlet.h:26
OverlapResolver()
Construct this findlet and add the subfindlet as listener.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) final
Expose the parameters of the subfindlet.
void apply(std::vector< Object > &results, std::vector< Object > &filteredResult) override
For each seed, search for the best candidate and return it.
Abstract base class for different kinds of events.