Belle II Software  release-08-01-10
RecoTrack Class Reference

This is the Reconstruction Event-Data Model Track. More...

#include <RecoTrack.h>

Inheritance diagram for RecoTrack:
Collaboration diagram for RecoTrack:

Public Types

enum  MatchingStatus {
  c_undefined ,
  c_matched ,
  c_matchedWrongCharge ,
  c_clone ,
  c_cloneWrongCharge ,
  c_background ,
  c_ghost
}
 Enum for the matching status of this reco track (set by the matching modules in the tracking package).
 

Public Member Functions

 RecoTrack ()
 Empty constructor for ROOT. Do not use!
 
 RecoTrack (const ROOT::Math::XYZVector &seedPosition, const ROOT::Math::XYZVector &seedMomentum, const short int seedCharge, const std::string &storeArrayNameOfPXDHits="", const std::string &storeArrayNameOfSVDHits="", const std::string &storeArrayNameOfCDCHits="", const std::string &storeArrayNameOfBKLMHits="", const std::string &storeArrayNameOfEKLMHits="", const std::string &storeArrayNameOfRecoHitInformation="")
 Construct a RecoTrack with the given seed helix parameters and the given names for the hits. More...
 
 RecoTrack (const RecoTrack &)=delete
 Delete the copy construtr.
 
RecoTrackoperator= (RecoTrack const &)=delete
 Delete the copy construtr.
 
genfit::TrackCand createGenfitTrackCand () const
 Create a genfit::TrackCand out of this reco track and copy all information to the track candidate.
 
RecoTrackcopyToStoreArrayUsing (StoreArray< RecoTrack > &storeArray, const ROOT::Math::XYZVector &position, const ROOT::Math::XYZVector &momentum, short charge, const TMatrixDSym &covariance, double timeSeed) const
 Append a new RecoTrack to the given store array and copy its general properties, but not the hits themself. More...
 
RecoTrackcopyToStoreArrayUsingSeeds (StoreArray< RecoTrack > &storeArray) const
 Append a new RecoTrack to the given store array and copy its general properties, but not the hits themself. More...
 
RecoTrackcopyToStoreArray (StoreArray< RecoTrack > &storeArray) const
 Append a new RecoTrack to the given store array and copy its general properties, but not the hits themself. More...
 
size_t addHitsFromRecoTrack (const RecoTrack *recoTrack, unsigned int sortingParameterOffset=0, bool reversed=false, std::optional< double > optionalMinimalWeight=std::nullopt)
 Add all hits from another RecoTrack to this RecoTrack. More...
 
bool addCDCHit (const UsedCDCHit *cdcHit, const unsigned int sortingParameter, RightLeftInformation rightLeftInformation=RightLeftInformation::c_undefinedRightLeftInformation, OriginTrackFinder foundByTrackFinder=OriginTrackFinder::c_undefinedTrackFinder)
 Adds a cdc hit with the given information to the reco track. More...
 
bool addPXDHit (const UsedPXDHit *pxdHit, const unsigned int sortingParameter, OriginTrackFinder foundByTrackFinder=OriginTrackFinder::c_undefinedTrackFinder)
 Adds a pxd hit with the given information to the reco track. More...
 
bool addSVDHit (const UsedSVDHit *svdHit, const unsigned int sortingParameter, OriginTrackFinder foundByTrackFinder=OriginTrackFinder::c_undefinedTrackFinder)
 Adds a svd hit with the given information to the reco track. More...
 
bool addBKLMHit (const UsedBKLMHit *bklmHit, const unsigned int sortingParameter, OriginTrackFinder foundByTrackFinder=OriginTrackFinder::c_undefinedTrackFinder)
 Adds a bklm hit with the given information to the reco track. More...
 
bool addEKLMHit (const UsedEKLMHit *eklmHit, const unsigned int sortingParameter, OriginTrackFinder foundByTrackFinder=OriginTrackFinder::c_undefinedTrackFinder)
 Adds an eklm hit with the given information to the reco track. More...
 
template<class HitType >
RecoHitInformationgetRecoHitInformation (HitType *hit) const
 Return the reco hit information for a generic hit from the storeArray. More...
 
template<class HitType >
TrackingDetector getTrackingDetector (const HitType *hit) const
 Return the tracking detector of a given hit (every type) or throws an exception of the hit is not related to the track.
 
template<class HitType >
RightLeftInformation getRightLeftInformation (const HitType *hit) const
 Return the right left information of a given hit (every type) or throws an exception of the hit is not related to the track.
 
template<class HitType >
OriginTrackFinder getFoundByTrackFinder (const HitType *hit) const
 Return the found by track finder flag for the given hit (every type) or throws an exception of the hit is not related to the track.
 
template<class HitType >
unsigned int getSortingParameter (const HitType *hit) const
 Return the sorting parameter for a given hit (every type) or throws an exception of the hit is not related to the track.
 
template<class HitType >
void setRightLeftInformation (const HitType *hit, RightLeftInformation rightLeftInformation)
 Set the right left information or throws an exception of the hit is not related to the track. Will set the dirty flag!
 
template<class HitType >
void setFoundByTrackFinder (const HitType *hit, OriginTrackFinder originTrackFinder)
 Set the found by track finder flag or throws an exception of the hit is not related to the track.
 
template<class HitType >
void setSortingParameter (const HitType *hit, unsigned int sortingParameter)
 Set the sorting parameter or throws an exception of the hit is not related to the track. Will set the dirty flag!
 
const genfit::TrackPointgetCreatedTrackPoint (const RecoHitInformation *recoHitInformation) const
 Get a pointer to the TrackPoint that was created from this hit. More...
 
bool hasPXDHits () const
 Returns true if the track has pxd hits.
 
bool hasSVDHits () const
 Returns true if the track has svd hits.
 
bool hasCDCHits () const
 Returns true if the track has cdc hits.
 
bool hasBKLMHits () const
 Returns true if the track has bklm hits.
 
bool hasEKLMHits () const
 Returns true if the track has eklm hits.
 
template<class HitType >
bool hasHit (const HitType *hit) const
 Returns true if the given hit is in the track.
 
unsigned int getNumberOfPXDHits () const
 Return the number of pxd hits.
 
unsigned int getNumberOfSVDHits () const
 Return the number of svd hits.
 
unsigned int getNumberOfCDCHits () const
 Return the number of cdc hits.
 
unsigned int getNumberOfBKLMHits () const
 Return the number of bklm hits.
 
unsigned int getNumberOfEKLMHits () const
 Return the number of eklm hits.
 
unsigned int getNumberOfTotalHits () const
 Return the number of cdc + svd + pxd + bklm + eklm hits.
 
unsigned int getNumberOfTrackingHits () const
 Return the number of cdc + svd + pxd hits.
 
std::vector< Belle2::RecoTrack::UsedPXDHit * > getPXDHitList () const
 Return an unsorted list of pxd hits.
 
std::vector< Belle2::RecoTrack::UsedSVDHit * > getSVDHitList () const
 Return an unsorted list of svd hits.
 
