Skip to content

Commit b4afdc0

Browse files
committed
save, not validated
1 parent f01540d commit b4afdc0

1 file changed

Lines changed: 31 additions & 2 deletions

File tree

PWGHF/HFC/Tasks/taskFlow.cxx

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ enum MftTrackSelectionStep {
138138
DCAxy,
139139
DCAz,
140140
Chi2OverNdf,
141+
Phi,
141142
IsLTF,
142143
IsCA,
143144
NMftTrackSelectionSteps
@@ -304,9 +305,14 @@ struct HfTaskFlow {
304305
Configurable<float> mftMaxDCAxy{"mftMaxDCAxy", 2.0f, "Cut on dcaXY for MFT tracks"};
305306
Configurable<float> mftMaxDCAz{"mftMaxDCAz", 2.0f, "Cut on dcaZ for MFT tracks"};
306307
Configurable<int> nClustersMftTrack{"nClustersMftTrack", 5, "Minimum number of clusters for the reconstruction of MFT tracks"};
308+
Configurable<float> phiMftTrackMin{"phiMftTrackMin", 0.1, "Minimum value for the phi of MFT tracks when used in cut function"};
309+
Configurable<float> phiMftTrackMiddleMin{"phiMftTrackMiddleMin", PI - 0.1, "cut to remove before phi = pi for MFT tracks when used in cut function"};
310+
Configurable<float> phiMftTrackMiddleMax{"phiMftTrackMiddleMax", PI + 0.1, "cut to remove after phi = pi for MFT tracks when used in cut function"};
311+
Configurable<float> phiMftTrackMax{"phiMftTrackMax", 2 * PI - 0.1, "Maximum value for the phi of MFT tracks when used in cut function"};
307312
Configurable<float> ptMftTrackMax{"ptMftTrackMax", 10.0f, "max value of MFT tracks pT when used in cut function"};
308313
Configurable<float> ptMftTrackMin{"ptMftTrackMin", 0.f, "min value of MFT tracks pT when used in cut function"};
309314
Configurable<bool> useMftChi2OverNdfCut{"useMftChi2OverNdfCut", false, "use mft track chi2/ndf cut"};
315+
Configurable<bool> useMftPhiCut{"useMftPhiCut", false, "if true, use the Mft phi function cut"};
310316
Configurable<bool> useMftPtCut{"useMftPtCut", false, "if true, use the Mft pt function cut"};
311317
Configurable<bool> useOnlyCATracks{"useOnlyCATracks", false, "if true, use strictly MFT tracks reconstructed with CA algo."};
312318
Configurable<bool> useOnlyLTFTracks{"useOnlyLTFTracks", false, "if true, use strictly MFT tracks reconstructed with LTF algo."};
@@ -508,6 +514,7 @@ struct HfTaskFlow {
508514
labelsMftTracksSelection[MftTrackSelectionStep::DCAxy] = "MFT tracks after DCAxy selection";
509515
labelsMftTracksSelection[MftTrackSelectionStep::DCAz] = "MFT tracks after DCAz selection";
510516
labelsMftTracksSelection[MftTrackSelectionStep::Chi2OverNdf] = "MFT tracks after Chi2OverNdf selection";
517+
labelsMftTracksSelection[MftTrackSelectionStep::Phi] = "MFT tracks after phi selection";
511518
labelsMftTracksSelection[MftTrackSelectionStep::IsLTF] = "Linear Track Finder MFT tracks";
512519
labelsMftTracksSelection[MftTrackSelectionStep::IsCA] = "Cellular Automaton MFT tracks";
513520
registry.get<TH1>(HIST("Data/Mft/hMftTracksSelection"))->SetMinimum(0);
@@ -1465,6 +1472,18 @@ struct HfTaskFlow {
14651472
registry.fill(HIST("Data/Mft/hMftTracksSelection"), MftTrackSelectionStep::Chi2OverNdf);
14661473
}
14671474

1475+
if (configMft.useMftPhiCut) {
1476+
auto phiMftTrack = mftTrack.phi();
1477+
o2::math_utils::bringTo02Pi(phiMftTrack);
1478+
if (phiMftTrack > configMft.phiMftTrackMax || phiMftTrack < configMft.phiMftTrackMin ||
1479+
(phiMftTrack > configMft.phiMftTrackMiddleMin && phiMftTrack < configMft.phiMftTrackMiddleMax)) {
1480+
return false;
1481+
}
1482+
}
1483+
if (fillHistograms) {
1484+
registry.fill(HIST("Data/Mft/hMftTracksSelection"), MftTrackSelectionStep::Phi);
1485+
}
1486+
14681487
// cut on the track algorithm of MFT tracks
14691488
if (mftTrack.isCA()) {
14701489
if (fillHistograms) {
@@ -4368,8 +4387,18 @@ struct HfTaskFlow {
43684387
particle.eta() >= configTask.etaMcParticlesAssocMin &&
43694388
particle.pt() >= configTask.ptMcParticlesAssocMin &&
43704389
particle.pt() <= configTask.ptMcParticlesAssocMax) {
4371-
if (hasReconstructedCollision) {
4372-
registry.fill(HIST("MC/hEfficiencyAssociated"), particle.pt(), particle.eta(), mcCollision.posZ());
4390+
4391+
if (configMft.useMftPhiCut) {
4392+
if (particle.phi() < configMft.phiMftTrackMax && particle.phi() > configMft.phiMftTrackMin &&
4393+
!(particle.phi() > configMft.phiMftTrackMiddleMin && particle.phi() < configMft.phiMftTrackMiddleMax)) {
4394+
if (hasReconstructedCollision) {
4395+
registry.fill(HIST("MC/hEfficiencyAssociated"), particle.pt(), particle.eta(), mcCollision.posZ());
4396+
}
4397+
}
4398+
} else {
4399+
if (hasReconstructedCollision) {
4400+
registry.fill(HIST("MC/hEfficiencyAssociated"), particle.pt(), particle.eta(), mcCollision.posZ());
4401+
}
43734402
}
43744403
}
43754404
}

0 commit comments

Comments
 (0)