Skip to content

Commit 9857c8b

Browse files
blacwovieblacwalibuild
authored
[PWGLF] enable DCA fitter (AliceO2Group#10728)
Co-authored-by: blacw <[email protected]> Co-authored-by: ALICE Action Bot <[email protected]>
1 parent 5a3a5a4 commit 9857c8b

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

PWGLF/TableProducer/Nuspex/he3HadronFemto.cxx

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ struct he3hadronfemto {
187187
Configurable<float> setting_cutNsigmaTOF{"setting_cutNsigmaTOF", 3.0f, "Value of the TOF Nsigma cut"};
188188
Configurable<int> setting_noMixedEvents{"setting_noMixedEvents", 5, "Number of mixed events per event"};
189189
Configurable<bool> setting_enableBkgUS{"setting_enableBkgUS", false, "Enable US background"};
190+
Configurable<bool> setting_enableDCAfitter{"setting_enableDCAfitter", false, "Enable DCA fitter"};
190191
Configurable<bool> setting_saveUSandLS{"setting_saveUSandLS", true, "Save All Pairs"};
191192
Configurable<bool> setting_isMC{"setting_isMC", false, "Run MC"};
192193
Configurable<bool> setting_fillMultiplicity{"setting_fillMultiplicity", false, "Fill multiplicity table"};
@@ -244,7 +245,7 @@ struct he3hadronfemto {
244245
{"hTrackSel", "Accepted tracks", {HistType::kTH1F, {{Selections::kAll, -0.5, static_cast<double>(Selections::kAll) - 0.5}}}},
245246
{"hEvents", "; Events;", {HistType::kTH1F, {{3, -0.5, 2.5}}}},
246247
{"hEmptyPool", "svPoolCreator did not find track pairs false/true", {HistType::kTH1F, {{2, -0.5, 1.5}}}},
247-
{"hDCAxyHe3", ";DCA_{xy} (cm)", {HistType::kTH1F, {{200, -1.0f, 1.0f}}}},
248+
{"hDCAxyHe3", ";DCA_{xy} (cm)", {HistType::kTH1F, {{200, -5.0f, 5.0f}}}},
248249
{"hDCAzHe3", ";DCA_{z} (cm)", {HistType::kTH1F, {{200, -1.0f, 1.0f}}}},
249250
{"hNClsHe3ITS", ";N_{ITS} Cluster", {HistType::kTH1F, {{20, -10.0f, 10.0f}}}},
250251
{"hNClsHadITS", ";N_{ITS} Cluster", {HistType::kTH1F, {{20, -10.0f, 10.0f}}}},
@@ -536,6 +537,7 @@ struct he3hadronfemto {
536537
return false;
537538
}
538539
he3Hadcand.collisionID = collIdxMin;
540+
539541
} else {
540542
he3Hadcand.collisionID = collBracket.getMin();
541543
}
@@ -564,11 +566,21 @@ struct he3hadronfemto {
564566
he3Hadcand.signHe3 = trackHe3.sign();
565567
he3Hadcand.signHad = trackHad.sign();
566568

567-
he3Hadcand.DCAxyHe3 = trackHe3.dcaXY();
569+
gpu::gpustd::array<float, 2> dcaInfo;
570+
if (setting_enableDCAfitter) {
571+
auto trackCovHe3 = getTrackParCov(trackHe3);
572+
auto trackCovHad = getTrackParCov(trackHad);
573+
auto collision = collisions.rawIteratorAt(he3Hadcand.collisionID);
574+
o2::base::Propagator::Instance()->propagateToDCABxByBz({collision.posX(), collision.posY(), collision.posZ()}, trackCovHe3, 2.f, m_fitter.getMatCorrType(), &dcaInfo);
575+
he3Hadcand.DCAxyHe3 = dcaInfo[0];
576+
o2::base::Propagator::Instance()->propagateToDCABxByBz({collision.posX(), collision.posY(), collision.posZ()}, trackCovHad, 2.f, m_fitter.getMatCorrType(), &dcaInfo);
577+
he3Hadcand.DCAxyHad = dcaInfo[0];
578+
} else {
579+
he3Hadcand.DCAxyHe3 = trackHe3.dcaXY();
580+
he3Hadcand.DCAxyHad = trackHad.dcaXY();
581+
}
568582
he3Hadcand.DCAzHe3 = trackHe3.dcaZ();
569-
he3Hadcand.DCAxyHad = trackHad.dcaXY();
570583
he3Hadcand.DCAzHad = trackHad.dcaZ();
571-
572584
he3Hadcand.tpcSignalHe3 = trackHe3.tpcSignal();
573585
bool heliumPID = trackHe3.pidForTracking() == o2::track::PID::Helium3 || trackHe3.pidForTracking() == o2::track::PID::Alpha;
574586
float correctedTPCinnerParamHe3 = (heliumPID && setting_compensatePIDinTracking) ? trackHe3.tpcInnerParam() / 2.f : trackHe3.tpcInnerParam();

0 commit comments

Comments
 (0)