std::vector< Belle2::RecoTrack::UsedCDCHit * > getCDCHitList () const
 Return an unsorted list of cdc hits.
 
std::vector< Belle2::RecoTrack::UsedBKLMHit * > getBKLMHitList () const
 Return an unsorted list of bklm hits.
 
std::vector< Belle2::RecoTrack::UsedEKLMHit * > getEKLMHitList () const
 Return an unsorted list of eklm hits.
 
std::vector< Belle2::RecoTrack::UsedPXDHit * > getSortedPXDHitList () const
 Return a sorted list of pxd hits. Sorted by the sortingParameter.
 
std::vector< Belle2::RecoTrack::UsedSVDHit * > getSortedSVDHitList () const
 Return a sorted list of svd hits. Sorted by the sortingParameter.
 
std::vector< Belle2::RecoTrack::UsedCDCHit * > getSortedCDCHitList () const
 Return a sorted list of cdc hits. Sorted by the sortingParameter.
 
std::vector< Belle2::RecoTrack::UsedBKLMHit * > getSortedBKLMHitList () const
 Return a sorted list of bklm hits. Sorted by the sortingParameter.
 
std::vector< Belle2::RecoTrack::UsedEKLMHit * > getSortedEKLMHitList () const
 Return a sorted list of eklm hits. Sorted by the sortingParameter.
 
ROOT::Math::XYZVector getPositionSeed () const
 Return the position seed stored in the reco track. ATTENTION: This is not the fitted position.
 
ROOT::Math::XYZVector getMomentumSeed () const
 Return the momentum seed stored in the reco track. ATTENTION: This is not the fitted momentum.
 
const TVectorD & getStateSeed () const
 Return the state seed in the form posX, posY, posZ, momX, momY, momZ. ATTENTION: This is not the fitted state.
 
const genfit::TrackgetGenfitTrack () const
 Returns genfit track. More...
 
short int getChargeSeed () const
 Return the charge seed stored in the reco track. ATTENTION: This is not the fitted charge.
 
double getTimeSeed () const
 Return the time seed stored in the reco track. ATTENTION: This is not the fitted time.
 
float getOutgoingArmTime ()
 Return the track time of the outgoing arm.
 
float getOutgoingArmTimeError ()
 Return the error of the track time of the outgoing arm.
 
float getIngoingArmTime ()
 Return the track time of the ingoing arm.
 
float getIngoingArmTimeError ()
 Return the error of the track time of the ingoing arm.
 
float getInOutArmTimeDifference ()
 Return the difference between the track times of the ingoing and outgoing arms.
 
float getInOutArmTimeDifferenceError ()
 Return the error of the difference between the track times of the ingoing and outgoing arms.
 
bool hasIngoingArmTime ()
 Check if the ingoing arm time is set.
 
bool hasOutgoingArmTime ()
 Check if the outgoing arm time is set.
 
int getNSVDHitsOfOutgoingArm ()
 Return the number of clusters used to estimate the outgoing arm time.
 
int getNSVDHitsOfIngoingArm ()
 Return the number of clusters used to estimate the ingoing arm time.
 
void flipTrackDirectionAndCharge (const genfit::AbsTrackRep *representation=nullptr)
 Flip the direction of the RecoTrack by inverting the momentum vector and the charge. More...
 
std::tuple< ROOT::Math::XYZVector, ROOT::Math::XYZVector, short > extractTrackState () const
 Return the position, the momentum and the charge of the first measured state on plane or - if unfitted - the seeds. More...
 
void setPositionAndMomentum (const ROOT::Math::XYZVector &positionSeed, const ROOT::Math::XYZVector &momentumSeed)
 Set the position and momentum seed of the reco track. ATTENTION: This is not the fitted position or momentum.
 
void setChargeSeed (const short int chargeSeed)
 Set the charge seed stored in the reco track. ATTENTION: This is not the fitted charge.
 
void setTimeSeed (const double timeSeed)
 Set the time seed. ATTENTION: This is not the fitted time.
 
const TMatrixDSym & getSeedCovariance () const
 Return the covariance matrix of the seed. ATTENTION: This is not the fitted covariance.
 
void setSeedCovariance (const TMatrixDSym &seedCovariance)
 Set the covariance of the seed. ATTENTION: This is not the fitted covariance.
 
bool wasFitSuccessful (const genfit::AbsTrackRep *representation=nullptr) const
 Returns true if the last fit with the given representation was successful.
 
const genfit::FitStatusgetTrackFitStatus (const genfit::AbsTrackRep *representation=nullptr) const
 Return the track fit status for the given representation or for the cardinal one. You are not allowed to modify or delete it!
 
bool hasTrackFitStatus (const genfit::AbsTrackRep *representation=nullptr) const
 Check, if there is a fit status for the given representation or for the cardinal one.
 
genfit::AbsTrackRepgetCardinalRepresentation () const
 Get a pointer to the cardinal track representation. You are not allowed to modify or delete it!
 
const std::vector< genfit::AbsTrackRep * > & getRepresentations () const
 Return a list of track representations. You are not allowed to modify or delete them!
 
genfit::AbsTrackRepgetTrackRepresentationForPDG (int pdgCode) const
 Return an already created track representation of the given reco track for the PDG. More...
 
std::vector< RecoHitInformation * > getRecoHitInformations (bool getSorted=false) const
 Return a list of all RecoHitInformations associated with the RecoTrack. More...
 
const genfit::MeasuredStateOnPlanegetMeasuredStateOnPlaneFromFirstHit (const genfit::AbsTrackRep *representation=nullptr) const
 Return genfit's MeasuredStateOnPlane for the first hit in a fit useful for extrapolation of measurements to other locations Const version.
 
const genfit::MeasuredStateOnPlanegetMeasuredStateOnPlaneFromLastHit (const genfit::AbsTrackRep *representation=nullptr) const
 Return genfit's MeasuredStateOnPlane for the last hit in a fit useful for extrapolation of measurements to other locations Const version.
 
const genfit::MeasuredStateOnPlanegetMeasuredStateOnPlaneFromRecoHit (const RecoHitInformation *recoHitInfo, const genfit::AbsTrackRep *representation=nullptr) const
 Return genfit's MeasuredStateOnPlane on plane for associated with one RecoHitInformation. More...
 
const genfit::MeasuredStateOnPlanegetMeasuredStateOnPlaneClosestTo (const ROOT::Math::XYZVector &closestPoint, const genfit::AbsTrackRep *representation=nullptr)
 Return genfit's MasuredStateOnPlane, that is closest to the given point useful for extrapolation of measurements other locations.
 
void prune ()
 Prune the genfit track, e.g. More...
 
void estimateArmTime ()
 This function calculates the track time of the ingoing and outgoing arms and their difference. More...
 
bool isOutgoingArm (RecoHitInformation::RecoHitDetector pre=RecoHitInformation::RecoHitDetector::c_undefinedTrackingDetector, RecoHitInformation::RecoHitDetector post=RecoHitInformation::RecoHitDetector::c_undefinedTrackingDetector)
 This function returns true if the arm direction is Outgoing and false if the arm direction is Ingoing. More...
 
