Skip to content

Commit 7966939

Browse files
committed
Fix initialisations
1 parent 991b2b6 commit 7966939

File tree

6 files changed

+13
-13
lines changed

6 files changed

+13
-13
lines changed

PWGHF/TableProducer/candidateCreatorB0.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ struct HfCandidateCreatorB0 {
359359
trackParCovPi.propagateToDCA(primaryVertex, bz, &dcaPion);
360360

361361
// get uncertainty of the decay length
362-
double phi, theta;
362+
double phi{}, theta{};
363363
// getPointDirection modifies phi and theta
364364
getPointDirection(std::array{collision.posX(), collision.posY(), collision.posZ()}, secondaryVertexB0, phi, theta);
365365
auto errorDecayLength = std::sqrt(getRotatedCovMatrixXX(covMatrixPV, phi, theta) + getRotatedCovMatrixXX(covMatrixPCA, phi, theta));

PWGHF/TableProducer/candidateCreatorBplus.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ struct HfCandidateCreatorBplus {
106106
Configurable<std::string> ccdbPathGrp{"ccdbPathGrp", "GLO/GRP/GRP", "Path of the grp file (Run 2)"};
107107
Configurable<std::string> ccdbPathGrpMag{"ccdbPathGrpMag", "GLO/Config/GRPMagField", "CCDB path of the GRPMagField object (Run 3)"};
108108

109-
Service<o2::ccdb::BasicCCDBManager> ccdb;
109+
Service<o2::ccdb::BasicCCDBManager> ccdb{};
110110
o2::base::MatLayerCylSet* lut{};
111111
o2::base::Propagator::MatCorrType matCorr = o2::base::Propagator::MatCorrType::USEMatCorrLUT;
112112
int runNumber{};
@@ -345,7 +345,7 @@ struct HfCandidateCreatorBplus {
345345
trackParCovPi.propagateToDCA(primaryVertex, bz, &impactParameter1);
346346

347347
// get uncertainty of the decay length
348-
double phi, theta;
348+
double phi{}, theta{};
349349
getPointDirection(std::array{collision.posX(), collision.posY(), collision.posZ()}, secVertexBplus, phi, theta);
350350
auto errorDecayLength = std::sqrt(getRotatedCovMatrixXX(covMatrixPV, phi, theta) + getRotatedCovMatrixXX(covMatrixPCA, phi, theta));
351351
auto errorDecayLengthXY = std::sqrt(getRotatedCovMatrixXX(covMatrixPV, phi, 0.) + getRotatedCovMatrixXX(covMatrixPCA, phi, 0.));

PWGHF/TableProducer/candidateCreatorBs.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ struct HfCandidateCreatorBs {
9898

9999
o2::vertexing::DCAFitterN<2> df2; // 2-prong vertex fitter
100100
o2::vertexing::DCAFitterN<3> df3; // 3-prong vertex fitter
101-
Service<o2::ccdb::BasicCCDBManager> ccdb;
101+
Service<o2::ccdb::BasicCCDBManager> ccdb{};
102102
o2::base::MatLayerCylSet* lut{};
103103
o2::base::Propagator::MatCorrType matCorr = o2::base::Propagator::MatCorrType::USEMatCorrLUT;
104104

@@ -336,7 +336,7 @@ struct HfCandidateCreatorBs {
336336
trackParCovPi.propagateToDCA(primaryVertex, bz, &dcaPion);
337337

338338
// get uncertainty of the decay length
339-
double phi, theta;
339+
double phi{}, theta{};
340340
// getPointDirection modifies phi and theta
341341
getPointDirection(std::array{collision.posX(), collision.posY(), collision.posZ()}, secondaryVertexBs, phi, theta);
342342
auto errorDecayLength = std::sqrt(getRotatedCovMatrixXX(covMatrixPV, phi, theta) + getRotatedCovMatrixXX(covMatrixPCA, phi, theta));

PWGHF/TableProducer/candidateCreatorCascade.cxx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ struct HfCandidateCreatorCascade {
9292

9393
HfEventSelection hfEvSel; // event selection and monitoring
9494
o2::vertexing::DCAFitterN<2> df; // 2-prong vertex fitter
95-
Service<o2::ccdb::BasicCCDBManager> ccdb;
95+
Service<o2::ccdb::BasicCCDBManager> ccdb{};
9696
o2::base::MatLayerCylSet* lut{};
9797
o2::base::Propagator::MatCorrType matCorr = o2::base::Propagator::MatCorrType::USEMatCorrLUT;
9898

@@ -187,10 +187,10 @@ struct HfCandidateCreatorCascade {
187187
}
188188

189189
int posGlobalIndex = -1, negGlobalIndex = -1;
190-
float v0X, v0Y, v0Z, v0px, v0py, v0pz;
191-
float v0PosPx, v0PosPy, v0PosPz, v0NegPx, v0NegPy, v0NegPz;
192-
float dcaV0dau, dcaPosToPV, dcaNegToPV, v0cosPA;
193-
std::array<float, 21> covV = {0.};
190+
float v0X{}, v0Y{}, v0Z{}, v0px{}, v0py{}, v0pz{};
191+
float v0PosPx{}, v0PosPy{}, v0PosPz{}, v0NegPx{}, v0NegPy{}, v0NegPz{};
192+
float dcaV0dau{}, dcaPosToPV{}, dcaNegToPV{}, v0cosPA{};
193+
std::array<float, 21> covV{};
194194

195195
auto v0index = casc.template v0_as<o2::aod::V0sLinked>();
196196
if (v0index.has_v0Data()) {
@@ -287,7 +287,7 @@ struct HfCandidateCreatorCascade {
287287
trackParVarBach.propagateToDCA(primaryVertex, bz, &impactParameterBach);
288288

289289
// get uncertainty of the decay length
290-
double phi, theta;
290+
double phi{}, theta{};
291291
getPointDirection(std::array{collision.posX(), collision.posY(), collision.posZ()}, secondaryVertex, phi, theta);
292292
auto errorDecayLength = std::sqrt(getRotatedCovMatrixXX(covMatrixPV, phi, theta) + getRotatedCovMatrixXX(covMatrixPCA, phi, theta));
293293
auto errorDecayLengthXY = std::sqrt(getRotatedCovMatrixXX(covMatrixPV, phi, 0.) + getRotatedCovMatrixXX(covMatrixPCA, phi, 0.));

PWGHF/TableProducer/candidateCreatorDstar.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ struct HfCandidateCreatorDstar {
333333
registry.fill(HIST("QA/hDCAZPi"), trackPi.pt(), impactParameterPi.getZ() * CmToMicrometers);
334334

335335
// get uncertainty of the decay length
336-
double phi, theta;
336+
double phi{}, theta{};
337337
getPointDirection(std::array{primaryVertex.getX(), primaryVertex.getY(), primaryVertex.getZ()}, secondaryVertex, phi, theta);
338338
// Calculates the XX element of a XYZ covariance matrix after rotation of the coordinate system by phi around the z-axis and by minus theta around the new y-axis.
339339
auto errorDecayLength = std::sqrt(getRotatedCovMatrixXX(covMatrixPV, phi, theta) + getRotatedCovMatrixXX(covMatrixPCA, phi, theta));

PWGHF/TableProducer/candidateCreatorLb.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ struct HfCandidateCreatorLb {
225225
hCovPVXX->Fill(covMatrixPV[0]);
226226

227227
// get uncertainty of the decay length
228-
double phi, theta;
228+
double phi{}, theta{};
229229
getPointDirection(std::array{collision.posX(), collision.posY(), collision.posZ()}, secondaryVertexLb, phi, theta);
230230
auto errorDecayLength = std::sqrt(getRotatedCovMatrixXX(covMatrixPV, phi, theta) + getRotatedCovMatrixXX(covMatrixPCA, phi, theta));
231231
auto errorDecayLengthXY = std::sqrt(getRotatedCovMatrixXX(covMatrixPV, phi, 0.) + getRotatedCovMatrixXX(covMatrixPCA, phi, 0.));

0 commit comments

Comments
 (0)