From 2c9214e3d5f222af76664a9d60a6bc5c2d00df7e Mon Sep 17 00:00:00 2001 From: "se.gorbunov" <se.gorbunov@gsi.de> Date: Sat, 11 Feb 2023 15:32:59 +0000 Subject: [PATCH] L1: macosx compilation fix --- reco/KF/CbmKFParticleFinderPID.h | 2 +- reco/L1/CbmL1Performance.cxx | 7 +++++-- reco/L1/L1Algo/L1Fit.cxx | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/reco/KF/CbmKFParticleFinderPID.h b/reco/KF/CbmKFParticleFinderPID.h index f8b91d359d..7e2698f9c8 100644 --- a/reco/KF/CbmKFParticleFinderPID.h +++ b/reco/KF/CbmKFParticleFinderPID.h @@ -28,7 +28,7 @@ public: Double_t fTrackLengthMax {1.e10}; Double_t fTrackTofTimeMin {0.}; Double_t fTrackTofTimeMax {1.e10}; - Double_t fSP[7][5] {0}; // ? + Double_t fSP[7][5] {{0}}; // ? }; // Constructors/Destructors --------- diff --git a/reco/L1/CbmL1Performance.cxx b/reco/L1/CbmL1Performance.cxx index 956f31f2f0..2d80119cb2 100644 --- a/reco/L1/CbmL1Performance.cxx +++ b/reco/L1/CbmL1Performance.cxx @@ -54,6 +54,9 @@ #include <map> #include <vector> +#include <cmath> +#include <math.h> + #include "L1Algo/L1Algo.h" #include "L1Algo/L1Def.h" #include "L1Algo/L1Fit.h" @@ -1388,7 +1391,7 @@ void CbmL1::TrackFitPerformance() { // vertex CbmL1MCTrack mc = *(it->GetMCTracks()[0]); fit.SetTrack(it->T, it->C); - L1TrackPar& tr = fit.Tr(); + const L1TrackPar& tr = fit.Tr(); // if (mc.mother_ID != -1) { // secondary if (!mc.IsPrimary()) { // secondary @@ -1430,7 +1433,7 @@ void CbmL1::TrackFitPerformance() h_fitSV[2]->Fill((tr.tx[0] - mc.px / mc.pz) * 1.e3); h_fitSV[3]->Fill((tr.ty[0] - mc.py / mc.pz) * 1.e3); h_fitSV[4]->Fill(100. * (fabs(1. / tr.qp[0]) / mc.p - 1.)); - if (std::isfinite(tr.C00[0]) && tr.C00[0] > 0) h_fitSV[5]->Fill((tr.x[0] - mc.x) / sqrt(tr.C00[0])); + if (std::isfinite(tr.C00[0]) && tr.C00[0] > 0) { h_fitSV[5]->Fill((tr.x[0] - mc.x) / sqrt(tr.C00[0])); } if (std::isfinite(tr.C11[0]) && tr.C11[0] > 0) h_fitSV[6]->Fill((tr.y[0] - mc.y) / sqrt(tr.C11[0])); if (std::isfinite(tr.C22[0]) && tr.C22[0] > 0) h_fitSV[7]->Fill((tr.tx[0] - mc.px / mc.pz) / sqrt(tr.C22[0])); if (std::isfinite(tr.C33[0]) && tr.C33[0] > 0) h_fitSV[8]->Fill((tr.ty[0] - mc.py / mc.pz) / sqrt(tr.C33[0])); diff --git a/reco/L1/L1Algo/L1Fit.cxx b/reco/L1/L1Algo/L1Fit.cxx index 0639c696bf..7ea106f6e0 100644 --- a/reco/L1/L1Algo/L1Fit.cxx +++ b/reco/L1/L1Algo/L1Fit.cxx @@ -377,7 +377,7 @@ void L1Fit::ExtrapolateStep // extrapolates track parameters and returns jacobi fvec f2_ty[4], f3_ty[4], f4_ty[4]; // df* / dty fvec f2_qp[4], f3_qp[4], f4_qp[4]; // df* / dqp - fvec k[5][5] = {0., 0., 0., 0., 0.}; + fvec k[5][5] {{0.}}; // Runge-Kutta steps for track parameters // -- GitLab