const std::vector< genfit::TrackPoint * > & getHitPointsWithMeasurement () const
 Return a list of measurements and track points, which can be used e.g. to extrapolate. You are not allowed to modify or delete them!
 
bool getDirtyFlag () const
 This returns true, if a hit was added after the last fit and measurement creation and a refit should be done.
 
void setDirtyFlag (const bool &dirtyFlag=true)
 Set to true, if you want to rebuild the measurements and do the fit independent on changes of the hit content. More...
 
const std::string & getStoreArrayNameOfPXDHits () const
 Name of the store array of the pxd hits.
 
const std::string & getStoreArrayNameOfSVDHits () const
 Name of the store array of the svd hits.
 
const std::string & getStoreArrayNameOfCDCHits () const
 Name of the store array of the cdc hits.
 
const std::string & getStoreArrayNameOfBKLMHits () const
 Name of the store array of the bklm hits.
 
const std::string & getStoreArrayNameOfEKLMHits () const
 Name of the store array of the eklm hits.
 
const std::string & getStoreArrayNameOfRecoHitInformation () const
 Name of the store array of the reco hit informations.
 
void revertRecoHitInformationSorting ()
 Revert the sorting order of the RecoHitInformation.
 
template<class HitType >
void mapOnHits (const std::string &storeArrayNameOfHits, std::function< void(RecoHitInformation &, HitType *)> const &mapFunction, std::function< bool(const RecoHitInformation &, const HitType *)> const &pickFunction)
 Call a function on all hits of the given type in the store array, that are related to this track. More...
 
template<class HitType >
void mapOnHits (const std::string &storeArrayNameOfHits, std::function< void(const RecoHitInformation &, const HitType *)> const &mapFunction, std::function< bool(const RecoHitInformation &, const HitType *)> const &pickFunction) const
 Call a function on all hits of the given type in the store array, that are related to this track. More...
 
template<class HitType >
void mapOnHits (const std::string &storeArrayNameOfHits, std::function< void(RecoHitInformation &, HitType *)> const &mapFunction)
 Call a function on all hits of the given type in the store array, that are related to this track. More...
 
template<class HitType >
void mapOnHits (const std::string &storeArrayNameOfHits, std::function< void(const RecoHitInformation &, const HitType *)> const &mapFunction) const
 Call a function on all hits of the given type in the store array, that are related to this track. More...
 
MatchingStatus getMatchingStatus () const
 Return the matching status set by the TrackMatcher module.
 
void setMatchingStatus (MatchingStatus matchingStatus)
 Set the matching status (used by the TrackMatcher module)
 
float getQualityIndicator () const
 Get the quality index attached to this RecoTrack given by one of the reconstruction algorithms. 0 means likely fake.
 
void setQualityIndicator (const float qualityIndicator)
 Set the quality index attached to this RecoTrack. 0 means likely fake.
 
float getFlipQualityIndicator () const
 Get the 1st flipping quality attached to this RecoTrack as a reference for flipping.
 
void setFlipQualityIndicator (const float qualityIndicator)
 Set the 1st flipping quality attached to this RecoTrack.
 
float get2ndFlipQualityIndicator () const
 Get the 2nd flipping quality attached to this RecoTrack as a reference for flipping.
 
void set2ndFlipQualityIndicator (const float qualityIndicator)
 Set the 2nd flipping quality attached to this RecoTrack.
 
void deleteFittedInformation ()
 Delete all fitted information for all representations. More...
 
void deleteFittedInformationForRepresentation (const genfit::AbsTrackRep *rep)
 Delete all fitted information for the given representations. More...
 
std::string getInfoHTML () const override
 Get useful information on EventDisplay.
 
void addRelationTo (const RelationsInterface< BASE > *object, float weight=1.0, const std::string &namedRelation="") const
 Add a relation from this object to another object (with caching). More...
 
void addRelationTo (const TObject *object, float weight=1.0, const std::string &namedRelation="") const
 Add a relation from this object to another object (no caching, can be quite slow). More...
 
void copyRelations (const RelationsInterface< BASE > *sourceObj)
 Copies all relations of sourceObj (pointing from or to sourceObj) to this object (including weights). More...
 
template<class TO >
RelationVector< TO > getRelationsTo (const std::string &name="", const std::string &namedRelation="") const
 Get the relations that point from this object to another store array. More...
 
template<class FROM >
RelationVector< FROM > getRelationsFrom (const std::string &name="", const std::string &namedRelation="") const
 Get the relations that point from another store array to this object. More...
 
template<class T >
RelationVector< T > getRelationsWith (const std::string &name="", const std::string &namedRelation="") const
 Get the relations between this object and another store array. More...
 
template<class TO >
TO * getRelatedTo (const std::string &name="", const std::string &namedRelation="") const
 Get the object to which this object has a relation. More...
 
template<class FROM >
FROM * getRelatedFrom (const std::string &name="", const std::string &namedRelation="") const
 Get the object from which this object has a relation. More...
 
template<class T >
T * getRelated (const std::string &name="", const std::string &namedRelation="") const
 Get the object to or from which this object has a relation. More...
 
template<class TO >
std::pair< TO *, float > getRelatedToWithWeight (const std::string &name="", const std::string &namedRelation="") const
 Get first related object & weight of relation pointing to an array. More...
 
template<class FROM >
std::pair< FROM *, float > getRelatedFromWithWeight (const std::string &name="", const std::string &namedRelation="") const
 Get first related object & weight of relation pointing from an array. More...
 
template<class T >
std::pair< T *, float > getRelatedWithWeight (const std::string &name="", const std::string &namedRelation="") const
 Get first related object & weight of relation pointing from/to an array. More...
 
virtual std::string getName () const
 Return a short name that describes this object, e.g. More...
 
std::string getInfo () const
 Return a short summary of this object's contents in raw text format. More...
 
std::string getArrayName () const
 Get name of array this object is stored in, or "" if not found.
 
int getArrayIndex () const
 Returns this object's array index (in StoreArray), or -1 if not found.
 

Static Public Member Functions

static void registerRequiredRelations (StoreArray< RecoTrack > &recoTracks, std::string const &pxdHitsStoreArrayName="", std::string const &svdHitsStoreArrayName="", std::string const &cdcHitsStoreArrayName="", std::string const &bklmHitsStoreArrayName="", std::string const &eklmHitsStoreArrayName="", std::string const &recoHitInformationStoreArrayName="")
 Convenience method which registers all relations required to fully use a RecoTrack. More...
 
static RecoTrackcreateFromTrackCand (const genfit::TrackCand &trackCand, const std::string &storeArrayNameOfRecoTracks="", const std::string &storeArrayNameOfPXDHits="", const std::string &storeArrayNameOfSVDHits="", const std::string &storeArrayNameOfCDCHits="", const std::string &storeArrayNameOfBKLMHits="", const std::string &storeArrayNameOfEKLMHits="", const std::string &storeArrayNameOfRecoHitInformation="", const bool recreateSortingParameters=false)
 Create a reco track from a genfit::TrackCand and save it to the given store array. More...
 

