- Timestamp:
- Feb 10, 2022, 11:42:45 AM (3 years ago)
- Branches:
- master
- Children:
- 5c03893
- Parents:
- b750b0a
- Location:
- external/TrackCovariance
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
external/TrackCovariance/ObsTrk.cc
rb750b0a r7bca620 74 74 fCovILC.ResizeTo(5, 5); 75 75 fGenPar = XPtoPar(fGenX, fGenP, Q); 76 fGenParMm = ParToMm(fGenPar); 76 77 fGenParACTS = ParToACTS(fGenPar); 77 78 fGenParILC = ParToILC(fGenPar); 78 79 // 79 80 fObsPar = GenToObsPar(fGenPar); 81 fObsParMm = ParToMm(fObsPar); 80 82 fObsParACTS = ParToACTS(fObsPar); 81 83 fObsParILC = ParToILC(fObsPar); … … 83 85 fObsP = ParToP(fObsPar); 84 86 fObsQ = ParToQ(fObsPar); 87 fCovMm = CovToMm(fCov); 85 88 fCovACTS = CovToACTS(fObsPar, fCov); 86 89 fCovILC = CovToILC(fCov); -
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; -
external/TrackCovariance/VertexFit.h
rb750b0a r7bca620 36 36 // Results 37 37 Bool_t fVtxDone; // Flag vertex fit completed 38 Double_t fR old; // Current value of vertex radius38 Double_t fRstart; // Starting value of vertex radius (0 = none) 39 39 TVectorD fXv; // Found vertex 40 40 TMatrixDSym fcovXv; // Vertex covariance … … 83 83 // Handle tracks/constraints 84 84 void AddVtxConstraint(TVectorD xv, TMatrixDSym cov); // Add gaussian vertex constraint 85 void AddTrk(TVectorD *par, TMatrixDSym *Cov); // Add track to input list 86 void RemoveTrk(Int_t iTrk); // Remove iTrk track 85 void AddTrk(TVectorD *par, TMatrixDSym *Cov); // Add track to input list 86 void RemoveTrk(Int_t iTrk); // Remove iTrk track 87 void SetStartR(Double_t R) { fRstart = R; }; // Set starting radius 87 88 // 88 89 };
Note:
See TracChangeset
for help on using the changeset viewer.