Skip to content

Commit c981483

Browse files
authored
[PWGCF] diHadron, flowDecorr DCAxy cut update
1 parent 8e36596 commit c981483

2 files changed

Lines changed: 40 additions & 23 deletions

File tree

PWGCF/TwoParticleCorrelations/Tasks/diHadronCor.cxx

Lines changed: 17 additions & 3 deletions
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

@@ -425,14 +438,14 @@ struct DiHadronCor {
425438
if (mEfficiency == nullptr) {
426439
LOGF(fatal, "Could not load efficiency histogram for trigger particles from %s", cfgEfficiency.value.c_str());
427440
}
428-
LOGF(info, "Loaded efficiency histogram from %s (%p)", cfgEfficiency.value.c_str(), (void*)mEfficiency);
441+
LOGF(info, "Loaded efficiency histogram from %s (%p)", cfgEfficiency.value.c_str(), static_cast<void*>(mEfficiency));
429442
}
430443
if (cfgCentralityWeight.value.empty() == false) {
431444
mCentralityWeight = ccdb->getForTimeStamp<TH1D>(cfgCentralityWeight, timestamp);
432445
if (mCentralityWeight == nullptr) {
433446
LOGF(fatal, "Could not load efficiency histogram for trigger particles from %s", cfgCentralityWeight.value.c_str());
434447
}
435-
LOGF(info, "Loaded efficiency histogram from %s (%p)", cfgCentralityWeight.value.c_str(), (void*)mCentralityWeight);
448+
LOGF(info, "Loaded efficiency histogram from %s (%p)", cfgCentralityWeight.value.c_str(), static_cast<void*>(mCentralityWeight));
436449
}
437450
correctionsLoaded = true;
438451
}
@@ -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: 23 additions & 20 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

