|
15 | 15 | #include "TObjArray.h" |
16 | 16 | #include <TMatrixD.h> |
17 | 17 |
|
18 | | - |
| 18 | +static const double defaultMagneticField = 2.; |
| 19 | +static const double mTommConversionFactor = 1000.; |
19 | 20 |
|
20 | 21 | // Covariance conversion to ACTS format |
21 | | -TMatrixDSym CovToACTS(TMatrixDSym Cov, double ct /*cot(theta)*/, double C /*half curvature*/, double fB=2. /*magnetic field in T*/) |
| 22 | +TMatrixDSym CovToACTS(TMatrixDSym Cov, double ct /*cot(theta)*/, double C /*half curvature*/, |
| 23 | + double fB=defaultMagneticField /*magnetic field in T*/) |
22 | 24 | { |
23 | 25 | TMatrixDSym cACTS(6); cACTS.Zero(); |
24 | | - Double_t b = -0.29988*fB / 2.; |
| 26 | + Double_t b = -0.29979 * fB / 2. / mTommConversionFactor; |
25 | 27 | // |
26 | 28 | // Fill derivative matrix |
27 | 29 | TMatrixD A(5, 5); A.Zero(); |
28 | | - A(0, 0) = 1000.; // D-D conversion to mm |
| 30 | + A(0, 0) = mTommConversionFactor; // D-D conversion to mm |
29 | 31 | A(1, 2) = 1.0; // phi0-phi0 |
30 | 32 | A(2, 4) = 1.0/(TMath::Sqrt(1.0 + ct*ct) * b); // q/p-C |
31 | | - A(3, 1) = 1000.; // z0-z0 conversion to mm |
| 33 | + A(3, 1) = mTommConversionFactor; // z0-z0 conversion to mm |
32 | 34 | A(4, 3) = -1.0 / (1.0 + ct*ct); // theta - cot(theta) |
33 | 35 | A(4, 4) = -C*ct / (b*pow(1.0 + ct*ct,3.0/2.0)); // q/p-cot(theta) |
34 | 36 | // |
@@ -91,15 +93,14 @@ StatusCode DelphesSaveChargedParticles::saveOutput(Delphes& delphes, const fcc:: |
91 | 93 | auto cand = static_cast<Candidate*>(delphesColl->At(j)); |
92 | 94 | auto particle = colParticles->create(); |
93 | 95 |
|
94 | | - |
95 | 96 | if (m_saveTrkCov) { |
96 | 97 | auto cov_d = CovToACTS(cand->TrackCovariance, cand->CtgTheta, cand->C); |
97 | 98 | auto t = colParticles_trkCov->create(); |
98 | | - t.d0(1000* cand->D0); |
99 | | - t.z0(1000* cand->DZ); |
| 99 | + t.d0(mTommConversionFactor * cand->D0); |
| 100 | + t.z0(mTommConversionFactor * cand->DZ); |
100 | 101 | t.phi(cand->Phi); |
101 | | - t.theta(TMath::ATan2(1.0, cand->CtgTheta)); |
102 | | - Double_t b = -0.29988*2.0 / 2.; //mag field |
| 102 | + t.theta(TMath::ATan2(1.0, cand->CtgTheta)); |
| 103 | + Double_t b = -0.29979 * defaultMagneticField / 2. / mTommConversionFactor; //mag field in T |
103 | 104 | t.qOverP(cand->C / (b*TMath::Sqrt(1 + cand->CtgTheta*cand->CtgTheta))); |
104 | 105 | std::array<float,15> t_c; |
105 | 106 | // save upper right triangle, row first |
|
0 commit comments