|
38 | 38 | #include <Framework/OutputObjHeader.h> |
39 | 39 | #include <Framework/runDataProcessing.h> |
40 | 40 | #include <MCHTracking/TrackExtrap.h> |
41 | | -#include <MathUtils/Utils.h> |
42 | 41 | #include <ReconstructionDataFormats/GlobalFwdTrack.h> |
43 | 42 |
|
44 | 43 | #include <Math/Vector4D.h> // IWYU pragma: keep (do not replace with Math/Vector4Dfwd.h) |
|
47 | 46 | #include <TH1.h> |
48 | 47 |
|
49 | 48 | #include <algorithm> |
| 49 | +#include <cfloat> |
50 | 50 | #include <cmath> |
51 | 51 | #include <map> |
52 | 52 | #include <memory> |
|
56 | 56 | #include <utility> |
57 | 57 | #include <vector> |
58 | 58 |
|
59 | | -#include <math.h> |
| 59 | +#include <stdint.h> |
| 60 | + |
| 61 | +// #include <math.h> |
60 | 62 |
|
61 | 63 | struct globalDimuonFilter { |
62 | 64 | o2::framework::Produces<o2::aod::GlobalDimuonFilters> tags; |
@@ -186,7 +188,7 @@ struct globalDimuonFilter { |
186 | 188 | } |
187 | 189 | o2::mch::TrackExtrap::setField(); |
188 | 190 | const double centerMFT[3] = {0, 0, -61.4}; |
189 | | - o2::field::MagneticField* field = static_cast<o2::field::MagneticField*>(TGeoGlobalMagField::Instance()->GetField()); |
| 191 | + o2::field::MagneticField* field = dynamic_cast<o2::field::MagneticField*>(TGeoGlobalMagField::Instance()->GetField()); |
190 | 192 | mBz = field->getBz(centerMFT); // Get field at centre of MFT |
191 | 193 | LOGF(info, "Bz at center of MFT = %f kZG", mBz); |
192 | 194 |
|
@@ -400,13 +402,13 @@ struct globalDimuonFilter { |
400 | 402 | float rAtAbsorberEnd = fwdtrack.rAtAbsorberEnd(); // this works only for GlobalMuonTrack |
401 | 403 | int nClustersMFT = mfttrack.nClusters(); |
402 | 404 | int ndf_mchmft = 2.f * (mchtrack.nClusters() + nClustersMFT) - 5.f; |
403 | | - float chi2 = fwdtrack.chi2() / ndf_mchmft; |
| 405 | + float chi2 = fwdtrack.chi2() / static_cast<float>(ndf_mchmft); |
404 | 406 | if (chi2 < 0.f || glMuonCutGroup.maxChi2 < chi2) { |
405 | 407 | return false; |
406 | 408 | } |
407 | 409 |
|
408 | 410 | int ndf_mft = 2.f * nClustersMFT - 5.f; |
409 | | - float chi2mft = mfttrack.chi2() / ndf_mft; |
| 411 | + float chi2mft = mfttrack.chi2() / static_cast<float>(ndf_mft); |
410 | 412 | if (chi2mft < 0.f || glMuonCutGroup.maxChi2MFT < chi2mft) { |
411 | 413 | return false; |
412 | 414 | } |
@@ -547,13 +549,13 @@ struct globalDimuonFilter { |
547 | 549 |
|
548 | 550 | int nClustersMFT = mfttrack.nClusters(); |
549 | 551 | int ndf_mchmft = 2.f * (mchtrack.nClusters() + nClustersMFT) - 5.f; |
550 | | - float chi2 = fwdtrack.chi2() / ndf_mchmft; |
| 552 | + float chi2 = fwdtrack.chi2() / static_cast<float>(ndf_mchmft); |
551 | 553 | if (tagMuonCutGroup.maxChi2 < chi2) { |
552 | 554 | return false; |
553 | 555 | } |
554 | 556 |
|
555 | 557 | int ndf_mft = 2.f * nClustersMFT - 5.f; |
556 | | - float chi2mft = mfttrack.chi2() / ndf_mft; |
| 558 | + float chi2mft = mfttrack.chi2() / static_cast<float>(ndf_mft); |
557 | 559 | if (tagMuonCutGroup.maxChi2MFT < chi2mft) { |
558 | 560 | return false; |
559 | 561 | } |
@@ -635,13 +637,13 @@ struct globalDimuonFilter { |
635 | 637 | nclsMCH = mchtrack.nClusters(); |
636 | 638 | nclsMFT = mfttrack.nClusters(); |
637 | 639 | int ndf_mchmft = 2.f * (nclsMCH + nclsMFT) - 5.f; |
638 | | - chi2 = fwdtrack.chi2() / ndf_mchmft; |
| 640 | + chi2 = fwdtrack.chi2() / static_cast<float>(ndf_mchmft); |
639 | 641 | if (probeMuonCutGroup.maxChi2 < chi2) { |
640 | 642 | return false; |
641 | 643 | } |
642 | 644 |
|
643 | 645 | int ndf_mft = 2.f * nclsMFT - 5.f; |
644 | | - chi2mft = mfttrack.chi2() / ndf_mft; |
| 646 | + chi2mft = mfttrack.chi2() / static_cast<float>(ndf_mft); |
645 | 647 | if (probeMuonCutGroup.maxChi2MFT < chi2mft) { |
646 | 648 | return false; |
647 | 649 | } |
|
0 commit comments