Skip to content

Commit 1245587

Browse files
authored
fixing warnings (#335)
1 parent 15648ff commit 1245587

9 files changed

Lines changed: 74 additions & 74 deletions

File tree

ALICE3/Tools/handleParamTOFResoALICE3.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ int main(int argc, char* argv[])
7070
const unsigned int mode = vm["mode"].as<unsigned int>();
7171
const std::string path = vm["ccdb-path"].as<std::string>();
7272
std::map<std::string, std::string> metadata;
73-
std::map<std::string, std::string>* headers;
73+
std::map<std::string, std::string>* headers = nullptr;
7474
o2::ccdb::CcdbApi api;
7575
const std::string url = vm["url"].as<std::string>();
7676
api.init(url);

Common/Core/EventMixing.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ static int getMixingBin(const T1& vtxBins, const T1& multBins, const T2& vtx, co
3333
return -1;
3434
}
3535

36-
for (int i = 1; i < vtxBins.size(); i++) {
36+
for (unsigned int i = 1; i < vtxBins.size(); i++) {
3737
if (vtx < vtxBins.at(i)) {
38-
for (int j = 1; j < multBins.size(); j++) {
38+
for (unsigned int j = 1; j < multBins.size(); j++) {
3939
if (mult < multBins.at(j)) {
4040
return i + j * (vtxBins.size() + 1);
4141
}

Common/TableProducer/eventSelection.cxx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -431,25 +431,25 @@ struct EventSelectionTask {
431431
int64_t foundFT0 = bc.foundFT0();
432432

433433
if (foundFT0 < 0) { // search in +/-4 sigma around meanBC
434-
uint64_t apprBC = bc.globalBC();
435-
uint64_t meanBC = apprBC - std::lround(col.collisionTime() / o2::constants::lhc::LHCBunchSpacingNS);
434+
int64_t apprBC = bc.globalBC();
435+
int64_t meanBC = apprBC - std::lround(col.collisionTime() / o2::constants::lhc::LHCBunchSpacingNS);
436436
int64_t deltaBC = std::ceil(col.collisionTimeRes() / o2::constants::lhc::LHCBunchSpacingNS * 4);
437437
// search forward
438438
int forwardMoveCount = 0;
439439
int64_t forwardBcDist = deltaBC + 1;
440-
for (; bc != bcs.end() && bc.globalBC() - meanBC <= deltaBC; ++bc, ++forwardMoveCount) {
440+
for (; bc != bcs.end() && apprBC - meanBC <= deltaBC; ++bc, ++forwardMoveCount) {
441441
if (bc.foundFT0() >= 0) {
442-
forwardBcDist = bc.globalBC() - meanBC;
442+
forwardBcDist = apprBC - meanBC;
443443
break;
444444
}
445445
}
446446
bc.moveByIndex(-forwardMoveCount);
447447
// search backward
448448
int backwardMoveCount = 0;
449449
int64_t backwardBcDist = deltaBC + 1;
450-
for (; bc != bcs.begin() && bc.globalBC() - meanBC >= -deltaBC; --bc, --backwardMoveCount) {
450+
for (; bc != bcs.begin() && apprBC - meanBC >= -deltaBC; --bc, --backwardMoveCount) {
451451
if (bc.foundFT0() >= 0) {
452-
backwardBcDist = meanBC - bc.globalBC();
452+
backwardBcDist = meanBC - apprBC;
453453
break;
454454
}
455455
}

Common/Tools/handleParamTOFReso.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ int main(int argc, char* argv[])
7474
const unsigned int mode = vm["mode"].as<unsigned int>();
7575
const std::string path = vm["ccdb-path"].as<std::string>();
7676
std::map<std::string, std::string> metadata;
77-
std::map<std::string, std::string>* headers;
77+
std::map<std::string, std::string>* headers = nullptr;
7878
o2::ccdb::CcdbApi api;
7979
const std::string url = vm["url"].as<std::string>();
8080
api.init(url);

PWGLF/TableProducer/cascadebuilder.cxx

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ struct cascadebuilder {
7575
OutputObj<TH1F> hCascFiltered{TH1F("hCascFiltered", "", 15, 0, 15)};
7676
OutputObj<TH1F> hCascCandidate{TH1F("hCascCandidate", "", 10, 0, 10)};
7777

78-
//Configurables
78+
// Configurables
7979
Configurable<double> d_bz{"d_bz", -5.0, "bz field"};
8080
Configurable<bool> d_UseAbsDCA{"d_UseAbsDCA", true, "Use Abs DCAs"};
8181

@@ -92,7 +92,7 @@ struct cascadebuilder {
9292

9393
void process(aod::MatchedV0Cascades const& MatchedV0Cascades, aod::V0Datas const&, aod::Cascades const&, aod::Collisions const&, soa::Join<aod::FullTracks, aod::TracksExtended> const&)
9494
{
95-
//Define o2 fitter, 2-prong
95+
// Define o2 fitter, 2-prong
9696
o2::vertexing::DCAFitterN<2> fitterV0, fitterCasc;
9797
fitterV0.setBz(d_bz);
9898
fitterV0.setPropagateToPCA(true);
@@ -120,19 +120,19 @@ struct cascadebuilder {
120120

121121
std::array<float, 3> pVtx = {v0.collision().posX(), v0.collision().posY(), v0.collision().posZ()};
122122

123-
auto b = casc.bachelor_as<FullTracksExt>();
123+
// auto b = casc.bachelor_as<FullTracksExt>();
124124

125125
if (tpcrefit) {
126126
if (!(v0.posTrack_as<FullTracksExt>().trackType() & o2::aod::track::TPCrefit)) {
127-
continue; //TPC refit
127+
continue; // TPC refit
128128
}
129129
hCascFiltered->Fill(1.5);
130130
if (!(v0.negTrack_as<FullTracksExt>().trackType() & o2::aod::track::TPCrefit)) {
131-
continue; //TPC refit
131+
continue; // TPC refit
132132
}
133133
hCascFiltered->Fill(2.5);
134134
if (!(casc.bachelor_as<FullTracksExt>().trackType() & o2::aod::track::TPCrefit)) {
135-
continue; //TPC refit
135+
continue; // TPC refit
136136
}
137137
hCascFiltered->Fill(3.5);
138138
}
@@ -161,7 +161,7 @@ struct cascadebuilder {
161161
}
162162
hCascFiltered->Fill(9.5);
163163

164-
//V0 selections
164+
// V0 selections
165165
if (fabs(v0.mLambda() - 1.116) > lambdamasswindow && fabs(v0.mAntiLambda() - 1.116) > lambdamasswindow) {
166166
continue;
167167
}
@@ -192,7 +192,7 @@ struct cascadebuilder {
192192

193193
hCascCandidate->Fill(0.5);
194194

195-
//Acquire basic tracks
195+
// Acquire basic tracks
196196
auto pTrack = getTrackParCov(v0.posTrack_as<FullTracksExt>());
197197
auto nTrack = getTrackParCov(v0.negTrack_as<FullTracksExt>());
198198
auto bTrack = getTrackParCov(casc.bachelor_as<FullTracksExt>());
@@ -213,7 +213,7 @@ struct cascadebuilder {
213213
std::array<float, 21> cov1 = {0};
214214
std::array<float, 21> covV0 = {0};
215215

216-
//Covariance matrix calculation
216+
// Covariance matrix calculation
217217
const int momInd[6] = {9, 13, 14, 18, 19, 20}; // cov matrix elements for momentum component
218218
fitterV0.getTrack(0).getPxPyPzGlo(pvecpos);
219219
fitterV0.getTrack(1).getPxPyPzGlo(pvecneg);
@@ -235,7 +235,7 @@ struct cascadebuilder {
235235
const std::array<float, 3> momentum = {pvecpos[0] + pvecneg[0], pvecpos[1] + pvecneg[1], pvecpos[2] + pvecneg[2]};
236236

237237
auto tV0 = o2::track::TrackParCov(vertex, momentum, covV0, 0);
238-
tV0.setQ2Pt(0); //No bending, please
238+
tV0.setQ2Pt(0); // No bending, please
239239
int nCand2 = fitterCasc.process(tV0, bTrack);
240240
if (nCand2 != 0) {
241241
fitterCasc.propagateTracksToVertex();
@@ -245,9 +245,9 @@ struct cascadebuilder {
245245
posXi[i] = cascvtx[i];
246246
}
247247
fitterCasc.getTrack(1).getPxPyPzGlo(pvecbach);
248-
} //end if cascade recoed
249-
} //end if v0 recoed
250-
//Fill table, please
248+
} // end if cascade recoed
249+
} // end if v0 recoed
250+
// Fill table, please
251251
cascdata(
252252
v0.globalIndex(),
253253
casc.bachelor_as<FullTracksExt>().globalIndex(),

PWGLF/TableProducer/cascadefinder.cxx

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ struct cascadeprefilter {
122122
{
123123
for (auto& t0 : goodPosTracks) {
124124
if (!(t0.trackType() & o2::aod::track::TPCrefit)) {
125-
continue; //TPC refit
125+
continue; // TPC refit
126126
}
127127
if (t0.tpcNClsCrossedRows() < mincrossedrows) {
128128
continue;
@@ -131,7 +131,7 @@ struct cascadeprefilter {
131131
}
132132
for (auto& t0 : goodNegTracks) {
133133
if (!(t0.trackType() & o2::aod::track::TPCrefit)) {
134-
continue; //TPC refit
134+
continue; // TPC refit
135135
}
136136
if (t0.tpcNClsCrossedRows() < mincrossedrows) {
137137
continue;
@@ -167,16 +167,16 @@ struct cascadefinder {
167167

168168
OutputObj<TH1F> hCandPerEvent{TH1F("hCandPerEvent", "", 100, 0, 100)};
169169

170-
//Configurables
170+
// Configurables
171171
Configurable<double> d_bz{"d_bz", +5.0, "bz field"};
172172
Configurable<double> d_UseAbsDCA{"d_UseAbsDCA", kTRUE, "Use Abs DCAs"};
173173

174-
//Selection criteria
175-
Configurable<double> v0cospa{"casccospa", 0.998, "Casc CosPA"}; //double -> N.B. dcos(x)/dx = 0 at x=0)
174+
// Selection criteria
175+
Configurable<double> v0cospa{"casccospa", 0.998, "Casc CosPA"}; // double -> N.B. dcos(x)/dx = 0 at x=0)
176176
Configurable<float> dcav0dau{"dcacascdau", 1.0, "DCA Casc Daughters"};
177177
Configurable<float> v0radius{"cascradius", 1.0, "cascradius"};
178178

179-
//Process: subscribes to a lot of things!
179+
// Process: subscribes to a lot of things!
180180
void process(aod::Collision const& collision,
181181
soa::Join<aod::FullTracks, aod::TracksCov> const& tracks,
182182
aod::V0Datas const& V0s,
@@ -185,7 +185,7 @@ struct cascadefinder {
185185
aod::CascGoodPosTracks const& pBachtracks,
186186
aod::CascGoodNegTracks const& nBachtracks)
187187
{
188-
//Define o2 fitter, 2-prong
188+
// Define o2 fitter, 2-prong
189189
o2::vertexing::DCAFitterN<2> fitterV0, fitterCasc;
190190
fitterV0.setBz(d_bz);
191191
fitterV0.setPropagateToPCA(true);
@@ -207,20 +207,20 @@ struct cascadefinder {
207207

208208
Long_t lNCand = 0;
209209

210-
std::array<float, 3> pVtx = {collision.posX(), collision.posY(), collision.posZ()};
210+
// std::array<float, 3> pVtx = {collision.posX(), collision.posY(), collision.posZ()};
211211
std::array<float, 3> pos = {0.};
212212
std::array<float, 3> posXi = {0.};
213213
std::array<float, 3> pvecpos = {0.};
214214
std::array<float, 3> pvecneg = {0.};
215215
std::array<float, 3> pvecbach = {0.};
216216

217-
//Cascades first
217+
// Cascades first
218218
for (auto& v0id : lambdas) {
219-
//required: de-reference the tracks for cascade building
219+
// required: de-reference the tracks for cascade building
220220
auto v0 = v0id.goodLambda();
221221
auto pTrack = getTrackParCov(v0.posTrack_as<soa::Join<aod::FullTracks, aod::TracksCov>>());
222222
auto nTrack = getTrackParCov(v0.negTrack_as<soa::Join<aod::FullTracks, aod::TracksCov>>());
223-
//Let's do the slow part first: the V0 recalculation from scratch
223+
// Let's do the slow part first: the V0 recalculation from scratch
224224
int nCand = fitterV0.process(pTrack, nTrack);
225225
if (nCand != 0) {
226226
fitterV0.propagateTracksToVertex();
@@ -233,7 +233,7 @@ struct cascadefinder {
233233
std::array<float, 21> cov1 = {0};
234234
std::array<float, 21> covV0 = {0};
235235

236-
//Covariance matrix calculation
236+
// Covariance matrix calculation
237237
const int momInd[6] = {9, 13, 14, 18, 19, 20}; // cov matrix elements for momentum component
238238
fitterV0.getTrack(0).getPxPyPzGlo(pvecpos);
239239
fitterV0.getTrack(1).getPxPyPzGlo(pvecneg);
@@ -255,7 +255,7 @@ struct cascadefinder {
255255
const std::array<float, 3> momentum = {pvecpos[0] + pvecneg[0], pvecpos[1] + pvecneg[1], pvecpos[2] + pvecneg[2]};
256256

257257
auto tV0 = o2::track::TrackParCov(vertex, momentum, covV0, 0);
258-
tV0.setQ2Pt(0); //No bending, please
258+
tV0.setQ2Pt(0); // No bending, please
259259

260260
for (auto& t0id : nBachtracks) {
261261
auto t0 = t0id.goodNegTrack_as<soa::Join<aod::FullTracks, aod::TracksCov>>();
@@ -271,7 +271,7 @@ struct cascadefinder {
271271
fitterCasc.getTrack(1).getPxPyPzGlo(pvecbach);
272272

273273
lNCand++;
274-
//If we got here, it means this is a good candidate!
274+
// If we got here, it means this is a good candidate!
275275
cascdata(v0.globalIndex(), v0.posTrack().globalIndex(), v0.negTrack().collisionId(),
276276
-1, posXi[0], posXi[1], posXi[2], pos[0], pos[1], pos[2],
277277
pvecpos[0], pvecpos[1], pvecpos[2],
@@ -281,18 +281,18 @@ struct cascadefinder {
281281
v0.dcapostopv(),
282282
v0.dcanegtopv(),
283283
t0id.dcaXY());
284-
} //end if cascade recoed
285-
} //end loop over bachelor
286-
} //end if v0 recoed
287-
} //end loop over cascades
284+
} // end if cascade recoed
285+
} // end loop over bachelor
286+
} // end if v0 recoed
287+
} // end loop over cascades
288288

289-
//Anticascades
289+
// Anticascades
290290
for (auto& v0id : antiLambdas) {
291-
//required: de-reference the tracks for cascade building
291+
// required: de-reference the tracks for cascade building
292292
auto v0 = v0id.goodAntiLambda();
293293
auto pTrack = getTrackParCov(v0.posTrack_as<soa::Join<aod::FullTracks, aod::TracksCov>>());
294294
auto nTrack = getTrackParCov(v0.negTrack_as<soa::Join<aod::FullTracks, aod::TracksCov>>());
295-
//Let's do the slow part first: the V0 recalculation from scratch
295+
// Let's do the slow part first: the V0 recalculation from scratch
296296
int nCand = fitterV0.process(pTrack, nTrack);
297297
if (nCand != 0) {
298298
fitterV0.propagateTracksToVertex();
@@ -305,7 +305,7 @@ struct cascadefinder {
305305
std::array<float, 21> cov1 = {0};
306306
std::array<float, 21> covV0 = {0};
307307

308-
//Covariance matrix calculation
308+
// Covariance matrix calculation
309309
const int momInd[6] = {9, 13, 14, 18, 19, 20}; // cov matrix elements for momentum component
310310
fitterV0.getTrack(0).getPxPyPzGlo(pvecpos);
311311
fitterV0.getTrack(1).getPxPyPzGlo(pvecneg);
@@ -327,7 +327,7 @@ struct cascadefinder {
327327
const std::array<float, 3> momentum = {pvecpos[0] + pvecneg[0], pvecpos[1] + pvecneg[1], pvecpos[2] + pvecneg[2]};
328328

329329
auto tV0 = o2::track::TrackParCov(vertex, momentum, covV0, 0);
330-
tV0.setQ2Pt(0); //No bending, please
330+
tV0.setQ2Pt(0); // No bending, please
331331

332332
for (auto& t0id : pBachtracks) {
333333
auto t0 = t0id.goodPosTrack_as<soa::Join<aod::FullTracks, aod::TracksCov>>();
@@ -343,7 +343,7 @@ struct cascadefinder {
343343
fitterCasc.getTrack(1).getPxPyPzGlo(pvecbach);
344344

345345
lNCand++;
346-
//If we got here, it means this is a good candidate!
346+
// If we got here, it means this is a good candidate!
347347
cascdata(v0.globalIndex(), v0.posTrack().globalIndex(), v0.negTrack().collisionId(),
348348
+1, posXi[0], posXi[1], posXi[2], pos[0], pos[1], pos[2],
349349
pvecpos[0], pvecpos[1], pvecpos[2],
@@ -353,25 +353,25 @@ struct cascadefinder {
353353
v0.dcapostopv(),
354354
v0.dcanegtopv(),
355355
t0id.dcaXY());
356-
} //end if cascade recoed
357-
} //end loop over bachelor
358-
} //end if v0 recoed
359-
} //end loop over anticascades
356+
} // end if cascade recoed
357+
} // end loop over bachelor
358+
} // end if v0 recoed
359+
} // end loop over anticascades
360360

361361
hCandPerEvent->Fill(lNCand);
362362
}
363363
};
364364

365365
struct cascadefinderQA {
366-
//Basic checks
366+
// Basic checks
367367
OutputObj<TH3F> h3dMassXiMinus{TH3F("h3dMassXiMinus", "", 20, 0, 100, 200, 0, 10, 200, 1.322 - 0.100, 1.322 + 0.100)};
368368
OutputObj<TH3F> h3dMassXiPlus{TH3F("h3dMassXiPlus", "", 20, 0, 100, 200, 0, 10, 200, 1.322 - 0.100, 1.322 + 0.100)};
369369
OutputObj<TH3F> h3dMassOmegaMinus{TH3F("h3dMassOmegaMinus", "", 20, 0, 100, 200, 0, 10, 200, 1.672 - 0.100, 1.672 + 0.100)};
370370
OutputObj<TH3F> h3dMassOmegaPlus{TH3F("h3dMassOmegaPlus", "", 20, 0, 100, 200, 0, 10, 200, 1.672 - 0.100, 1.672 + 0.100)};
371371

372-
//Selection criteria
373-
Configurable<double> v0cospa{"v0cospa", 0.999, "V0 CosPA"}; //double -> N.B. dcos(x)/dx = 0 at x=0)
374-
Configurable<double> casccospa{"casccospa", 0.999, "Casc CosPA"}; //double -> N.B. dcos(x)/dx = 0 at x=0)
372+
// Selection criteria
373+
Configurable<double> v0cospa{"v0cospa", 0.999, "V0 CosPA"}; // double -> N.B. dcos(x)/dx = 0 at x=0)
374+
Configurable<double> casccospa{"casccospa", 0.999, "Casc CosPA"}; // double -> N.B. dcos(x)/dx = 0 at x=0)
375375
Configurable<float> dcav0dau{"dcav0dau", 1.0, "DCA V0 Daughters"};
376376
Configurable<float> dcacascdau{"dcacascdau", .3, "DCA Casc Daughters"};
377377
Configurable<float> dcanegtopv{"dcanegtopv", .1, "DCA Neg To PV"};
@@ -387,7 +387,7 @@ struct cascadefinderQA {
387387
aod::cascdata::dcabachtopv > dcabachtopv&&
388388
aod::cascdata::dcaV0daughters < dcav0dau&& aod::cascdata::dcacascdaughters < dcacascdau;
389389

390-
///Connect to CascFinderData: newly indexed, note: CascDataExt table incompatible with standard V0 table!
390+
/// Connect to CascFinderData: newly indexed, note: CascDataExt table incompatible with standard V0 table!
391391
void process(soa::Join<aod::Collisions, aod::EvSels, aod::CentV0Ms>::iterator const& collision, soa::Filtered<aod::CascDataExt> const& Cascades)
392392
{
393393
if (!collision.alias()[kINT7]) {
@@ -397,13 +397,13 @@ struct cascadefinderQA {
397397
return;
398398
}
399399
for (auto& casc : Cascades) {
400-
//FIXME: dynamic columns cannot be filtered on?
400+
// FIXME: dynamic columns cannot be filtered on?
401401
if (casc.v0radius() > v0radius &&
402402
casc.cascradius() > cascradius &&
403403
casc.v0cosPA(collision.posX(), collision.posY(), collision.posZ()) > v0cospa &&
404404
casc.casccosPA(collision.posX(), collision.posY(), collision.posZ()) > casccospa &&
405405
casc.dcav0topv(collision.posX(), collision.posY(), collision.posZ()) > dcav0topv) {
406-
if (casc.sign() < 0) { //FIXME: could be done better...
406+
if (casc.sign() < 0) { // FIXME: could be done better...
407407
if (TMath::Abs(casc.yXi()) < 0.5) {
408408
h3dMassXiMinus->Fill(collision.centV0M(), casc.pt(), casc.mXi());
409409
}

0 commit comments

Comments
 (0)