|
42 | 42 | #include "Common/Core/EventPlaneHelper.h" |
43 | 43 | #include "Common/DataModel/Qvectors.h" |
44 | 44 | #include "Common/Tools/TrackTuner.h" |
| 45 | +#include "Common/Core/RecoDecay.h" |
45 | 46 |
|
46 | 47 | #include "DataFormatsParameters/GRPMagField.h" |
47 | 48 | #include "DataFormatsParameters/GRPObject.h" |
@@ -321,18 +322,6 @@ struct nucleiSpectra { |
321 | 322 |
|
322 | 323 | HistogramRegistry spectra{"spectra", {}, OutputObjHandlingPolicy::AnalysisObject, true, true}; |
323 | 324 |
|
324 | | - double getPhiInRange(double phi) |
325 | | - { |
326 | | - double result = phi; |
327 | | - while (result < 0) { |
328 | | - result = result + 2. * TMath::Pi() / 2; |
329 | | - } |
330 | | - while (result > 2. * TMath::Pi() / 2) { |
331 | | - result = result - 2. * TMath::Pi() / 2; |
332 | | - } |
333 | | - return result; |
334 | | - } |
335 | | - |
336 | 325 | double computeAbsoDecL(aod::McParticles::iterator particle) |
337 | 326 | { |
338 | 327 | if (!particle.has_daughters()) |
@@ -469,7 +458,7 @@ struct nucleiSpectra { |
469 | 458 | if (doprocessMatching) { |
470 | 459 | for (int iC{0}; iC < 2; ++iC) { |
471 | 460 | nuclei::hMatchingStudy[iC] = spectra.add<THnSparse>(fmt::format("hMatchingStudy{}", nuclei::matter[iC]).data(), ";#it{p}_{T};#phi;#eta;n#sigma_{ITS};n#sigma{TPC};n#sigma_{TOF};Centrality", HistType::kTHnSparseF, {{20, 1., 9.}, {10, 0., o2::constants::math::TwoPI}, {10, -1., 1.}, {50, -5., 5.}, {50, -5., 5.}, {50, 0., 1.}, {8, 0., 80.}}); |
472 | | - nuclei::hMatchingStudyHadrons[iC] = spectra.add<THn>(fmt::format("hMatchingStudyHadrons{}", nuclei::matter[iC]).data(), ";#it{p}_{T};#phi;#eta;Centrality;Track type", HistType::kTHnSparseF, {{23, 0.4, 5.}, {20, 0., o2::constants::math::TwoPI}, {10, -1., 1.}, {8, 0., 80.}, {2, -0.5, 1.5}}); |
| 461 | + nuclei::hMatchingStudyHadrons[iC] = spectra.add<THn>(fmt::format("hMatchingStudyHadrons{}", nuclei::matter[iC]).data(), ";#it{p}_{T};#phi;#eta;Centrality;Track type", HistType::kTHnF, {{23, 0.4, 5.}, {20, 0., o2::constants::math::TwoPI}, {10, -1., 1.}, {8, 0., 80.}, {2, -0.5, 1.5}}); |
473 | 462 | } |
474 | 463 | } |
475 | 464 |
|
@@ -648,13 +637,13 @@ struct nucleiSpectra { |
648 | 637 |
|
649 | 638 | if (cfgFlowHist->get(iS) && doprocessDataFlow) { |
650 | 639 | if constexpr (std::is_same<Tcoll, CollWithEP>::value) { |
651 | | - auto deltaPhiInRange = getPhiInRange(fvector.phi() - collision.psiFT0C()); |
| 640 | + auto deltaPhiInRange = RecoDecay::constrainAngle(fvector.phi() - collision.psiFT0C(), 0.f, 2); |
652 | 641 | auto v2 = std::cos(2.0 * deltaPhiInRange); |
653 | 642 | nuclei::hFlowHists[iC][iS]->Fill(collision.centFT0C(), fvector.pt(), nSigma[0][iS], tofMasses[iS], v2, track.itsNCls(), track.tpcNClsFound()); |
654 | 643 | } |
655 | 644 | } else if (cfgFlowHist->get(iS) && doprocessDataFlowAlternative) { |
656 | 645 | if constexpr (std::is_same<Tcoll, CollWithQvec>::value) { |
657 | | - auto deltaPhiInRange = getPhiInRange(fvector.phi() - computeEventPlane(collision.qvecFT0CIm(), collision.qvecFT0CRe())); |
| 646 | + auto deltaPhiInRange = RecoDecay::constrainAngle(fvector.phi() - computeEventPlane(collision.qvecFT0CIm(), collision.qvecFT0CRe()), 0.f, 2); |
658 | 647 | auto v2 = std::cos(2.0 * deltaPhiInRange); |
659 | 648 | nuclei::hFlowHists[iC][iS]->Fill(collision.centFT0C(), fvector.pt(), nSigma[0][iS], tofMasses[iS], v2, track.itsNCls(), track.tpcNClsFound()); |
660 | 649 | } |
@@ -908,23 +897,24 @@ struct nucleiSpectra { |
908 | 897 | if (!eventSelection(collision) || !collision.triggereventep()) { |
909 | 898 | return; |
910 | 899 | } |
911 | | - const float centrality = getCentrality(collision); |
| 900 | + const float centrality = collision.centFT0C(); |
912 | 901 | o2::aod::ITSResponse itsResponse; |
913 | 902 | for (const auto& track : tracks) { |
914 | 903 | if (std::abs(track.eta()) > cfgCutEta || |
915 | 904 | track.itsNCls() < 7 || |
916 | | - track.itsChi2NCl() > 36.f || |
917 | | - itsResponse.nSigmaITS<o2::track::PID::Helium3>(track) < -1.) { |
| 905 | + track.itsChi2NCl() > 36.f) { |
918 | 906 | continue; |
919 | 907 | } |
920 | 908 | double expBethe{tpc::BetheBlochAleph(static_cast<double>(track.tpcInnerParam() * 2. / o2::constants::physics::MassHelium3), cfgBetheBlochParams->get(4, 0u), cfgBetheBlochParams->get(4, 1u), cfgBetheBlochParams->get(4, 2u), cfgBetheBlochParams->get(4, 3u), cfgBetheBlochParams->get(4, 4u))}; |
921 | 909 | double expSigma{expBethe * cfgBetheBlochParams->get(4, 5u)}; |
922 | 910 | double nSigmaTPC{(track.tpcSignal() - expBethe) / expSigma}; |
923 | 911 | int iC = track.signed1Pt() > 0; |
924 | 912 | const float pt = track.pt(); |
925 | | - const float phi = getPhiInRange(track.phi() - collision.psiFT0C()); |
926 | | - nuclei::hMatchingStudy[iC]->Fill(pt * 2, phi, track.eta(), itsResponse.nSigmaITS<o2::track::PID::Helium3>(track), nSigmaTPC, o2::pid::tof::Beta::GetBeta(track), centrality); |
| 913 | + const float phi = 2.f * RecoDecay::constrainAngle(track.phi() - collision.psiFT0C(), 0.f, 2); |
927 | 914 | nuclei::hMatchingStudyHadrons[iC]->Fill(pt, phi, track.eta(), centrality, track.hasTPC()); |
| 915 | + if (itsResponse.nSigmaITS<o2::track::PID::Helium3>(track) > -1.) { |
| 916 | + nuclei::hMatchingStudy[iC]->Fill(pt * 2, phi, track.eta(), itsResponse.nSigmaITS<o2::track::PID::Helium3>(track), nSigmaTPC, o2::pid::tof::Beta::GetBeta(track), centrality); |
| 917 | + } |
928 | 918 | } |
929 | 919 | } |
930 | 920 |
|
|
0 commit comments