Belle II Software  release-08-01-10
UnionRecordingSegmentRelationFilter.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/segmentRelation/UnionRecordingSegmentRelationFilter.h>
9 
10 #include <tracking/trackFindingCDC/filters/segmentRelation/BasicSegmentRelationVarSet.h>
11 #include <tracking/trackFindingCDC/filters/segmentRelation/HitGapSegmentRelationVarSet.h>
12 #include <tracking/trackFindingCDC/filters/segmentRelation/FitlessSegmentRelationVarSet.h>
13 #include <tracking/trackFindingCDC/filters/segmentRelation/FitSegmentRelationVarSet.h>
14 
15 #include <tracking/trackFindingCDC/filters/segmentRelation/MVAFeasibleSegmentRelationFilter.h>
16 #include <tracking/trackFindingCDC/filters/segmentRelation/MVARealisticSegmentRelationFilter.h>
17 
18 #include <tracking/trackFindingCDC/filters/base/UnionRecordingFilter.icc.h>
19 
20 
21 using namespace Belle2;
22 using namespace TrackFindingCDC;
23 
25 
26 std::vector<std::string>
28 {
29  std::vector<std::string> varSetNames = Super::getValidVarSetNames();
30  varSetNames.insert(varSetNames.end(), {"basic", "hit_gap", "feasible", "fitless", "fit", "realistic"});
31  return varSetNames;
32 }
33 
34 std::unique_ptr<BaseVarSet<Relation<const CDCSegment2D> > >
36 {
37  if (name == "basic") {
38  return std::make_unique<BasicSegmentRelationVarSet>();
39  } else if (name == "hit_gap") {
40  return std::make_unique<HitGapSegmentRelationVarSet>();
41  } else if (name == "feasible") {
43  return std::move(filter).releaseVarSet();
44  } else if (name == "fitless") {
45  return std::make_unique<FitlessSegmentRelationVarSet>();
46  } else if (name == "fit") {
47  return std::make_unique<FitSegmentRelationVarSet>();
48  } else if (name == "realistic") {
50  return std::move(filter).releaseVarSet();
51  } else {
52  return Super::createVarSet(name);
53  }
54 }
Filter for the constuction of segment pairs based on simple criteria without the common fit.
std::vector< std::string > getValidVarSetNames() const override
Get the valid names of variable sets for segment relations.
std::unique_ptr< BaseVarSet< Relation< const CDCSegment2D > > > createVarSet(const std::string &name) const override
Create a concrete variables set for segment 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.