diff --git a/PWGCF/TwoParticleCorrelations/DataModel/LongRangeDerived.h b/PWGCF/TwoParticleCorrelations/DataModel/LongRangeDerived.h index af4916671da..583e33019c4 100644 --- a/PWGCF/TwoParticleCorrelations/DataModel/LongRangeDerived.h +++ b/PWGCF/TwoParticleCorrelations/DataModel/LongRangeDerived.h @@ -159,6 +159,8 @@ DECLARE_SOA_COLUMN(DcaZ, dcaZ, float); DECLARE_SOA_COLUMN(Pt, pt, float); DECLARE_SOA_COLUMN(Eta, eta, float); DECLARE_SOA_COLUMN(Phi, phi, float); +DECLARE_SOA_COLUMN(IsCA, isCA, bool); +DECLARE_SOA_COLUMN(IsReassigned, isReassigned, bool); enum TrackPid { kSpCharge, @@ -226,7 +228,9 @@ DECLARE_SOA_TABLE(LRMftTracks, "AOD", "LRMFTTRACK", lrcorrtrktable::Phi, fwdtrack::NClusters, fwdtrack::BestDCAXY, - fwdtrack::BestDCAZ); + fwdtrack::BestDCAZ, + lrcorrtrktable::IsCA, + lrcorrtrktable::IsReassigned); using LRMftTrack = LRMftTracks::iterator; DECLARE_SOA_TABLE(UpcLRMidTracks, "AOD", "UPCLRMIDTRACK", @@ -281,7 +285,9 @@ DECLARE_SOA_TABLE(UpcLRMftTracks, "AOD", "UPCLRMFTTRACK", lrcorrtrktable::Phi, fwdtrack::NClusters, fwdtrack::BestDCAXY, - fwdtrack::BestDCAZ); + fwdtrack::BestDCAZ, + lrcorrtrktable::IsCA, + lrcorrtrktable::IsReassigned); using UpcLRMftTrack = UpcLRMftTracks::iterator; } // namespace o2::aod diff --git a/PWGCF/TwoParticleCorrelations/TableProducer/longrangeMaker.cxx b/PWGCF/TwoParticleCorrelations/TableProducer/longrangeMaker.cxx index 61d404d5890..4dd36146ce2 100644 --- a/PWGCF/TwoParticleCorrelations/TableProducer/longrangeMaker.cxx +++ b/PWGCF/TwoParticleCorrelations/TableProducer/longrangeMaker.cxx @@ -83,7 +83,7 @@ using namespace o2::constants::math; auto static constexpr CintZero = 0; auto static constexpr KminFt0cCell = 96; auto static constexpr TotFt0Channels = 208; -AxisSpec axisEvent{15, 0.5, 15.5, "#Event", "EventAxis"}; +AxisSpec axisEvent{20, 0.5, 20.5, "#Event", "EventAxis"}; AxisSpec axisTrackSel{10, 0.5, 10.5, "#Track", "TrackAxis"}; auto static constexpr KminCharge = 3.0f; static constexpr std::string_view species[] = {"Pi", "Ka", "Pr"}; @@ -112,7 +112,9 @@ struct LongrangeMaker { Configurable isApplyBestCollIndex{"isApplyBestCollIndex", true, "bestCollIndex"}; Configurable isrejectFlangeEvent{"isrejectFlangeEvent", false, "At least one channel with -350 TDC < time < -450 TDC"}; Configurable isApplyNoCollInTimeRangeStandard{"isApplyNoCollInTimeRangeStandard", false, "Enable NoCollInTimeRangeStandard cut"}; + Configurable isApplyNoCollInTimeRangeStrict{"isApplyNoCollInTimeRangeStrict", false, "Enable NoCollInTimeRangeStrict cut"}; Configurable isApplyNoCollInRofStandard{"isApplyNoCollInRofStandard", false, "Enable NoCollInRofStandard cut"}; + Configurable isApplyNoCollInRofStrict{"isApplyNoCollInRofStrict", false, "Enable NoCollInRofStrict cut"}; Configurable isApplyNoHighMultCollInPrevRof{"isApplyNoHighMultCollInPrevRof", false, "Enable NoHighMultCollInPrevRof cut"}; Configurable isApplyCentFT0C{"isApplyCentFT0C", false, "Centrality based on FT0C"}; Configurable isApplyCentFV0A{"isApplyCentFV0A", false, "Centrality based on FV0A"}; @@ -142,6 +144,7 @@ struct LongrangeMaker { struct : ConfigurableGroup { Configurable cfgUseChi2Cut{"cfgUseChi2Cut", false, "Use condition on MFT track: chi2/Nclusters"}; Configurable cfgRequireCA{"cfgRequireCA", false, "Use Cellular Automaton track-finding algorithm"}; + Configurable cfgRequireLTF{"cfgRequireLTF", false, "Use LTF track-finding algorithm"}; Configurable useMftPtCut{"useMftPtCut", true, "Choose to apply MFT track pT cut"}; Configurable cfgMftCluster{"cfgMftCluster", 5, "cut on MFT Cluster"}; Configurable cfgMftEtaMax{"cfgMftEtaMax", -2.4f, "Maximum MFT eta cut"}; @@ -251,11 +254,13 @@ struct LongrangeMaker { x->SetBinLabel(6, "ApplyGoodZvtxFT0vsPV"); x->SetBinLabel(7, "ApplyGoodITSLayersAll"); x->SetBinLabel(8, "ApplyExtraCorrCut"); - x->SetBinLabel(9, "ApplyNoCollInTimeRangeStandard"); - x->SetBinLabel(10, "ApplyNoCollInRofStandard"); - x->SetBinLabel(11, "ApplyNoHighMultCollInPrevRof"); - x->SetBinLabel(12, "ApplyOccupancySelection"); - x->SetBinLabel(13, "reject flange event"); + x->SetBinLabel(9, "ApplyNoCollInRofStandard"); + x->SetBinLabel(10, "ApplyNoCollInRofStrict"); + x->SetBinLabel(11, "ApplyNoCollInTimeRangeStandard"); + x->SetBinLabel(12, "ApplyNoCollInTimeRangeStrict"); + x->SetBinLabel(13, "ApplyNoHighMultCollInPrevRof"); + x->SetBinLabel(14, "ApplyOccupancySelection"); + x->SetBinLabel(15, "reject flange event"); histos.add("hSelectionResult", "hSelectionResult", kTH1I, {{5, -0.5, 4.5}}); histos.add("hMftTrkSel", "hMftTrkSel", kTH1D, {axisTrackSel}, false); @@ -277,9 +282,6 @@ struct LongrangeMaker { xMftBestTrk->SetBinLabel(4, "DCAxy selection"); xMftBestTrk->SetBinLabel(5, "DCAz selection"); - histos.add("ReassignedMFTtrackAmbDegree", "ReassignedMFTtrackAmbDegree", kTH1D, {cfgAxis.axisMFTAmbDegree}); - histos.add("AssignedMFTtrackAmbDegree", "AssignedMFTtrackAmbDegree", kTH1D, {cfgAxis.axisMFTAmbDegree}); - histos.add("FT0A_Amp", "FT0A_Amp", kTH1D, {cfgAxis.axisAmplitude}); histos.add("FT0A_Amp_gaincorrected", "FT0A_Amp_gaincorrected", kTH1D, {cfgAxis.axisAmplitude}); histos.add("FT0A_Channel_vs_Amp", "FT0A_Channel_vs_Amp", kTH2D, {cfgAxis.axisChannel, cfgAxis.axisAmplitude}); @@ -427,7 +429,7 @@ struct LongrangeMaker { return; } } - histos.fill(HIST("EventHist"), 13); + histos.fill(HIST("EventHist"), 15); for (std::size_t iCh = 0; iCh < ft0.channelA().size(); iCh++) { auto chanelid = ft0.channelA()[iCh]; float ampl = ft0.amplitudeA()[iCh]; @@ -483,12 +485,6 @@ struct LongrangeMaker { continue; } auto phi = itrack.phi(); - if (itrack.collisionId() != reassoMftTrack.bestCollisionId()) { - histos.fill(HIST("ReassignedMFTtrackAmbDegree"), reassoMftTrack.ambDegree()); - } - if (itrack.collisionId() == reassoMftTrack.bestCollisionId()) { - histos.fill(HIST("AssignedMFTtrackAmbDegree"), reassoMftTrack.ambDegree()); - } o2::math_utils::bringTo02Pi(phi); lrmfttracks(lrcollision.lastIndex(), reassoMftTrack.ambDegree(), @@ -497,7 +493,9 @@ struct LongrangeMaker { phi, itrack.nClusters(), reassoMftTrack.bestDCAXY(), - reassoMftTrack.bestDCAZ()); + reassoMftTrack.bestDCAZ(), + itrack.isCA(), + itrack.collisionId() != reassoMftTrack.bestCollisionId()); } // v0 loop @@ -664,12 +662,6 @@ struct LongrangeMaker { } auto phi = itrack.phi(); o2::math_utils::bringTo02Pi(phi); - if (itrack.collisionId() != reassoMftTrack.bestCollisionId()) { - histos.fill(HIST("ReassignedMFTtrackAmbDegree"), reassoMftTrack.ambDegree()); - } - if (itrack.collisionId() == reassoMftTrack.bestCollisionId()) { - histos.fill(HIST("AssignedMFTtrackAmbDegree"), reassoMftTrack.ambDegree()); - } upclrmfttracks(upclrcollision.lastIndex(), reassoMftTrack.ambDegree(), itrack.pt(), @@ -677,7 +669,9 @@ struct LongrangeMaker { phi, itrack.nClusters(), reassoMftTrack.bestDCAXY(), - reassoMftTrack.bestDCAZ()); + reassoMftTrack.bestDCAZ(), + itrack.isCA(), + itrack.collisionId() != reassoMftTrack.bestCollisionId()); } // v0 loop @@ -869,12 +863,6 @@ struct LongrangeMaker { } auto phi = itrack.phi(); o2::math_utils::bringTo02Pi(phi); - if (itrack.collisionId() != reassoMftTrack.bestCollisionId()) { - histos.fill(HIST("ReassignedMFTtrackAmbDegree"), reassoMftTrack.ambDegree()); - } - if (itrack.collisionId() == reassoMftTrack.bestCollisionId()) { - histos.fill(HIST("AssignedMFTtrackAmbDegree"), reassoMftTrack.ambDegree()); - } lrmfttracks(lrcollision.lastIndex(), reassoMftTrack.ambDegree(), itrack.pt(), @@ -882,7 +870,9 @@ struct LongrangeMaker { phi, itrack.nClusters(), reassoMftTrack.bestDCAXY(), - reassoMftTrack.bestDCAZ()); + reassoMftTrack.bestDCAZ(), + itrack.isCA(), + itrack.collisionId() != reassoMftTrack.bestCollisionId()); } for (const auto& particle : mcparticles) { @@ -1034,6 +1024,12 @@ struct LongrangeMaker { if (!isMftTrackSelected(track)) { continue; } + if (cfgmfttrksel.cfgRequireCA && !track.isCA()) { + continue; + } + if (cfgmfttrksel.cfgRequireLTF && track.isCA()) { + continue; + } if (!track.has_mcParticle()) continue; auto particle = track.mcParticle(); @@ -1096,22 +1092,30 @@ struct LongrangeMaker { return false; } histos.fill(HIST("EventHist"), 8); - if (cfgevtsel.isApplyNoCollInTimeRangeStandard && !col.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard)) { + if (cfgevtsel.isApplyNoCollInRofStandard && !col.selection_bit(o2::aod::evsel::kNoCollInRofStandard)) { return false; } histos.fill(HIST("EventHist"), 9); - if (cfgevtsel.isApplyNoCollInRofStandard && !col.selection_bit(o2::aod::evsel::kNoCollInRofStandard)) { + if (cfgevtsel.isApplyNoCollInRofStrict && !col.selection_bit(o2::aod::evsel::kNoCollInRofStrict)) { return false; } histos.fill(HIST("EventHist"), 10); - if (cfgevtsel.isApplyNoHighMultCollInPrevRof && !col.selection_bit(o2::aod::evsel::kNoHighMultCollInPrevRof)) { + if (cfgevtsel.isApplyNoCollInTimeRangeStandard && !col.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard)) { return false; } histos.fill(HIST("EventHist"), 11); - if (cfgevtsel.isApplyOccuSelection && (col.trackOccupancyInTimeRange() > cfgevtsel.cfgOccuCut)) { + if (cfgevtsel.isApplyNoCollInTimeRangeStrict && !col.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStrict)) { return false; } histos.fill(HIST("EventHist"), 12); + if (cfgevtsel.isApplyNoHighMultCollInPrevRof && !col.selection_bit(o2::aod::evsel::kNoHighMultCollInPrevRof)) { + return false; + } + histos.fill(HIST("EventHist"), 13); + if (cfgevtsel.isApplyOccuSelection && (col.trackOccupancyInTimeRange() > cfgevtsel.cfgOccuCut)) { + return false; + } + histos.fill(HIST("EventHist"), 14); return true; } @@ -1247,9 +1251,6 @@ struct LongrangeMaker { if constexpr (fillHis) { histos.fill(HIST("hMftTrkSel"), 5); } - if (cfgmfttrksel.cfgRequireCA && !track.isCA()) { - return false; - } if constexpr (fillHis) { histos.fill(HIST("hMftTrkSel"), 6); } diff --git a/PWGCF/TwoParticleCorrelations/Tasks/longrangecorrDerived.cxx b/PWGCF/TwoParticleCorrelations/Tasks/longrangecorrDerived.cxx index 866fcdeba90..79b3b67238c 100644 --- a/PWGCF/TwoParticleCorrelations/Tasks/longrangecorrDerived.cxx +++ b/PWGCF/TwoParticleCorrelations/Tasks/longrangecorrDerived.cxx @@ -76,6 +76,8 @@ struct LongrangecorrDerived { Configurable cfgMftDcaz{"cfgMftDcaz", 2.0f, "cut on DCA z for MFT tracks"}; Configurable cfgRejectAmbTrk{"cfgRejectAmbTrk", false, "Condition to reject Ambiguous tracks"}; Configurable cfgRejectNonAmbTrk{"cfgRejectNonAmbTrk", false, "Condition to reject Non-Ambiguous tracks"}; + Configurable cfgRequireCA{"cfgRequireCA", false, "Use Cellular Automaton track-finding algorithm"}; + Configurable cfgRequireLTF{"cfgRequireLTF", false, "Use LTF track-finding algorithm"}; } cfgSel; struct : ConfigurableGroup { @@ -203,10 +205,12 @@ struct LongrangecorrDerived { histos.add("TPCChi2NCl", "TPCChi2NCl", kTH1D, {cfgAxis.axisTPCChi2NCl}); histos.add("TPCdcaZ", "TPCdcaZ", kTH1D, {cfgAxis.axisTPCdcaZ}); - histos.add("MFTAmbDegree", "MFTAmbDegree", kTH1D, {cfgAxis.axisMFTAmbDegree}); histos.add("MFTNClusters", "MFTNClusters", kTH1D, {cfgAxis.axisMFTNClusters}); histos.add("MFTbestDCAXY", "MFTbestDCAXY", kTH1D, {cfgAxis.axisMFTbestDCAXY}); histos.add("MFTbestDCAZ", "MFTbestDCAZ", kTH1D, {cfgAxis.axisMFTbestDCAZ}); + + histos.add("ReassignedMFTtrackAmbDegree", "ReassignedMFTtrackAmbDegree", kTH1D, {cfgAxis.axisMFTAmbDegree}); + histos.add("AssignedMFTtrackAmbDegree", "AssignedMFTtrackAmbDegree", kTH1D, {cfgAxis.axisMFTAmbDegree}); } template @@ -233,6 +237,10 @@ struct LongrangecorrDerived { return false; if (cfgSel.cfgRejectNonAmbTrk && track.ambDegree() == 1) return false; + if (cfgSel.cfgRequireCA && !track.isCA()) + return false; + if (cfgSel.cfgRequireLTF && track.isCA()) + return false; return true; } else { return true; @@ -274,7 +282,11 @@ struct LongrangecorrDerived { histos.fill(HIST("MFTNClusters"), track.nClusters()); histos.fill(HIST("MFTbestDCAXY"), track.bestDCAXY()); histos.fill(HIST("MFTbestDCAZ"), track.bestDCAZ()); - histos.fill(HIST("MFTAmbDegree"), track.ambDegree()); + if (track.isReassigned()) { + histos.fill(HIST("ReassignedMFTtrackAmbDegree"), track.ambDegree()); + } else { + histos.fill(HIST("AssignedMFTtrackAmbDegree"), track.ambDegree()); + } } } @@ -292,7 +304,11 @@ struct LongrangecorrDerived { histos.fill(HIST("MFTNClusters"), track.nClusters()); histos.fill(HIST("MFTbestDCAXY"), track.bestDCAXY()); histos.fill(HIST("MFTbestDCAZ"), track.bestDCAZ()); - histos.fill(HIST("MFTAmbDegree"), track.ambDegree()); + if (track.isReassigned()) { + histos.fill(HIST("ReassignedMFTtrackAmbDegree"), track.ambDegree()); + } else { + histos.fill(HIST("AssignedMFTtrackAmbDegree"), track.ambDegree()); + } } }