Developer: Yuehong Xie
As the name suggests, this is a vertex fitter used for secondary vertex fitting in the offline data analysis. It is now the default vertex fitter in DaVinci. The fitter takes as input a vector of particles, performs the fit and updates the mother particle. Note the input particles are not modified after the fit.
In the first step, the fitter classifies the input particles into the following four categories:
The classification is controlled by the option "useResonanceVertex". If "useResonanceVertex" is set to true (default), the fitter just classifies the particles given as input without checking their daughters. If "useResonanceVertex" is set to false, the fitter automatically decomposes all Vertexed particles into Flying particles, Photons and PhotonPairs.
If a composite particle is not Vertexed, it is also decomposed regardless of "useResonanceVertex". An example: D*0->D0gamma. In this case, The D0 and gamma are used in the fit instead of the D*0.
The basic idea is to factorize the fitting of a vertex into five types of actions:
If the options "applyDauMassConstraint" (default: false) and "useResonanceVertex" (default: true) are set to true, the mass of any composite daughter whose decay width is less than a threshold controlled by the option "widthThreshold" (default: 2 MeV) is constrained to its nominal value.
An exception: no mass constraint is applied to composite particles which are not Vertexed, such as D*0->D0gamma. This can only be cured in a case by case way.
At the end of the vertex fit, the mother particle is updated with new four momentum, mass, vertex position, their covariance matrix, the vertex chi2 and the number of degrees of freedom obatined from the fit.
Note the chi2 of the vertex fit and the number of degrees of freedom may depend on the option "useResonanceVertex". Always check the number of degrees of freedom when you use the chi2 in your analysis. Take Bd->JpsiK* as an example. If "useResonanceVertex" is true, the number of degrees of freedom is 3. If "useResonanceVertex" is false, the number of degrees of freedom is 2*4-3=5.
Work to do
Tips:
If you want to change the default behaviour of the OfflineVeretxFitter in your algorithm named YourAlgName, add this line in your option file
YourAlgName.OfflineVertexFitter.[property] = [new value] ;
E.g.,
YourAlgName.OfflineVertexFitter.useResonanceVertex= false ;
YourAlgName.OfflineVertexFitter.applyDauMassConstraint = true ;
LoKi::VertexFitter
, aka BlindVertexFitter
Developer: Vanya Belyaev
BlindVertexFitter
is probably the most trivial implementation of
IVertexFit
abstract interface.
Unfortunately the implementation is not complete: the method remove(const LHCb::Particle*,LHCb::Vertex&)
is not implemented (yet?).
The fitter is completely "blind" with respect to the input particles:
It is a full responsibility of the client to prepare the particles for the vertex fit and to use them properly. Please also note that the tool implements also:
IParticleCombiner
abstract interface
IParticleReFitter
abstract interface
The tool internally used the formalism of Kalman Fitter. Since the inetrnal representation of the particle ("measurement") is a vector with 7-components the formalism becomes very simple and after the decomposition of all matrices it is just amazingly trivial and transparent.
Let be a vector containing the parameters of the track. Let be the covariance matrix of these parameters, and is formal inverse matrix . for the trivial case of both matrices and could be defined properly and non-singular. Here we'll try to extend the standard Kalman Filter formalism for almost linear model, by embedding the minimal -model into more dimensions. In particular we choose the : The vertex fit determines the new parameters - position of the common vertex and - 4-momentum of the track, constrained to originate in .
The covariance matrix of fit parameters could be split into sub-matrices:
Such choice of and allows to obtain almost trivial projection matrices and :
Kalman filter proceeds in the following steps
Covariance matrices:
, where
New fit values:
New :
The procedure need to be iterated with the measurement evaluated around the new (improved) fit parameters, until convergence is reached. In particular it need that the particle parameter vector need to be reevaluated in vicinity of the found vertex position . In spite of linear formalism of projection matrices, the iterations are necessary for proper extrapolation of parameter vector to the vertex position.
After the convergence, the covariance matrices of the smoothed fit parameters are computed:
With the chosen parameterization of one gets and .
Assuming the existence of the matrix and its block structure one can rewrite the equations as:
From these equations one sees that the blocks of the inverse covariance matrix enters into the expressions only through the combinations
Using the formal expression , one gets:
Finally one gets that Kalman Filter procedure (except for the expression for ) requires the validity of only the following matrix expressions:
In next section it is shown that these expression are always valid matrix expression, in spite of ill-defined matrices and .
Lets consider the change of the track parameterization form canonical
_state_-parameterization to the representation, adopted for
the class LHCb::Particle
as 2-step procedure
, where
Obviously the covariance matrix for , is well-defined and non-singular: .
Both corresponding covariance matrices for the parameters and , and are either singular or not existing. It will be shown that one can define the formal inverse covariance matrix , but there is no way to define neither the proper matrix no the proper matrix .
The re-parameterization with fake parameter does not allow to write the sensible covariance matrix for . But one can write the formal expression for the inverse covariance matrix where
For simplicity the matrix could be represented as block matrix , where the matrices and has the structure and . Correspondingly .
Taking into account this block structures one writes:
Here the block representation of the matrix has been used . The matrix is singular, rank 5 matrix. It is worth to stress here that the upper top block is singular rank 2 matrix, while the lower right block in general is not singular and has the inverse matrix . The components of the formal inverse (fake) matrix are
The parameterization formally allows to express the covariance matrix through the fake matrix as , where
Here for simplicity the matrix is represented as block matrix, where matrix
has the structure correspondingly
Obviously the lower right block of this matrix is singular.
Making the comparison of these expressions one gets all formal expressions needed for Kalman Filter procedure:
In spite of the fact that neither the matrix nor matrices could be constructed explicitly all required expressions for Kalman Filter procedure are valid matrix expressions.
Following methods are implemented:
IVertexFit
interface)
1000virtual StatusCode fit 1010 ( const LHCb::Particle::ConstVector& daughters , 1020 LHCb::Vertex& vertex ) const ;
IVertexFit
interface)
1000virtual StatusCode fit 1010 ( const LHCb::Particle::ConstVector& daughters , 1020 LHCb::Particle& particle , 1030 LHCb::Vertex& vertex ) const ;
IVertexFit
interface)
1000virtual StatusCode add 1010 ( const LHCb::Particle* particle , 1020 LHCb::Vertex& vertex ) const ; 1030
IParticleCombiner
interface)
1000virtual StatusCode combine 1010 ( const LHCb::Particle::ConstVector& daughters , 1020 LHCb::Particle& mother , 1030 LHCb::Vertex& vertex ) const { return fit ( daughters , mother , vertex ) ; } ;Please note that the method
combine
is reimplemented in a terms of fit
, which guarantees the coherency
between IParticleCombiner
and IVertexFit
actions.
IParticleReFitter
interface)
1000virtual StatusCode reFit ( LHCb::Particle& particle ) const 1010 { 1020 LHCb::Vertex* vertex = particle.endVertex() ; 1030 const IVertexFit* vFit = this ; 1040 return vFit->fit ( vertex->outgoingParticles().begin() , 1050 vertex->outgoingParticles().end () , 1060 particle , *vertex ) ; 1070 } ;Please note that the method
reFit
is reimplemented in a terms of fit
, which guarantees the coherency
between IParticleReFitter
and IVertexFit
actions.
The method remove
is not implemented yet.
If the (input) position of the vertex for the method fit
belong to a fiducial cylinder,
defined by minimal and maximal z and the maximal radius,
the position of the vertex is considered as seed for the vertex fitter.
It is a useful trick for re-fitting of the vertices and it is also a way to supply the tool with
the information about the expected position of the vertex.
The iterations performed until the change in the vertex position is in excess of 1 micrometer and the change in the is in excess of 0.01 or the maximum number of iterations is reached.
"Blind"
"Kalman"
1000/// get the vertex fitter by nickname: 1010IVertexFit* vfit1 = vertexFitter ( "Blind") ; 1020 1030/// get the vertex fitter by nickname: 1040IVertexFit* vfit2 = vertexFitter ( "Blind") ; 1050 1060 1070/// get the particle combiner by nickname: 1080IParticleCombiner* pcomb1 = particleCombiner ( "Blind") ; 1090 1100/// get the particle combiner by nickname: 1110IParticleCombiner* pcomb1 = particleCombiner ( "Kalman") ; 1120 1130 1140// get the particle refitter by nickname: 1150IParticleReFitter* rfit1 = particleReFitter ( "Blind" ) ; 1160 1170/// get the particle refitter by nickname: 1180IParticleReFitter* rfit1 = particleReFitter ( "Kalman" ) ;This mapping is under the control by the properties of class
DVAlgorithm
and
could be modified:
1000MyAlg.VertexFitters = { 1010 "Offline" : "OfflineVertexFitter" , 1020 "Trigger" : "TrgVertexFitter" , 1030 "Kalman" : "BlindVertexFitter" , 1040 "Blind" : "BlindVertexFitter" , 1050 "ParticleAdder" : "ParticleAdder" 1060}; 1070 1080MyAlg.ParticleCombiners = { 1090 "" : "OfflineVertexFitter" , 1100 "Offline" : "OfflineVertexFitter" , 1110 "Trigger" : "TrgVertexFitter" , 1120 "Kalman" : "BlindVertexFitter" , 1130 "Blind" : "BlindVertexFitter" , 1140 "ParticleAdder" : "ParticleAdder" 1150}; 1160 1170MyAlg.ParticleReFitters = { 1180 "" : "OfflineVertexFitter" , 1190 "Offline" : "OfflineVertexFitter" , 1200 "Kalman" : "BlindVertexFitter" , 1210 "Blind" : "BlindVertexFitter" , 1220 "ParticleAdder" : "ParticleAdder" 1230}; 1240
The tool has following specific p[roperties:
Property | Type | Default | Description |
---|---|---|---|
MaxIterations |
int |
10 |
The maximum allowed number of iterations for fit , combine & reFit methods |
MaxIterationsForAdd |
int |
5 |
The maximum allowed number of iterations for add method |
MaxIterationsFroRemove |
int |
5 |
The maximum allowed number of iterations for remove method |
SeedZmin |
double |
-1.5 m |
The z-min of the seed fiducial volume |
SeedZmax |
double |
3.0 m |
The z-max of the seed fiducial volume |
SeedRho |
double |
50 cm |
The rho-max of the seed fiducial volume |
Transporter |
string |
"" |
The type/name of particle transporter tool to be used |
The tool has been tested for comparisions with TrgVertexFitter
and OfflineVertexFitter
for the simple cases of
and
.
For these simple cases the physical performance of BlindVertexFitter
have been found to be very similar with OfflineVertexFitter
:
Number of fit failures for random tracks is a bit larger while for the signal tracks which do form the vertex
the number of failures is very small and statistically the same as the number of fit failures for OfflineVertexFitter
.
CPU performance has been found to be just in between of TrgVertexFitter
and OfflineVertexFitter
. With maximal number of iterations
equal to three the CPU perfrormance is very close to TrgVertexFitter
.
Developers: Yasmine Amhis & Olivier Deschamps
ParticleAdder
can be used for decays with typically one charged
track in the final state and one neutral particle.
Let us consider for example:
ParticleAdder
simply computes the invariant mass
of the system .
No vertexing is performed, an offset value for the vertex is set to -10000 mm.
Usage for selections written in python:
Seq.VertexFitters.update( { " " : ParticleAdder } )
--Yasmine Amhis -- 21 Nov 2008
-- Yuehong Xie - 26 Sep 2007
-- JuanPalacios - 29 Sep 2007
-- Vanya Belyaev - 29 Sep