8#include <tracking/ckf/cdc/filters/paths/CDCPathFilterFactory.h>
10#include <tracking/trackFindingCDC/filters/base/FilterFactory.icc.h>
12#include <tracking/ckf/cdc/filters/paths/SizeCDCPathFilter.h>
13#include <tracking/trackFindingCDC/filters/base/AllFilter.icc.h>
14#include <tracking/trackFindingCDC/filters/base/AndFilter.icc.h>
15#include <tracking/trackFindingCDC/filters/base/NoneFilter.icc.h>
16#include <tracking/trackFindingCDC/filters/base/RecordingFilter.icc.h>
18#include <tracking/trackFindingCDC/varsets/VariadicUnionVarSet.h>
20#include <tracking/ckf/cdc/filters/paths/CDCPathBasicVarSet.h>
21#include <tracking/ckf/cdc/filters/paths/CDCPathTruthVarSet.h>
22#include <tracking/ckf/cdc/filters/paths/CDCfromEclPathTruthVarSet.h>
24#include <tracking/ckf/cdc/filters/paths/SeedChargeCDCPathFilter.h>
27using namespace TrackFindingCDC;
39 :
Super(defaultFilterName)
52 return "Reject CDC CKF paths. ";
58 {
"none",
"no track combination is valid"},
59 {
"all",
"set all track combinations as good"},
60 {
"size",
"very rough filtering"},
61 {
"recording",
"record variables to a TTree"},
62 {
"size_and_recording",
"record variables to a TTree"},
63 {
"recording_fromEcl",
"record variables to a TTree"},
64 {
"size_and_recording_fromEcl",
"record variables to a TTree"},
65 {
"seedCharge",
"charge of path corresponds to charge of seed"},
66 {
"seedCharge_and_recording_fromEcl",
"record variables to a TTree"}
71std::unique_ptr<BaseCDCPathFilter>
74 if (filterName ==
"none") {
75 return std::make_unique<TrackFindingCDC::NoneFilter<BaseCDCPathFilter>>();
77 }
else if (filterName ==
"all") {
78 return std::make_unique<TrackFindingCDC::AllFilter<BaseCDCPathFilter>>();
80 }
else if (filterName ==
"size") {
81 return std::make_unique<SizeCDCPathFilter>();
85 }
else if (filterName ==
"recording") {
86 return std::make_unique<RecordingCDCPathFilter>(
"CDCPathFilter.root");
88 }
else if (filterName ==
"size_and_recording") {
89 return std::make_unique<AndCDCPathFilter>(
90 std::make_unique<RecordingCDCPathFilter>(
"CDCPathFilter.root"),
91 std::make_unique<SizeCDCPathFilter>()
94 }
else if (filterName ==
"recording_fromEcl") {
95 return std::make_unique<RecordingCDCfromEclPathFilter>(
"CDCfromEclPathFilter.root");
97 }
else if (filterName ==
"size_and_recording_fromEcl") {
98 return std::make_unique<AndCDCPathFilter>(
99 std::make_unique<RecordingCDCfromEclPathFilter>(
"CDCfromEclPathFilter.root"),
100 std::make_unique<SizeCDCPathFilter>()
103 }
else if (filterName ==
"seedCharge") {
104 return std::make_unique<SeedChargeCDCPathFilter>();
106 }
else if (filterName ==
"seedCharge_and_recording_fromEcl") {
107 return std::make_unique<AndCDCPathFilter>(
108 std::make_unique<RecordingCDCfromEclPathFilter>(
"CDCfromEclPathFilter.root"),
109 std::make_unique<SeedChargeCDCPathFilter>()
std::map< std::string, std::string > getValidFilterNamesAndDescriptions() const override
Getter for valid filter names and a description for each.
std::unique_ptr< BaseCDCPathFilter > create(const std::string &filterName) const override
Create a filter with the given name.
~CDCPathFilterFactory()
Default destructor.
std::string getIdentifier() const override
Getter for a short identifier for the factory.
CDCPathFilterFactory(const std::string &defaultFilterName="size")
Constructor forwarding the default filter name.
std::string getFilterPurpose() const override
Getter for a descriptive purpose of the constructed filters.
Filter adapter type that joins two filter results in an and like fashion.
virtual std::unique_ptr< BaseCDCPathFilter > create(const std::string &filterName) const
Create a filter with the given name, does not set filter specific parameters.
Convenience template to create a recording filter for a set of variables.
Abstract base class for different kinds of events.