Skip to content

Commit c8bfac3

Browse files
authored
[PWGEM/Dilepton] add max. diff. chi2 MFT-MCH (#17104)
1 parent 6a9f216 commit c8bfac3

2 files changed

Lines changed: 16 additions & 8 deletions

File tree

PWGEM/Dilepton/Core/DileptonSV.h

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,7 @@ struct DileptonSV {
328328
o2::framework::Configurable<float> cfg_max_dcaxy{"cfg_max_dcaxy", 1e+10, "max dca XY for single track in cm"};
329329
o2::framework::Configurable<float> cfg_min_rabs{"cfg_min_rabs", 17.6, "min Radius at the absorber end"};
330330
o2::framework::Configurable<float> cfg_max_rabs{"cfg_max_rabs", 89.5, "max Radius at the absorber end"};
331+
o2::framework::Configurable<float> cfg_max_diff_chi2_mftmch{"cfg_max_diff_chi2_mftmch", -1.f, "max. diff chi2MatchingMCHMFT between the best and the 2nd best matched candidates"};
331332
o2::framework::Configurable<bool> enableTTCA{"enableTTCA", true, "Flag to enable or disable TTCA"};
332333
o2::framework::Configurable<float> cfg_max_relDPt_wrt_matchedMCHMID{"cfg_max_relDPt_wrt_matchedMCHMID", 1e+10f, "max. relative dpt between MFT-MCH-MID and MCH-MID"};
333334
o2::framework::Configurable<float> cfg_max_DEta_wrt_matchedMCHMID{"cfg_max_DEta_wrt_matchedMCHMID", 1e+10f, "max. deta between MFT-MCH-MID and MCH-MID"};
@@ -352,24 +353,24 @@ struct DileptonSV {
352353
std::string prefix = "dfGroup";
353354
o2::framework::Configurable<bool> useAbsDCA{"useAbsDCA", true, "Minimise abs. distance rather than chi2"};
354355
o2::framework::Configurable<bool> useWeightedFinalPCA{"useWeightedFinalPCA", false, "Recalculate vertex position using track covariances, effective only if useAbsDCA is true"};
355-
o2::framework::Configurable<double> maxR{"maxR", 10.f, "reject PCA's above this radius"};
356+
o2::framework::Configurable<double> maxR{"maxR", 20.f, "reject PCA's above this radius"};
356357
o2::framework::Configurable<double> maxDZIni{"maxDZIni", 4.f, "reject (if > 0) PCA candidate if tracks DZ exceeds threshold"};
357358
o2::framework::Configurable<double> minParamChange{"minParamChange", 1e-3, "stop iterations if largest change of any X is smaller than this"};
358359
o2::framework::Configurable<double> minRelChi2Change{"minRelChi2Change", 0.9, "stop iterations is chi2/chi2old > this"};
359360
o2::framework::Configurable<bool> propagateToPCA{"propagateToPCA", true, "create tracks version propagated to PCA"};
360-
o2::framework::Configurable<float> maxLog10Chi2PCA{"maxLog10Chi2PCA", 0, "max. log10(chi2PCA) for dilepton pair"};
361+
o2::framework::Configurable<float> maxLog10Chi2PCA{"maxLog10Chi2PCA", 10, "max. log10(chi2PCA) for dilepton pair"};
361362
} dfGroup; // for DCAFitterN
362363

363364
struct : o2::framework::ConfigurableGroup {
364365
std::string prefix = "fdfGroup";
365366
o2::framework::Configurable<bool> useAbsDCA{"useAbsDCA", true, "Minimise abs. distance rather than chi2"};
366367
o2::framework::Configurable<bool> useWeightedFinalPCA{"useWeightedFinalPCA", false, "Recalculate vertex position using track covariances, effective only if useAbsDCA is true"};
367-
o2::framework::Configurable<double> maxR{"maxR", 10.f, "reject PCA's above this radius"};
368+
o2::framework::Configurable<double> maxR{"maxR", 20.f, "reject PCA's above this radius"};
368369
o2::framework::Configurable<double> maxDXIni{"maxDXIni", 4.f, "reject (if > 0) PCA candidate if tracks DZ exceeds threshold"};
369370
o2::framework::Configurable<double> minParamChange{"minParamChange", 1e-3, "stop iterations if largest change of any X is smaller than this"};
370371
o2::framework::Configurable<double> minRelChi2Change{"minRelChi2Change", 0.9, "stop iterations is chi2/chi2old > this"};
371372
o2::framework::Configurable<bool> propagateToPCA{"propagateToPCA", true, "create tracks version propagated to PCA"};
372-
o2::framework::Configurable<float> maxLog10Chi2PCA{"maxLog10Chi2PCA", 0, "max. log10(chi2PCA) for dilepton pair"};
373+
o2::framework::Configurable<float> maxLog10Chi2PCA{"maxLog10Chi2PCA", 10, "max. log10(chi2PCA) for dilepton pair"};
373374
} fdfGroup; // for FwdDCAFitterN
374375

375376
o2::vertexing::DCAFitterN<2> mDCAFitter;
@@ -537,13 +538,15 @@ struct DileptonSV {
537538
mDCAFitter.setMinRelChi2Change(dfGroup.minRelChi2Change);
538539
mDCAFitter.setUseAbsDCA(dfGroup.useAbsDCA);
539540
mDCAFitter.setWeightedFinalPCA(dfGroup.useWeightedFinalPCA);
541+
mDCAFitter.setMaxChi2(std::pow(10, dfGroup.maxLog10Chi2PCA));
540542

541543
mFwdDCAFitter.setPropagateToPCA(fdfGroup.propagateToPCA);
542544
mFwdDCAFitter.setMaxR(fdfGroup.maxR);
543545
mFwdDCAFitter.setMaxDXIni(fdfGroup.maxDXIni);
544546
mFwdDCAFitter.setMinParamChange(fdfGroup.minParamChange);
545547
mFwdDCAFitter.setMinRelChi2Change(fdfGroup.minRelChi2Change);
546548
mFwdDCAFitter.setUseAbsDCA(fdfGroup.useAbsDCA);
549+
mFwdDCAFitter.setMaxChi2(std::pow(10, fdfGroup.maxLog10Chi2PCA));
547550

548551
if constexpr (pairtype == o2::aod::pwgem::dilepton::utils::pairutil::DileptonPairType::kDimuon) {
549552
switch (matCorrType.value) {
@@ -909,6 +912,7 @@ struct DileptonSV {
909912
fDimuonCut.SetChi2(0.f, dimuoncuts.cfg_max_chi2);
910913
fDimuonCut.SetChi2MFT(0.f, dimuoncuts.cfg_max_chi2mft);
911914
// fDimuonCut.SetMatchingChi2MCHMFT(0.f, dimuoncuts.cfg_max_matching_chi2_mftmch);
915+
fDimuonCut.SetMaxDiffMatchingChi2MCHMFT(dimuoncuts.cfg_max_diff_chi2_mftmch);
912916
fDimuonCut.SetMaxMatchingChi2MCHMFTPtDep([&](float pt) { return (pt < dimuoncuts.cfg_border_pt_for_chi2mchmft ? dimuoncuts.cfg_max_matching_chi2_mftmch_lowPt : dimuoncuts.cfg_max_matching_chi2_mftmch_highPt); });
913917
fDimuonCut.SetMatchingChi2MCHMID(0.f, dimuoncuts.cfg_max_matching_chi2_mchmid);
914918
fDimuonCut.SetDCAxy(0.f, dimuoncuts.cfg_max_dcaxy);

PWGEM/Dilepton/Core/DileptonSVMC.h

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,7 @@ struct DileptonSVMC {
312312
o2::framework::Configurable<float> cfg_max_dcaxy{"cfg_max_dcaxy", 1e+10, "max dca XY for single track in cm"};
313313
o2::framework::Configurable<float> cfg_min_rabs{"cfg_min_rabs", 17.6, "min Radius at the absorber end"};
314314
o2::framework::Configurable<float> cfg_max_rabs{"cfg_max_rabs", 89.5, "max Radius at the absorber end"};
315+
o2::framework::Configurable<float> cfg_max_diff_chi2_mftmch{"cfg_max_diff_chi2_mftmch", -1.f, "max. diff chi2MatchingMCHMFT between the best and the 2nd best matched candidates"};
315316
o2::framework::Configurable<bool> enableTTCA{"enableTTCA", true, "Flag to enable or disable TTCA"};
316317
o2::framework::Configurable<float> cfg_max_relDPt_wrt_matchedMCHMID{"cfg_max_relDPt_wrt_matchedMCHMID", 1e+10f, "max. relative dpt between MFT-MCH-MID and MCH-MID"};
317318
o2::framework::Configurable<float> cfg_max_DEta_wrt_matchedMCHMID{"cfg_max_DEta_wrt_matchedMCHMID", 1e+10f, "max. deta between MFT-MCH-MID and MCH-MID"};
@@ -327,24 +328,24 @@ struct DileptonSVMC {
327328
std::string prefix = "dfGroup";
328329
o2::framework::Configurable<bool> useAbsDCA{"useAbsDCA", true, "Minimise abs. distance rather than chi2"};
329330
o2::framework::Configurable<bool> useWeightedFinalPCA{"useWeightedFinalPCA", false, "Recalculate vertex position using track covariances, effective only if useAbsDCA is true"};
330-
o2::framework::Configurable<double> maxR{"maxR", 10.f, "reject PCA's above this radius"};
331+
o2::framework::Configurable<double> maxR{"maxR", 20.f, "reject PCA's above this radius"};
331332
o2::framework::Configurable<double> maxDZIni{"maxDZIni", 4.f, "reject (if > 0) PCA candidate if tracks DZ exceeds threshold"};
332333
o2::framework::Configurable<double> minParamChange{"minParamChange", 1e-3, "stop iterations if largest change of any X is smaller than this"};
333334
o2::framework::Configurable<double> minRelChi2Change{"minRelChi2Change", 0.9, "stop iterations is chi2/chi2old > this"};
334335
o2::framework::Configurable<bool> propagateToPCA{"propagateToPCA", true, "create tracks version propagated to PCA"};
335-
o2::framework::Configurable<float> maxLog10Chi2PCA{"maxLog10Chi2PCA", 0, "max. log10(chi2PCA) for dilepton pair"};
336+
o2::framework::Configurable<float> maxLog10Chi2PCA{"maxLog10Chi2PCA", 10, "max. log10(chi2PCA) for dilepton pair"};
336337
} dfGroup; // for DCAFitterN
337338

338339
struct : o2::framework::ConfigurableGroup {
339340
std::string prefix = "fdfGroup";
340341
o2::framework::Configurable<bool> useAbsDCA{"useAbsDCA", true, "Minimise abs. distance rather than chi2"};
341342
o2::framework::Configurable<bool> useWeightedFinalPCA{"useWeightedFinalPCA", false, "Recalculate vertex position using track covariances, effective only if useAbsDCA is true"};
342-
o2::framework::Configurable<double> maxR{"maxR", 10.f, "reject PCA's above this radius"};
343+
o2::framework::Configurable<double> maxR{"maxR", 20.f, "reject PCA's above this radius"};
343344
o2::framework::Configurable<double> maxDXIni{"maxDXIni", 4.f, "reject (if > 0) PCA candidate if tracks DZ exceeds threshold"};
344345
o2::framework::Configurable<double> minParamChange{"minParamChange", 1e-3, "stop iterations if largest change of any X is smaller than this"};
345346
o2::framework::Configurable<double> minRelChi2Change{"minRelChi2Change", 0.9, "stop iterations is chi2/chi2old > this"};
346347
o2::framework::Configurable<bool> propagateToPCA{"propagateToPCA", true, "create tracks version propagated to PCA"};
347-
o2::framework::Configurable<float> maxLog10Chi2PCA{"maxLog10Chi2PCA", 0, "max. log10(chi2PCA) for dilepton pair"};
348+
o2::framework::Configurable<float> maxLog10Chi2PCA{"maxLog10Chi2PCA", 10, "max. log10(chi2PCA) for dilepton pair"};
348349
} fdfGroup; // for FwdDCAFitterN
349350

350351
o2::vertexing::DCAFitterN<2> mDCAFitter;
@@ -676,13 +677,15 @@ struct DileptonSVMC {
676677
mDCAFitter.setMinRelChi2Change(dfGroup.minRelChi2Change);
677678
mDCAFitter.setUseAbsDCA(dfGroup.useAbsDCA);
678679
mDCAFitter.setWeightedFinalPCA(dfGroup.useWeightedFinalPCA);
680+
mDCAFitter.setMaxChi2(std::pow(10, dfGroup.maxLog10Chi2PCA));
679681

680682
mFwdDCAFitter.setPropagateToPCA(fdfGroup.propagateToPCA);
681683
mFwdDCAFitter.setMaxR(fdfGroup.maxR);
682684
mFwdDCAFitter.setMaxDXIni(fdfGroup.maxDXIni);
683685
mFwdDCAFitter.setMinParamChange(fdfGroup.minParamChange);
684686
mFwdDCAFitter.setMinRelChi2Change(fdfGroup.minRelChi2Change);
685687
mFwdDCAFitter.setUseAbsDCA(fdfGroup.useAbsDCA);
688+
mFwdDCAFitter.setMaxChi2(std::pow(10, fdfGroup.maxLog10Chi2PCA));
686689

687690
if constexpr (pairtype == o2::aod::pwgem::dilepton::utils::pairutil::DileptonPairType::kDimuon) {
688691
switch (matCorrType.value) {
@@ -864,6 +867,7 @@ struct DileptonSVMC {
864867
fDimuonCut.SetChi2(0.f, dimuoncuts.cfg_max_chi2);
865868
fDimuonCut.SetChi2MFT(0.f, dimuoncuts.cfg_max_chi2mft);
866869
// fDimuonCut.SetMatchingChi2MCHMFT(0.f, dimuoncuts.cfg_max_matching_chi2_mftmch);
870+
fDimuonCut.SetMaxDiffMatchingChi2MCHMFT(dimuoncuts.cfg_max_diff_chi2_mftmch);
867871
fDimuonCut.SetMaxMatchingChi2MCHMFTPtDep([&](float pt) { return (pt < dimuoncuts.cfg_border_pt_for_chi2mchmft ? dimuoncuts.cfg_max_matching_chi2_mftmch_lowPt : dimuoncuts.cfg_max_matching_chi2_mftmch_highPt); });
868872
fDimuonCut.SetMatchingChi2MCHMID(0.f, dimuoncuts.cfg_max_matching_chi2_mchmid);
869873
fDimuonCut.SetDCAxy(0.f, dimuoncuts.cfg_max_dcaxy);

0 commit comments

Comments
 (0)