LCFIVertex
0.7.2
|
A collection of TrackState objects with a fit and vertex function maximum. More...
#include <candidatevertex.h>
Public Types | |
enum | eResolveType { FittedPosition, NearestMaximum, FittedPosition, NearestMaximum } |
Type of resolution to perform - vertex position or the nearest found maximum. | |
enum | eResolveType { FittedPosition, NearestMaximum, FittedPosition, NearestMaximum } |
Type of resolution to perform - vertex position or the nearest found maximum. | |
typedef VertexFitterLSM | FallbackVertexFitter |
typedef VertexResolverEqualSteps | FallbackVertexResolver |
typedef VertexFuncMaxFinderClassicStepper | FallbackVertexFuncMaxFinder |
typedef VertexFitterLSM | FallbackVertexFitter |
typedef VertexResolverEqualSteps | FallbackVertexResolver |
typedef VertexFuncMaxFinderClassicStepper | FallbackVertexFuncMaxFinder |
Public Member Functions | |
CandidateVertex (const std::vector< TrackState * > &Tracks, VertexFunction *VertexFunction, VertexFitter *Fitter=_getFallbackFitter(), VertexResolver *Resolver=_getFallbackResolver(), VertexFuncMaxFinder *MaxFinder=_getFallbackMaxFinder()) | |
Constuct with just Track list and VertexFunction. More... | |
CandidateVertex (const std::vector< TrackState * > &Tracks, InteractionPoint *IP, VertexFunction *VertexFunction, VertexFitter *Fitter=_getFallbackFitter(), VertexResolver *Resolver=_getFallbackResolver(), VertexFuncMaxFinder *MaxFinder=_getFallbackMaxFinder()) | |
Constuct with Track list, InteractionPoint and VertexFunction. More... | |
CandidateVertex (const Vector3 &Position, const Matrix3x3 &PositionError, double ChiSquaredOfFit, std::map< TrackState *, double > ChiSquaredOfTrack, double ChiSquaredOfIP) | |
Construct a CandidateVertex with fit information. More... | |
CandidateVertex (const std::vector< CandidateVertex * > &Vertices, VertexFitter *Fitter=_getFallbackFitter(), VertexResolver *Resolver=_getFallbackResolver(), VertexFuncMaxFinder *MaxFinder=_getFallbackMaxFinder()) | |
Construct a CandidateVertex by merging other CandidateVertices. More... | |
~CandidateVertex () | |
Destructor. More... | |
bool | removeTrackState (TrackState *const TrackToRemove) |
Remove the first reference to a TrackState from this vertices track list. More... | |
bool | removeTrack (Track *const TrackToRemove) |
Remove the first TrackState from this vertices track list which has parent track TrackToRemove. More... | |
void | addTrackState (TrackState *TrackToAdd) |
Add a TrackState to this vertex. More... | |
bool | removeIP () |
Remove this vertices InteractionPoint. More... | |
void | setIP (InteractionPoint *IP) |
Add an InteractionPoint. More... | |
void | mergeCandidateVertex (const CandidateVertex *SourceVertex) |
Merge another vertex into this one. More... | |
void | claimTracksFrom (const std::list< CandidateVertex * > &LosingVertices) |
Claim tracks and IP from another vertex. More... | |
int | trimByProb (const double ProbThreshold) |
Trim trackstates in order of decreasing chi squared until the vertex has a probabilty below that of the threshold. More... | |
int | trimByChi2 (const double Chi2Threshold) |
Trim trackstates with chi squared contributions bigger than the threshold. More... | |
int | trimByChi2 (const double Chi2Threshold, VertexFitter *Fitter) |
Trim trackstates with chi squared contributions bigger than the threshold. More... | |
void | invalidateFit () const |
Invalidate the fit so that the refit() is called when needed. More... | |
void | refit (bool CalculateError=0) const |
Refit the vertex. More... | |
void | refit (VertexFitter *Fitter, bool CalculateError=0) const |
Refit the vertex using the fitter specified. More... | |
void | invalidateFuncMax () const |
Invalidate the found vertex function maximum so that findVertexFuncMax() is called when needed. | |
bool | findVertexFuncMax () const |
Find the local vertex function maximum. More... | |
bool | isResolvedFrom (CandidateVertex *const Vertex, const double Threshold, eResolveType Type) const |
Resolve two vertices with this vertices resolver. More... | |
bool | isResolvedFrom (CandidateVertex *const Vertex, const double Threshold, eResolveType Type, VertexResolver *Resolver) const |
Resolve two vertices with a specified resolver. More... | |
const std::vector< TrackState * > & | trackStateList () const |
Return the TrackStates in this Vertex. More... | |
bool | hasTrack (Track *Track) const |
Return if this Vertex contains the passed track. More... | |
InteractionPoint * | interactionPoint () const |
Return the InteractionPoint in this Vertex. | |
const Vector3 & | position () const |
Return the fitted position of this Vertex. More... | |
const Matrix3x3 & | positionError () const |
Return the fitted position error matrix of this Vertex. More... | |
double | distanceTo (const Vector3 &Point) const |
Return the distance from this Vertex to a point. More... | |
double | distanceTo (const CandidateVertex *const Vertex) const |
Return the distance from this Vertex to another Vertex. More... | |
double | vertexFuncMaxValue () const |
Return the value of the vertex function at this vertexes local maximum. More... | |
const Vector3 & | vertexFuncMaxPosition () const |
Return the position of this vertexes local maximum. More... | |
double | vertexFuncValue () const |
Return the value of the vertex function at the vertices position. More... | |
double | chiSquaredOfTrack (TrackState *Track) const |
Return the chi squared contribution of a trackstate in this vertex. More... | |
double | chiSquaredOfIP () const |
Return the chi squared contribution of the IP if this vertex has one. More... | |
const std::map< TrackState *, double > & | chiSquaredOfAllTracks () const |
Return the chi squared contribution of all the trackstates in this vertex. More... | |
double | chiSquaredOfFit () const |
Return the chi squared of the fit. More... | |
double | maxChiSquaredOfTrackIP () const |
Return the chi squared contribution of the Track or IP with the highest chi square contribution. More... | |
CandidateVertex (const std::vector< TrackState * > &Tracks, VertexFunction *VertexFunction, VertexFitter *Fitter=_getFallbackFitter(), VertexResolver *Resolver=_getFallbackResolver(), VertexFuncMaxFinder *MaxFinder=_getFallbackMaxFinder()) | |
Constuct with just Track list and VertexFunction. More... | |
CandidateVertex (const std::vector< TrackState * > &Tracks, InteractionPoint *IP, VertexFunction *VertexFunction, VertexFitter *Fitter=_getFallbackFitter(), VertexResolver *Resolver=_getFallbackResolver(), VertexFuncMaxFinder *MaxFinder=_getFallbackMaxFinder()) | |
Constuct with Track list, InteractionPoint and VertexFunction. More... | |
CandidateVertex (const Vector3 &Position, const Matrix3x3 &PositionError, double ChiSquaredOfFit, std::map< TrackState *, double > ChiSquaredOfTrack, double ChiSquaredOfIP) | |
Construct a CandidateVertex with fit information. More... | |
CandidateVertex (const std::vector< CandidateVertex * > &Vertices, VertexFitter *Fitter=_getFallbackFitter(), VertexResolver *Resolver=_getFallbackResolver(), VertexFuncMaxFinder *MaxFinder=_getFallbackMaxFinder()) | |
Construct a CandidateVertex by merging other CandidateVertices. More... | |
~CandidateVertex () | |
Destructor. More... | |
bool | removeTrackState (TrackState *const TrackToRemove) |
Remove the first reference to a TrackState from this vertices track list. More... | |
bool | removeTrack (Track *const TrackToRemove) |
Remove the first TrackState from this vertices track list which has parent track TrackToRemove. More... | |
void | addTrackState (TrackState *TrackToAdd) |
Add a TrackState to this vertex. More... | |
bool | removeIP () |
Remove this vertices InteractionPoint. More... | |
void | setIP (InteractionPoint *IP) |
Add an InteractionPoint. More... | |
void | mergeCandidateVertex (const CandidateVertex *SourceVertex) |
Merge another vertex into this one. More... | |
void | claimTracksFrom (const std::list< CandidateVertex * > &LosingVertices) |
Claim tracks and IP from another vertex. More... | |
int | trimByProb (const double ProbThreshold) |
Trim trackstates in order of decreasing chi squared until the vertex has a probabilty below that of the threshold. More... | |
int | trimByChi2 (const double Chi2Threshold) |
Trim trackstates with chi squared contributions bigger than the threshold. More... | |
int | trimByChi2 (const double Chi2Threshold, VertexFitter *Fitter) |
Trim trackstates with chi squared contributions bigger than the threshold. More... | |
void | invalidateFit () const |
Invalidate the fit so that the refit() is called when needed. More... | |
void | refit (bool CalculateError=0) const |
Refit the vertex. More... | |
void | refit (VertexFitter *Fitter, bool CalculateError=0) const |
Refit the vertex using the fitter specified. More... | |
void | invalidateFuncMax () const |
Invalidate the found vertex function maximum so that findVertexFuncMax() is called when needed. | |
bool | findVertexFuncMax () const |
Find the local vertex function maximum. More... | |
bool | isResolvedFrom (CandidateVertex *const Vertex, const double Threshold, eResolveType Type) const |
Resolve two vertices with this vertices resolver. More... | |
bool | isResolvedFrom (CandidateVertex *const Vertex, const double Threshold, eResolveType Type, VertexResolver *Resolver) const |
Resolve two vertices with a specified resolver. More... | |
const std::vector< TrackState * > & | trackStateList () const |
Return the TrackStates in this Vertex. More... | |
bool | hasTrack (Track *Track) const |
Return if this Vertex contains the passed track. More... | |
InteractionPoint * | interactionPoint () const |
Return the InteractionPoint in this Vertex. | |
const Vector3 & | position () const |
Return the fitted position of this Vertex. More... | |
const Matrix3x3 & | positionError () const |
Return the fitted position error matrix of this Vertex. More... | |
double | distanceTo (const Vector3 &Point) const |
Return the distance from this Vertex to a point. More... | |
double | distanceTo (const CandidateVertex *const Vertex) const |
Return the distance from this Vertex to another Vertex. More... | |
double | vertexFuncMaxValue () const |
Return the value of the vertex function at this vertexes local maximum. More... | |
const Vector3 & | vertexFuncMaxPosition () const |
Return the position of this vertexes local maximum. More... | |
double | vertexFuncValue () const |
Return the value of the vertex function at the vertices position. More... | |
double | chiSquaredOfTrack (TrackState *Track) const |
Return the chi squared contribution of a trackstate in this vertex. More... | |
double | chiSquaredOfIP () const |
Return the chi squared contribution of the IP if this vertex has one. More... | |
const std::map< TrackState *, double > & | chiSquaredOfAllTracks () const |
Return the chi squared contribution of all the trackstates in this vertex. More... | |
double | chiSquaredOfFit () const |
Return the chi squared of the fit. More... | |
double | maxChiSquaredOfTrackIP () const |
Return the chi squared contribution of the Track or IP with the highest chi square contribution. More... | |
Friends | |
template<class charT , class traits > | |
std::basic_ostream< charT, traits > & | operator<< (std::basic_ostream< charT, traits > &os, const CandidateVertex &cv) |
template<class charT , class traits > | |
std::basic_ostream< charT, traits > & | operator<< (std::basic_ostream< charT, traits > &os, const CandidateVertex &cv) |
A collection of TrackState objects with a fit and vertex function maximum.
This class is a list of TrackStates (and possibly an InteractionPoint) that are fit to a common spatial point, and which are optionally related to a maximum in the vertex function. Three external algorithm classes are used, VertexFitter,VertexResolver and VertexFuncMaxFinder. The perticular instance of these algorithms to be used by each candidate vertex is specified at construction, the constuctor defaults to fallback algorithms if none are specified.
In order to minimise the number of times a vertex is fitted, this only happens when needed. When a candidate vertex is created or its track content changed a flag is set (_FitIsValid) to 0, a function such as position() will check the status of this flag and fit the vertex if needed, so that a fit only occurs if the track content changed and the fit is needed. The vertex function maximum works in a similar way, except it is not currently invalidated on a change of track content as classic ZVTOP does not require this.
The per-instance algorithms can be overridden as the functions that use them are overloaded with a version that takes a pointer to the algorithm class. For example calling isResolvedFrom(Vertex, Threshold, Resolver) rather than isResolvedFrom(Vertex,Threshold). For fitting and max finding this is slightly complicated by the caching system mentioned above. For example to use a different fitter than that specified at constuction to get the position of the vertex, one must call refit(Fitter) and then position().
Definition at line 58 of file include/vertex_lcfi/zvtop/include/candidatevertex.h.
This typedef determines the VertexFitter used if none is specified in the CandidateVertex constuctor. If changed you may need to change the includes in the cpp file
Definition at line 64 of file include/vertex_lcfi/zvtop/include/candidatevertex.h.
This typedef determines the VertexFitter used if none is specified in the CandidateVertex constuctor. If changed you may need to change the includes in the cpp file
Definition at line 64 of file vertex_lcfi/zvtop/include/candidatevertex.h.
typedef VertexFuncMaxFinderClassicStepper vertex_lcfi::ZVTOP::CandidateVertex::FallbackVertexFuncMaxFinder |
This typedef determines the VertexFuncMaxFinder used if none is specified in the CandidateVertex constuctor. If changed you may need to change the includes in the cpp file
Definition at line 68 of file vertex_lcfi/zvtop/include/candidatevertex.h.
typedef VertexFuncMaxFinderClassicStepper vertex_lcfi::ZVTOP::CandidateVertex::FallbackVertexFuncMaxFinder |
This typedef determines the VertexFuncMaxFinder used if none is specified in the CandidateVertex constuctor. If changed you may need to change the includes in the cpp file
Definition at line 68 of file include/vertex_lcfi/zvtop/include/candidatevertex.h.
This typedef determines the VertexResolver used if none is specified in the CandidateVertex constuctor. If changed you may need to change the includes in the cpp file
Definition at line 66 of file include/vertex_lcfi/zvtop/include/candidatevertex.h.
This typedef determines the VertexResolver used if none is specified in the CandidateVertex constuctor. If changed you may need to change the includes in the cpp file
Definition at line 66 of file vertex_lcfi/zvtop/include/candidatevertex.h.
vertex_lcfi::ZVTOP::CandidateVertex::CandidateVertex | ( | const std::vector< TrackState * > & | Tracks, |
VertexFunction * | VertexFunction, | ||
VertexFitter * | Fitter = _getFallbackFitter() , |
||
VertexResolver * | Resolver = _getFallbackResolver() , |
||
VertexFuncMaxFinder * | MaxFinder = _getFallbackMaxFinder() |
||
) |
Constuct with just Track list and VertexFunction.
Creates a CandidateVertex from a set of TrackState objects, a VertexFunction but no InteractionPoint. As no fit or VertexFunction maximum is specifed at constuction the flags for these are set to invalid so that they are worked out when needed. Note defaults for fitter, resolver and max finder.
Tracks | A vector of pointers to the TrackState objects that form this CandidateVertex. The same TrackState can be given to multiple CandidateVertex objects, but this is may not desierable as the TrackState would then be swum back and forth between the vertices. |
VertexFunction | Pointer to the function which is explored for the nearest maxima to the fit vertex. |
Fitter | Pointer to the VertexFitter that the vertex uses to fit itself. Defaults to the typedef FallbackVertexFitter. |
Resolver | Pointer to the VertexResolver that the vertex uses to resolve itself from others. Defaults to the typedef FallbackVertexResolver. |
MaxFinder | Pointer to the VertexFuncMaxFinder that the vertex uses to find the nearest VertexFunction maximum. Defaults to the typedef FallbackVertexFuncMaxFinder. |
Definition at line 28 of file candidatevertex.cpp.
vertex_lcfi::ZVTOP::CandidateVertex::CandidateVertex | ( | const std::vector< TrackState * > & | Tracks, |
InteractionPoint * | IP, | ||
VertexFunction * | VertexFunction, | ||
VertexFitter * | Fitter = _getFallbackFitter() , |
||
VertexResolver * | Resolver = _getFallbackResolver() , |
||
VertexFuncMaxFinder * | MaxFinder = _getFallbackMaxFinder() |
||
) |
Constuct with Track list, InteractionPoint and VertexFunction.
Creates a CandidateVertex from a set of TrackState objects, a VertexFunction and an InteractionPoint. As no fit or VertexFunction maximum is specifed at constuction the flags for these are set to invalid so that they are worked out when needed. Note defaults for fitter, resolver and max finder.
Tracks | A vector of pointers to the TrackState objects that form this CandidateVertex. The same TrackState can be given to multiple CandidateVertex objects, but this is may not desierable as the TrackState would then be swum back and forth between the vertices. |
IP | A pointer to the InteractionPoint associated with the vertex |
VertexFunction | Pointer to the function which is explored for the nearest maxima to the fit vertex. |
Fitter | Pointer to the VertexFitter that the vertex uses to fit itself. Defaults to the typedef FallbackVertexFitter. |
Resolver | Pointer to the VertexResolver that the vertex uses to resolve itself from others. Defaults to the typedef FallbackVertexResolver. |
MaxFinder | Pointer to the VertexFuncMaxFinder that the vertex uses to find the nearest VertexFunction maximum. Defaults to the typedef FallbackVertexFuncMaxFinder. |
Definition at line 33 of file candidatevertex.cpp.
vertex_lcfi::ZVTOP::CandidateVertex::CandidateVertex | ( | const Vector3 & | Position, |
const Matrix3x3 & | PositionError, | ||
double | ChiSquaredOfFit, | ||
std::map< TrackState *, double > | ChiSquaredOfTrack, | ||
double | ChiSquaredOfIP | ||
) |
Construct a CandidateVertex with fit information.
Creates a CandidateVertex that contains fit information and in which the fit flag is set valid.
Position | Position of the fitted vertex |
PositionError | ErrorMatrix of the fitted vertex |
ChiSquaredOfFit | Chi Squared of total fit |
ChiSquaredOfTrack | A std::map of track chi squareds indexed by trackstate pointer |
ChiSquaredOfIP | Chi squared contribution of IP object (if any) |
Definition at line 37 of file candidatevertex.cpp.
vertex_lcfi::ZVTOP::CandidateVertex::CandidateVertex | ( | const std::vector< CandidateVertex * > & | Vertices, |
VertexFitter * | Fitter = _getFallbackFitter() , |
||
VertexResolver * | Resolver = _getFallbackResolver() , |
||
VertexFuncMaxFinder * | MaxFinder = _getFallbackMaxFinder() |
||
) |
Construct a CandidateVertex by merging other CandidateVertices.
Creates a CandidateVertex by merging the tracks and IP from a collection of CV's track duplicates are removed by checking if TrackStates have the same parent, if there is more than one IP object the IP from the last vertex in the list is used. If the list is empty you get an empty vertex! Ignores vertex functions.
Vertices | Position of the fitted vertex |
Fitter | Pointer to the VertexFitter that the vertex uses to fit itself. Defaults to the typedef FallbackVertexFitter. |
Resolver | Pointer to the VertexResolver that the vertex uses to resolve itself from others. Defaults to the typedef FallbackVertexResolver. |
MaxFinder | Pointer to the VertexFuncMaxFinder that the vertex uses to find the nearest VertexFunction maximum. Defaults to the typedef FallbackVertexFuncMaxFinder. |
Definition at line 41 of file candidatevertex.cpp.
References addTrackState(), hasTrack(), and setIP().
|
inline |
Destructor.
Does not delete any objects passed at construction.
Definition at line 128 of file include/vertex_lcfi/zvtop/include/candidatevertex.h.
vertex_lcfi::ZVTOP::CandidateVertex::CandidateVertex | ( | const std::vector< TrackState * > & | Tracks, |
VertexFunction * | VertexFunction, | ||
VertexFitter * | Fitter = _getFallbackFitter() , |
||
VertexResolver * | Resolver = _getFallbackResolver() , |
||
VertexFuncMaxFinder * | MaxFinder = _getFallbackMaxFinder() |
||
) |
Constuct with just Track list and VertexFunction.
Creates a CandidateVertex from a set of TrackState objects, a VertexFunction but no InteractionPoint. As no fit or VertexFunction maximum is specifed at constuction the flags for these are set to invalid so that they are worked out when needed. Note defaults for fitter, resolver and max finder.
Tracks | A vector of pointers to the TrackState objects that form this CandidateVertex. The same TrackState can be given to multiple CandidateVertex objects, but this is may not desierable as the TrackState would then be swum back and forth between the vertices. |
VertexFunction | Pointer to the function which is explored for the nearest maxima to the fit vertex. |
Fitter | Pointer to the VertexFitter that the vertex uses to fit itself. Defaults to the typedef FallbackVertexFitter. |
Resolver | Pointer to the VertexResolver that the vertex uses to resolve itself from others. Defaults to the typedef FallbackVertexResolver. |
MaxFinder | Pointer to the VertexFuncMaxFinder that the vertex uses to find the nearest VertexFunction maximum. Defaults to the typedef FallbackVertexFuncMaxFinder. |
vertex_lcfi::ZVTOP::CandidateVertex::CandidateVertex | ( | const std::vector< TrackState * > & | Tracks, |
InteractionPoint * | IP, | ||
VertexFunction * | VertexFunction, | ||
VertexFitter * | Fitter = _getFallbackFitter() , |
||
VertexResolver * | Resolver = _getFallbackResolver() , |
||
VertexFuncMaxFinder * | MaxFinder = _getFallbackMaxFinder() |
||
) |
Constuct with Track list, InteractionPoint and VertexFunction.
Creates a CandidateVertex from a set of TrackState objects, a VertexFunction and an InteractionPoint. As no fit or VertexFunction maximum is specifed at constuction the flags for these are set to invalid so that they are worked out when needed. Note defaults for fitter, resolver and max finder.
Tracks | A vector of pointers to the TrackState objects that form this CandidateVertex. The same TrackState can be given to multiple CandidateVertex objects, but this is may not desierable as the TrackState would then be swum back and forth between the vertices. |
IP | A pointer to the InteractionPoint associated with the vertex |
VertexFunction | Pointer to the function which is explored for the nearest maxima to the fit vertex. |
Fitter | Pointer to the VertexFitter that the vertex uses to fit itself. Defaults to the typedef FallbackVertexFitter. |
Resolver | Pointer to the VertexResolver that the vertex uses to resolve itself from others. Defaults to the typedef FallbackVertexResolver. |
MaxFinder | Pointer to the VertexFuncMaxFinder that the vertex uses to find the nearest VertexFunction maximum. Defaults to the typedef FallbackVertexFuncMaxFinder. |
vertex_lcfi::ZVTOP::CandidateVertex::CandidateVertex | ( | const Vector3 & | Position, |
const Matrix3x3 & | PositionError, | ||
double | ChiSquaredOfFit, | ||
std::map< TrackState *, double > | ChiSquaredOfTrack, | ||
double | ChiSquaredOfIP | ||
) |
Construct a CandidateVertex with fit information.
Creates a CandidateVertex that contains fit information and in which the fit flag is set valid.
Position | Position of the fitted vertex |
PositionError | ErrorMatrix of the fitted vertex |
ChiSquaredOfFit | Chi Squared of total fit |
ChiSquaredOfTrack | A std::map of track chi squareds indexed by trackstate pointer |
ChiSquaredOfIP | Chi squared contribution of IP object (if any) |
vertex_lcfi::ZVTOP::CandidateVertex::CandidateVertex | ( | const std::vector< CandidateVertex * > & | Vertices, |
VertexFitter * | Fitter = _getFallbackFitter() , |
||
VertexResolver * | Resolver = _getFallbackResolver() , |
||
VertexFuncMaxFinder * | MaxFinder = _getFallbackMaxFinder() |
||
) |
Construct a CandidateVertex by merging other CandidateVertices.
Creates a CandidateVertex by merging the tracks and IP from a collection of CV's track duplicates are removed by checking if TrackStates have the same parent, if there is more than one IP object the IP from the last vertex in the list is used. If the list is empty you get an empty vertex! Ignores vertex functions.
Vertices | Position of the fitted vertex |
Fitter | Pointer to the VertexFitter that the vertex uses to fit itself. Defaults to the typedef FallbackVertexFitter. |
Resolver | Pointer to the VertexResolver that the vertex uses to resolve itself from others. Defaults to the typedef FallbackVertexResolver. |
MaxFinder | Pointer to the VertexFuncMaxFinder that the vertex uses to find the nearest VertexFunction maximum. Defaults to the typedef FallbackVertexFuncMaxFinder. |
|
inline |
Destructor.
Does not delete any objects passed at construction.
Definition at line 128 of file vertex_lcfi/zvtop/include/candidatevertex.h.
void vertex_lcfi::ZVTOP::CandidateVertex::addTrackState | ( | TrackState * | TrackToAdd | ) |
Add a TrackState to this vertex.
Adds the TrackState to this Vertices track list, and invalidates the fit via invalidateFit().
TrackToAdd | Pointer to the TrackState to add. |
Definition at line 95 of file candidatevertex.cpp.
References invalidateFit().
Referenced by CandidateVertex(), and mergeCandidateVertex().
void vertex_lcfi::ZVTOP::CandidateVertex::addTrackState | ( | TrackState * | TrackToAdd | ) |
Add a TrackState to this vertex.
Adds the TrackState to this Vertices track list, and invalidates the fit via invalidateFit().
TrackToAdd | Pointer to the TrackState to add. |
const std::map< TrackState *, double > & vertex_lcfi::ZVTOP::CandidateVertex::chiSquaredOfAllTracks | ( | ) | const |
Return the chi squared contribution of all the trackstates in this vertex.
Note this may cause the vertex to be fit if needed.
Definition at line 429 of file candidatevertex.cpp.
References refit().
const std::map<TrackState*, double>& vertex_lcfi::ZVTOP::CandidateVertex::chiSquaredOfAllTracks | ( | ) | const |
Return the chi squared contribution of all the trackstates in this vertex.
Note this may cause the vertex to be fit if needed.
double vertex_lcfi::ZVTOP::CandidateVertex::chiSquaredOfFit | ( | ) | const |
Return the chi squared of the fit.
Note this may cause the vertex to be fit if needed.
Definition at line 436 of file candidatevertex.cpp.
References refit().
Referenced by trimByProb(), and vertex_lcfi::Vertex::Vertex().
double vertex_lcfi::ZVTOP::CandidateVertex::chiSquaredOfFit | ( | ) | const |
Return the chi squared of the fit.
Note this may cause the vertex to be fit if needed.
double vertex_lcfi::ZVTOP::CandidateVertex::chiSquaredOfIP | ( | ) | const |
Return the chi squared contribution of the IP if this vertex has one.
Note this may cause the vertex to be fit if needed.
double vertex_lcfi::ZVTOP::CandidateVertex::chiSquaredOfIP | ( | ) | const |
Return the chi squared contribution of the IP if this vertex has one.
Note this may cause the vertex to be fit if needed.
Definition at line 417 of file candidatevertex.cpp.
References refit().
Referenced by maxChiSquaredOfTrackIP().
double vertex_lcfi::ZVTOP::CandidateVertex::chiSquaredOfTrack | ( | TrackState * | Track | ) | const |
Return the chi squared contribution of a trackstate in this vertex.
If the trackstate is found its chi squared is returned. Note this may cause the vertex to be fit if needed.
Definition at line 405 of file candidatevertex.cpp.
References refit().
Referenced by maxChiSquaredOfTrackIP(), trimByChi2(), trimByProb(), and vertex_lcfi::Vertex::Vertex().
double vertex_lcfi::ZVTOP::CandidateVertex::chiSquaredOfTrack | ( | TrackState * | Track | ) | const |
Return the chi squared contribution of a trackstate in this vertex.
If the trackstate is found its chi squared is returned. Note this may cause the vertex to be fit if needed.
void vertex_lcfi::ZVTOP::CandidateVertex::claimTracksFrom | ( | const std::list< CandidateVertex * > & | LosingVertices | ) |
Claim tracks and IP from another vertex.
Message all the vertices in the list LosingVertices to remove trackstates that have the same parent as the trackstates in this vertex. The fits of the losing vertices are automatically invalidated as we call removeTrack(). Also removes the IP from losing vertices if we have it
LosingVertices | A vector of pointers to the vertices that lose the tracks we have. |
void vertex_lcfi::ZVTOP::CandidateVertex::claimTracksFrom | ( | const std::list< CandidateVertex * > & | LosingVertices | ) |
Claim tracks and IP from another vertex.
Message all the vertices in the list LosingVertices to remove trackstates that have the same parent as the trackstates in this vertex. The fits of the losing vertices are automatically invalidated as we call removeTrack(). Also removes the IP from losing vertices if we have it
LosingVertices | A vector of pointers to the vertices that lose the tracks we have. |
Definition at line 141 of file candidatevertex.cpp.
double vertex_lcfi::ZVTOP::CandidateVertex::distanceTo | ( | const Vector3 & | Point | ) | const |
Return the distance from this Vertex to a point.
Note this may lead to this vertex being refit as position() is called.
Point | Vector3 of point. |
Definition at line 369 of file candidatevertex.cpp.
References refit().
double vertex_lcfi::ZVTOP::CandidateVertex::distanceTo | ( | const Vector3 & | Point | ) | const |
Return the distance from this Vertex to a point.
Note this may lead to this vertex being refit as position() is called.
Point | Vector3 of point. |
double vertex_lcfi::ZVTOP::CandidateVertex::distanceTo | ( | const CandidateVertex *const | Vertex | ) | const |
Return the distance from this Vertex to another Vertex.
Note this may lead to either vertex being refit as position() is called.
Vertex | to measure distance to. |
Definition at line 376 of file candidatevertex.cpp.
References position(), and refit().
double vertex_lcfi::ZVTOP::CandidateVertex::distanceTo | ( | const CandidateVertex *const | Vertex | ) | const |
Return the distance from this Vertex to another Vertex.
Note this may lead to either vertex being refit as position() is called.
Vertex | to measure distance to. |
bool vertex_lcfi::ZVTOP::CandidateVertex::findVertexFuncMax | ( | ) | const |
Find the local vertex function maximum.
Find the nearest vertex function maximum using the vertexes _MaxFinder, using the fitted position of this vertex as the inital guess. Note this may lead to this vertex being refit as position() is called.
bool vertex_lcfi::ZVTOP::CandidateVertex::findVertexFuncMax | ( | ) | const |
Find the local vertex function maximum.
Find the nearest vertex function maximum using the vertexes _MaxFinder, using the fitted position of this vertex as the inital guess. Note this may lead to this vertex being refit as position() is called.
Definition at line 307 of file candidatevertex.cpp.
References position().
Referenced by vertexFuncMaxPosition(), and vertexFuncMaxValue().
bool vertex_lcfi::ZVTOP::CandidateVertex::hasTrack | ( | Track * | Track | ) | const |
Return if this Vertex contains the passed track.
Track | Pointer to the query track |
Definition at line 347 of file candidatevertex.cpp.
Referenced by CandidateVertex().
bool vertex_lcfi::ZVTOP::CandidateVertex::hasTrack | ( | Track * | Track | ) | const |
void vertex_lcfi::ZVTOP::CandidateVertex::invalidateFit | ( | ) | const |
Invalidate the fit so that the refit() is called when needed.
Called by any function that modifies the vertex so that it is refit before being used again.
Note: Currently does not invalidate the Vertex Function Maximum as this stays constant through a Vertices life for classic ZVTOP Invalidation of Vertex Func Max should be a parameter
Definition at line 271 of file candidatevertex.cpp.
Referenced by addTrackState(), removeIP(), removeTrack(), removeTrackState(), and setIP().
void vertex_lcfi::ZVTOP::CandidateVertex::invalidateFit | ( | ) | const |
Invalidate the fit so that the refit() is called when needed.
Called by any function that modifies the vertex so that it is refit before being used again.
Note: Currently does not invalidate the Vertex Function Maximum as this stays constant through a Vertices life for classic ZVTOP Invalidation of Vertex Func Max should be a parameter
bool vertex_lcfi::ZVTOP::CandidateVertex::isResolvedFrom | ( | CandidateVertex *const | Vertex, |
const double | Threshold, | ||
CandidateVertex::eResolveType | Type | ||
) | const |
Resolve two vertices with this vertices resolver.
Uses the VertexResolver stored in _Resolver to resolve this vertex and the one specified.
Vertex | Vertex to resolve this one with. |
Threshold | Threshold for resolution, see VertexResolverEqualSteps for default resolver. |
Type | Point to use for resolution, either FittedPosition or NearestMaximum |
Definition at line 315 of file candidatevertex.cpp.
References position(), and vertexFuncMaxPosition().
bool vertex_lcfi::ZVTOP::CandidateVertex::isResolvedFrom | ( | CandidateVertex *const | Vertex, |
const double | Threshold, | ||
eResolveType | Type | ||
) | const |
Resolve two vertices with this vertices resolver.
Uses the VertexResolver stored in _Resolver to resolve this vertex and the one specified.
Vertex | Vertex to resolve this one with. |
Threshold | Threshold for resolution, see VertexResolverEqualSteps for default resolver. |
Type | Point to use for resolution, either FittedPosition or NearestMaximum |
bool vertex_lcfi::ZVTOP::CandidateVertex::isResolvedFrom | ( | CandidateVertex *const | Vertex, |
const double | Threshold, | ||
CandidateVertex::eResolveType | Type, | ||
VertexResolver * | Resolver | ||
) | const |
Resolve two vertices with a specified resolver.
Uses the VertexResolver specified to resolve this vertex and the one specified.
Vertex | Vertex to resolve this one with. |
Threshold | Threshold for resolution, implementation depends on resolver. |
Type | Point to use for resolution, either FittedPosition or NearestMaximum |
Resolver | Pointer to VertexResolver to use. |
Definition at line 331 of file candidatevertex.cpp.
References position(), and vertexFuncMaxPosition().
bool vertex_lcfi::ZVTOP::CandidateVertex::isResolvedFrom | ( | CandidateVertex *const | Vertex, |
const double | Threshold, | ||
eResolveType | Type, | ||
VertexResolver * | Resolver | ||
) | const |
Resolve two vertices with a specified resolver.
Uses the VertexResolver specified to resolve this vertex and the one specified.
Vertex | Vertex to resolve this one with. |
Threshold | Threshold for resolution, implementation depends on resolver. |
Type | Point to use for resolution, either FittedPosition or NearestMaximum |
Resolver | Pointer to VertexResolver to use. |
double vertex_lcfi::ZVTOP::CandidateVertex::maxChiSquaredOfTrackIP | ( | ) | const |
Return the chi squared contribution of the Track or IP with the highest chi square contribution.
Note this may cause the vertex to be fit if needed.
Definition at line 443 of file candidatevertex.cpp.
References chiSquaredOfIP(), chiSquaredOfTrack(), and refit().
Referenced by vertex_lcfi::ZVTOP::VertexFinderClassic::findVertices().
double vertex_lcfi::ZVTOP::CandidateVertex::maxChiSquaredOfTrackIP | ( | ) | const |
Return the chi squared contribution of the Track or IP with the highest chi square contribution.
Note this may cause the vertex to be fit if needed.
void vertex_lcfi::ZVTOP::CandidateVertex::mergeCandidateVertex | ( | const CandidateVertex * | SourceVertex | ) |
Merge another vertex into this one.
Adds all the trackstates and the IP if held from SourceVertex to this vertices trackstate list, after removing any trackstates which have the same parent to avoid duplicates. The fit is automatically invalidated as this function calls addTrackState() If the vertex function maximum of the source vertex is bigger than this vertices, then it is also copied to this vertex.
SourceVertex remains unchanged.
SourceVertex | The vertex to be merged into this one. |
void vertex_lcfi::ZVTOP::CandidateVertex::mergeCandidateVertex | ( | const CandidateVertex * | SourceVertex | ) |
Merge another vertex into this one.
Adds all the trackstates and the IP if held from SourceVertex to this vertices trackstate list, after removing any trackstates which have the same parent to avoid duplicates. The fit is automatically invalidated as this function calls addTrackState() If the vertex function maximum of the source vertex is bigger than this vertices, then it is also copied to this vertex.
SourceVertex remains unchanged.
SourceVertex | The vertex to be merged into this one. |
Definition at line 120 of file candidatevertex.cpp.
References addTrackState(), interactionPoint(), removeTrack(), setIP(), trackStateList(), vertexFuncMaxPosition(), and vertexFuncMaxValue().
const Vector3 & vertex_lcfi::ZVTOP::CandidateVertex::position | ( | ) | const |
Return the fitted position of this Vertex.
If the fit of this vertex is invalid it is refit and then the position returned.
Definition at line 355 of file candidatevertex.cpp.
References refit().
Referenced by distanceTo(), findVertexFuncMax(), vertex_lcfi::ZVTOP::VertexFinderClassic::findVertices(), isResolvedFrom(), removeTrackState(), and vertexFuncValue().
const Vector3& vertex_lcfi::ZVTOP::CandidateVertex::position | ( | ) | const |
Return the fitted position of this Vertex.
If the fit of this vertex is invalid it is refit and then the position returned.
const Matrix3x3& vertex_lcfi::ZVTOP::CandidateVertex::positionError | ( | ) | const |
const Matrix3x3 & vertex_lcfi::ZVTOP::CandidateVertex::positionError | ( | ) | const |
Return the fitted position error matrix of this Vertex.
If the fit of this vertex is invalid it is refit using refit() and then the position error returned.
Definition at line 362 of file candidatevertex.cpp.
References refit().
void vertex_lcfi::ZVTOP::CandidateVertex::refit | ( | bool | CalculateError = 0 | ) | const |
Refit the vertex.
Used by methods that need fit information such as position() if the fit is flagged as invalid.
CalculateError | If true the vertex error is calculated - a time saving device |
void vertex_lcfi::ZVTOP::CandidateVertex::refit | ( | bool | CalculateError = 0 | ) | const |
Refit the vertex.
Used by methods that need fit information such as position() if the fit is flagged as invalid.
CalculateError | If true the vertex error is calculated - a time saving device |
Definition at line 279 of file candidatevertex.cpp.
References interactionPoint(), and trackStateList().
Referenced by chiSquaredOfAllTracks(), chiSquaredOfFit(), chiSquaredOfIP(), chiSquaredOfTrack(), distanceTo(), maxChiSquaredOfTrackIP(), position(), positionError(), and trimByChi2().
void vertex_lcfi::ZVTOP::CandidateVertex::refit | ( | VertexFitter * | Fitter, |
bool | CalculateError = 0 |
||
) | const |
Refit the vertex using the fitter specified.
Fits the vertex with the one specified and flags the fit as valid.
Fitter | Fitter to use. |
CalculateError | If true the vertex error is calculated - a time saving device |
void vertex_lcfi::ZVTOP::CandidateVertex::refit | ( | VertexFitter * | Fitter, |
bool | CalculateError = 0 |
||
) | const |
Refit the vertex using the fitter specified.
Fits the vertex with the one specified and flags the fit as valid.
Fitter | Fitter to use. |
CalculateError | If true the vertex error is calculated - a time saving device |
Definition at line 293 of file candidatevertex.cpp.
References interactionPoint(), and trackStateList().
bool vertex_lcfi::ZVTOP::CandidateVertex::removeIP | ( | ) |
Remove this vertices InteractionPoint.
If this vertex had a pointer to an IP it is removed, and the fit invalidated via invalidateFit().
bool vertex_lcfi::ZVTOP::CandidateVertex::removeIP | ( | ) |
Remove this vertices InteractionPoint.
If this vertex had a pointer to an IP it is removed, and the fit invalidated via invalidateFit().
Definition at line 102 of file candidatevertex.cpp.
References invalidateFit().
Referenced by vertex_lcfi::ZVTOP::VertexFinderClassic::findVertices().
bool vertex_lcfi::ZVTOP::CandidateVertex::removeTrack | ( | Track *const | TrackToRemove | ) |
Remove the first TrackState from this vertices track list which has parent track TrackToRemove.
This vertices TrackState list is searched for the first TrackState that has TrackToRemove as its ParentTrack. If found it is removed and the fit invalidated via invalidateFit().
TrackToRemove | Pointer to the TrackState to remove. |
bool vertex_lcfi::ZVTOP::CandidateVertex::removeTrack | ( | Track *const | TrackToRemove | ) |
Remove the first TrackState from this vertices track list which has parent track TrackToRemove.
This vertices TrackState list is searched for the first TrackState that has TrackToRemove as its ParentTrack. If found it is removed and the fit invalidated via invalidateFit().
TrackToRemove | Pointer to the TrackState to remove. |
Definition at line 79 of file candidatevertex.cpp.
References invalidateFit().
Referenced by mergeCandidateVertex().
bool vertex_lcfi::ZVTOP::CandidateVertex::removeTrackState | ( | TrackState *const | TrackToRemove | ) |
Remove the first reference to a TrackState from this vertices track list.
This vertices TrackState list is searched for the first reference to TrackToRemove. If found it is removed and the fit invalidated via invalidateFit().
TrackToRemove | Pointer to the TrackState to remove. |
bool vertex_lcfi::ZVTOP::CandidateVertex::removeTrackState | ( | TrackState *const | TrackToRemove | ) |
Remove the first reference to a TrackState from this vertices track list.
This vertices TrackState list is searched for the first reference to TrackToRemove. If found it is removed and the fit invalidated via invalidateFit().
TrackToRemove | Pointer to the TrackState to remove. |
Definition at line 66 of file candidatevertex.cpp.
References invalidateFit(), and position().
Referenced by trimByChi2(), and trimByProb().
void vertex_lcfi::ZVTOP::CandidateVertex::setIP | ( | InteractionPoint * | IP | ) |
Add an InteractionPoint.
Sets the IP of this vertex, replacing the current one, if any. The fit is then invalidated via invalidateFit().
IP | Pointer to the InteractionPoint to set. |
void vertex_lcfi::ZVTOP::CandidateVertex::setIP | ( | InteractionPoint * | IP | ) |
Add an InteractionPoint.
Sets the IP of this vertex, replacing the current one, if any. The fit is then invalidated via invalidateFit().
IP | Pointer to the InteractionPoint to set. |
Definition at line 114 of file candidatevertex.cpp.
References invalidateFit().
Referenced by CandidateVertex(), and mergeCandidateVertex().
|
inline |
Return the TrackStates in this Vertex.
Definition at line 276 of file vertex_lcfi/zvtop/include/candidatevertex.h.
|
inline |
Return the TrackStates in this Vertex.
Definition at line 276 of file include/vertex_lcfi/zvtop/include/candidatevertex.h.
Referenced by vertex_lcfi::PerEventIPFitter::calculateFor(), mergeCandidateVertex(), refit(), trimByProb(), and vertex_lcfi::Vertex::Vertex().
int vertex_lcfi::ZVTOP::CandidateVertex::trimByChi2 | ( | const double | Chi2Threshold | ) |
Trim trackstates with chi squared contributions bigger than the threshold.
Using the fitter of this vertex (specified at constuction or default) the trackstate with the highest chi squared is removed if it is above threshold. If one was removed then refit and check again, repeating until threshold is reached or we only have one track left.. Does not effect the IP held by this vertex if any.
Chi2Threshold | Threshold for removal. |
int vertex_lcfi::ZVTOP::CandidateVertex::trimByChi2 | ( | const double | Chi2Threshold | ) |
Trim trackstates with chi squared contributions bigger than the threshold.
Using the fitter of this vertex (specified at constuction or default) the trackstate with the highest chi squared is removed if it is above threshold. If one was removed then refit and check again, repeating until threshold is reached or we only have one track left.. Does not effect the IP held by this vertex if any.
Chi2Threshold | Threshold for removal. |
Definition at line 201 of file candidatevertex.cpp.
References chiSquaredOfTrack(), and removeTrackState().
int vertex_lcfi::ZVTOP::CandidateVertex::trimByChi2 | ( | const double | Chi2Threshold, |
VertexFitter * | Fitter | ||
) |
Trim trackstates with chi squared contributions bigger than the threshold.
Using the fitter specified, the trackstate with the highest chi squared is removed if it is above threshold. If one was removed then refit and check again, repeating until one is not removed. Does not effect the IP held by this vertex if any.
Chi2Threshold | Threshold for removal. |
Fitter | VertexFitter to use |
int vertex_lcfi::ZVTOP::CandidateVertex::trimByChi2 | ( | const double | Chi2Threshold, |
VertexFitter * | Fitter | ||
) |
Trim trackstates with chi squared contributions bigger than the threshold.
Using the fitter specified, the trackstate with the highest chi squared is removed if it is above threshold. If one was removed then refit and check again, repeating until one is not removed. Does not effect the IP held by this vertex if any.
Chi2Threshold | Threshold for removal. |
Fitter | VertexFitter to use |
Definition at line 234 of file candidatevertex.cpp.
References chiSquaredOfTrack(), refit(), and removeTrackState().
int vertex_lcfi::ZVTOP::CandidateVertex::trimByProb | ( | const double | ProbThreshold | ) |
Trim trackstates in order of decreasing chi squared until the vertex has a probabilty below that of the threshold.
Using the fitter of this vertex (specified at constuction or default) the trackstate with the highest chi squared is removed if it is below threshold. If one was removed then refit and check again, repeating until we have reached thresold.
ProbThreshold | Threshold for removal. |
int vertex_lcfi::ZVTOP::CandidateVertex::trimByProb | ( | const double | ProbThreshold | ) |
Trim trackstates in order of decreasing chi squared until the vertex has a probabilty below that of the threshold.
Using the fitter of this vertex (specified at constuction or default) the trackstate with the highest chi squared is removed if it is below threshold. If one was removed then refit and check again, repeating until we have reached thresold.
ProbThreshold | Threshold for removal. |
Definition at line 157 of file candidatevertex.cpp.
References chiSquaredOfFit(), chiSquaredOfTrack(), vertex_lcfi::util::prob(), removeTrackState(), and trackStateList().
Referenced by vertex_lcfi::PerEventIPFitter::calculateFor().
const Vector3 & vertex_lcfi::ZVTOP::CandidateVertex::vertexFuncMaxPosition | ( | ) | const |
Return the position of this vertexes local maximum.
If the position of this vertex is invalid it is refound using findVertexFuncMax() and then returned.
Definition at line 398 of file candidatevertex.cpp.
References findVertexFuncMax().
Referenced by isResolvedFrom(), and mergeCandidateVertex().
const Vector3& vertex_lcfi::ZVTOP::CandidateVertex::vertexFuncMaxPosition | ( | ) | const |
Return the position of this vertexes local maximum.
If the position of this vertex is invalid it is refound using findVertexFuncMax() and then returned.
double vertex_lcfi::ZVTOP::CandidateVertex::vertexFuncMaxValue | ( | ) | const |
Return the value of the vertex function at this vertexes local maximum.
If the maximum of this vertex is invalid it is refound using findVertexFuncMax() and then the value returned.
double vertex_lcfi::ZVTOP::CandidateVertex::vertexFuncMaxValue | ( | ) | const |
Return the value of the vertex function at this vertexes local maximum.
If the maximum of this vertex is invalid it is refound using findVertexFuncMax() and then the value returned.
Definition at line 385 of file candidatevertex.cpp.
References findVertexFuncMax().
Referenced by mergeCandidateVertex().
double vertex_lcfi::ZVTOP::CandidateVertex::vertexFuncValue | ( | ) | const |
Return the value of the vertex function at the vertices position.
Note that this return the value at the fitted position, not the nearest maximum
double vertex_lcfi::ZVTOP::CandidateVertex::vertexFuncValue | ( | ) | const |
Return the value of the vertex function at the vertices position.
Note that this return the value at the fitted position, not the nearest maximum
Definition at line 392 of file candidatevertex.cpp.
References position().
Referenced by vertex_lcfi::ZVTOP::VertexFinderClassic::findVertices().