Protected Member Functions

TClonesArray * getArrayPointer () const
 Returns the pointer to the raw DataStore array holding this object (protected since these arrays are easy to misuse).
 

Private Types

typedef RecoHitInformation::RightLeftInformation RightLeftInformation
 Copy the definitions from the RecoHitInformation to this class.
 
typedef RecoHitInformation::RecoHitDetector TrackingDetector
 Copy the definitions from the RecoHitInformation to this class.
 
typedef RecoHitInformation::OriginTrackFinder OriginTrackFinder
 Copy the definitions from the RecoHitInformation to this class.
 
typedef RecoHitInformation::UsedCDCHit UsedCDCHit
 Copy the definitions from the RecoHitInformation to this class.
 
typedef RecoHitInformation::UsedSVDHit UsedSVDHit
 Copy the definitions from the RecoHitInformation to this class.
 
typedef RecoHitInformation::UsedPXDHit UsedPXDHit
 Copy the definitions from the RecoHitInformation to this class.
 
typedef RecoHitInformation::UsedBKLMHit UsedBKLMHit
 Copy the definitions from the RecoHitInformation to this class.
 
typedef RecoHitInformation::UsedEKLMHit UsedEKLMHit
 Copy the definitions from the RecoHitInformation to this class.
 

Private Member Functions

template<class HitType , class ... Args>
bool addHit (const HitType *hit, Args &&... params)
 Add a generic hit with the given parameters for the reco hit information. More...
 
template<class HitType >
void addHitWithHitInformation (const HitType *hit, RecoHitInformation *recoHitInformation)
 Add the needed relations for adding a generic hit with the given hit information and reset track time information. More...
 
template<class HitType >
RecoHitInformationgetRecoHitInformationSafely (HitType *hit) const
 Returns the reco hit information for a given hit or throws an exception if the hit is not related to the track.
 
template<class HitType >
unsigned int getNumberOfHitsOfGivenType (const std::string &storeArrayNameOfHits) const
 Get the number of hits for the given hit type in the store array that are related to this track. More...
 
template<class HitType >
std::vector< HitType * > getSortedHitList (const std::string &storeArrayNameOfHits) const
 Return a sorted list of hits of the given type in the store array that are related to this track. More...
 
template<class HitType >
std::vector< HitType * > getHitList (const std::string &storeArrayNameOfHits) const
 Return an unsorted list of hits of the given type in the store array that are related to this track. More...
 
void swapArmTimes ()
 Swap arm times, booleans and nSVDHits.
 
void checkDirtyFlag () const
 Helper: Check the dirty flag and produce a warning, whenever a fit result is accessed.
 
 ClassDefOverride (RecoTrack, 14)
 Making this class a ROOT class.
 
 ClassDef (RelationsInterface, 0)
 defines interface for accessing relations of objects in StoreArray.
 

Private Attributes

genfit::Track m_genfitTrack
 Internal storage for the genfit track.
 
short int m_charge = 1
 Storage for the charge. All other helix parameters are saved in the genfit::Track.
 
std::string m_storeArrayNameOfPXDHits = ""
 Store array name of added PXD hits.
 
std::string m_storeArrayNameOfSVDHits = ""
 Store array name of added SVD hits.
 
std::string m_storeArrayNameOfCDCHits = ""
 Store array name of added CDC hits.
 
std::string m_storeArrayNameOfBKLMHits = ""
 Store array name of added BKLM hits.
 
std::string m_storeArrayNameOfEKLMHits = ""
 Store array name of added EKLM hits.
 
std::string m_storeArrayNameOfRecoHitInformation = ""
 Store array of added RecoHitInformation.
 
bool m_dirtyFlag = true
 Bool is hits were added to track after fitting and the measurements should be recalculated. More...
 
MatchingStatus m_matchingStatus = MatchingStatus::c_undefined
 Flag used in the MCRecoTracksMatcherModule.
 
float m_qualityIndicator = NAN
 Quality index for classification of fake vs. MC-matched Tracks.
 
float m_flipqualityIndicator = NAN
 Quality index for flipping.
 
float m_2ndFlipqualityIndicator = NAN
 Quality index for flipping.
 
float m_outgoingArmTime = NAN
 Track time of the outgoing arm.
 
float m_outgoingArmTimeError = NAN
 Error of the track time of the outgoing arm.
 
float m_ingoingArmTime = NAN
 Track time of the ingoing arm.
 
float m_ingoingArmTimeError = NAN
 Error of the track time of the ingoing arm.
 
bool m_isArmTimeComputed = false
 true if the arms times are already computed, false otherwise
 
bool m_hasIngoingArmTime = false
 Internal storage of the final ingoing arm time is set.
 
bool m_hasOutgoingArmTime = false
 Internal storage of the final outgoing arm time is set.
 
int m_nSVDHitsOfOutgoingArm = 0
 Number of SVD clusters of the outgoing arm.
 
int m_nSVDHitsOfIngoingArm = 0
 Number of SVD clusters of the ingoing arm.
 
DataStore::StoreEntrym_cacheDataStoreEntry
 Cache of the data store entry to which this object belongs.
 
int m_cacheArrayIndex
 Cache of the index in the TClonesArray to which this object belongs.
 

Friends

class RecoTrackGenfitAccess
 The RecoTrackGenfitAccess need to access the genfit track (which is intended)!
 

Detailed Description

This is the Reconstruction Event-Data Model Track.

This class collects hits, saves the track parameters and can be used with a TrackFitter to perform fits to the hits. It can be created from a genfit::TrackCand and converted to a genfit::Track, but it is better to use this class directly in the modules, because it offers a more datastore-suited interface.

The RecoTrack itself does only store a genfit::Track internally. All hit content is stored as a relation to the hits. For each of these relations to a detector hit, there is also a relation to a RecoHitInformation, to store additional information. However, the user does not need to access these relation by himself, but can use the accessor functions of the RecoTrack.

Typically, a RecoTrack object is created with a position and momentum seed and a charge.

RecoTrack recoTrack(position, momentum, charge, ...)

Then, hits are added

recoTrack.addCDCHit(cdcHit, rlInformation, ...) ....

After that, the hits can either be accessed:

recoTrack.getCDCHitList(); recoTrack.getRightLeftInformation(cdcHit);

or the track can be fitted:

TrackFitter fitter; fitter.fit(recoTrack);

See also the TrackFitter class for possibilities to fit. After the track is fitted properly, the hit points with measurements can be used to extrapolate the track

recoTrack.getHitPointsWithMeasurement();

See the recoTrack.cc test for an overview on the hit information accessor methods.

Definition at line 79 of file RecoTrack.h.

Constructor & Destructor Documentation

◆ RecoTrack()

