@@ -417,9 +417,9 @@ struct TreeWriterTpcV0 {
417417 }
418418 }
419419
420- const auto & tracksWithITSPid = soa::Attach<TrksType,
421- aod::pidits::ITSNSigmaEl, aod::pidits::ITSNSigmaPi,
422- aod::pidits::ITSNSigmaKa, aod::pidits::ITSNSigmaPr>(myTracks);
420+ const auto tracksWithITSPid = soa::Attach<TrksType,
421+ aod::pidits::ITSNSigmaEl, aod::pidits::ITSNSigmaPi,
422+ aod::pidits::ITSNSigmaKa, aod::pidits::ITSNSigmaPr>(myTracks);
423423
424424 for (const auto & collision : collisions) {
425425 if (!isEventSelected (collision, applyEvSel)) {
@@ -430,9 +430,9 @@ struct TreeWriterTpcV0 {
430430 continue ;
431431 }
432432
433- const auto & v0s = myV0s.sliceBy (perCollisionV0s, static_cast <int >(collision.globalIndex ()));
434- const auto & cascs = myCascs.sliceBy (perCollisionCascs, static_cast <int >(collision.globalIndex ()));
435- const auto & bc = collision.bc_as <BCType>();
433+ const auto v0s = myV0s.sliceBy (perCollisionV0s, static_cast <int >(collision.globalIndex ()));
434+ const auto cascs = myCascs.sliceBy (perCollisionCascs, static_cast <int >(collision.globalIndex ()));
435+ const auto bc = collision.bc_as <BCType>();
436436 const int runnumber = bc.runNumber ();
437437 const auto hadronicRate = mRateFetcher .fetch (ccdb.service , bc.timestamp (), runnumber, irSource) * OneToKilo;
438438 const int bcGlobalIndex = bc.globalIndex ();
@@ -464,7 +464,7 @@ struct TreeWriterTpcV0 {
464464 auto fillDaughterTrack = [&](const auto & mother, const TrksType::iterator& dauTrack, const auto & v0, const bool isPositive) {
465465 const auto [trackQAInstance, existTrkQA] = getTrackQA (dauTrack);
466466 const auto trackId = dauTrack.globalIndex ();
467- const auto & dauTrackWithITSPid = tracksWithITSPid.rawIteratorAt (trackId);
467+ const auto dauTrackWithITSPid = tracksWithITSPid.rawIteratorAt (trackId);
468468 const auto v0Id = getAddId (v0);
469469 const V0Mother v0Mother = createV0Mother (v0Id);
470470 const auto daughterId = isPositive ? v0Mother.posDaughterId : v0Mother.negDaughterId ;
@@ -489,8 +489,8 @@ struct TreeWriterTpcV0 {
489489 if (v0Id == MotherUndef) {
490490 continue ;
491491 }
492- const auto & posTrack = v0.posTrack_as <TrksType>();
493- const auto & negTrack = v0.negTrack_as <TrksType>();
492+ const auto posTrack = v0.posTrack_as <TrksType>();
493+ const auto negTrack = v0.negTrack_as <TrksType>();
494494
495495 fillDaughterTrack (v0, posTrack, v0, true );
496496 fillDaughterTrack (v0, negTrack, v0, false );
@@ -502,7 +502,7 @@ struct TreeWriterTpcV0 {
502502 if (cascId == MotherUndef) {
503503 continue ;
504504 }
505- const auto & bachTrack = casc.bachelor_as <TrksType>();
505+ const auto bachTrack = casc.bachelor_as <TrksType>();
506506 // Omega and antiomega
507507 const auto isDaughterPositive = cascId == MotherAntiOmega ? true : false ;
508508 fillDaughterTrack (casc, bachTrack, casc, isDaughterPositive);
@@ -803,7 +803,7 @@ struct TreeWriterTpcTof {
803803 }
804804 }
805805 for (const auto & collision : collisions) {
806- const auto & tracks = myTracks.sliceBy (perCollisionTracksType, collision.globalIndex ());
806+ const auto tracks = myTracks.sliceBy (perCollisionTracksType, collision.globalIndex ());
807807 if (!isEventSelected (collision, applyEvSel)) {
808808 continue ;
809809 }
@@ -820,7 +820,7 @@ struct TreeWriterTpcTof {
820820 tracksWithITSPid.bindExternalIndices (&trackMeanOccs);
821821 }
822822
823- const auto & bc = collision.bc_as <BCType>();
823+ const auto bc = collision.bc_as <BCType>();
824824 const int runnumber = bc.runNumber ();
825825 const auto hadronicRate = mRateFetcher .fetch (ccdb.service , bc.timestamp (), runnumber, irSource) * OneToKilo;
826826 const int bcGlobalIndex = bc.globalIndex ();
0 commit comments