Skip to content

Commit 898abdd

Browse files
authored
[PWGCF] pT dependent DCAxy cut for DiHadron
1 parent 2f8569a commit 898abdd

2 files changed

Lines changed: 33 additions & 3 deletions

File tree

PWGCF/TwoParticleCorrelations/Tasks/diHadronCor.cxx

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ struct DiHadronCor {
7373
O2_DEFINE_CONFIGURABLE(cfgCutTPCCrossedRows, float, 70.0f, "minimum TPC crossed rows")
7474
O2_DEFINE_CONFIGURABLE(cfgCutITSclu, float, 5.0f, "minimum ITS clusters")
7575
O2_DEFINE_CONFIGURABLE(cfgCutDCAz, float, 2.0f, "max DCA to vertex z")
76+
O2_DEFINE_CONFIGURABLE(cfgCutDCAxy, float, -1.0f, "max DCA to vertex xy, pT dependent in terms of N sigma. -1 for default cut")
77+
O2_DEFINE_CONFIGURABLE(cfgDCAxyFunc, std::string, "(0.0026+0.005/(x^1.01))", "Functional form of pt-dependent DCAxy cut")
78+
TF1* fPtDepDCAxy = nullptr;
7679
O2_DEFINE_CONFIGURABLE(cfgCutMerging, float, 0.0, "Merging cut on track merge")
7780
O2_DEFINE_CONFIGURABLE(cfgSelCollByNch, bool, true, "Select collisions by Nch or centrality")
7881
O2_DEFINE_CONFIGURABLE(cfgCutMultMin, int, 0, "Minimum multiplicity for collision")
@@ -160,7 +163,7 @@ struct DiHadronCor {
160163

161164
// make the filters and cuts.
162165
Filter collisionFilter = (nabs(aod::collision::posZ) < cfgCutVtxZ);
163-
Filter trackFilter = (nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPtMin) && (aod::track::pt < cfgCutPtMax) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t) true)) && (aod::track::tpcChi2NCl < cfgCutChi2prTPCcls) && (nabs(aod::track::dcaZ) < cfgCutDCAz);
166+
Filter trackFilter = (nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPtMin) && (aod::track::pt < cfgCutPtMax) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t)true)) && (aod::track::tpcChi2NCl < cfgCutChi2prTPCcls) && (nabs(aod::track::dcaZ) < cfgCutDCAz);
164167
using FilteredCollisions = soa::Filtered<soa::Join<aod::Collisions, aod::EvSel, aod::CentFT0Cs, aod::CentFT0CVariant1s, aod::CentFT0Ms, aod::CentFV0As, aod::Mults>>;
165168
using FilteredTracks = soa::Filtered<soa::Join<aod::Tracks, aod::TrackSelection, aod::TracksExtra, aod::TracksDCA>>;
166169
using FilteredTracksWithMCLabels = soa::Filtered<soa::Join<aod::Tracks, aod::TrackSelection, aod::TracksExtra, aod::TracksDCA, aod::McTrackLabels>>;
@@ -287,6 +290,7 @@ struct DiHadronCor {
287290
registry.add("zVtx", "zVtx", {HistType::kTH1D, {axisVertex}});
288291
registry.add("zVtx_used", "zVtx_used", {HistType::kTH1D, {axisVertex}});
289292
registry.add("Trig_hist", "", {HistType::kTHnSparseF, {{axisSample, axisVertex, axisPtTrigger}}});
293+
registry.add("hDCAxy", "DCAxy after cuts; DCAxy (cm); Pt", {HistType::kTH2D, {{200, -1., 1.}, {200, 0, 5}}});
290294
}
291295
if (cfgSoloPtTrack && doprocessSame) {
292296
registry.add("Nch_final_pt", "pT", {HistType::kTH1D, {axisPtTrigger}});
@@ -345,6 +349,12 @@ struct DiHadronCor {
345349
same.setObject(new CorrelationContainer("sameEvent", "sameEvent", corrAxis, effAxis, userAxis));
346350
mixed.setObject(new CorrelationContainer("mixedEvent", "mixedEvent", corrAxis, effAxis, userAxis));
347351

352+
if (cfgCutDCAxy > 0.) {
353+
fPtDepDCAxy = new TF1("ptDepDCAxy", Form("[0]*%s", cfgDCAxyFunc->c_str()), 0.001, 1000);
354+
fPtDepDCAxy->SetParameter(0, cfgCutDCAxy);
355+
LOGF(info, "DCAxy pt-dependence function: %s", Form("%0.1f * %s", cfgCutDCAxy.value, cfgDCAxyFunc->c_str()));
356+
}
357+
348358
LOGF(info, "End of init");
349359
}
350360

@@ -389,6 +399,9 @@ struct DiHadronCor {
389399
template <typename TTrack>
390400
bool trackSelected(TTrack track)
391401
{
402+
if (cfgCutDCAxy > 0. && (std::fabs(track.dcaXY()) > fPtDepDCAxy->Eval(track.pt())))
403+
return false;
404+
392405
return ((track.tpcNClsFound() >= cfgCutTPCclu) && (track.tpcNClsCrossedRows() >= cfgCutTPCCrossedRows) && (track.itsNCls() >= cfgCutITSclu));
393406
}
394407

@@ -544,6 +557,7 @@ struct DiHadronCor {
544557
if (system == SameEvent) {
545558
registry.fill(HIST("Trig_hist"), fSampleIndex, posZ, track1.pt(), eventWeight * triggerWeight);
546559
}
560+
registry.fill(HIST("hDCAxy"), track1.dcaXY(), track1.pt());
547561

548562
for (auto const& track2 : tracks2) {
549563

PWGCF/TwoParticleCorrelations/Tasks/flowDecorrelation.cxx

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,9 @@ struct FlowDecorrelation {
7272
O2_DEFINE_CONFIGURABLE(cfgCutTPCCrossedRows, float, 70.0f, "minimum TPC crossed rows")
7373
O2_DEFINE_CONFIGURABLE(cfgCutITSclu, float, 5.0f, "minimum ITS clusters")
7474
O2_DEFINE_CONFIGURABLE(cfgCutDCAz, float, 2.0f, "max DCA to vertex z")
75-
O2_DEFINE_CONFIGURABLE(cfgCutDCAxy, float, 7.0f, "max DCA to vertex xy")
75+
O2_DEFINE_CONFIGURABLE(cfgCutDCAxy, float, -1.0f, "max DCA to vertex xy, pT dependent in terms of N sigma. -1 for default cut")
76+
O2_DEFINE_CONFIGURABLE(cfgDCAxyFunc, std::string, "(0.0026+0.005/(x^1.01))", "Functional form of pt-dependent DCAxy cut")
77+
TF1* fPtDepDCAxy = nullptr;
7678
O2_DEFINE_CONFIGURABLE(cfgCutMultMin, int, 0, "Minimum multiplicity for collision")
7779
O2_DEFINE_CONFIGURABLE(cfgCutMultMax, int, 10, "Maximum multiplicity for collision")
7880
O2_DEFINE_CONFIGURABLE(cfgCutCentMin, float, 60.0f, "Minimum centrality for collision")
@@ -181,7 +183,7 @@ struct FlowDecorrelation {
181183
AxisSpec axisChID = {220, 0, 220};
182184
// make the filters and cuts.
183185
Filter collisionFilter = (nabs(aod::collision::posZ) < cfgGeneralCuts.cfgCutVtxZ);
184-
Filter trackFilter = (aod::track::pt > cfgGeneralCuts.cfgCutPtMin) && (aod::track::pt < cfgGeneralCuts.cfgCutPtMax) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == static_cast<uint8_t>(true))) && (aod::track::tpcChi2NCl < cfgGeneralCuts.cfgCutChi2prTPCcls) && (nabs(aod::track::dcaZ) < cfgGeneralCuts.cfgCutDCAz) && (nabs(aod::track::dcaXY) < cfgGeneralCuts.cfgCutDCAxy);
186+
Filter trackFilter = (aod::track::pt > cfgGeneralCuts.cfgCutPtMin) && (aod::track::pt < cfgGeneralCuts.cfgCutPtMax) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == static_cast<uint8_t>(true))) && (aod::track::tpcChi2NCl < cfgGeneralCuts.cfgCutChi2prTPCcls) && (nabs(aod::track::dcaZ) < cfgGeneralCuts.cfgCutDCAz);
185187
using FilteredCollisions = soa::Filtered<soa::Join<aod::Collisions, aod::EvSel, aod::CentFT0Cs, aod::CentFT0CVariant1s, aod::CentFT0Ms, aod::CentFV0As, aod::Mults>>;
186188
using FilteredTracks = soa::Filtered<soa::Join<aod::Tracks, aod::TrackSelection, aod::TracksExtra, aod::TracksDCA>>;
187189

@@ -370,6 +372,7 @@ struct FlowDecorrelation {
370372
if (doprocessSameTpcFt0a || doprocessSameTpcFt0c || doprocessSameFt0aFt0c || doprocessSameTpcMft || doprocessSameTpcFv0) {
371373
registry.add("Phi", "Phi", {HistType::kTH1D, {axisPhi}});
372374
registry.add("Eta", "Eta", {HistType::kTH1D, {axisEta}});
375+
registry.add("hDCAxy", "DCAxy after cuts; DCAxy (cm); Pt", {HistType::kTH2D, {{200, -1., 1.}, {200, 0, 5}}});
373376
registry.add("EtaCorrected", "EtaCorrected", {HistType::kTH1D, {axisEta}});
374377
registry.add("Nch", "N_{ch}", {HistType::kTH1D, {axisMultiplicity}});
375378
registry.add("Nch_used", "N_{ch}", {HistType::kTH1D, {axisMultiplicity}}); // histogram to see how many events are in the same and mixed event
@@ -494,6 +497,13 @@ struct FlowDecorrelation {
494497
same.setObject(new CorrelationContainer("sameEvent_TPC_FV0", "sameEvent_TPC_FT0A", corrAxisTpcFt0a, effAxis, userAxis));
495498
mixed.setObject(new CorrelationContainer("mixedEvent_TPC_FV0", "mixedEvent_TPC_FT0A", corrAxisTpcFt0a, effAxis, userAxis));
496499
}
500+
501+
if (cfgGeneralCuts.cfgCutDCAxy > 0.) {
502+
cfgGeneralCuts.fPtDepDCAxy = new TF1("ptDepDCAxy", Form("[0]*%s", cfgGeneralCuts.cfgDCAxyFunc->c_str()), 0.001, 1000);
503+
cfgGeneralCuts.fPtDepDCAxy->SetParameter(0, cfgGeneralCuts.cfgCutDCAxy);
504+
LOGF(info, "DCAxy pt-dependence function: %s", Form("%0.1f * %s", cfgGeneralCuts.cfgCutDCAxy.value, cfgGeneralCuts.cfgDCAxyFunc->c_str()));
505+
}
506+
497507
LOGF(info, "End of init");
498508
}
499509

@@ -615,6 +625,9 @@ struct FlowDecorrelation {
615625
template <typename TTrack>
616626
bool trackSelected(TTrack track)
617627
{
628+
if (cfgGeneralCuts.cfgCutDCAxy > 0. && (std::fabs(track.dcaXY()) > cfgGeneralCuts.fPtDepDCAxy->Eval(track.pt())))
629+
return false;
630+
618631
return ((track.tpcNClsFound() >= cfgGeneralCuts.cfgCutTPCclu) && (track.tpcNClsCrossedRows() >= cfgGeneralCuts.cfgCutTPCCrossedRows) && (track.itsNCls() >= cfgGeneralCuts.cfgCutITSclu));
619632
}
620633

@@ -788,6 +801,7 @@ struct FlowDecorrelation {
788801
if (cfgDrawEtaPhiDis && corType == kFT0A)
789802
registry.fill(HIST("EtaPhi"), track1.eta(), track1.phi(), eventWeight * triggerWeight);
790803
}
804+
registry.fill(HIST("hDCAxy"), track1.dcaXY(), track1.pt());
791805

792806
std::size_t channelSize = 0;
793807
if (corType == kFT0A)
@@ -920,6 +934,7 @@ struct FlowDecorrelation {
920934
if (system == SameEvent) {
921935
registry.fill(HIST("Trig_hist_TPC_FV0"), fSampleIndex, posZ, track1.eta(), eventWeight * triggerWeight);
922936
}
937+
registry.fill(HIST("hDCAxy"), track1.dcaXY(), track1.pt());
923938

924939
std::size_t channelSize = 0;
925940
channelSize = fv0.channel().size();
@@ -1474,6 +1489,7 @@ struct FlowDecorrelation {
14741489
if (system == SameEvent) {
14751490
registry.fill(HIST("Trig_hist_TPC_MFT"), fSampleIndex, posZ, track1.pt(), eventWeight * triggerWeight);
14761491
}
1492+
registry.fill(HIST("hDCAxy"), track1.dcaXY(), track1.pt());
14771493

14781494
for (auto const& track2 : tracks2) {
14791495

0 commit comments

Comments
 (0)