Belle II Software development
UnionRecordingAxialSegmentPairFilter.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/axialSegmentPair/UnionRecordingAxialSegmentPairFilter.h>
9
10#include <tracking/trackFindingCDC/filters/axialSegmentPair/BasicAxialSegmentPairVarSet.h>
11#include <tracking/trackFindingCDC/filters/axialSegmentPair/HitGapAxialSegmentPairVarSet.h>
12#include <tracking/trackFindingCDC/filters/axialSegmentPair/FitlessAxialSegmentPairVarSet.h>
13#include <tracking/trackFindingCDC/filters/axialSegmentPair/FitAxialSegmentPairVarSet.h>
14
15#include <tracking/trackFindingCDC/filters/axialSegmentPair/MVAFeasibleAxialSegmentPairFilter.h>
16#include <tracking/trackFindingCDC/filters/axialSegmentPair/MVARealisticAxialSegmentPairFilter.h>
17
18#include <tracking/trackFindingCDC/filters/base/UnionRecordingFilter.icc.h>
19
20#include <tracking/trackFindingCDC/varsets/BaseVarSet.h>
21
22using namespace Belle2;
23using namespace TrackFindingCDC;
24
26
27std::vector<std::string>
29{
30 std::vector<std::string> varSetNames = Super::getValidVarSetNames();
31 varSetNames.insert(varSetNames.end(), {"basic", "hit_gap", "feasible", "fitless", "fit", "realistic"});
32 return varSetNames;
33}
34
35std::unique_ptr<BaseVarSet<CDCAxialSegmentPair> >
37{
38 if (name == "basic") {
39 return std::make_unique<BasicAxialSegmentPairVarSet>();
40 } else if (name == "hit_gap") {
41 return std::make_unique<HitGapAxialSegmentPairVarSet>();
42 } else if (name == "feasible") {
44 return std::move(filter).releaseVarSet();
45 } else if (name == "fitless") {
46 return std::make_unique<FitlessAxialSegmentPairVarSet>();
47 } else if (name == "fit") {
48 return std::make_unique<FitAxialSegmentPairVarSet>();
49 } else if (name == "realistic") {
51 return std::move(filter).releaseVarSet();
52 } else {
53 return Super::createVarSet(name);
54 }
55}
Filter for the construction of segment pairs based on simple criteria without the common fit.
std::unique_ptr< BaseVarSet< CDCAxialSegmentPair > > createVarSet(const std::string &name) const final
Create a concrete variables set for axial segment pairs from a name.
std::vector< std::string > getValidVarSetNames() const final
Get the valid names of variable sets for axial segment pairs.
Convenience template to create a recording filter for a filter factory.
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.