Belle II Software development
UnionRecordingSegmentPairFilter.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/segmentPair/UnionRecordingSegmentPairFilter.h>
9
10#include <tracking/trackFindingCDC/filters/segmentPair/BasicSegmentPairVarSet.h>
11
12#include <tracking/trackFindingCDC/filters/segmentPair/HitGapSegmentPairVarSet.h>
13#include <tracking/trackFindingCDC/filters/segmentPair/SkimmedHitGapSegmentPairVarSet.h>
14#include <tracking/trackFindingCDC/filters/segmentPair/FitlessSegmentPairVarSet.h>
15#include <tracking/trackFindingCDC/filters/segmentPair/FitSegmentPairVarSet.h>
16#include <tracking/trackFindingCDC/filters/segmentPair/TruthSegmentPairVarSet.h>
17#include <tracking/trackFindingCDC/filters/segmentPair/TrailSegmentPairVarSet.h>
18
19#include <tracking/trackFindingCDC/filters/segmentPair/MVAFeasibleSegmentPairFilter.h>
20#include <tracking/trackFindingCDC/filters/segmentPair/MVARealisticSegmentPairFilter.h>
21
22#include <tracking/trackFindingCDC/filters/base/UnionRecordingFilter.icc.h>
23
24using namespace Belle2;
25using namespace TrackFindingCDC;
26
28
29std::vector<std::string>
31{
32 std::vector<std::string> varSetNames = Super::getValidVarSetNames();
33 varSetNames.insert(varSetNames.end(), {
34 "basic",
35 "hit_gap",
36 "skimmed_hit_gap",
37 "fitless",
38 "feasible",
39 "pre_fit",
40 "fit",
41 "releastic",
42 "truth",
43 "trail"
44 });
45
46 return varSetNames;
47}
48
49std::unique_ptr<BaseVarSet<CDCSegmentPair> >
51{
52 if (name == "basic") {
53 return std::make_unique<BasicSegmentPairVarSet>();
54 } else if (name == "hit_gap") {
55 return std::make_unique<HitGapSegmentPairVarSet>();
56 } else if (name == "skimmed_hit_gap") {
57 return std::make_unique<SkimmedHitGapSegmentPairVarSet>();
58 } else if (name == "fitless") {
59 return std::make_unique<FitlessSegmentPairVarSet>();
60 } else if (name == "feasible") {
62 return std::move(filter).releaseVarSet();
63 } else if (name == "pre_fit") {
64 const bool preliminaryFit = true;
65 return std::make_unique<FitSegmentPairVarSet>(preliminaryFit);
66 } else if (name == "fit") {
67 return std::make_unique<FitSegmentPairVarSet>(false);
68 } else if (name == "realistic") {
70 return std::move(filter).releaseVarSet();
71 } else if (name == "truth") {
72 return std::make_unique<TruthSegmentPairVarSet>();
73 } else if (name == "trail") {
74 return std::make_unique<TrailSegmentPairVarSet>();
75 } else {
76 return Super::createVarSet(name);
77 }
78}
Filter for the construction of segment pairs based on simple criteria without the common fit.
Final filter for the construction of segment pairs.
Convenience template to create a recording filter for a filter factory.
std::unique_ptr< BaseVarSet< CDCSegmentPair > > createVarSet(const std::string &name) const final
Create a concrete variables set for segment pairs from a name.
std::vector< std::string > getValidVarSetNames() const final
Get the valid names of variable sets for segment pairs.
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.
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.