8#include <tracking/ckf/cdc/filters/states/CDCStateFilterFactory.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/AndFilter.icc.h>
14#include <tracking/trackFindingCDC/filters/base/RecordingFilter.icc.h>
16#include <tracking/trackFindingCDC/varsets/VariadicUnionVarSet.h>
18#include <tracking/ckf/cdc/filters/states/CDCStateBasicVarSet.h>
19#include <tracking/ckf/cdc/filters/states/CDCfromEclStateTruthVarSet.h>
21#include <tracking/ckf/cdc/filters/states/MCTruthCDCStateFilter.h>
22#include <tracking/ckf/cdc/filters/states/RoughCDCStateFilter.h>
23#include <tracking/ckf/cdc/filters/states/RoughCDCfromEclStateFilter.h>
24#include <tracking/ckf/cdc/filters/states/ExtrapolateAndUpdateCDCStateFilter.h>
25#include <tracking/ckf/cdc/filters/states/DistanceCDCStateFilter.h>
26#include <tracking/ckf/cdc/filters/states/MCTruthEclSeedFilter.h>
29using namespace TrackFindingCDC;
43 :
Super(defaultFilterName)
56 return "Reject CDC CKF states. ";
62 {
"none",
"no track combination is valid"},
63 {
"all",
"set all track combinations as good"},
64 {
"mc_truth",
"filtering based on the mc truth information"},
65 {
"mc_truth_eclSeed",
"filtering based on the mc truth information"},
66 {
"rough",
"very rough filtering"},
67 {
"rough_eclSeed",
"very rough filtering, seed created from ECL shower"},
68 {
"extrapolate_and_update",
"Extrapolation and update"},
69 {
"distance",
"Give a weight based on the distance"},
70 {
"recording",
"record variables to a TTree"},
71 {
"recording_eclSeed",
"record variables to a TTree"},
72 {
"rough_and_recording",
"very rough filtering, seed created from SVD track"},
73 {
"rough_and_recording_eclSeed",
"very rough filtering, seed created from ECL shower"},
74 {
"distance_and_recording_eclSeed",
"Give a weight based on the distance"},
79std::unique_ptr<BaseCDCStateFilter>
82 if (filterName ==
"none") {
83 return std::make_unique<TrackFindingCDC::NoneFilter<BaseCDCStateFilter>>();
85 }
else if (filterName ==
"all") {
86 return std::make_unique<TrackFindingCDC::AllFilter<BaseCDCStateFilter>>();
88 }
else if (filterName ==
"rough") {
89 return std::make_unique<RoughCDCStateFilter>();
91 }
else if (filterName ==
"rough_eclSeed") {
92 return std::make_unique<RoughCDCfromEclStateFilter>();
94 }
else if (filterName ==
"mc_truth") {
95 return std::make_unique<MCTruthCDCStateFilter>();
97 }
else if (filterName ==
"mc_truth_eclSeed") {
98 return std::make_unique<MCTruthEclSeedFilter>();
100 }
else if (filterName ==
"extrapolate_and_update") {
101 return std::make_unique<ExtrapolateAndUpdateCDCStateFilter>();
103 }
else if (filterName ==
"distance") {
104 return std::make_unique<DistanceCDCStateFilter>();
106 }
else if (filterName ==
"recording") {
107 return std::make_unique<RecordingCDCStateFilter>(
"CDCStateFilter.root");
109 }
else if (filterName ==
"rough_and_recording") {
110 return std::make_unique<AndCDCStateFilter>(
111 std::make_unique<RecordingCDCStateFilter>(
"CDCStateFilter.root"),
112 std::make_unique<RoughCDCStateFilter>()
115 }
else if (filterName ==
"recording_eclSeed") {
116 return std::make_unique<RecordingCDCfromEclStateFilter>(
"CDCfromECLStateFilter.root");
118 }
else if (filterName ==
"rough_and_recording_eclSeed") {
119 return std::make_unique<AndCDCStateFilter>(
120 std::make_unique<RecordingCDCfromEclStateFilter>(
"CDCfromECLStateFilter.root"),
121 std::make_unique<RoughCDCfromEclStateFilter>()
124 }
else if (filterName ==
"distance_and_recording_eclSeed") {
125 return std::make_unique<AndCDCStateFilter>(
126 std::make_unique<RecordingCDCfromEclStateFilter>(
"CDCfromECLStateFilter.root"),
127 std::make_unique<DistanceCDCStateFilter>()
~CDCStateFilterFactory()
Default destructor.
std::map< std::string, std::string > getValidFilterNamesAndDescriptions() const override
Getter for valid filter names and a description for each.
std::string getIdentifier() const override
Getter for a short identifier for the factory.
CDCStateFilterFactory(const std::string &defaultFilterName="all")
Constructor forwarding the default filter name.
std::string getFilterPurpose() const override
Getter for a descriptive purpose of the constructed filters.
std::unique_ptr< BaseCDCStateFilter > create(const std::string &filterName) const override
Create a filter with the given name.
Filter adapter type that joins two filter results in an and like fashion.
virtual std::unique_ptr< BaseCDCStateFilter > 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.