Belle II Software  release-05-01-25
UnionRecordingSegmentPairRelationFilter.cc
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2016 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Oliver Frost *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 #include <tracking/trackFindingCDC/filters/segmentPairRelation/UnionRecordingSegmentPairRelationFilter.h>
11 
12 #include <tracking/trackFindingCDC/filters/segmentPairRelation/BasicSegmentPairRelationVarSet.h>
13 #include <tracking/trackFindingCDC/filters/segmentPairRelation/FitSegmentPairRelationVarSet.h>
14 #include <tracking/trackFindingCDC/filters/segmentPairRelation/TruthSegmentPairRelationVarSet.h>
15 
16 #include <tracking/trackFindingCDC/filters/segmentPairRelation/MVARealisticSegmentPairRelationFilter.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", "fit", "realistic", "truth"});
31  return varSetNames;
32 }
33 
34 std::unique_ptr<BaseVarSet<Relation<const CDCSegmentPair> > >
36 {
37  if (name == "basic") {
38  return std::make_unique<BasicSegmentPairRelationVarSet>();
39  } else if (name == "fit") {
40  return std::make_unique<FitSegmentPairRelationVarSet>();
41  } else if (name == "realistic") {
43  return std::move(filter).releaseVarSet();
44  } else if (name == "truth") {
45  return std::make_unique<TruthSegmentPairRelationVarSet>();
46  }
47  return Super::createVarSet(name);
48 }
Belle2::TrackFindingCDC::UnionRecording< SegmentPairRelationFilterFactory ::CreatedFilter >::getValidVarSetNames
virtual std::vector< std::string > getValidVarSetNames() const
Getter for the list of valid names of concret variable sets.
Definition: UnionRecordingFilter.icc.h:101
Belle2::TrackFindingCDC::UnionRecordingFilter< SegmentPairRelationFilterFactory >
Belle2::TrackFindingCDC::MVARealisticSegmentPairRelationFilter
Final filter for the constuction of segment pairs.
Definition: MVARealisticSegmentPairRelationFilter.h:37
Belle2::filter
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:43
Belle2::TrackFindingCDC::UnionRecordingSegmentPairRelationFilter::getValidVarSetNames
std::vector< std::string > getValidVarSetNames() const final
Get the valid names of variable sets for segment pair relations.
Definition: UnionRecordingSegmentPairRelationFilter.cc:27
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TrackFindingCDC::UnionRecording< SegmentPairRelationFilterFactory ::CreatedFilter >::createVarSet
virtual std::unique_ptr< AVarSet > createVarSet(const std::string &name) const
Create a variable set for the given name.
Definition: UnionRecordingFilter.icc.h:131
Belle2::TrackFindingCDC::UnionRecordingSegmentPairRelationFilter::createVarSet
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.
Definition: UnionRecordingSegmentPairRelationFilter.cc:35