Skip to content

Commit 4e6b503

Browse files
committed
solve github issues
1 parent eb39eb2 commit 4e6b503

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

PWGHF/HFC/Tasks/taskFlow.cxx

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -289,8 +289,8 @@ struct HfTaskFlow {
289289
TF1* fPtDepDCAxy = nullptr;
290290

291291
SliceCache cache;
292-
Service<o2::framework::O2DatabasePDG> pdg;
293-
Service<o2::ccdb::BasicCCDBManager> ccdb;
292+
Service<o2::framework::O2DatabasePDG> pdg{};
293+
Service<o2::ccdb::BasicCCDBManager> ccdb{};
294294
std::vector<o2::detectors::AlignParam>* offsetFT0{};
295295
std::vector<o2::detectors::AlignParam>* offsetFV0{};
296296
o2::ccdb::CcdbApi ccdbApi;
@@ -807,10 +807,12 @@ struct HfTaskFlow {
807807

808808
float dPhiStar = phi1 - phi2 - charge1 * fbSign * std::asin(0.075 * radius / pt1) + charge2 * fbSign * std::asin(0.075 * radius / pt2);
809809

810-
if (dPhiStar > constants::math::PI)
810+
if (dPhiStar > constants::math::PI) {
811811
dPhiStar = constants::math::TwoPI - dPhiStar;
812-
if (dPhiStar < -constants::math::PI)
812+
}
813+
if (dPhiStar < -constants::math::PI) {
813814
dPhiStar = -constants::math::TwoPI - dPhiStar;
815+
}
814816

815817
return dPhiStar;
816818
}
@@ -841,7 +843,7 @@ struct HfTaskFlow {
841843
{
842844
int const cellsInLeft[] = {0, 1, 2, 3, 8, 9, 10, 11, 16, 17, 18, 19, 24, 25, 26, 27, 32, 40, 33, 41, 34, 42, 35, 43};
843845
bool const isChnoInLeft = std::find(std::begin(cellsInLeft), std::end(cellsInLeft), chno) != std::end(cellsInLeft);
844-
float offsetX, offsetY;
846+
float offsetX{}, offsetY{};
845847
if (isChnoInLeft) {
846848
offsetX = (*offsetFV0)[0].getX();
847849
offsetY = (*offsetFV0)[0].getY();
@@ -880,7 +882,7 @@ struct HfTaskFlow {
880882
{
881883
int const cellsInLeft[] = {0, 1, 2, 3, 8, 9, 10, 11, 16, 17, 18, 19, 24, 25, 26, 27, 32, 40, 33, 41, 34, 42, 35, 43};
882884
bool const isChnoInLeft = std::find(std::begin(cellsInLeft), std::end(cellsInLeft), chno) != std::end(cellsInLeft);
883-
float offsetX, offsetY, offsetZ;
885+
float offsetX{}, offsetY{}, offsetZ{};
884886
if (isChnoInLeft) {
885887
offsetX = (*offsetFV0)[0].getX();
886888
offsetY = (*offsetFV0)[0].getY();
@@ -1276,15 +1278,16 @@ struct HfTaskFlow {
12761278
bool bIsBelow = false;
12771279

12781280
if (std::abs(dPhiStarLow) < kLimit || std::abs(dPhiStarHigh) < kLimit || dPhiStarLow * dPhiStarHigh < 0) {
1279-
for (double rad(configCentral.minMergingRadius); rad < configCentral.maxMergingRadius; rad += 0.01) {
1281+
for (double rad(configCentral.minMergingRadius); rad < configCentral.maxMergingRadius; rad += 0.01) { // FIXME: Variable 'rad' with floating point type 'double' should not be used as a loop counter.
12801282
double dPhiStar = getDPhiStar(track1, track2, rad, magneticField);
12811283
if (std::abs(dPhiStar) < kLimit) {
12821284
bIsBelow = true;
12831285
break;
12841286
}
12851287
}
1286-
if (bIsBelow)
1288+
if (bIsBelow) {
12871289
continue;
1290+
}
12881291
}
12891292
}
12901293
}

0 commit comments

Comments
 (0)