RecoTrack ( const ROOT::Math::XYZVector &  seedPosition,
const ROOT::Math::XYZVector &  seedMomentum,
const short int  seedCharge,
const std::string &  storeArrayNameOfPXDHits = "",
const std::string &  storeArrayNameOfSVDHits = "",
const std::string &  storeArrayNameOfCDCHits = "",
const std::string &  storeArrayNameOfBKLMHits = "",
const std::string &  storeArrayNameOfEKLMHits = "",
const std::string &  storeArrayNameOfRecoHitInformation = "" 
)

Construct a RecoTrack with the given seed helix parameters and the given names for the hits.

If you do not provide information for the hit store array names, the standard parameters are used.

Parameters
seedPositionA position on the helix of the track seed. Only the perigee of the helix will be saved.
seedMomentumThe seed momentum of the helix on the given position.
seedChargeThe seed charge of the helix
storeArrayNameOfPXDHitsThe name of the store array where the related PXD hits are stored.
storeArrayNameOfSVDHitsThe name of the store array where the related SVD hits are stored.
storeArrayNameOfCDCHitsThe name of the store array where the related CDC hits are stored.
storeArrayNameOfBKLMHitsThe name of the store array where the related BKLM hits are stored.
storeArrayNameOfEKLMHitsThe name of the store array where the related EKLM hits are stored.
storeArrayNameOfRecoHitInformationThe name of the store array where the related hit information are stored.

Definition at line 25 of file RecoTrack.cc.

32  :
33  m_charge(seedCharge),
34  m_storeArrayNameOfPXDHits(storeArrayNameOfPXDHits),
35  m_storeArrayNameOfSVDHits(storeArrayNameOfSVDHits),
36  m_storeArrayNameOfCDCHits(storeArrayNameOfCDCHits),
37  m_storeArrayNameOfBKLMHits(storeArrayNameOfBKLMHits),
38  m_storeArrayNameOfEKLMHits(storeArrayNameOfEKLMHits),
39  m_storeArrayNameOfRecoHitInformation(storeArrayNameOfRecoHitInformation)
40 {
41  m_genfitTrack.setStateSeed(XYZToTVector(seedPosition), XYZToTVector(seedMomentum));
42  // TODO Set the covariance seed (that should be done by the tracking package)
43  TMatrixDSym covSeed(6);
44  covSeed(0, 0) = 1e-3;
45  covSeed(1, 1) = 1e-3;
46  covSeed(2, 2) = 4e-3;
47  covSeed(3, 3) = 0.01e-3;
48  covSeed(4, 4) = 0.01e-3;
49  covSeed(5, 5) = 0.04e-3;
50  m_genfitTrack.setCovSeed(covSeed);
51 }
std::string m_storeArrayNameOfCDCHits
Store array name of added CDC hits.
Definition: RecoTrack.h:905
std::string m_storeArrayNameOfBKLMHits
Store array name of added BKLM hits.
Definition: RecoTrack.h:907
short int m_charge
Storage for the charge. All other helix parameters are saved in the genfit::Track.
Definition: RecoTrack.h:899
std::string m_storeArrayNameOfSVDHits
Store array name of added SVD hits.
Definition: RecoTrack.h:903
genfit::Track m_genfitTrack
Internal storage for the genfit track.
Definition: RecoTrack.h:897
std::string m_storeArrayNameOfEKLMHits
Store array name of added EKLM hits.
Definition: RecoTrack.h:909
std::string m_storeArrayNameOfPXDHits
Store array name of added PXD hits.
Definition: RecoTrack.h:901
std::string m_storeArrayNameOfRecoHitInformation
Store array of added RecoHitInformation.
Definition: RecoTrack.h:911
static constexpr auto XYZToTVector
Helper function to convert XYZVector to TVector3.
Definition: VectorUtil.h:24

Member Function Documentation

◆ addBKLMHit()

bool addBKLMHit ( const UsedBKLMHit bklmHit,
const unsigned int  sortingParameter,
OriginTrackFinder  foundByTrackFinder = OriginTrackFinder::c_undefinedTrackFinder 
)
inline

Adds a bklm hit with the given information to the reco track.

You only have to provide the hit and the sorting parameter, all other parameters have default value.

Parameters
bklmHitThe pointer to a stored BKLMHit in the store array you provided earlier, which you want to add.
sortingParameterThe index of the hit. It starts with 0 with the first hit.
foundByTrackFinderWhich track finder has found the hit?
Returns
True if the hit was not already added to the track.

Definition at line 286 of file RecoTrack.h.

288  {
289  return addHit(bklmHit, foundByTrackFinder, sortingParameter);
290  }
bool addHit(const HitType *hit, Args &&... params)
Add a generic hit with the given parameters for the reco hit information.
Definition: RecoTrack.h:949

◆ addCDCHit()

bool addCDCHit ( const UsedCDCHit cdcHit,
const unsigned int  sortingParameter,
RightLeftInformation  rightLeftInformation = RightLeftInformation::c_undefinedRightLeftInformation,
OriginTrackFinder  foundByTrackFinder = OriginTrackFinder::c_undefinedTrackFinder 
)
inline

Adds a cdc hit with the given information to the reco track.

You only have to provide the hit and the sorting parameter, all other parameters have default value.

Parameters
cdcHitThe pointer to a stored CDCHit in the store array you provided earlier, which you want to add.
sortingParameterThe index of the hit. It starts with 0 with the first hit.
rightLeftInformationThe right left information (if you know it).
foundByTrackFinderWhich track finder has found the hit?
Returns
True if the hit was not already added to the track.

Definition at line 243 of file RecoTrack.h.

◆ addEKLMHit()

bool addEKLMHit ( const UsedEKLMHit eklmHit,
const unsigned int  sortingParameter,
OriginTrackFinder  foundByTrackFinder = OriginTrackFinder::c_undefinedTrackFinder 
)
inline

Adds an eklm hit with the given information to the reco track.

You only have to provide the hit and the sorting parameter, all other parameters have default value.

Parameters
eklmHitThe pointer to a stored BKLMHit in the store array you provided earlier, which you want to add.
sortingParameterThe index of the hit. It starts with 0 with the first hit.
foundByTrackFinderWhich track finder has found the hit?
Returns
True if the hit was not already added to the track.

Definition at line 300 of file RecoTrack.h.

◆ addHit()

bool addHit ( const HitType *  hit,
Args &&...  params 
)
inlineprivate

Add a generic hit with the given parameters for the reco hit information.

Parameters
hita generic hit.
paramsfor the constructor of the reco hit information.
Returns
true if the hit was new.

Definition at line 949 of file RecoTrack.h.

◆ addHitsFromRecoTrack()

size_t addHitsFromRecoTrack ( const RecoTrack recoTrack,
unsigned int  sortingParameterOffset = 0,
bool  reversed = false,
std::optional< double >  optionalMinimalWeight = std::nullopt 
)

Add all hits from another RecoTrack to this RecoTrack.

Parameters
recoTrack: Pointer to the RecoTrack where the hits are copied from
sortingParameterOffset: This number will be added to the sortingParameter of all hits copied from recoTrack. Set this to (largest sorting parameter) + 1 in order to add hits at the end of this reco track.
reversed: add the hits in a reversed order - each sorting parameter is set to maximal sorting parameter - sorting parameter + offset
optionalMinimalWeight: if set, do only copy hits with a weight above this (if fitted already with the DAF).
Returns
The number of hits copied.

