8#include <tracking/trackFindingCDC/filters/segmentTrack/SegmentTrackFilterFactory.h>
10#include <tracking/trackFindingCDC/filters/segmentTrack/SegmentTrackTruthVarSet.h>
11#include <tracking/trackFindingCDC/filters/segmentTrack/SegmentTrackVarSet.h>
13#include <tracking/trackFindingCDC/filters/base/MVAFilter.icc.h>
14#include <tracking/trackFindingCDC/filters/base/AllFilter.icc.h>
15#include <tracking/trackFindingCDC/filters/base/NoneFilter.icc.h>
16#include <tracking/trackFindingCDC/filters/base/TruthVarFilter.icc.h>
17#include <tracking/trackFindingCDC/filters/base/RecordingFilter.icc.h>
19#include <tracking/trackFindingCDC/filters/base/FilterVarSet.icc.h>
21#include <tracking/trackFindingCDC/filters/base/FilterFactory.icc.h>
23#include <tracking/trackFindingCDC/varsets/VariadicUnionVarSet.h>
26using namespace TrackFindingCDC;
39 :
Super(defaultFilterName)
43std::map<std::string, std::string>
47 {
"none",
"no segment track combination is valid"},
48 {
"truth",
"monte carlo truth"},
49 {
"mva",
"test with a mva method"},
50 {
"recording",
"record variables to a TTree"},
54std::unique_ptr<BaseSegmentTrackFilter>
57 if (filterName ==
"none") {
58 return std::make_unique<NoneSegmentTrackFilter>();
59 }
else if (filterName ==
"truth") {
60 return std::make_unique<MCSegmentTrackFilter>();
61 }
else if (filterName ==
"mva") {
62 return std::make_unique<MVASegmentTrackFilter>(
"trackfindingcdc_SegmentTrackFilter", 0.74);
63 }
else if (filterName ==
"eval") {
64 auto recordedVarSets = std::make_unique<UnionVarSet<BaseSegmentTrackFilter::Object>>();
66 recordedVarSets->push_back(std::make_unique<TrackFilterVarSet>(
"mva",
create(
"mva")));
67 recordedVarSets->push_back(std::make_unique<TrackFilterVarSet>(
"truth",
create(
"truth")));
68 return std::make_unique<Recording<BaseSegmentTrackFilter>>(std::move(recordedVarSets),
"SegmentTrackFilter_eval.root");
69 }
else if (filterName ==
"recording") {
70 return std::make_unique<RecordingSegmentTrackFilter>(
"SegmentTrackFilter.root");
78 return "Segment track chooser to be used during the combination of segment track pairs";
83 return "SegmentTrackFilter";
Filter adapter type that accepts all items (just for reference).
Factory that can create appropriate filter instances from a name.
virtual std::unique_ptr< BaseSegmentTrackFilter > create(const std::string &filterName) const
Create a filter with the given name, does not set filter specific parameters.
Class to compute floating point variables from a filter response which can be recorded as a flat TNtu...
Convenience template to create a mva filter for a set of variables.
Filter adapter type that rejects all items.
Convenience template to create a recording filter for a set of variables.
std::map< std::string, std::string > getValidFilterNamesAndDescriptions() const override
Getter for valid filter names and a description for each.
SegmentTrackFilterFactory(const std::string &defaultFilterName="mva")
Constructor forwarding the default filter name.
std::string getIdentifier() const override
Getter for a short identifier for the factory.
std::unique_ptr< BaseSegmentTrackFilter > create(const std::string &filterName) const override
Create a filter with the given name.
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.