10#include <mdst/dataobjects/MCParticle.h>
11#include <mdst/dataobjects/TrackFitResult.h>
13#include <tracking/dataobjects/RecoTrack.h>
45 enum class MCToPRMatchInfo { c_undefined, c_matched, c_matchedWrongCharge, c_merged, c_mergedWrongCharge, c_missing };
57 enum class PRToMCMatchInfo { c_undefined, c_matched, c_matchedWrongCharge, c_clone, c_cloneWrongCharge, c_background, c_ghost };
69 const std::string& prRecoTrackStoreArrayName =
"");
78 const float& efficiency)
const;
86 const float& purity)
const;
94 const PRToMCMatchInfo matchingStatus = PRToMCMatchInfo::c_matched)
const;
102 const MCToPRMatchInfo matchingStatus = MCToPRMatchInfo::c_matched)
const;
134 if (anyMatchedRecoTrack ==
nullptr) {
137 return anyMatchedRecoTrack;
168 if (anyMatchedRecoTrack ==
nullptr) {
171 return anyMatchedRecoTrack;
210 float efficiency = NAN;
Provides a type-safe way to pass members of the chargedStableSet set.
static const ChargedStable pion
charged pion particle
A Class to store the Monte Carlo particle information.
This is the Reconstruction Event-Data Model Track.
Values of the result of a track fit with a given particle hypothesis.
Class to provide convenient methods to look up matching information between pattern recognition and M...
bool isAnyChargeMatchedMCRecoTrack(const RecoTrack &mcRecoTrack) const
Checks, if the Monte Carlo Track was matched to a pattern recognition track independent of the charge...
PRToMCMatchInfo extractPRToMCMatchInfo(const RecoTrack &prRecoTrack, const RecoTrack *mcRecoTrack, const float &purity) const
Helper function to assume the correct matching category for the pattern recognition tracks from the i...
const RecoTrack * getCorrectChargeMatchedMCRecoTrack(const RecoTrack &prRecoTrack) const
Looks up the matched Monte Carlo track for the given pattern recognition track.
bool isCorrectChargeClonePRRecoTrack(const RecoTrack &prRecoTrack) const
Checks, if the pattern recognition track is a clone of an other pattern recognition track.
bool isMissingMCRecoTrack(const RecoTrack &mcRecoTrack) const
Checks, if the Monte Carlo Track has no corresponding pattern recognition track.
float getMatchedPurity(const RecoTrack &recoTrack) const
Get the hit purity of the matched track.
const TrackFitResult * getRelatedTrackFitResult(const RecoTrack &prRecoTrack, Const::ChargedStable chargedStable=Const::pion) const
Looks up the TrackFitResult of a pattern recognition track.
const RecoTrack * getRelatedMCRecoTrack(const RecoTrack &prRecoTrack) const
Looks for a related Monte Carlo track for the given pattern recognition track and return it if found.
const RecoTrack * getWrongChargeMatchedMCRecoTrack(const RecoTrack &prRecoTrack) const
Looks up the matched Monte Carlo track for the given pattern recognition track with the wrong charge.
bool isWrongChargeMatchedPRRecoTrack(const RecoTrack &prRecoTrack) const
Checks, if the pattern recognition track was matched to a Monte Carlo track but with the wrong charge...
const RecoTrack * getAnyChargeMatchedMCRecoTrack(const RecoTrack &prRecoTrack) const
Check whether any matched MC RecoTracks for the given prRecoTrack, independent of whether both patter...
MCToPRMatchInfo
Matching categories for the Monte Carlo tracks.
float getRelatedPurity(const RecoTrack &prRecoTrack) const
Getter for the absolute value of the purity that is stored in the purity relation from pattern recogn...
bool isCorrectChargeMatchedMCRecoTrack(const RecoTrack &mcRecoTrack) const
Checks, if the Monte Carlo Track was matched to a pattern recognition track based on the hit pattern ...
bool isWrongChargeMergedMCRecoTrack(const RecoTrack &mcRecoTrack) const
Checks, if the Monte Carlo Track has been merged into another pattern recognition track and with the ...
const MCParticle * getRelatedMCParticle(const RecoTrack &recoTrack) const
Looks for a relation of the given track to a Monte Carlo particle.
bool isPRRecoTrack(const RecoTrack &recoTrack) const
Checks if the given track is in the pattern recognition StoreArray.
std::string m_prTracksStoreArrayName
Name of the StoreArray of Pattern recognition tracks.
bool isAnyChargeClonePRRecoTrack(const RecoTrack &prRecoTrack) const
Checks, if the pattern recognition track is a clone of an other pattern recognition track,...
const std::string & getMCTracksStoreArrayName() const
Getter for the name of the StoreArray of the Monte Carlo tracks.
bool isCorrectChargeMergedMCRecoTrack(const RecoTrack &mcRecoTrack) const
Checks, if the Monte Carlo Track has been merged into another pattern recognition track.
bool isCorrectChargeMatchedPRRecoTrack(const RecoTrack &prRecoTrack) const
Checks, if the pattern recognition track was matched to a Monte Carlo track with both hit pattern and...
PRToMCMatchInfo getPRToMCMatchInfo(const RecoTrack &prRecoTrack) const
Gets the matching category of pattern recognition track.
MCToPRMatchInfo getMCToPRMatchInfo(const RecoTrack &mcRecoTrack) const
Gets the matching category of Monte Carlo track.
bool isWrongChargeMatchedMCRecoTrack(const RecoTrack &mcRecoTrack) const
Checks, if the Monte Carlo Track was matched to a pattern recognition track based on the hit pattern,...
bool isChargeMatched(const RecoTrack &recoTrack) const
Checks if the recoTrack charge is correctly assigned.
const RecoTrack * getWrongChargeMatchedPRRecoTrack(const RecoTrack &mcRecoTrack) const
Looks up the matched pattern recognition track for the given Monte Carlo track.
bool isAnyChargeMergedMCRecoTrack(const RecoTrack &mcRecoTrack) const
Checks, if the Monte Carlo Track has been merged into another pattern recognition track.
const std::string & getPRTracksStoreArrayName() const
Getter for the name of the StoreArray of the pattern recognition tracks.
bool isWrongChargeClonePRRecoTrack(const RecoTrack &prRecoTrack) const
Checks, if the pattern recognition track is a clone of an other pattern recognition track,...
bool isBackgroundPRRecoTrack(const RecoTrack &prRecoTrack) const
Checks, if the pattern recognition track is mostly made from background hits.
bool isMCRecoTrack(const RecoTrack &recoTrack) const
Checks if the given track is in the Monte Carlo track StoreArray.
const RecoTrack * getAnyChargeMatchedPRRecoTrack(const RecoTrack &mcRecoTrack) const
Check whether any matched PR RecoTracks for the given mcRecoTrack, independent of whether both patter...
const RecoTrack * getMCRecoTrackWithStatus(const RecoTrack &prRecoTrack, const PRToMCMatchInfo matchingStatus=PRToMCMatchInfo::c_matched) const
Looks up the matched Monte Carlo track with the PRToMCMatchInfo matchingStatus for the given pattern ...
const RecoTrack * getPRRecoTrackWithStatus(const RecoTrack &mcRecoTrack, const MCToPRMatchInfo matchingStatus=MCToPRMatchInfo::c_matched) const
Looks up the matched pattern recognition track with the MCToPRMatchInfo matchingStatus for the given ...
std::string m_mcTracksStoreArrayName
Name of the StoreArray of Monte Carlo tracks.
const RecoTrack * getRelatedPRRecoTrack(const RecoTrack &mcRecoTrack) const
Looks for a related pattern recognition track for the given Monte Carlo track and return it if found.
const RecoTrack * getCorrectChargeMatchedPRRecoTrack(const RecoTrack &mcRecoTrack) const
Looks up the matched pattern recognition track for the given Monte Carlo track.
bool isAnyChargeMatchedPRRecoTrack(const RecoTrack &prRecoTrack) const
Checks, if the pattern recognition track was matched to a Monte Carlo track, independent of whether t...
float getMatchedEfficiency(const RecoTrack &recoTrack) const
Get the hit efficiency of the matched track.
float getRelatedEfficiency(const RecoTrack &mcRecoTrack) const
Getter for the absolute value of the efficiency that is stored in the efficiency relation from Monte ...
bool isGhostPRRecoTrack(const RecoTrack &prRecoTrack) const
Checks, if the pattern recognition track has contributions of different Monte Carlo tracks and/or bac...
MCToPRMatchInfo extractMCToPRMatchInfo(const RecoTrack &mcRecoTrack, const RecoTrack *prRecoTrack, const float &efficiency) const
Helper function to assume the correct matching category for the Monte Carlo tracks from the informati...
PRToMCMatchInfo
Matching categories for the pattern recognition tracks.
Abstract base class for different kinds of events.