@@ -200,8 +202,8 @@ struct FlowDecorrelation {
200202
o2::ft0::Geometry ft0Det;
201203
o2::fv0::Geometry* fv0Det{};
202204
static constexpr uint64_t Ft0IndexA = 96;
203-
std::vector<o2::detectors::AlignParam>* offsetFT0;
204-
std::vector<o2::detectors::AlignParam>* offsetFV0;
205+
std::vector<o2::detectors::AlignParam>* offsetFT0{};
206+
std::vector<o2::detectors::AlignParam>* offsetFV0{};
205207
std::vector<float> cstFT0RelGain{};
206208

207209
// Corrections
@@ -256,9 +258,6 @@ struct FlowDecorrelation {
256258
kFT0COuterRingMin = 144,
257259
kFT0COuterRingMax = 207
258260
};
259-
std::array<float, 6> tofNsigmaCut;
260-
std::array<float, 6> itsNsigmaCut;
261-
std::array<float, 6> tpcNsigmaCut;
262261
struct Ft0cCConstants {
263262
double zFt0cDistance = -83.44;
264263
double maxWidth = 12.;
@@ -283,7 +282,6 @@ struct FlowDecorrelation {
283282
LOGF(fatal, "Centrality table is unavailable, cannot select collisions by centrality");
284283
}
285284
const AxisSpec axisPhi{72, 0.0, constants::math::TwoPI, "#varphi"};
286-
const AxisSpec axisEta{40, -1., 1., "#eta"};
287285
const AxisSpec axisEtaFull{90, -6., 6., "#eta"};
288286
const AxisSpec axisCentrality{20, 0., 100., "cent"};
289287

@@ -370,6 +368,7 @@ struct FlowDecorrelation {
370368
if (doprocessSameTpcFt0a || doprocessSameTpcFt0c || doprocessSameFt0aFt0c || doprocessSameTpcMft || doprocessSameTpcFv0) {
371369
registry.add("Phi", "Phi", {HistType::kTH1D, {axisPhi}});
372370
registry.add("Eta", "Eta", {HistType::kTH1D, {axisEta}});
371+
registry.add("hDCAxy", "DCAxy after cuts; DCAxy (cm); Pt", {HistType::kTH2D, {{200, -1., 1.}, {200, 0, 5}}});
373372
registry.add("EtaCorrected", "EtaCorrected", {HistType::kTH1D, {axisEta}});
374373
registry.add("Nch", "N_{ch}", {HistType::kTH1D, {axisMultiplicity}});
375374
registry.add("Nch_used", "N_{ch}", {HistType::kTH1D, {axisMultiplicity}}); // histogram to see how many events are in the same and mixed event
@@ -494,6 +493,13 @@ struct FlowDecorrelation {
494493
same.setObject(new CorrelationContainer("sameEvent_TPC_FV0", "sameEvent_TPC_FT0A", corrAxisTpcFt0a, effAxis, userAxis));
495494
mixed.setObject(new CorrelationContainer("mixedEvent_TPC_FV0", "mixedEvent_TPC_FT0A", corrAxisTpcFt0a, effAxis, userAxis));
496495
}
496+
497+
if (cfgGeneralCuts.cfgCutDCAxy > 0.) {
498+
cfgGeneralCuts.fPtDepDCAxy = new TF1("ptDepDCAxy", Form("[0]*%s", cfgGeneralCuts.cfgDCAxyFunc->c_str()), 0.001, 1000);
499+
cfgGeneralCuts.fPtDepDCAxy->SetParameter(0, cfgGeneralCuts.cfgCutDCAxy);
500+
LOGF(info, "DCAxy pt-dependence function: %s", Form("%0.1f * %s", cfgGeneralCuts.cfgCutDCAxy.value, cfgGeneralCuts.cfgDCAxyFunc->c_str()));
501+
}
502+
497503
LOGF(info, "End of init");
498504
}
499505

@@ -615,6 +621,9 @@ struct FlowDecorrelation {
615621
template <typename TTrack>
616622
bool trackSelected(TTrack track)
617623
{
624+
if (cfgGeneralCuts.cfgCutDCAxy > 0. && (std::fabs(track.dcaXY()) > cfgGeneralCuts.fPtDepDCAxy->Eval(track.pt())))
625+
return false;
626+
618627
return ((track.tpcNClsFound() >= cfgGeneralCuts.cfgCutTPCclu) && (track.tpcNClsCrossedRows() >= cfgGeneralCuts.cfgCutTPCCrossedRows) && (track.itsNCls() >= cfgGeneralCuts.cfgCutITSclu));
619628
}
620629

@@ -671,14 +680,14 @@ struct FlowDecorrelation {
671680
if (mEfficiency == nullptr) {
672681
LOGF(fatal, "Could not load efficiency histogram for trigger particles from %s", cfgEfficiency.value.c_str());
673682
}
674-
LOGF(info, "Loaded efficiency histogram from %s (%p)", cfgEfficiency.value.c_str(), (void*)mEfficiency);
683+
LOGF(info, "Loaded efficiency histogram from %s (%p)", cfgEfficiency.value.c_str(), static_cast<void*>(mEfficiency));
675684
}
676685
if (cfgCentralityWeight.value.empty() == false) {
677686
mCentralityWeight = ccdb->getForTimeStamp<TH1D>(cfgCentralityWeight, timestamp);
678687
if (mCentralityWeight == nullptr) {
679688
LOGF(fatal, "Could not load efficiency histogram for trigger particles from %s", cfgCentralityWeight.value.c_str());
680689
}
681-
LOGF(info, "Loaded efficiency histogram from %s (%p)", cfgCentralityWeight.value.c_str(), (void*)mCentralityWeight);
690+
LOGF(info, "Loaded efficiency histogram from %s (%p)", cfgCentralityWeight.value.c_str(), static_cast<void*>(mCentralityWeight));
682691
}
683692
correctionsLoaded = true;
684693
}
@@ -788,6 +797,7 @@ struct FlowDecorrelation {
788797
if (cfgDrawEtaPhiDis && corType == kFT0A)
789798
registry.fill(HIST("EtaPhi"), track1.eta(), track1.phi(), eventWeight * triggerWeight);
790799
}
800+
registry.fill(HIST("hDCAxy"), track1.dcaXY(), track1.pt());
791801

792802
std::size_t channelSize = 0;
793803
if (corType == kFT0A)
@@ -920,6 +930,7 @@ struct FlowDecorrelation {
920930
if (system == SameEvent) {
921931
registry.fill(HIST("Trig_hist_TPC_FV0"), fSampleIndex, posZ, track1.eta(), eventWeight * triggerWeight);
922932
}
933+
registry.fill(HIST("hDCAxy"), track1.dcaXY(), track1.pt());
923934

924935
std::size_t channelSize = 0;
925936
channelSize = fv0.channel().size();
@@ -1093,8 +1104,6 @@ struct FlowDecorrelation {
10931104
if (y < (Ft0aLocations.blockFar + Ft0aLocations.offSetY) && y > (Ft0aLocations.blockClose + Ft0aLocations.offSetY)) {
10941105
return true;
10951106
}
1096-
}
1097-
if (x < (Ft0aLocations.blockFar + Ft0aLocations.offSetX) && x > (Ft0aLocations.blockClose + Ft0aLocations.offSetX)) {
10981107
if (y > (-Ft0aLocations.blockFar + Ft0aLocations.offSetY) && y < (-Ft0aLocations.blockClose + Ft0aLocations.offSetY)) {
10991108
return true;
11001109
}
@@ -1104,8 +1113,6 @@ struct FlowDecorrelation {
11041113
if (y < (Ft0aLocations.blockFar + Ft0aLocations.offSetY) && y > (Ft0aLocations.blockClose + Ft0aLocations.offSetY)) {
11051114
return true;
11061115
}
1107-
}
1108-
if (x > (-Ft0aLocations.blockFar + Ft0aLocations.offSetX) && x < (-Ft0aLocations.blockClose + Ft0aLocations.offSetX)) {
11091116
if (y > (-Ft0aLocations.blockFar + Ft0aLocations.offSetY) && y < (-Ft0aLocations.blockClose + Ft0aLocations.offSetY)) {
11101117
return true;
11111118
}
@@ -1115,9 +1122,6 @@ struct FlowDecorrelation {
11151122
if (y > (-Ft0aLocations.blockFar + Ft0aLocations.offSetY - Ft0aLocations.rectOffSet) && y < (-Ft0aLocations.blockClose + Ft0aLocations.offSetY - Ft0aLocations.rectOffSet)) {
11161123
return true;
11171124
}
1118-
}
1119-
1120-
if (x < (Ft0aLocations.blockClose + Ft0aLocations.offSetX) && x > (-Ft0aLocations.blockClose + Ft0aLocations.offSetX)) {
11211125
if (y < (Ft0aLocations.blockFar + Ft0aLocations.offSetY + Ft0aLocations.rectOffSet) && y > (Ft0aLocations.blockClose + Ft0aLocations.offSetY + Ft0aLocations.rectOffSet)) {
11221126
return true;
11231127
}
@@ -1127,13 +1131,11 @@ struct FlowDecorrelation {
11271131
if (x > (-Ft0aLocations.blockFar + Ft0aLocations.offSetX - Ft0aLocations.rectOffSet) && x < (-Ft0aLocations.blockClose + Ft0aLocations.offSetX - Ft0aLocations.rectOffSet)) {
11281132
return true;
11291133
}
1130-
}
1131-
1132-
if (y < (Ft0aLocations.blockClose + Ft0aLocations.offSetY) && y > (-Ft0aLocations.blockClose + Ft0aLocations.offSetY)) {
11331134
if (x < (Ft0aLocations.blockFar + Ft0aLocations.offSetX + Ft0aLocations.rectOffSet) && x > (Ft0aLocations.blockClose + Ft0aLocations.offSetX + Ft0aLocations.rectOffSet)) {
11341135
return true;
11351136
}
11361137
}
1138+
11371139
return false;
11381140
}
11391141

@@ -1474,6 +1476,7 @@ struct FlowDecorrelation {
14741476
if (system == SameEvent) {
14751477
registry.fill(HIST("Trig_hist_TPC_MFT"), fSampleIndex, posZ, track1.pt(), eventWeight * triggerWeight);
14761478
}
1479+
registry.fill(HIST("hDCAxy"), track1.dcaXY(), track1.pt());
14771480

14781481
for (auto const& track2 : tracks2) {
14791482

0 commit comments

Comments
 (0)