Belle II Software development
UnionRecordingClusterFilter.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/trackFindingCDC/filters/cluster/UnionRecordingClusterFilter.h>
9
10#include <tracking/trackFindingCDC/filters/cluster/BasicClusterVarSet.h>
11#include <tracking/trackFindingCDC/filters/cluster/BkgTruthClusterVarSet.h>
12
13#include <tracking/trackFindingCDC/filters/base/UnionRecordingFilter.icc.h>
14
15
16using namespace Belle2;
17using namespace TrackFindingCDC;
18
20
22{
23 std::vector<std::string> varSetNames = Super::getValidVarSetNames();
24 varSetNames.insert(varSetNames.end(), {"basic", "bkg_truth"});
25 return varSetNames;
26}
27
28std::unique_ptr<BaseVarSet<CDCWireHitCluster> >
29UnionRecordingClusterFilter::createVarSet(const std::string& name) const
30{
31 if (name == "basic") {
32 return std::make_unique<BasicClusterVarSet>();
33 } else if (name == "bkg_truth") {
34 return std::make_unique<BkgTruthClusterVarSet>();
35 } else {
36 return Super::createVarSet(name);
37 }
38}
std::vector< std::string > getValidVarSetNames() const override
Get the valid names of variable sets for wire hit clusters.
std::unique_ptr< BaseVarSet< CDCWireHitCluster > > createVarSet(const std::string &name) const override
Create a concrete variables set for wire hit clusters from a name.
Convenience template to create a recording filter for a filter factory.
virtual std::unique_ptr< AVarSet > createVarSet(const std::string &name) const
Create a variable set for the given name.
virtual std::vector< std::string > getValidVarSetNames() const
Getter for the list of valid names of concrete variable sets.
Abstract base class for different kinds of events.