Definition at line 240 of file RecoTrack.cc.

◆ addHitWithHitInformation()

void addHitWithHitInformation ( const HitType *  hit,
RecoHitInformation recoHitInformation 
)
inlineprivate

Add the needed relations for adding a generic hit with the given hit information and reset track time information.

Parameters
hitThe hit to add
recoHitInformationThe reco hit information of the hit.

Definition at line 969 of file RecoTrack.h.

◆ addPXDHit()

bool addPXDHit ( const UsedPXDHit pxdHit,
const unsigned int  sortingParameter,
OriginTrackFinder  foundByTrackFinder = OriginTrackFinder::c_undefinedTrackFinder 
)
inline

Adds a pxd hit with the given information to the reco track.

You only have to provide the hit and the sorting parameter, all other parameters have default value.

Parameters
pxdHitThe pointer to a stored PXDHit/Cluster in the store array you provided earlier, which you want to add.
sortingParameterThe index of the hit. It starts with 0 with the first hit.
foundByTrackFinderWhich track finder has found the hit?
Returns
True if the hit was not already added to the track.

Definition at line 258 of file RecoTrack.h.

◆ addRelationTo() [1/2]

void addRelationTo ( const RelationsInterface< BASE > *  object,
float  weight = 1.0,
const std::string &  namedRelation = "" 
) const
inlineinherited

Add a relation from this object to another object (with caching).

Parameters
objectThe object to which the relation should point.
weightThe weight of the relation.
namedRelationAdditional name for the relation, or "" for the default naming

Definition at line 142 of file RelationsObject.h.

◆ addRelationTo() [2/2]

void addRelationTo ( const TObject *  object,
float  weight = 1.0,
const std::string &  namedRelation = "" 
) const
inlineinherited

Add a relation from this object to another object (no caching, can be quite slow).

Parameters
objectThe object to which the relation should point.
weightThe weight of the relation.
namedRelationAdditional name for the relation, or "" for the default naming

Definition at line 155 of file RelationsObject.h.

◆ addSVDHit()

bool addSVDHit ( const UsedSVDHit svdHit,
const unsigned int  sortingParameter,
OriginTrackFinder  foundByTrackFinder = OriginTrackFinder::c_undefinedTrackFinder 
)
inline

Adds a svd hit with the given information to the reco track.

You only have to provide the hit and the sorting parameter, all other parameters have default value.

Parameters
svdHitThe pointer to a stored SVDHit in the store array you provided earlier, which you want to add.
sortingParameterThe index of the hit. It starts with 0 with the first hit.
foundByTrackFinderWhich track finder has found the hit?
Returns
True if the hit was not already added to the track.

Definition at line 272 of file RecoTrack.h.

◆ copyRelations()

void copyRelations ( const RelationsInterface< BASE > *  sourceObj)
inlineinherited

Copies all relations of sourceObj (pointing from or to sourceObj) to this object (including weights).

Useful if you want to make a complete copy of a StoreArray object to make modifications to it, but retain all information on linked objects.

Note: this only works if sourceObj inherits from the same base (e.g. RelationsObject), and only for related objects that also inherit from the same base.

Definition at line 170 of file RelationsObject.h.

◆ copyToStoreArray()

RecoTrack * copyToStoreArray ( StoreArray< RecoTrack > &  storeArray) const

Append a new RecoTrack to the given store array and copy its general properties, but not the hits themself.

The position, momentum and charge are set to the seed values of this reco track, if it was not fitted or to the values at the first hit.

Definition at line 529 of file RecoTrack.cc.

◆ copyToStoreArrayUsing()

RecoTrack * copyToStoreArrayUsing ( StoreArray< RecoTrack > &  storeArray,
const ROOT::Math::XYZVector &  position,
const ROOT::Math::XYZVector &  momentum,
short  charge,
const TMatrixDSym &  covariance,
double  timeSeed 
) const

Append a new RecoTrack to the given store array and copy its general properties, but not the hits themself.

The position, momentum, charge etc. are set to the given parameters.

Definition at line 510 of file RecoTrack.cc.

◆ copyToStoreArrayUsingSeeds()

RecoTrack * copyToStoreArrayUsingSeeds ( StoreArray< RecoTrack > &  storeArray) const

Append a new RecoTrack to the given store array and copy its general properties, but not the hits themself.

The position, momentum and charge are set to the seed values of this reco track.

Definition at line 524 of file RecoTrack.cc.

◆ createFromTrackCand()

RecoTrack * createFromTrackCand ( const genfit::TrackCand trackCand,
const std::string &  storeArrayNameOfRecoTracks = "",
const std::string &  storeArrayNameOfPXDHits = "",
const std::string &  storeArrayNameOfSVDHits = "",
const std::string &  storeArrayNameOfCDCHits = "",
const std::string &  storeArrayNameOfBKLMHits = "",
const std::string &  storeArrayNameOfEKLMHits = "",
const std::string &  storeArrayNameOfRecoHitInformation = "",
const bool  recreateSortingParameters = false 
)
static

Create a reco track from a genfit::TrackCand and save it to the given store array.

Parameters
trackCandThe genfit::TrackCand from which to create the new object.
storeArrayNameOfRecoTracksThe store array where the new object should be saved.
storeArrayNameOfPXDHitsThe name of the store array where the related PXD hits are stored.
storeArrayNameOfSVDHitsThe name of the store array where the related SVD hits are stored.
storeArrayNameOfCDCHitsThe name of the store array where the related CDC hits are stored.
storeArrayNameOfBKLMHitsThe name of the store array where the related BKLM hits are stored.
storeArrayNameOfEKLMHitsThe name of the store array where the related EKLM hits are stored.
storeArrayNameOfRecoHitInformationThe name of the store array where the related hit information are stored.
recreateSortingParametersThe VXDTF does not set the sorting parameters correctly (they are all 0). This flag can be used to recover the parameters.
Returns
The newly created reco track.

Definition at line 97 of file RecoTrack.cc.

◆ deleteFittedInformation()

void deleteFittedInformation ( )

Delete all fitted information for all representations.

This function is needed, when you want to start the fitting "from scratch". After this function, a fit will recreate all measurements and fitted information. Please be aware that any pointers will be invalid after that!

Definition at line 462 of file RecoTrack.cc.

◆ deleteFittedInformationForRepresentation()

void deleteFittedInformationForRepresentation ( const genfit::AbsTrackRep rep)

Delete all fitted information for the given representations.

This function is needed, when you want to start the fitting "from scratch". After this function, a fit will recreate all measurements and fitted information. Please be aware that any pointers will be invalid after that!

Definition at line 470 of file RecoTrack.cc.

◆ estimateArmTime()

void estimateArmTime ( )

This function calculates the track time of the ingoing and outgoing arms and their difference.

If they do not exists they are set to NAN by default

Definition at line 633 of file RecoTrack.cc.

◆ extractTrackState()

