12#include <framework/datastore/RelationsObject.h>
13#include <framework/core/FrameworkExceptions.h>
16#include <tracking/spacePointCreation/SpacePoint.h>
47 BELLE2_DEFINE_EXCEPTION(UnsupportedDetType,
"The Detector Type is not supported by this class. Supported are: PXD and SVD");
53 " index that is out of bounds!");
59 "Trying to modify SortingParameters, but number of new SortingParameters differs from number of SpacePoints");
106 explicit SpacePointTrackCand(
const std::vector<const Belle2::SpacePoint*>& spacePoints,
int pdgCode = 0,
double charge = 0,
125 const std::vector<const Belle2::SpacePoint*>
getSortedHits()
const;
138 const std::vector<const Belle2::SpacePoint*>
getHitsInRange(
int firstInd,
int lastInd)
const;
262 void print(
int debuglevel = 25,
const Option_t* =
"")
const;
Defines interface for accessing relations of objects in StoreArray.
ClassDef(RelationsInterface, 0)
defines interface for accessing relations of objects in StoreArray.
Storage for (VXD) SpacePoint-based track candidates.
short getFamily() const
return family identifier
const ROOT::Math::XYZVector getPosSeed() const
get position seed as ROOT::Math::XYZVector
int getMcTrackId() const
get the MC Track ID (same writing as in genfit::TrackCand)
std::vector< constBelle2::SpacePoint * >::const_iterator begin() const
returns a const_iterator (begin()) for easily looping over hits of SpacePointTrackCand.
double m_q
charge of the particle in units of elementary charge
short m_family
identifier for tracks that share at least two SpacePoints.
double m_qualityIndicator
An estimation for the quality of the track.
const std::vector< double > & getSortingParameters() const
get the sorting parameters
int m_iTrackStub
Index of TrackStub in a curling Track Candidate.
void setSortingParameters(const std::vector< double > &sortParams)
set the sorting parameters
const ROOT::Math::XYZVector getMomSeed() const
get momentum seed as ROOT::Math::XYZVector
void set6DSeed(const TVectorD &state6D)
set the 6D state seed
void print(int debuglevel=25, const Option_t *="") const
print the Track Candidate in its "full beauty".
unsigned int getNHits() const
get the number of hits (space points) in the track candidate
bool checkedMinDistance() const
Check if the SpacePointTrackCand has been checked for consecutive hits being far enough apart.
int getPdgCode() const
get pdg code
unsigned short int m_refereeStatus
bit-field to indicate different properties that are checked by the referee module
const TMatrixDSym & getCovSeed() const
get the covariance matrix seed (6D).
const std::vector< const Belle2::SpacePoint * > & getHits() const
get hits (space points) of track candidate
void removeSpacePoint(int indexInTrackCand)
remove a SpacePoint (and its sorting parameter) from the SpacePointTrackCand
double getQualityIndicator() const
returns the current status of the estimated quality of this track candidate.
unsigned short int getRefereeStatus(unsigned short int bitmask=USHRT_MAX) const
Return the referee status code of the SpacePointTrackCand.
bool checkedSameSensors() const
Check if the SpacePointTrackCand has been checked for consecutive hits on same sensor.
void setCovSeed(const TMatrixDSym &cov)
set the covariance matrix seed
std::vector< constBelle2::SpacePoint * >::const_iterator end() const
returns a const_iterator (end()) for easily looping over hits of SpacePointTrackCand.
void setFamily(short family)
assign family identifier
int getMcTrackID() const
get the MC Track ID
void clearRefereeStatus()
clear the referee status.
void removeRefereeStatus(unsigned short int bitmask)
remove a referee status
bool m_flightDirection
direction of flight.
std::vector< const SpacePoint * > m_trackSpacePoints
pointers to SpacePoints in the datastore
bool checkedForCurling() const
check if the TrackCand has been checked for Curling.
RefereeStatusBit
Status information that can be set to indicate several properties of the SpacePointTrackCand.
@ c_curlingTrack
bit 8: SPTC is curling (resp.
@ c_checkedTrueHits
bit 5: All SpacePoints of the SPTC have a relation to at least one TrueHit.
@ c_removedHits
bit 4: SpacePoints were removed from this SPTC.
@ c_omittedClusters
bit 9: Not all Clusters of the genfit::TrackCand have been used to create this SPTC.
@ c_hitsLowDistance
bit 3: SPTC has two (or more) SpacePoints that are not far enough apart.
@ c_checkedClean
bit 1: SPTC shows no 'problematic' behaviour.
@ c_singleClustersSPs
bit 10: SPTC contains single Cluster SpacePoints.
@ c_checkedMinDistance
bit 7: It has been checked if two consecutive SpacePoints are far enough apart.
@ c_initialState
This is the initialState, which will always be set in the beginning and at reset.
@ c_hasFittedRecoTrack
bit 13: SPTC is related to a RecoTrack which has a successful fit.
@ c_isActive
bit 11: SPTC is active (i.e.
@ c_checkedSameSensors
bit 6: It has been checked, if two consecutive SpacePoints are on the same sensor for this SPTC.
@ c_checkedByReferee
bit 0: SPTC has been checked by a Referee (all possible tests).
@ c_isReserved
bit 12: SPTC is reserved (i.e.
@ c_hitsOnSameSensor
bit 2: SPTC has two (or more) SpacePoints on same sensor.
unsigned int size() const
get the number of hits (space points) in the track candidate
int m_pdg
PDG code of particle.
bool operator<(const SpacePointTrackCand &rhs) const
Overloading the less operator to compare SPTCs based on their quality index.
bool isCurling() const
get if the TrackCand is curling.
bool hasHitsOnSameSensor() const
Check if the SpacePointTrackCand contains consecutive SpacePoints that are on the same sensor WARNING...
std::vector< double > m_sortingParameters
sorting Parameters, can be used to sort the SpacePoints.
SpacePointTrackCand()=default
Empty constructor with default values, including it to be active.
BELLE2_DEFINE_EXCEPTION(UnsupportedDetType, "The Detector Type is not supported by this class. Supported are: PXD and SVD")
Exception thrown, when an Unsupported Detector Type occurs.
void addSpacePoint(const SpacePoint *newSP, double sortParam)
add a new SpacePoint and its according sorting parameter to the track candidate
void setRefereeStatus(unsigned short int bitmask)
set referee status (resets the complete to the passed status!)
void setTrackStubIndex(int trackStubInd)
set TrackStub index
bool isPartOfCurlingTrack() const
check if the TrackCand is part of a curling TrackCand.
bool isOutgoing() const
check if particle is outgoing (simply returns member m_flightDirection)!
int m_MCTrackID
track ID from MC simulation
int getTrackStubIndex() const
get TrackStub Index
void resetRefereeStatus()
resets the referee status to the initial value
BELLE2_DEFINE_EXCEPTION(SPTCSortingParameterSizeInvalid, "Trying to modify SortingParameters, but number of new SortingParameters differs from number of SpacePoints")
Exception thrown, when the size of the vector containing the spacePoints has a different size than th...
const std::vector< const Belle2::SpacePoint * > getHitsInRange(int firstInd, int lastInd) const
get hits (SpacePoints) in range (indices of SpacePoint inside SpacePointTrackCand) including first in...
bool hasRefereeStatus(unsigned int short bitmask) const
Check if the SpacePointTrackCand has the status characterized by the bitmask.
const std::vector< double > getSortingParametersInRange(int firstIndex, int lastIndex) const
get the sorting parameters in range (indices of SpacePoints inside SpacePointTrackCand) including fir...
std::string getRefereeStatusString(std::string delimiter=" ") const
get the refereeStatus as a string (easier to read than an unsigned short int)
TMatrixDSym m_cov6D
global momentum plus position state (seed) covariance matrix
bool operator==(const SpacePointTrackCand &rhs) const
Checks the equality of the pointers to the contained SpacePoints (pdg-code and charge estimate are no...
double getChargeSeed() const
get charge
const TVectorD & getStateSeed() const
get state seed as 6D vector
void setFlightDirection(bool direction)
set the direction of flight (true is outgoing, false is ingoing).
BELLE2_DEFINE_EXCEPTION(SPTCIndexOutOfBounds, "Trying to access a SpacePoint from a SpacePointTrackCand via an" " index that is out of bounds!")
Exception thrown, when trying to access SpacePoints by their index inside of SpacePointTrackCand,...
TVectorD m_state6D
global momentum plus position state (seed) vector
bool hasHitsLowDistance() const
Check if consecutive SpacePoints are far enough apart throughout the SpacePointTrackCand WARNING: doe...
void addRefereeStatus(unsigned short int bitmask)
add a referee status
void setPdgCode(int pdgCode)
set a hypothesis for the particle by setting a pdgcode (will also set the appropriate charge)
bool hasRemovedHits() const
Check if a SpacePointTrackCand has removed hits (i.e.
const std::vector< const Belle2::SpacePoint * > getSortedHits() const
get hits (space points) sorted by their respective sorting parameter
void setQualityIndicator(const double newIndicator)
sets the new status of the estimated quality of this track candidate.
void setChargeSeed(double charge)
Setter for assumed charge of tracked particle.
SpacePoint typically is build from 1 PXDCluster or 1-2 SVDClusters.
Abstract base class for different kinds of events.