Changeset 170a11d in git for external/TrackCovariance/ObsTrk.cc
- Timestamp:
- Dec 14, 2020, 10:53:31 AM (4 years ago)
- Branches:
- master
- Children:
- a0db751
- Parents:
- 527f67a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
external/TrackCovariance/ObsTrk.cc
r527f67a r170a11d 44 44 fCovILC = CovToILC(fCov); 45 45 } 46 47 // x[3] track origin, p[3] track momentum at origin, Q charge, B magnetic field in Tesla 48 ObsTrk::ObsTrk(Double_t *x, Double_t *p, Double_t Q, Double_t B, SolGridCov* GC) 49 { 50 fGC = GC; 51 fGenX.SetXYZ(x[0],x[1],x[2]); 52 fGenP.SetXYZ(p[0],p[1],p[2]); 53 fGenQ = Q; 54 fB = B; 55 fGenPar.ResizeTo(5); 56 fGenParACTS.ResizeTo(6); 57 fGenParILC.ResizeTo(5); 58 fObsPar.ResizeTo(5); 59 fObsParACTS.ResizeTo(6); 60 fObsParILC.ResizeTo(5); 61 fCov.ResizeTo(5, 5); 62 fCovACTS.ResizeTo(6, 6); 63 fCovILC.ResizeTo(5, 5); 64 fGenPar = XPtoPar(fGenX, fGenP, Q); 65 fGenParACTS = ParToACTS(fGenPar); 66 fGenParILC = ParToILC(fGenPar); 67 /* 68 cout << "ObsTrk::ObsTrk: fGenPar"; 69 for (Int_t i = 0; i < 5; i++)cout << fGenPar(i) << ", "; 70 cout << endl; 71 */ 72 fObsPar = GenToObsPar(fGenPar, fGC); 73 fObsParACTS = ParToACTS(fObsPar); 74 fObsParILC = ParToILC(fObsPar); 75 fObsX = ParToX(fObsPar); 76 fObsP = ParToP(fObsPar); 77 fObsQ = ParToQ(fObsPar); 78 fCovACTS = CovToACTS(fCov); 79 fCovILC = CovToILC(fCov); 80 } 81 82 46 83 // 47 84 // Destructor … … 98 135 // 99 136 TVector3 Xval; 100 Xval(0) = -D*TMath::Sin(phi0); 101 Xval(1) = D*TMath::Cos(phi0); 137 Xval(0) = -D*TMath::Sin(phi0); 138 Xval(1) = D*TMath::Cos(phi0); 102 139 Xval(2) = z0; 103 140 // … … 135 172 // Check ranges 136 173 Double_t minPt = GC->GetMinPt (); 137 if (pt < minPt) std::cout << "Warning ObsTrk::GenToObsPar: pt " << pt << " is below grid range of " << minPt << std::endl;174 //if (pt < minPt) std::cout << "Warning ObsTrk::GenToObsPar: pt " << pt << " is below grid range of " << minPt << std::endl; 138 175 Double_t maxPt = GC->GetMaxPt(); 139 if (pt > maxPt) std::cout << "Warning ObsTrk::GenToObsPar: pt " << pt << " is above grid range of " << maxPt << std::endl;176 //if (pt > maxPt) std::cout << "Warning ObsTrk::GenToObsPar: pt " << pt << " is above grid range of " << maxPt << std::endl; 140 177 Double_t minAn = GC->GetMinAng(); 141 if (angd < minAn) std::cout << "Warning ObsTrk::GenToObsPar: angle " << angd 142 << " is below grid range of " << minAn << std::endl;178 //if (angd < minAn) std::cout << "Warning ObsTrk::GenToObsPar: angle " << angd 179 // << " is below grid range of " << minAn << std::endl; 143 180 Double_t maxAn = GC->GetMaxAng(); 144 if (angd > maxAn) std::cout << "Warning ObsTrk::GenToObsPar: angle " << angd145 << " is above grid range of " << maxAn << std::endl;181 //if (angd > maxAn) std::cout << "Warning ObsTrk::GenToObsPar: angle " << angd 182 // << " is above grid range of " << maxAn << std::endl; 146 183 // 147 184 TMatrixDSym Cov = GC->GetCov(pt, angd); … … 179 216 pACTS(1) = 1000 * Par(3); // z0 from m to mm 180 217 pACTS(2) = Par(1); // Phi0 is unchanged 181 pACTS(3) = TMath::ATan (1.0 / Par(4)) + TMath::PiOver2(); // Theta in [0, pi] range218 pACTS(3) = TMath::ATan2(1.0,Par(4)); // Theta in [0, pi] range 182 219 pACTS(4) = Par(2) / (b*TMath::Sqrt(1 + Par(4)*Par(4))); // q/p in GeV 183 220 pACTS(5) = 0.0; // Time: currently undefined … … 247 284 return cILC; 248 285 } 249 250 251 252
Note:
See TracChangeset
for help on using the changeset viewer.