3434#include < CommonConstants/PhysicsConstants.h>
3535#include < DataFormatsParameters/GRPMagField.h>
3636#include < Framework/AnalysisDataModel.h>
37+ #include < Framework/AnalysisHelpers.h>
3738#include < Framework/AnalysisTask.h>
3839#include < Framework/BinningPolicy.h>
3940#include < Framework/CallbackService.h>
4445#include < Framework/InitContext.h>
4546#include < Framework/OutputObjHeader.h>
4647#include < Framework/runDataProcessing.h>
48+ #include < ReconstructionDataFormats/TrackParametrization.h>
4749
4850#include < Math/GenVector/Boost.h>
4951#include < Math/GenVector/LorentzVector.h>
5557#include < algorithm>
5658#include < array>
5759#include < cmath>
60+ #include < cstddef>
5861#include < cstdint>
5962#include < deque>
6063#include < functional>
@@ -274,14 +277,14 @@ struct PiHypertritonFemto {
274277 std::array<ClosePairTrack, 2 > daughterClosePairTracks{}; // He3, decay pion.
275278 uint64_t mixedPairCount{0 }; // Accumulated over the complete residence in the mixing pool.
276279
277- float pt () const { return std::hypot (momentum[0 ], momentum[1 ]); }
278- float eta () const
280+ [[nodiscard]] float pt () const { return std::hypot (momentum[0 ], momentum[1 ]); }
281+ [[nodiscard]] float eta () const
279282 {
280283 const float transverseMomentum = pt ();
281284 return transverseMomentum > 0 .f ? std::asinh (momentum[2 ] / transverseMomentum) : 999 .f ;
282285 }
283- float phi () const { return std::atan2 (momentum[1 ], momentum[0 ]); }
284- int8_t sign () const { return isMatter ? 1 : -1 ; }
286+ [[nodiscard]] float phi () const { return std::atan2 (momentum[1 ], momentum[0 ]); }
287+ [[nodiscard]] int8_t sign () const { return isMatter ? 1 : -1 ; }
285288 };
286289
287290 struct HadHyperHadron {
@@ -293,9 +296,9 @@ struct PiHypertritonFemto {
293296 int8_t signValue{0 };
294297 ClosePairTrack closePairTrack{};
295298
296- float eta () const { return std::get<1 >(info); }
297- float phi () const { return std::get<2 >(info); }
298- int8_t sign () const { return signValue; }
299+ [[nodiscard]] float eta () const { return std::get<1 >(info); }
300+ [[nodiscard]] float phi () const { return std::get<2 >(info); }
301+ [[nodiscard]] int8_t sign () const { return signValue; }
299302 };
300303
301304 struct HadHyperEvent {
@@ -402,7 +405,7 @@ struct PiHypertritonFemto {
402405 // AO2D signed1Pt is signed inverse rigidity: He3's |Z|=2 is already included.
403406 // Do not multiply it by two again. Cache each source event's field-dependent values.
404407 constexpr float CurvatureFactor = 0 .3f * 0 .01f / 2 .f ; // B in T, radius in cm.
405- for (size_t i = 0 ; i < CPRTPCRadii.size (); ++i) {
408+ for (std:: size_t i = 0 ; i < CPRTPCRadii.size (); ++i) {
406409 const float argument = CurvatureFactor * mMagneticFieldTesla * CPRTPCRadii[i] * track.signed1Pt ();
407410 if (std::isfinite (argument) && std::abs (argument) < 1 .f ) {
408411 result.phiStar [i] = track.phi () - std::asin (argument);
@@ -415,7 +418,7 @@ struct PiHypertritonFemto {
415418 constexpr float TeslaToKilogauss = 10 .f ;
416419 constexpr float TPCHalfLength = 250 .f ; // cm
417420 const float fieldKilogauss = TeslaToKilogauss * mMagneticFieldTesla ;
418- for (size_t i = 0 ; i < CPRTPCRadii.size (); ++i) {
421+ for (std:: size_t i = 0 ; i < CPRTPCRadii.size (); ++i) {
419422 float localX = 0 .f ;
420423 if (!trackPar.getXatLabR (CPRTPCRadii[i], localX, fieldKilogauss, o2::track::DirOutward)) {
421424 continue ;
@@ -436,7 +439,7 @@ struct PiHypertritonFemto {
436439 {
437440 ClosePairResult result;
438441 result.deltaEta = pion.eta - daughter.eta ;
439- for (size_t i = 0 ; i < CPRTPCRadii.size (); ++i) {
442+ for (std:: size_t i = 0 ; i < CPRTPCRadii.size (); ++i) {
440443 if (pion.valid [i] && daughter.valid [i]) {
441444 result.deltaPhiStar += wrapDeltaPhi (pion.phiStar [i] - daughter.phiStar [i]);
442445 ++result.validRadii ;
@@ -487,7 +490,7 @@ struct PiHypertritonFemto {
487490 rejectionFlags |= aod::pihypertritonfemto::ClosePairDistanceUnavailable;
488491 }
489492 }
490- for (size_t i = 0 ; i < results.size (); ++i) {
493+ for (std:: size_t i = 0 ; i < results.size (); ++i) {
491494 const auto & result = results[i];
492495 const auto & qa = mClosePairQA [mixed ? 1 : 0 ][i];
493496 qa.validRadii ->Fill (result.validRadii );
@@ -581,7 +584,7 @@ struct PiHypertritonFemto {
581584 const std::array<float , 3 > decayPionMomentum{candidate.ptPi () * std::cos (candidate.phiPi ()), candidate.ptPi () * std::sin (candidate.phiPi ()), candidate.ptPi () * std::sinh (candidate.etaPi ())};
582585
583586 HadHyperCandidate result;
584- for (size_t i = 0 ; i < result.momentum .size (); ++i) {
587+ for (std:: size_t i = 0 ; i < result.momentum .size (); ++i) {
585588 result.momentum [i] = heMomentum[i] + decayPionMomentum[i];
586589 }
587590 result.mass = computeHyperCandidateMass (candidate);
@@ -857,23 +860,23 @@ struct PiHypertritonFemto {
857860 {
858861 const int depth = static_cast <int >(pool.size ());
859862 hadHyperRegistry.fill (HIST (" hMixingDepth" ), depth);
860- for (size_t partnerIndex = 0 ; partnerIndex < pool.size (); ++partnerIndex) {
863+ for (std:: size_t partnerIndex = 0 ; partnerIndex < pool.size (); ++partnerIndex) {
861864 auto & partner = pool[partnerIndex];
862865 const float currentPosZ = std::get<0 >(currentEvent.info );
863866 const float partnerPosZ = std::get<0 >(partner.info );
864867 hadHyperRegistry.fill (HIST (" hMixEventDeltaPosZVsCent" ), currentEvent.centrality , currentPosZ - partnerPosZ);
865868 hadHyperRegistry.fill (HIST (" hMixEventDeltaCentFT0CVsCent" ), currentEvent.centrality , currentEvent.centrality - partner.centrality );
866869 hadHyperRegistry.fill (HIST (" hMixEventDeltaPosZVsCent" ), partner.centrality , partnerPosZ - currentPosZ);
867870 hadHyperRegistry.fill (HIST (" hMixEventDeltaCentFT0CVsCent" ), partner.centrality , partner.centrality - currentEvent.centrality );
868- for (size_t candidateIndex = 0 ; candidateIndex < currentEvent.candidates .size (); ++candidateIndex) {
871+ for (std:: size_t candidateIndex = 0 ; candidateIndex < currentEvent.candidates .size (); ++candidateIndex) {
869872 auto & candidate = currentEvent.candidates [candidateIndex];
870873 for (const auto & pion : partner.hadrons ) {
871874 if (fillPair<isMC>(candidate, pion, currentEvent, partner, true , depth)) {
872875 ++candidate.mixedPairCount ;
873876 }
874877 }
875878 }
876- for (size_t candidateIndex = 0 ; candidateIndex < partner.candidates .size (); ++candidateIndex) {
879+ for (std:: size_t candidateIndex = 0 ; candidateIndex < partner.candidates .size (); ++candidateIndex) {
877880 auto & candidate = partner.candidates [candidateIndex];
878881 for (const auto & pion : currentEvent.hadrons ) {
879882 if (fillPair<isMC>(candidate, pion, partner, currentEvent, true , depth)) {
@@ -908,7 +911,7 @@ struct PiHypertritonFemto {
908911 if (requestedMixingDepth <= 0 ) {
909912 return ;
910913 }
911- const auto mixingDepth = static_cast <size_t >(requestedMixingDepth);
914+ const auto mixingDepth = static_cast <std:: size_t >(requestedMixingDepth);
912915 if (pool.size () >= mixingDepth) {
913916 flushMixedEventMultiplicity (pool.front ());
914917 pool.pop_front ();
@@ -949,8 +952,8 @@ void PiHypertritonFemto::init(o2::framework::InitContext&)
949952
950953 const std::array<std::string, 2 > eventNames{" SE" , " ME" };
951954 const std::array<std::string, 2 > daughterNames{" He3" , " DecayPi" };
952- for (size_t eventIndex = 0 ; eventIndex < eventNames.size (); ++eventIndex) {
953- for (size_t daughterIndex = 0 ; daughterIndex < daughterNames.size (); ++daughterIndex) {
955+ for (std:: size_t eventIndex = 0 ; eventIndex < eventNames.size (); ++eventIndex) {
956+ for (std:: size_t daughterIndex = 0 ; daughterIndex < daughterNames.size (); ++daughterIndex) {
954957 const std::string prefix = " CPR/" + eventNames[eventIndex] + " /" + daughterNames[daughterIndex];
955958 auto & qa = mClosePairQA [eventIndex][daughterIndex];
956959 qa.before = hadHyperRegistry.add <TH2 >((prefix + " /hBefore" ).c_str (), " All pairs;#Delta#eta;#LT#Delta#varphi*#GT" ,
@@ -1006,7 +1009,7 @@ void PiHypertritonFemto::init(o2::framework::InitContext&)
10061009 " Zorro (data, optional)" ,
10071010 " MC collision label (MC, optional)" ,
10081011 " Mixing bin (if enabled)" };
1009- for (size_t i = 0 ; i < eventsLabels.size (); i++) {
1012+ for (std:: size_t i = 0 ; i < eventsLabels.size (); i++) {
10101013 mQaRegistry .get <TH1 >(HIST (" hEvents" ))->GetXaxis ()->SetBinLabel (i + 1 , eventsLabels[i].c_str ());
10111014 }
10121015}
0 commit comments