std::tuple< ROOT::Math::XYZVector, ROOT::Math::XYZVector, short > extractTrackState ( ) const

Return the position, the momentum and the charge of the first measured state on plane or - if unfitted - the seeds.

Helper function to get the seed or the measured state on plane from a track.

Definition at line 499 of file RecoTrack.cc.

◆ flipTrackDirectionAndCharge()

void flipTrackDirectionAndCharge ( const genfit::AbsTrackRep representation = nullptr)

Flip the direction of the RecoTrack by inverting the momentum vector and the charge.

In addition, also the ingoing and outgoing arms and arm times are swapped.

Parameters
representationTrack representation to be used to get the MeasuredStateOnPlane at the last hit

Definition at line 724 of file RecoTrack.cc.

◆ getCreatedTrackPoint()

const genfit::TrackPoint * getCreatedTrackPoint ( const RecoHitInformation recoHitInformation) const

Get a pointer to the TrackPoint that was created from this hit.

Can be a nullptr if no measurement was already created. Please be aware that refitting may or may not recreate the track points and older pointers can be invalidated. Also, pruning a RecoTrack will also delete most of the TrackPoints.

Definition at line 230 of file RecoTrack.cc.

◆ getGenfitTrack()

const genfit::Track& getGenfitTrack ( ) const
inline

Returns genfit track.

const casting of the return reference is forbidden! If you need to modify genfit track, please use RecoTrackGenfitAccess::getGenfitTrack(RecoTrack& recoTrack).

Returns
const reference to genfit track

Definition at line 505 of file RecoTrack.h.

◆ getHitList()

std::vector<HitType*> getHitList ( const std::string &  storeArrayNameOfHits) const
inlineprivate

Return an unsorted list of hits of the given type in the store array that are related to this track.

Parameters
storeArrayNameOfHitsThe StoreArray to look for.

Definition at line 1044 of file RecoTrack.h.

◆ getInfo()

std::string getInfo ( ) const
inlineinherited

Return a short summary of this object's contents in raw text format.

Returns the contents of getInfoHTML() while translating line-breaks etc.

Note
: You don't need to implement this function (it's not virtual), getInfoHTML() is enough.

Definition at line 370 of file RelationsObject.h.

◆ getMeasuredStateOnPlaneFromRecoHit()

const genfit::MeasuredStateOnPlane & getMeasuredStateOnPlaneFromRecoHit ( const RecoHitInformation recoHitInfo,
const genfit::AbsTrackRep representation = nullptr 
) const

Return genfit's MeasuredStateOnPlane on plane for associated with one RecoHitInformation.

The caller needs to ensure that recoHitInfo->useInFit() is true and the a fit has been performed on the track, a.k.a. hasTrackFitStatus() == true

Definition at line 579 of file RecoTrack.cc.

◆ getName()

virtual std::string getName ( ) const
inlinevirtualinherited

Return a short name that describes this object, e.g.

pi+ for an MCParticle.

Reimplemented in SpacePoint, MCParticle, and Particle.

Definition at line 344 of file RelationsObject.h.

◆ getNumberOfHitsOfGivenType()

unsigned int getNumberOfHitsOfGivenType ( const std::string &  storeArrayNameOfHits) const
inlineprivate

Get the number of hits for the given hit type in the store array that are related to this track.

Parameters
storeArrayNameOfHitsThe StoreArray to look for.

Definition at line 1002 of file RecoTrack.h.

◆ getRecoHitInformation()

RecoHitInformation* getRecoHitInformation ( HitType *  hit) const
inline

Return the reco hit information for a generic hit from the storeArray.

Parameters
hitthe hit to look for.
Returns
The connected RecoHitInformation or a nullptr when the hit is not connected to the track.

Definition at line 312 of file RecoTrack.h.

◆ getRecoHitInformations()

std::vector< RecoHitInformation * > getRecoHitInformations ( bool  getSorted = false) const

Return a list of all RecoHitInformations associated with the RecoTrack.

This is especially useful when you want to iterate over all (fitted) hits in a track without caring whether its a CDC, VXD etc hit.

Parameters
getSortedif true, the list of RecoHitInformations will be returned sorted by the Sorting parameter in an ascending order. If false, the hits will be returned unsorted.

Definition at line 557 of file RecoTrack.cc.

◆ getRelated()

T* getRelated ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get the object to or from which this object has a relation.

Template Parameters
TThe class of objects to or from which the relation points.
Parameters
nameThe name of the store array to or from which the relation points. If empty the default store array name for class T will be used. If the special name "ALL" is given all store arrays containing objects of type T are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
The first related object or a null pointer.

Definition at line 278 of file RelationsObject.h.

◆ getRelatedFrom()

FROM* getRelatedFrom ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get the object from which this object has a relation.

Template Parameters
FROMThe class of objects from which the relation points.
Parameters
nameThe name of the store array from which the relation points. If empty the default store array name for class FROM will be used. If the special name "ALL" is given all store arrays containing objects of type FROM are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
The first related object or a null pointer.

Definition at line 263 of file RelationsObject.h.

◆ getRelatedFromWithWeight()

std::pair<FROM*, float> getRelatedFromWithWeight ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get first related object & weight of relation pointing from an array.

Template Parameters
FROMThe class of objects from which the relation points.
Parameters
nameThe name of the store array from which the relation points. If empty the default store array name for class FROM will be used. If the special name "ALL" is given all store arrays containing objects of type FROM are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
Pair of first related object and the relation weight, or (NULL, 1.0) if none found.

Definition at line 314 of file RelationsObject.h.

◆ getRelatedTo()

TO* getRelatedTo ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get the object to which this object has a relation.

Template Parameters
TOThe class of objects to which the relation points.
Parameters
nameThe name of the store array to which the relation points. If empty the default store array name for class TO will be used. If the special name "ALL" is given all store arrays containing objects of type TO are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
The first related object or a null pointer.

Definition at line 248 of file RelationsObject.h.

◆ getRelatedToWithWeight()

std::pair<TO*, float> getRelatedToWithWeight ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get first related object & weight of relation pointing to an array.

Template Parameters
TOThe class of objects to which the relation points.
Parameters
nameThe name of the store array to which the relation points. If empty the default store array name for class TO will be used. If the special name "ALL" is given all store arrays containing objects of type TO are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
Pair of first related object and the relation weight, or (NULL, 1.0) if none found.

Definition at line 297 of file RelationsObject.h.

◆ getRelatedWithWeight()

std::pair<T*, float> getRelatedWithWeight ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get first related object & weight of relation pointing from/to an array.

Template Parameters
TThe class of objects to or from which the relation points.
Parameters
nameThe name of the store array to or from which the relation points. If empty the default store array name for class T will be used. If the special name "ALL" is given all store arrays containing objects of type T are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
Pair of first related object and the relation weight, or (NULL, 1.0) if none found.

Definition at line 331 of file RelationsObject.h.

◆ getRelationsFrom()

RelationVector<FROM> getRelationsFrom ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get the relations that point from another store array to this object.

