8#include <tracking/ckf/pxd/filters/results/PXDResultFilterFactory.h>
10#include <tracking/trackFindingCDC/filters/base/FilterFactory.icc.h>
11#include <tracking/trackFindingCDC/filters/base/AllFilter.icc.h>
12#include <tracking/trackFindingCDC/filters/base/NoneFilter.icc.h>
13#include <tracking/trackFindingCDC/filters/base/ChoosableFromVarSetFilter.icc.h>
14#include <tracking/trackFindingCDC/filters/base/RecordingFilter.icc.h>
15#include <tracking/trackFindingCDC/filters/base/MVAFilter.icc.h>
17#include <tracking/trackFindingCDC/varsets/VariadicUnionVarSet.h>
19#include <tracking/ckf/pxd/filters/results/PXDResultVarSet.h>
20#include <tracking/ckf/pxd/filters/results/PXDResultTruthVarSet.h>
21#include <tracking/ckf/pxd/filters/results/SizePXDResultFilter.h>
25using namespace TrackFindingCDC;
40 :
Super(defaultFilterName)
53 return "Reject PXD CKF results. ";
59 {
"none",
"no combination is valid"},
60 {
"all",
"all combination are valid"},
61 {
"recording",
"record variables to a TTree"},
62 {
"mva",
"filter based on the trained MVA method"},
63 {
"size",
"ordering according to size"},
64 {
"truth",
"Monte Carlo truth"},
65 {
"truth_teacher",
"Monte Carlo truth returning the result of the teacher"},
69std::unique_ptr<BasePXDResultFilter>
72 if (filterName ==
"none") {
73 return std::make_unique<TrackFindingCDC::NoneFilter<BasePXDResultFilter>>();
75 }
else if (filterName ==
"all") {
76 return std::make_unique<TrackFindingCDC::AllFilter<BasePXDResultFilter>>();
78 }
else if (filterName ==
"recording") {
79 return std::make_unique<RecordingPXDResultFilter>();
81 }
else if (filterName ==
"mva") {
82 return std::make_unique<MVAPXDResultFilter>(
"ckf_CDCToPXDResult");
84 }
else if (filterName ==
"truth") {
85 return std::make_unique<ChooseableTruthPXDResultFilter>(
"truth");
87 }
else if (filterName ==
"truth_teacher") {
88 return std::make_unique<ChooseableTruthPXDResultFilter>(
"truth_teacher");
90 }
else if (filterName ==
"size") {
91 return std::make_unique<SizePXDResultFilter>();
std::unique_ptr< BasePXDResultFilter > create(const std::string &filterName) const override
Create a filter with the given name.
std::map< std::string, std::string > getValidFilterNamesAndDescriptions() const override
Getter for valid filter names and a description for each.
~PXDResultFilterFactory()
Default destructor.
PXDResultFilterFactory(const std::string &defaultFilterName="all")
Constructor forwarding the default filter name.
std::string getIdentifier() const override
Getter for a short identifier for the factory.
std::string getFilterPurpose() const override
Getter for a descriptive purpose of the constructed filters.
Convince template to create a filter returning on variable from a set of variables.
virtual std::unique_ptr< BasePXDResultFilter > create(const std::string &filterName) const
Create a filter with the given name, does not set filter specific parameters.
Convenience template to create a mva filter for a set of variables.
Convenience template to create a recording filter for a set of variables.
Abstract base class for different kinds of events.