8#include <tracking/trackFindingCDC/filters/track/TruthTrackVarSet.h>
10#include <tracking/trackFindingCDC/mclookup/CDCMCHitLookUp.h>
11#include <tracking/trackFindingCDC/mclookup/CDCMCTrackLookUp.h>
12#include <tracking/trackFindingCDC/mclookup/CDCMCManager.h>
14#include <tracking/trackFindingCDC/eventdata/tracks/CDCTrack.h>
15#include <tracking/trackFindingCDC/eventdata/hits/CDCWireHit.h>
18using namespace TrackFindingCDC;
34 if (not track)
return false;
40 ITrackType trackMCMatch = mcTrackLookup.
getMCTrackId(track);
41 bool trackIsFake =
false;
43 if (trackMCMatch == INVALID_ITRACK) {
47 unsigned int numberOfCorrectHits = 0;
49 if (hitLookup.
getMCTrackId(recoHit.getWireHit().getHit()) == trackMCMatch) {
50 numberOfCorrectHits++;
53 if ((
double)numberOfCorrectHits / track->size() < 0.8) {
60 var<
named(
"track_is_fake_truth")>() = trackIsFake;
61 var<
named(
"truth")>() = not trackIsFake;
ITrackType getMCTrackId(const ACDCHitCollection *ptrHits) const
Getter for the Monte Carlo track id matched to this collection of hits.
Interface class to the Monte Carlo information for individual hits.
ITrackType getMCTrackId(const CDCHit *ptrHit) const
Returns the track id for the hit.
static const CDCMCHitLookUp & getInstance()
Getter for the singletone instance.
void requireTruthInformation()
Require the MC information store arrays.
void fill()
Fill Monte Carlo look up maps from the DataStore.
static CDCMCManager & getInstance()
Getter for the singleton instance.
Specialisation of the lookup for the truth values of reconstructed tracks.
static const CDCMCTrackLookUp & getInstance()
Getter for the singletone instance.
Class representing a three dimensional reconstructed hit.
Class representing a sequence of three dimensional reconstructed hits.
void initialize() override
Receive and dispatch signal before the start of the event processing.
void beginEvent() override
Receive and dispatch signal for the start of a new event.
void initialize() final
Require the Monte Carlo truth information at initialisation.
void beginEvent() final
Prepare the Monte Carlo truth information at start of the event.
bool extract(const CDCTrack *track) override
Generate and assign the contained variables.
static constexpr int named(const char *name)
Getter for the index from the name.
Float_t & var()
Reference getter for the value of the ith variable. Static version.
Abstract base class for different kinds of events.