8#include <tracking/trackFindingCDC/filters/stereoHits/StereoHitFilterFactory.h>
10#include <tracking/trackFindingCDC/filters/stereoHits/StereoHitTruthVarSet.h>
11#include <tracking/trackFindingCDC/filters/stereoHits/StereoHitVarSet.h>
13#include <tracking/trackFindingCDC/filters/base/MVAFilter.icc.h>
15#include <tracking/trackFindingCDC/filters/base/AllFilter.icc.h>
16#include <tracking/trackFindingCDC/filters/base/NoneFilter.icc.h>
17#include <tracking/trackFindingCDC/filters/base/RandomFilter.icc.h>
18#include <tracking/trackFindingCDC/filters/base/ChoosableFromVarSetFilter.icc.h>
19#include <tracking/trackFindingCDC/filters/base/TruthVarFilter.icc.h>
20#include <tracking/trackFindingCDC/filters/base/RecordingFilter.icc.h>
22#include <tracking/trackFindingCDC/filters/base/FilterFactory.icc.h>
24#include <tracking/trackFindingCDC/varsets/VariadicUnionVarSet.h>
27using namespace TrackFindingCDC;
35 using RecordingStereoHitFilter =
43 :
Super(defaultFilterName)
54 return "Stereo hit to track combination filter for adding the hit.";
57std::map<std::string, std::string>
61 {
"none",
"no hit track combination is valid."},
62 {
"all",
"set all hits as good."},
63 {
"random",
"returns a random weight (for testing)."},
64 {
"truth",
"monte carlo truth."},
65 {
"simple",
"give back a weight based on very simple variables you can give as a parameter."},
66 {
"recording",
"record variables to a TTree."},
67 {
"mva",
"use the trained BDT."},
71std::unique_ptr<BaseStereoHitFilter>
74 if (filterName ==
"none") {
75 return std::make_unique<NoneStereoHitFilter>();
77 }
else if (filterName ==
"all") {
78 return std::make_unique<AllStereoHitFilter>();
80 }
else if (filterName ==
"random") {
81 return std::make_unique<RandomStereoHitFilter>();
83 }
else if (filterName ==
"simple") {
84 return std::make_unique<SimpleStereoHitFilter>();
86 }
else if (filterName ==
"truth") {
87 return std::make_unique<MCStereoHitFilter>();
89 }
else if (filterName ==
"recording") {
90 return std::make_unique<RecordingStereoHitFilter>(
"StereoHitFilter.root");
92 }
else if (filterName ==
"mva") {
93 return std::make_unique<MVAStereoHitFilter>(
"trackfindingcdc_StereoHitFilter");
Filter adapter type that accepts all items (just for reference).
Convince template to create a filter returning on variable from a set of variables.
Factory that can create appropriate filter instances from a name.
virtual std::unique_ptr< BaseStereoHitFilter > 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.
Filter adapter type that rejects all items.
Random filter resulting in a random weight between 0 and 1.
Convenience template to create a recording filter for a set of variables.
StereoHitFilterFactory(const std::string &defaultFilterName="all")
Constructor forwarding the default filter name.
std::map< std::string, std::string > getValidFilterNamesAndDescriptions() const override
Getter for valid filter names and a description for each.
std::unique_ptr< BaseStereoHitFilter > create(const std::string &filterName) const override
Create a filter with the given 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.
MC Filter Type using a VarSet and the truth variable in it.
Abstract base class for different kinds of events.