Template Parameters
FROMThe class of objects from which the relations point.
Parameters
nameThe name of the store array from which the relations point. If empty the default store array name for class FROM will be used. If the special name "ALL" is given all store arrays containing objects of type FROM are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
A vector of relations.

Definition at line 212 of file RelationsObject.h.

◆ getRelationsTo()

RelationVector<TO> getRelationsTo ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get the relations that point from this object to another store array.

Template Parameters
TOThe class of objects to which the relations point.
Parameters
nameThe name of the store array to which the relations point. If empty the default store array name for class TO will be used. If the special name "ALL" is given all store arrays containing objects of type TO are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
A vector of relations.

Definition at line 197 of file RelationsObject.h.

◆ getRelationsWith()

RelationVector<T> getRelationsWith ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get the relations between this object and another store array.

Relations in both directions are returned.

Template Parameters
TThe class of objects to or from which the relations point.
Parameters
nameThe name of the store array to or from which the relations point. If empty the default store array name for class T will be used. If the special name "ALL" is given all store arrays containing objects of type T are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
A vector of relations.

Definition at line 230 of file RelationsObject.h.

◆ getSortedHitList()

std::vector<HitType*> getSortedHitList ( const std::string &  storeArrayNameOfHits) const
inlineprivate

Return a sorted list of hits of the given type in the store array that are related to this track.

Parameters
storeArrayNameOfHitsThe StoreArray to look for.

Definition at line 1012 of file RecoTrack.h.

◆ getTrackRepresentationForPDG()

genfit::AbsTrackRep * getTrackRepresentationForPDG ( int  pdgCode) const

Return an already created track representation of the given reco track for the PDG.

You are not allowed to modify this TrackRep! Will return nulltpr if a trackRep is not available for the given pdgCode.

Parameters
pdgCodePDG code of the track representations, only positive PDG numbers are allowed

Definition at line 475 of file RecoTrack.cc.

◆ isOutgoingArm()

bool isOutgoingArm ( RecoHitInformation::RecoHitDetector  pre = RecoHitInformation::RecoHitDetector::c_undefinedTrackingDetector,
RecoHitInformation::RecoHitDetector  post = RecoHitInformation::RecoHitDetector::c_undefinedTrackingDetector 
)

This function returns true if the arm direction is Outgoing and false if the arm direction is Ingoing.

The detector sequences considered are: outgoing arm: PXD-SVD-CDC, PXD-SVD, SVD-CDC; ingoing arm: CDC-SVD-PXD, CDC-SVD, SVD-PXD; pre and post are defined w.r.t SVD, so they can be PXD, CDC or undefined if one of the two is missing

Definition at line 703 of file RecoTrack.cc.

◆ mapOnHits() [1/4]

void mapOnHits ( const std::string &  storeArrayNameOfHits,
std::function< void(const RecoHitInformation &, const HitType *)> const &  mapFunction 
) const
inline

Call a function on all hits of the given type in the store array, that are related to this track.

Const version.

Parameters
storeArrayNameOfHitsThe store array the hits should come from.
mapFunctionCall this function for every hit (with its reco hit information)

Definition at line 821 of file RecoTrack.h.

◆ mapOnHits() [2/4]

void mapOnHits ( const std::string &  storeArrayNameOfHits,
std::function< void(const RecoHitInformation &, const HitType *)> const &  mapFunction,
std::function< bool(const RecoHitInformation &, const HitType *)> const &  pickFunction 
) const
inline

Call a function on all hits of the given type in the store array, that are related to this track.

Const version.

Parameters
storeArrayNameOfHitsThe store array the hits should come from.
mapFunctionCall this function for every hit (with its reco hit information)
pickFunctionUse only those hits where the function returns true.

Definition at line 788 of file RecoTrack.h.

◆ mapOnHits() [3/4]

void mapOnHits ( const std::string &  storeArrayNameOfHits,
std::function< void(RecoHitInformation &, HitType *)> const &  mapFunction 
)
inline

Call a function on all hits of the given type in the store array, that are related to this track.

Parameters
storeArrayNameOfHitsThe store array the hits should come from.
mapFunctionCall this function for every hit (with its reco hit information)

Definition at line 809 of file RecoTrack.h.

◆ mapOnHits() [4/4]

void mapOnHits ( const std::string &  storeArrayNameOfHits,
std::function< void(RecoHitInformation &, HitType *)> const &  mapFunction,
std::function< bool(const RecoHitInformation &, const HitType *)> const &  pickFunction 
)
inline

Call a function on all hits of the given type in the store array, that are related to this track.

Parameters
storeArrayNameOfHitsThe store array the hits should come from.
mapFunctionCall this function for every hit (with its reco hit information)
pickFunctionUse only those hits where the function returns true.

Definition at line 766 of file RecoTrack.h.

◆ prune()

void prune ( )

Prune the genfit track, e.g.

remove all track points with measurements, but the first and the last one. Also, set the flags of the corresponding RecoHitInformation to pruned. Only to be used in the prune module.

Definition at line 375 of file RecoTrack.cc.

◆ registerRequiredRelations()

void registerRequiredRelations ( StoreArray< RecoTrack > &  recoTracks,
std::string const &  pxdHitsStoreArrayName = "",
std::string const &  svdHitsStoreArrayName = "",
std::string const &  cdcHitsStoreArrayName = "",
std::string const &  bklmHitsStoreArrayName = "",
std::string const &  eklmHitsStoreArrayName = "",
std::string const &  recoHitInformationStoreArrayName = "" 
)
static

Convenience method which registers all relations required to fully use a RecoTrack.

If you create a new RecoTrack StoreArray, call this method in the initialize() method of your module. Note that the BKLM and EKLM relations may not be registered because the KLM modules are loaded after tracking; in this case, a second call of this method is required after creation of the BKLM and EKLM hits store arrays.

Parameters
recoTracksReference to the store array where the new RecoTrack list is located
pxdHitsStoreArrayNamename of the StoreArray holding the PXDClusters lists
svdHitsStoreArrayNamename of the StoreArray holding the SVDClusters lists
cdcHitsStoreArrayNamename of the StoreArray holding the CDCHits lists
bklmHitsStoreArrayNamename of the StoreArray holding the BKLMHits lists
eklmHitsStoreArrayNamename of the StoreArray holding the EKLMHits lists
recoHitInformationStoreArrayNamename of the StoreArray holding RecoHitInformation lists

Definition at line 53 of file RecoTrack.cc.

◆ setDirtyFlag()

void setDirtyFlag ( const bool &  dirtyFlag = true)
inline

Set to true, if you want to rebuild the measurements and do the fit independent on changes of the hit content.

You can use this setting if you want to use other measurement creators than before (probably non-default settings) or different fitting algorithms.

Definition at line 722 of file RecoTrack.h.

Member Data Documentation

◆ m_dirtyFlag

bool m_dirtyFlag = true
private

Bool is hits were added to track after fitting and the measurements should be recalculated.

will be true after ROOT deserialization, which means the measurements will be recreated

Definition at line 914 of file RecoTrack.h.


The documentation for this class was generated from the following files: