LCFIVertex  0.7.2
Public Types | Public Member Functions | Friends | List of all members
vertex_lcfi::ZVTOP::CandidateVertex Class Reference

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...
 
InteractionPointinteractionPoint () const
 Return the InteractionPoint in this Vertex.
 
const Vector3position () const
 Return the fitted position of this Vertex. More...
 
const Matrix3x3positionError () 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 Vector3vertexFuncMaxPosition () 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...
 
InteractionPointinteractionPoint () const
 Return the InteractionPoint in this Vertex.
 
const Vector3position () const
 Return the fitted position of this Vertex. More...
 
const Matrix3x3positionError () 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 Vector3vertexFuncMaxPosition () 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)
 

Detailed Description

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().

Author
Ben Jeffery (b.jef.nosp@m.fery.nosp@m.1@phy.nosp@m.sics.nosp@m..ox.a.nosp@m.c.uk)
Version
0.1
Date
20/09/05

Definition at line 58 of file include/vertex_lcfi/zvtop/include/candidatevertex.h.

Member Typedef Documentation

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.

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.

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.

Constructor & Destructor Documentation

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.

Parameters
TracksA 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.
VertexFunctionPointer to the function which is explored for the nearest maxima to the fit vertex.
FitterPointer to the VertexFitter that the vertex uses to fit itself. Defaults to the typedef FallbackVertexFitter.
ResolverPointer to the VertexResolver that the vertex uses to resolve itself from others. Defaults to the typedef FallbackVertexResolver.
MaxFinderPointer 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.

Parameters
TracksA 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.
IPA pointer to the InteractionPoint associated with the vertex
VertexFunctionPointer to the function which is explored for the nearest maxima to the fit vertex.
FitterPointer to the VertexFitter that the vertex uses to fit itself. Defaults to the typedef FallbackVertexFitter.
ResolverPointer to the VertexResolver that the vertex uses to resolve itself from others. Defaults to the typedef FallbackVertexResolver.
MaxFinderPointer 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.

Parameters
PositionPosition of the fitted vertex
PositionErrorErrorMatrix of the fitted vertex
ChiSquaredOfFitChi Squared of total fit
ChiSquaredOfTrackA std::map of track chi squareds indexed by trackstate pointer
ChiSquaredOfIPChi 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.

Parameters
VerticesPosition of the fitted vertex
FitterPointer to the VertexFitter that the vertex uses to fit itself. Defaults to the typedef FallbackVertexFitter.
ResolverPointer to the VertexResolver that the vertex uses to resolve itself from others. Defaults to the typedef FallbackVertexResolver.
MaxFinderPointer 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().

vertex_lcfi::ZVTOP::CandidateVertex::~CandidateVertex ( )
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.

Parameters
TracksA 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.
VertexFunctionPointer to the function which is explored for the nearest maxima to the fit vertex.
FitterPointer to the VertexFitter that the vertex uses to fit itself. Defaults to the typedef FallbackVertexFitter.
ResolverPointer to the VertexResolver that the vertex uses to resolve itself from others. Defaults to the typedef FallbackVertexResolver.
MaxFinderPointer 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.

Parameters
TracksA 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.
IPA pointer to the InteractionPoint associated with the vertex
VertexFunctionPointer to the function which is explored for the nearest maxima to the fit vertex.
FitterPointer to the VertexFitter that the vertex uses to fit itself. Defaults to the typedef FallbackVertexFitter.
ResolverPointer to the VertexResolver that the vertex uses to resolve itself from others. Defaults to the typedef FallbackVertexResolver.
MaxFinderPointer 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.

Parameters
PositionPosition of the fitted vertex
PositionErrorErrorMatrix of the fitted vertex
ChiSquaredOfFitChi Squared of total fit
ChiSquaredOfTrackA std::map of track chi squareds indexed by trackstate pointer
ChiSquaredOfIPChi 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.

Parameters
VerticesPosition of the fitted vertex
FitterPointer to the VertexFitter that the vertex uses to fit itself. Defaults to the typedef FallbackVertexFitter.
ResolverPointer to the VertexResolver that the vertex uses to resolve itself from others. Defaults to the typedef FallbackVertexResolver.
MaxFinderPointer to the VertexFuncMaxFinder that the vertex uses to find the nearest VertexFunction maximum. Defaults to the typedef FallbackVertexFuncMaxFinder.
vertex_lcfi::ZVTOP::CandidateVertex::~CandidateVertex ( )
inline

Destructor.

Does not delete any objects passed at construction.

Definition at line 128 of file vertex_lcfi/zvtop/include/candidatevertex.h.

Member Function Documentation

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().

Parameters
TrackToAddPointer 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().

Parameters
TrackToAddPointer 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.

Returns
A std::map of chi squared vlaues with TrackState pointers as the key

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.

Returns
A std::map of chi squared vlaues with TrackState pointers as the key
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.

Returns
The chi squared value.

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.

Returns
The chi squared value.
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.

Returns
Chi squared of the ip if this vertex has one zero otherwise
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.

Returns
Chi squared of the ip if this vertex has one zero otherwise

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.

Returns
The chi squared of the track if found, -1 otherwise.

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.

Returns
The chi squared of the track if found, -1 otherwise.
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

Parameters
LosingVerticesA 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

Parameters
LosingVerticesA 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.

Parameters
PointVector3 of point.
Returns
Distance to 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.

Parameters
PointVector3 of point.
Returns
Distance to 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.

Parameters
Vertexto measure distance to.
Returns
Distance to Vertex.

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.

Parameters
Vertexto measure distance to.
Returns
Distance to Vertex.
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.

Parameters
TrackPointer to the query track
Returns
true if this vertex has a trackstate with this Track as parent

Definition at line 347 of file candidatevertex.cpp.

Referenced by CandidateVertex().

bool vertex_lcfi::ZVTOP::CandidateVertex::hasTrack ( Track Track) const

Return if this Vertex contains the passed track.

Parameters
TrackPointer to the query track
Returns
true if this vertex has a trackstate with this Track as parent
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.

Parameters
VertexVertex to resolve this one with.
ThresholdThreshold for resolution, see VertexResolverEqualSteps for default resolver.
TypePoint to use for resolution, either FittedPosition or NearestMaximum
Returns
1 if the vertices are resolved, 0 otherwise.

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.

Parameters
VertexVertex to resolve this one with.
ThresholdThreshold for resolution, see VertexResolverEqualSteps for default resolver.
TypePoint to use for resolution, either FittedPosition or NearestMaximum
Returns
1 if the vertices are resolved, 0 otherwise.
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.

Parameters
VertexVertex to resolve this one with.
ThresholdThreshold for resolution, implementation depends on resolver.
TypePoint to use for resolution, either FittedPosition or NearestMaximum
ResolverPointer to VertexResolver to use.
Returns
1 if the vertices are resolved, 0 otherwise.

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.

Parameters
VertexVertex to resolve this one with.
ThresholdThreshold for resolution, implementation depends on resolver.
TypePoint to use for resolution, either FittedPosition or NearestMaximum
ResolverPointer to VertexResolver to use.
Returns
1 if the vertices are resolved, 0 otherwise.
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.

Returns
The chi squared contibution.

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.

Returns
The chi squared contibution.
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.

Parameters
SourceVertexThe 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.

Parameters
SourceVertexThe 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.

Returns
A Vector3 of the fitted position.

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.

Returns
A Vector3 of the fitted position.
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.

Returns
A Matrix3x3 of the fitted position error.
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.

Returns
A Matrix3x3 of the fitted position error.

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.

Parameters
CalculateErrorIf 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.

Parameters
CalculateErrorIf 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.

Parameters
FitterFitter to use.
CalculateErrorIf 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.

Parameters
FitterFitter to use.
CalculateErrorIf 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().

Returns
1 if this vertex had an IP; 0 otherwise.
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().

Returns
1 if this vertex had an IP; 0 otherwise.

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().

Parameters
TrackToRemovePointer to the TrackState to remove.
Returns
1 if a track was removed; 0 otherwise.
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().

Parameters
TrackToRemovePointer to the TrackState to remove.
Returns
1 if a track was removed; 0 otherwise.

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().

Parameters
TrackToRemovePointer to the TrackState to remove.
Returns
1 if a TrackState was removed; 0 otherwise.
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().

Parameters
TrackToRemovePointer to the TrackState to remove.
Returns
1 if a TrackState was removed; 0 otherwise.

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().

Parameters
IPPointer 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().

Parameters
IPPointer to the InteractionPoint to set.

Definition at line 114 of file candidatevertex.cpp.

References invalidateFit().

Referenced by CandidateVertex(), and mergeCandidateVertex().

const std::vector<TrackState*>& vertex_lcfi::ZVTOP::CandidateVertex::trackStateList ( ) const
inline

Return the TrackStates in this Vertex.

Returns
A Vector of pointers to the TrackStates in the vertex

Definition at line 276 of file vertex_lcfi/zvtop/include/candidatevertex.h.

const std::vector<TrackState*>& vertex_lcfi::ZVTOP::CandidateVertex::trackStateList ( ) const
inline

Return the TrackStates in this Vertex.

Returns
A Vector of pointers to the TrackStates in the 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.

Parameters
Chi2ThresholdThreshold for removal.
Returns
Number of trackstates removed.
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.

Parameters
Chi2ThresholdThreshold for removal.
Returns
Number of trackstates removed.

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.

Parameters
Chi2ThresholdThreshold for removal.
FitterVertexFitter to use
Returns
Number of trackstates removed.
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.

Parameters
Chi2ThresholdThreshold for removal.
FitterVertexFitter to use
Returns
Number of trackstates removed.

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.

Parameters
ProbThresholdThreshold for removal.
Returns
Number of trackstates removed.
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.

Parameters
ProbThresholdThreshold for removal.
Returns
Number of trackstates removed.

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.

Returns
The maximum's position.

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.

Returns
The maximum's position.
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.

Returns
The maximum's value.
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.

Returns
The maximum's value.

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

Returns
The vertex function valuer
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

Returns
The vertex function valuer

Definition at line 392 of file candidatevertex.cpp.

References position().

Referenced by vertex_lcfi::ZVTOP::VertexFinderClassic::findVertices().


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