Belle II Software  release-08-01-10
UnionRecordingFacetFilter.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/facet/UnionRecordingFacetFilter.h>
9 
10 #include <tracking/trackFindingCDC/filters/facet/FitFacetVarSet.h>
11 #include <tracking/trackFindingCDC/filters/facet/BendFacetVarSet.h>
12 #include <tracking/trackFindingCDC/filters/facet/FitlessFacetVarSet.h>
13 #include <tracking/trackFindingCDC/filters/facet/BasicFacetVarSet.h>
14 
15 #include <tracking/trackFindingCDC/filters/facet/MVAFacetFilter.h>
16 
17 #include <tracking/trackFindingCDC/filters/base/UnionRecordingFilter.icc.h>
18 
19 using namespace Belle2;
20 using namespace TrackFindingCDC;
21 
23 
24 std::vector<std::string> UnionRecordingFacetFilter::getValidVarSetNames() const
25 {
26  std::vector<std::string> varSetNames = Super::getValidVarSetNames();
27  varSetNames.insert(varSetNames.end(), {"basic", "fitless", "bend", "fit", "mva"});
28  return varSetNames;
29 }
30 
31 std::unique_ptr<BaseVarSet<const CDCFacet> >
32 UnionRecordingFacetFilter::createVarSet(const std::string& name) const
33 {
34  if (name == "basic") {
35  return std::make_unique<BasicFacetVarSet>();
36  } else if (name == "fitless") {
37  return std::make_unique<FitlessFacetVarSet>();
38  } else if (name == "bend") {
39  return std::make_unique<BendFacetVarSet>();
40  } else if (name == "fit") {
41  return std::make_unique<FitFacetVarSet>();
42  } else if (name == "mva") {
43  MVAFacetFilter mvaFacetFilter;
44  return std::move(mvaFacetFilter).releaseVarSet();
45  } else {
46  return Super::createVarSet(name);
47  }
48 }
Background facet detection based on MVA.
std::unique_ptr< AVarSet > releaseVarSet() &&
Steal the set of variables form this filter - filter becomes disfunctional afterwards.
std::unique_ptr< BaseVarSet< const CDCFacet > > createVarSet(const std::string &name) const final
Create a concrete variables set for facets from a name.
std::vector< std::string > getValidVarSetNames() const final
Get the valid names of variable sets for facets.
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 concret variable sets.
Abstract base class for different kinds of events.