@@ -167,7 +167,7 @@ struct Omega2012TrainingTable {
167167 {
168168 uint64_t hash = FnvOffsetBasis;
169169 for (const auto & value : features) {
170- const uint32_t bits = std::bit_cast<uint32_t >(value);
170+ const auto bits = std::bit_cast<uint32_t >(value);
171171 for (unsigned int shift = 0 ; shift < BitsPerFloat; shift += BitsPerByte) {
172172 hash = (hash ^ ((bits >> shift) & ByteMask)) * FnvPrime;
173173 }
@@ -184,7 +184,7 @@ struct Omega2012TrainingTable {
184184 // ResoCollisions_001 carries no run number or BC; the reduced collision row identifies the event within its DF.
185185 mlEvents (static_cast <uint8_t >(mode), static_cast <int64_t >(collision.globalIndex ()),
186186 collision.posZ (), collision.bMagField (), collision.cent (), collision.multiplicity (), collision.isRecINELgt0 ());
187- mlEventRow = static_cast < int64_t >( mlEvents.lastIndex () );
187+ mlEventRow = mlEvents.lastIndex ();
188188 }
189189
190190 template <typename Cascade>
@@ -207,7 +207,7 @@ struct Omega2012TrainingTable {
207207 xi.daughterTOFNSigmaNegPi10 (), xi.daughterTOFNSigmaNegKa10 (), xi.daughterTOFNSigmaNegPr10 (),
208208 xi.daughterTOFNSigmaBachPi10 (), xi.daughterTOFNSigmaBachKa10 (), xi.daughterTOFNSigmaBachPr10 (),
209209 xi.nCrossedRowsPos (), xi.nCrossedRowsNeg (), xi.nCrossedRowsBach (), daughterIds.data ());
210- const auto row = static_cast < int64_t >( mlCascades.lastIndex () );
210+ const auto row = mlCascades.lastIndex ();
211211 mlCascadeRows.emplace (id, row);
212212 return row;
213213 }
@@ -229,7 +229,7 @@ struct Omega2012TrainingTable {
229229 v0.daughterTOFNSigmaPosPi10 (), v0.daughterTOFNSigmaPosKa10 (), v0.daughterTOFNSigmaPosPr10 (),
230230 v0.daughterTOFNSigmaNegPi10 (), v0.daughterTOFNSigmaNegKa10 (), v0.daughterTOFNSigmaNegPr10 (),
231231 v0.nCrossedRowsPos (), v0.nCrossedRowsNeg (), daughterIds.data ());
232- const auto row = static_cast < int64_t >( mlV0s.lastIndex () );
232+ const auto row = mlV0s.lastIndex ();
233233 mlV0Rows.emplace (id, row);
234234 return row;
235235 }
@@ -244,7 +244,7 @@ struct Omega2012TrainingTable {
244244 mlTracks (mlEventRow, static_cast <int64_t >(track.trackId ()), track.px (), track.py (), track.pz (),
245245 track.pidNSigmaPiFlag (), track.pidNSigmaKaFlag (), track.pidNSigmaPrFlag (),
246246 track.trackSelectionFlags (), track.trackFlags (), track.tpcNClsCrossedRows (), track.itsClusterMap ());
247- const auto row = static_cast < int64_t >( mlTracks.lastIndex () );
247+ const auto row = mlTracks.lastIndex ();
248248 mlTrackRows.emplace (id, row);
249249 return row;
250250 }
@@ -273,7 +273,7 @@ struct Omega2012TrainingTable {
273273 static_cast <float >(values.omega .M ()), static_cast <float >(values.omega .Pt ()),
274274 static_cast <float >(values.omega .Rapidity ()), static_cast <float >(values.omega .Eta ()),
275275 static_cast <float >(values.omega .Phi ()), values.alpha , static_cast <int8_t >(xi.sign ()), passBits);
276- const auto row = static_cast < int64_t >( mlXiK0sCandidates.lastIndex () );
276+ const auto row = mlXiK0sCandidates.lastIndex ();
277277 mlXiK0sInputs (row, pack.master .data (), static_cast <uint8_t >(pack.status ));
278278 if constexpr (IsMC) {
279279 const bool matched = classifyXiK0sTruth (xi, v0) == XiK0sTruth::Matched;
@@ -316,7 +316,7 @@ struct Omega2012TrainingTable {
316316 static_cast <float >(values.omega .Pt ()), static_cast <float >(values.omega .Rapidity ()),
317317 static_cast <float >(values.omega .Eta ()), static_cast <float >(values.omega .Phi ()),
318318 values.chargePattern , passBits);
319- const auto row = static_cast < int64_t >( mlXi1530KCandidates.lastIndex () );
319+ const auto row = mlXi1530KCandidates.lastIndex ();
320320 mlXi1530KInputs (row, pack.master .data (), static_cast <uint8_t >(pack.status ));
321321 if constexpr (IsMC) {
322322 const bool matched = classifyXi1530KTruth (xi, pion, kaon) == Xi1530KTruth::Matched;
@@ -333,7 +333,7 @@ struct Omega2012TrainingTable {
333333 writeEvent (collision, DecayMode::XiK0s);
334334 // Selection only: the analysis histograms belong to the Omega(2012) analysis task
335335 core.forEachXiK0sCandidate <IsMC, false >(histos, collision, collision, cascades, v0s, true , nullptr , nullptr , nullptr ,
336- [this ](auto const & coll, auto const & xi, auto const & v0, XiK0sCandidateValues const & values, uint16_t passBits) {
336+ [& ](auto const & coll, auto const & xi, auto const & v0, XiK0sCandidateValues const & values, uint16_t passBits) {
337337 writeXiK0sCandidate<IsMC>(coll, xi, v0, values, passBits);
338338 });
339339 }
@@ -343,8 +343,8 @@ struct Omega2012TrainingTable {
343343 {
344344 writeEvent (collision, DecayMode::Xi1530K);
345345 core.forEachXi1530KCandidate <IsMC, false , true >(histos, collision, cascades, tracks, nullptr , true , nullptr , nullptr , nullptr ,
346- [this ](auto const & coll, auto const & xi, auto const & pion, auto const & kaon,
347- Xi1530KCandidateValues const & values, uint16_t passBits) {
346+ [& ](auto const & coll, auto const & xi, auto const & pion, auto const & kaon,
347+ Xi1530KCandidateValues const & values, uint16_t passBits) {
348348 writeXi1530KCandidate<IsMC>(coll, xi, pion, kaon, values, passBits);
349349 });
350350 }
@@ -391,7 +391,7 @@ struct Omega2012TrainingTable {
391391 return ;
392392 }
393393 core.forEachGeneratedOmega2012 (histos, resoParents, [&](auto const & part, GeneratedChannel channel) {
394- mlGenAudit (static_cast < int64_t >( collision.globalIndex () ), static_cast <int64_t >(part.originalMcParticleId ()),
394+ mlGenAudit (collision.globalIndex (), static_cast <int64_t >(part.originalMcParticleId ()),
395395 part.pdgCode (), part.daughterPDG1 (), part.daughterPDG2 (), static_cast <uint8_t >(channel), part.pt (), part.y ());
396396 });
397397 }
0 commit comments