Changeset a47edcc in git for external/TrackCovariance
- Timestamp:
- May 1, 2021, 2:15:02 PM (4 years ago)
- Branches:
- master
- Children:
- 46d3442
- Parents:
- 53f4746
- Location:
- external/TrackCovariance
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
external/TrackCovariance/TrkUtil.cc
r53f4746 ra47edcc 46 46 Double_t C = a / (2 * pt); // Half curvature 47 47 //std::cout << "ObsTrk::XPtoPar: fB = " << fB << ", a = " << a << ", pt = " << pt << ", C = " << C << std::endl; 48 Double_t r2 = x .Perp2();48 Double_t r2 = x(0) * x(0) + x(1) * x(1); 49 49 Double_t cross = x(0) * p(1) - x(1) * p(0); 50 50 Double_t T = sqrt(pt * pt - 2 * a * cross + a * a * r2); … … 61 61 Double_t st = asin(B) / C; 62 62 Double_t ct = p(2) / pt; 63 Double_t z0 = x(2) - ct * st; 63 Double_t z0; 64 Double_t dot = x(0) * p(0) + x(1) * p(1); 65 if (dot > 0.0) z0 = x(2) - ct * st; 66 else z0 = x(2) + ct * st; 64 67 // 65 68 Par(3) = z0; // Store z0 … … 443 446 TSpline3* sp3 = new TSpline3("sp3", bg, ncl, Npt); 444 447 if (begam > bg[0] && begam < bg[Npt - 1]) interp = sp3->Eval(begam); 445 if(begam < bg[0]) interp = bg[0];446 if(begam > bg[Npt-1]) interp = bg[Npt-1];447 448 return 100 * interp; 448 449 } -
external/TrackCovariance/TrkUtil.h
r53f4746 ra47edcc 25 25 // Service routines 26 26 // 27 void SetB(Double_t Bz) { fBz = Bz; }27 void SetB(Double_t Bz) { fBz = Bz; } 28 28 TVectorD XPtoPar(TVector3 x, TVector3 p, Double_t Q); 29 29 TVector3 ParToP(TVectorD Par); … … 54 54 Double_t c = 2.99792458e8; // speed of light m/sec 55 55 //return TMath::C()*1.0e-9; // Incompatible with root5 56 return c*1.0e-9; // Reduced speed of light 56 return c*1.0e-9; // Reduced speed of light 57 57 } 58 58 // … … 71 71 // Cluster counting in gas 72 72 // 73 void SetBfield(Double_t Bz) { fBz = Bz; }74 // Define gas volume (units = meters) 73 void SetBfield(Double_t Bz) { fBz = Bz; } 74 // Define gas volume (units = meters) 75 75 void SetDchBoundaries(Double_t Rmin, Double_t Rmax, Double_t Zmin, Double_t Zmax); 76 76 // Gas mixture selection
Note:
See TracChangeset
for help on using the changeset viewer.