8#include <tracking/trackFindingCDC/filters/track/TrackQualityFilterFactory.h>
10#include <tracking/trackFindingCDC/filters/track/BestMatchedTruthVarSet.h>
11#include <tracking/trackFindingCDC/filters/track/BasicTrackVarSet.h>
13#include <tracking/trackFindingCDC/filters/base/MVAFilter.icc.h>
15#include <tracking/trackFindingCDC/filters/base/RecordingFilter.icc.h>
16#include <tracking/trackFindingCDC/filters/base/TruthVarFilter.icc.h>
17#include <tracking/trackFindingCDC/filters/base/AllFilter.icc.h>
18#include <tracking/trackFindingCDC/filters/base/NoneFilter.icc.h>
20#include <tracking/trackFindingCDC/filters/base/FilterFactory.icc.h>
21#include <tracking/trackFindingCDC/filters/base/FilterVarSet.icc.h>
23#include <tracking/trackFindingCDC/varsets/VariadicUnionVarSet.h>
26using namespace TrackFindingCDC;
34 using RecordingTrackFilter =
36 using RecordingDataTrackFilter =
45 return "Track filter for getting the quality indicator for CDC tracks. It should "
46 "distinguish correct PR tracks from fake and if wanted also clone tracks. ";
50 const std::string& filterName)
const
52 if (filterName ==
"none") {
53 return std::make_unique<NoneTrackFilter>();
54 }
else if (filterName ==
"all") {
55 return std::make_unique<AllTrackFilter>();
56 }
else if (filterName ==
"truth") {
57 return std::make_unique<MCTrackFilter>();
58 }
else if (filterName ==
"recording") {
59 return std::make_unique<RecordingTrackFilter>(
"TrackQualityFilter.root");
60 }
else if (filterName ==
"recording_data") {
61 return std::make_unique<RecordingDataTrackFilter>(
"TrackQualityFilter.root");
62 }
else if (filterName ==
"eval") {
63 auto recordedVarSets = std::make_unique<UnionVarSet<CDCTrack>>();
65 recordedVarSets->push_back(std::make_unique<TrackFilterVarSet>(
"mva",
create(
"mva")));
66 recordedVarSets->push_back(std::make_unique<TrackFilterVarSet>(
"truth",
create(
"truth")));
67 return std::make_unique<Recording<BaseTrackFilter>>(std::move(recordedVarSets),
68 "TrackQualityFilter_eval.root");
69 }
else if (filterName ==
"mva") {
70 return std::make_unique<MVATrackFilter>(
"trackfindingcdc_TrackQualityIndicator", 0.10);
Filter adapter type that accepts all items (just for reference).
Factory that can create appropriate filter instances from a name.
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::unique_ptr< BaseTrackFilter > create(const std::string &filterName) const override
Create a filter with the given name.
std::unique_ptr< BaseTrackFilter > 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.