Changeset 7bca620 in git for external/TrackCovariance/VertexFit.cc
- Timestamp:
- Feb 10, 2022, 11:42:45 AM (3 years ago)
- Branches:
- master
- Children:
- 5c03893
- Parents:
- b750b0a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
external/TrackCovariance/VertexFit.cc
rb750b0a r7bca620 17 17 { 18 18 fNtr = 0; 19 fR old= -1.0;19 fRstart = -1.0; 20 20 fVtxDone = kFALSE; 21 21 fVtxCst = kFALSE; … … 31 31 { 32 32 fNtr = Ntr; 33 fR old= -1.0;33 fRstart = -1.0; 34 34 fVtxDone = kFALSE; 35 35 fVtxCst = kFALSE; … … 55 55 { 56 56 fNtr = Ntr; 57 fR old= -1.0;57 fRstart = -1.0; 58 58 fVtxDone = kFALSE; 59 59 fVtxCst = kFALSE; … … 220 220 std::vector<TVectorD*> x0i; // Tracks at ma 221 221 std::vector<TVectorD*> ni; // Track derivative wrt phase 222 std::vector<TMatrixDSym*> Ci; // Position error matrix at fixed phase222 std::vector<TMatrixDSym*> Ci; // Position error matrix at fixed phase 223 223 std::vector<TVectorD*> wi; // Ci*ni 224 std::vector<Double_t> s_in; // Starting phase 225 // 226 // 224 227 // 225 228 // Track loop 226 229 for (Int_t i = 0; i < fNtr; i++) 227 230 { 228 Double_t s = 0.;229 231 TVectorD par = *fPar[i]; 230 232 TMatrixDSym Cov = *fCov[i]; 231 x0i.push_back(new TVectorD(Fill_x0(par))); 233 Double_t s = 0.; 234 // Case when starting radius is provided 235 if(fRstart > TMath::Abs(par(0))){ 236 s = 2.*TMath::ASin(par(2)*TMath::Sqrt((fRstart*fRstart-par(0)*par(0))/(1.+2.*par(2)*par(0)))); 237 } 238 // 239 x0i.push_back(new TVectorD(Fill_x(par, s))); 232 240 ni.push_back(new TVectorD(derXds(par, s))); 233 241 TMatrixD A = derXdPar(par, s); … … 235 243 TMatrixDSym Cinv = RegInv(*Ci[i]); 236 244 wi.push_back(new TVectorD(Cinv * (*ni[i]))); 245 s_in.push_back(s); 237 246 } 238 247 //std::cout << "Vtx init completed. fNtr = "<<fNtr << std::endl; … … 262 271 for (Int_t i = 0; i < fNtr; i++){ 263 272 Double_t si = Dot(*wi[i], fXv - (*x0i[i])) / Ci[i]->Similarity(*wi[i]); 264 ffi.push_back(si );273 ffi.push_back(si+s_in[i]); 265 274 //TVectorD xvi = Fill_x(*fPar[i],si); 266 275 //std::cout << "Fast vertex "<<i<<": xvi = "<<xvi(0)<<", "<<xvi(1)<<", "<<xvi(2) … … 280 289 Ci.clear(); 281 290 wi.clear(); 291 s_in.clear(); 282 292 } 283 293 // … … 402 412 // 403 413 fVtxDone = kTRUE; // Set fit completion flag 404 fRold= TMath::Sqrt(fXv(0)*fXv(0) + fXv(1)*fXv(1)); // Store fit414 //fRstart = TMath::Sqrt(fXv(0)*fXv(0) + fXv(1)*fXv(1)); // Store fit 405 415 //std::cout << "Found vertex " << fXv(0) << ", " << fXv(1) << ", " << fXv(2) 406 416 // << ", after "<<Ntry<<" iterations"<<std::endl;
Note:
See TracChangeset
for help on using the changeset viewer.