Generate and assign the contained variables.
35 if (not ptrCDCTrack)
return false;
42 ITrackType trackMCMatch = mcTrackLookUp.
getMCTrackId(ptrCDCTrack);
43 bool trackIsFake =
false;
45 unsigned int numberOfCorrectHits = 0;
48 bool trackHasMinimalMatchPurity = (trackMCMatch != INVALID_ITRACK);
50 if (not trackHasMinimalMatchPurity) {
54 auto hitIsCorrect = [&hitLookUp, &trackMCMatch](
const CDCRecoHit3D & recoHit) {
55 return hitLookUp.
getMCTrackId(recoHit.getWireHit().getHit()) == trackMCMatch;
57 numberOfCorrectHits = std::count_if(begin(*ptrCDCTrack), end(*ptrCDCTrack), hitIsCorrect);
59 const double purity = (double)numberOfCorrectHits / ptrCDCTrack->size();
67 bool trackIsClone = cloneLookUp.
isTrackClone(*ptrCDCTrack);
68 bool matchedNotClone = (not trackIsClone) and (not trackIsFake);
69 var<
named(
"truth")>() = matchedNotClone;
70 var<
named(
"truth_track_is_fake")>() = trackIsFake;
71 var<
named(
"truth_track_is_matched")>() = not trackIsFake;
72 var<
named(
"truth_matched_hits")>() = numberOfCorrectHits;
73 var<
named(
"truth_track_is_clone")>() = trackIsClone;
76 var<
named(
"truth_MCTrackID")>() = trackMCMatch;
StoreObjPtr< EventMetaData > m_eventMetaData
Pointer to the store array object with the EventMetaData.
Class providing information whether a PR CDC track is the best match or a clone.
bool isTrackClone(const CDCTrack &cdcTrack)
getter for information from m_cdcTrackIsCloneMap
static CDCMCCloneLookUp & getInstance()
Getter for the singletone instance.
ITrackType getMCTrackId(const ACDCHitCollection *ptrHits) const
Getter for the Monte Carlo track id matched to this collection of hits.
Index getFirstNLoops(const ACDCHitCollection *ptrHits) const
Getter for number of loops till the first hit the collection of hits which has the Monte Carlo track ...
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.
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.
constexpr static 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.