Additional info from Franco :

 

during my talk yesterday I forgot to remind that the momenta and the vertex you obtain after a vertex fit are in general strongly correlated. So, if you want to calculate the error on the Bs mass, for instance, you need to keep these correlations in mind. The class VertexMore has a method to return the full covariance matrix of vertex position and track momenta:
| C(x,x) C(x,p1)  C(x,p2)   .... C(x,pn)  |
C(x,p1, p2, ..., pn) =  | C(p1,x)  C(p1,p1) C(p1,p2) .... C(p1,pn) |
| ....................................................................................... |
| C(pn,x) C(pn,p1) C(pn,p2) ... C(pn,pn) |

Where each block is a 3x3 matrix. The method is called GetBigCov(). The following a snippet of code shows how to calculate the error on the Bs mass after fitting a pion and a Ds pseudo-track. Hope it helps.

Best,
Franco

//
// Bs mass plots
TVector3 rBsPi = vBs->GetMomentum(0); // Momentum pion from Bs
TVector3 rBsDs = vBs->GetMomentum(1); // Momentum Ds from Bs
Double_t PiMass = pBsPi->Mass; // Pion mass
Double_t DsMass = pDs->Mass; // Ds mass
Double_t BsMass = pBs->Mass; // Bs mass
Double_t Epi = TMath::Sqrt(PiMass*PiMass+rBsPi.Mag2()); // Energy pion from Bs
Double_t Eds = TMath::Sqrt(DsMass*DsMass+rBsDs.Mag2()); // Energy Ds from Bs
Double_t Etot = Epi + Eds; // Bs energy
TVector3 Ptot = rBsPi + rBsDs; // Bs momentum
Double_t rBsMass = TMath::Sqrt(Etot*Etot-Ptot.Mag2()); // Reconstructed Bs mass
// Mass error
TVector3 dm1 = (1./BsMass)*((Etot/Epi)*rBsPi-Ptot); // dm/dp1
TVector3 dm2 = (1./BsMass)*((Etot/Eds)*rBsDs-Ptot); // dm/dp2
Double_t dmp[6] = {dm1(0), dm1(1), dm1(2),dm2(0), dm2(1), dm2(2)};
TVectorD DmDp(6, dmp);
TMatrixDSym Bcov = vBs->GetBigCov(); // cov(x,p1,p2) 
TMatrixDSym pcov = Bcov.GetSub(3,8,3,8); // cov(p1,p2)
Double_t mBsErr = TMath::Sqrt(pcov.Similarity(DmDp)); // Error on Bs mass