Belle II Software development
RelationCreator.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/filters/base/RelationFilterUtil.h>
12#include <tracking/trackFindingCDC/utilities/WeightedRelation.h>
13#include <tracking/trackFindingCDC/utilities/StringManipulation.h>
14#include <framework/core/ModuleParamList.h>
15
16namespace Belle2 {
21 namespace vxdHoughTracking {
22
24 template<class AHit, class ARelationFilter>
25 class RelationCreator : public TrackFindingCDC::Findlet<AHit*, TrackFindingCDC::WeightedRelation<AHit>> {
26 public:
29
35
37 ~RelationCreator() = default;
38
40 void exposeParameters(ModuleParamList* moduleParamList, const std::string& prefix) final
41 {
42 m_relationFilter.exposeParameters(moduleParamList, TrackFindingCDC::prefixed("relation", prefix));
43 };
44
46 void apply(std::vector<AHit*>& hits,
47 std::vector<TrackFindingCDC::WeightedRelation<AHit>>& relations) override
48 {
49 // relations += hits -> hits in each track candidate
51 };
52
53 private:
55 ARelationFilter m_relationFilter;
56 };
57
58 }
60}
The Module parameter list class.
Interface for a minimal algorithm part that wants to expose some parameters to a module.
Definition Findlet.h:26
Type for two related objects with a weight.
~RelationCreator()=default
Default destructor.
RelationCreator()
Construct this findlet and add the subfindlet as listener.
void apply(std::vector< AHit * > &hits, std::vector< TrackFindingCDC::WeightedRelation< AHit > > &relations) override
Apply both filters for creating state-hit and hit-hit relations.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) final
Expose the parameters of the subfindlet.
TrackFindingCDC::Findlet< AHit *, TrackFindingCDC::WeightedRelation< AHit > > Super
The parent class.
ARelationFilter m_relationFilter
Subfindlet for the relation checking between seed and hits.
Abstract base class for different kinds of events.
static void appendUsing(ARelationFilter &relationFilter, const std::vector< AObject * > &froms, const std::vector< AObject * > &tos, std::vector< WeightedRelation< AObject > > &weightedRelations, unsigned int maximumNumberOfRelations=std::numeric_limits< unsigned int >::max())
Appends relations between elements in the given AItems using the ARelationFilter.