|
35 | 35 | #include "Common/DataModel/Multiplicity.h" |
36 | 36 | #include "Common/DataModel/EventSelection.h" |
37 | 37 | #include "Common/DataModel/PIDResponse.h" |
| 38 | +#include "Common/DataModel/PIDResponseITS.h" |
38 | 39 | #include "Common/DataModel/TrackSelectionTables.h" |
39 | 40 | #include "Common/Core/PID/PIDTOF.h" |
40 | 41 | #include "Common/TableProducer/PID/pidTOFBase.h" |
@@ -203,6 +204,7 @@ std::shared_ptr<TH2> hGloTOFtracks[2]; |
203 | 204 | std::shared_ptr<TH2> hDeltaP[2][5]; |
204 | 205 | std::shared_ptr<THnSparse> hFlowHists[2][5]; |
205 | 206 | std::shared_ptr<THnSparse> hDCAHists[2][5]; |
| 207 | +std::shared_ptr<THnSparse> hMatchingStudy[2]; |
206 | 208 | o2::base::MatLayerCylSet* lut = nullptr; |
207 | 209 |
|
208 | 210 | std::vector<NucleusCandidate> candidates; |
@@ -463,6 +465,12 @@ struct nucleiSpectra { |
463 | 465 | } |
464 | 466 | } |
465 | 467 |
|
| 468 | + if (doprocessMatching) { |
| 469 | + for (int iC{0}; iC < 2; ++iC) { |
| 470 | + 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}", HistType::kTHnSparseF, {{20, 1., 9.}, {10, 0., o2::constants::math::TwoPI}, {10, -1., 1.}, {50, -5., 5.}, {50, -5., 5.}, {50, 0., 1.}}); |
| 471 | + } |
| 472 | + } |
| 473 | + |
466 | 474 | nuclei::lut = o2::base::MatLayerCylSet::rectifyPtrFromFile(ccdb->get<o2::base::MatLayerCylSet>("GLO/Param/MatLUT")); |
467 | 475 | // TrackTuner initialization |
468 | 476 | if (cfgUseTrackTuner) { |
@@ -890,6 +898,29 @@ struct nucleiSpectra { |
890 | 898 | } |
891 | 899 | } |
892 | 900 | PROCESS_SWITCH(nucleiSpectra, processMC, "MC analysis", false); |
| 901 | + |
| 902 | + void processMatching(soa::Join<aod::Collisions, aod::EvSels>::iterator const& collision, TrackCandidates const& tracks, aod::BCsWithTimestamps const&) |
| 903 | + { |
| 904 | + if (!eventSelection(collision)) { |
| 905 | + return; |
| 906 | + } |
| 907 | + o2::aod::ITSResponse itsResponse; |
| 908 | + for (auto& track : tracks) { |
| 909 | + if (std::abs(track.eta()) > cfgCutEta || |
| 910 | + track.itsNCls() < 7 || |
| 911 | + track.itsChi2NCl() > 36.f || |
| 912 | + itsResponse.nSigmaITS<o2::track::PID::Helium3>(track) < -1.) { |
| 913 | + continue; |
| 914 | + } |
| 915 | + 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))}; |
| 916 | + double expSigma{expBethe * cfgBetheBlochParams->get(4, 5u)}; |
| 917 | + double nSigmaTPC{(track.tpcSignal() - expBethe) / expSigma}; |
| 918 | + int iC = track.signed1Pt() > 0; |
| 919 | + nuclei::hMatchingStudy[iC]->Fill(track.pt() * 2, track.phi(), track.eta(), itsResponse.nSigmaITS<o2::track::PID::Helium3>(track), nSigmaTPC, o2::pid::tof::Beta::GetBeta(track)); |
| 920 | + } |
| 921 | + } |
| 922 | + |
| 923 | + PROCESS_SWITCH(nucleiSpectra, processMatching, "Matching analysis", false); |
893 | 924 | }; |
894 | 925 |
|
895 | 926 | WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) |
|
0 commit comments