Belle II Software  release-08-01-10
UnionRecordingSegmentPairRelationFilter.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/segmentPairRelation/UnionRecordingSegmentPairRelationFilter.h>
9 
10 #include <tracking/trackFindingCDC/filters/segmentPairRelation/BasicSegmentPairRelationVarSet.h>
11 #include <tracking/trackFindingCDC/filters/segmentPairRelation/FitSegmentPairRelationVarSet.h>
12 #include <tracking/trackFindingCDC/filters/segmentPairRelation/TruthSegmentPairRelationVarSet.h>
13 
14 #include <tracking/trackFindingCDC/filters/segmentPairRelation/MVARealisticSegmentPairRelationFilter.h>
15 
16 #include <tracking/trackFindingCDC/filters/base/UnionRecordingFilter.icc.h>
17 
18 
19 using namespace Belle2;
20 using namespace TrackFindingCDC;
21 
23 
24 std::vector<std::string>
26 {
27  std::vector<std::string> varSetNames = Super::getValidVarSetNames();
28  varSetNames.insert(varSetNames.end(), {"basic", "fit", "realistic", "truth"});
29  return varSetNames;
30 }
31 
32 std::unique_ptr<BaseVarSet<Relation<const CDCSegmentPair> > >
34 {
35  if (name == "basic") {
36  return std::make_unique<BasicSegmentPairRelationVarSet>();
37  } else if (name == "fit") {
38  return std::make_unique<FitSegmentPairRelationVarSet>();
39  } else if (name == "realistic") {
41  return std::move(filter).releaseVarSet();
42  } else if (name == "truth") {
43  return std::make_unique<TruthSegmentPairRelationVarSet>();
44  }
45  return Super::createVarSet(name);
46 }
std::vector< std::string > getValidVarSetNames() const final
Get the valid names of variable sets for segment pair relations.
std::unique_ptr< BaseVarSet< Relation< const CDCSegmentPair > > > createVarSet(const std::string &name) const final
Create a concrete variables set for segment pair relations from a name.
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.
std::map< ExpRun, std::pair< double, double > > filter(const std::map< ExpRun, std::pair< double, double >> &runs, double cut, std::map< ExpRun, std::pair< double, double >> &runsRemoved)
filter events to remove runs shorter than cut, it stores removed runs in runsRemoved
Definition: Splitter.cc:38
Abstract base class for different kinds of events.