Skip to content

Commit 70622f6

Browse files
committed
Fix sgSelector parameters and make them configurable
1 parent 5d7212c commit 70622f6

File tree

2 files changed

+22
-6
lines changed

2 files changed

+22
-6
lines changed

PWGHF/D2H/Tasks/taskLc.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,8 +264,8 @@ struct HfTaskLc {
264264
addHistogramsRec("hDecLenErrVsPt", "decay length error (cm)", "#it{p}_{T} (GeV/#it{c})", {HistType::kTH2F, {{100, 0., 1.}, {vbins}}});
265265

266266
if (isUpc) {
267-
qaRegistry.add("Data/fitInfo/ampFT0A_vs_ampFT0C", "FT0-A vs FT0-C amplitude;FT0-A amplitude (a.u.);FT0-C amplitude (a.u.)", {HistType::kTH2F, {{1500, 0., 1500}, {1500, 0., 1500}}});
268-
qaRegistry.add("Data/zdc/energyZNA_vs_energyZNC", "ZNA vs ZNC common energy;E_{ZNA}^{common} (a.u.);E_{ZNC}^{common} (a.u.)", {HistType::kTH2F, {{200, 0., 20}, {200, 0., 20}}});
267+
qaRegistry.add("Data/fitInfo/ampFT0A_vs_ampFT0C", "FT0-A vs FT0-C amplitude;FT0-A amplitude (a.u.);FT0-C amplitude (a.u.)", {HistType::kTH2F, {{500, 0., 500}, {500, 0., 500}}});
268+
qaRegistry.add("Data/zdc/energyZNA_vs_energyZNC", "ZNA vs ZNC common energy;E_{ZNA}^{common} (a.u.);E_{ZNC}^{common} (a.u.)", {HistType::kTH2F, {{100, 0., 10}, {100, 0., 10}}});
269269
qaRegistry.add("Data/zdc/timeZNA_vs_timeZNC", "ZNA vs ZNC time;ZNA Time;ZNC time", {HistType::kTH2F, {{200, -10., 10}, {200, -10., 10}}});
270270
qaRegistry.add("Data/hUpcGapAfterSelection", "UPC gap type after selection;Gap side;Counts", {HistType::kTH1F, {{7, -1.5, 5.5}}});
271271
}

PWGHF/Utils/utilsUpcHf.h

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
/// \brief Utility functions for Ultra-Peripheral Collision (UPC) analysis in Heavy Flavor physics
1414
///
1515
/// \author Minjung Kim <minjung.kim@cern.ch>, CERN
16+
/// \author Ran Tu <ran.tu@cern.ch>, Fudan University, GSI Darmstadt
1617

1718
#ifndef PWGHF_UTILS_UTILSUPCHF_H_
1819
#define PWGHF_UTILS_UTILSUPCHF_H_
@@ -35,6 +36,11 @@ using o2::aod::sgselector::TrueGap;
3536
/// \brief Configurable group for UPC gap determination thresholds
3637
struct HfUpcGapThresholds : o2::framework::ConfigurableGroup {
3738
std::string prefix = "upc"; // JSON group name
39+
o2::framework::Configurable<int> fNDtColl{"fNDtColl", 1, "Number of standard deviations to consider in BC range"};
40+
o2::framework::Configurable<int> fNBCsMin{"fNBCsMin", 2, "Minimum number of BCs to consider in BC range"};
41+
o2::framework::Configurable<int> fNPVCsMin{"fNPVCsMin", 2, "Minimum number of PV contributors"};
42+
o2::framework::Configurable<int> fNPVCsMax{"fNPVCsMax", 1000, "Maximum number of PV contributors"};
43+
o2::framework::Configurable<float> fFITTimeMax{"fFITTimeMax", 34, "Maximum time in FIT"};
3844
o2::framework::Configurable<float> fv0aThreshold{"fv0aThreshold", 100.0f, "FV0-A amplitude threshold for UPC gap determination (a.u.)"};
3945
o2::framework::Configurable<float> ft0aThreshold{"ft0aThreshold", 100.0f, "FT0-A amplitude threshold for UPC gap determination (a.u.)"};
4046
o2::framework::Configurable<float> ft0cThreshold{"ft0cThreshold", 50.0f, "FT0-C amplitude threshold for UPC gap determination (a.u.)"};
@@ -66,6 +72,11 @@ constexpr int MaxNTracks = 100; ///< Maximum number of tracks
6672
template <typename TCollision, typename TBCs>
6773
inline auto determineGapType(TCollision const& collision,
6874
TBCs const& bcs,
75+
int nDtColl = defaults::NDtColl,
76+
int nBCsMin = defaults::MinNBCs,
77+
int nPVCsMin = defaults::MinNTracks,
78+
int nPVCsMax = defaults::MaxNTracks,
79+
float fITTimeMax = defaults::MaxFITTime,
6980
float amplitudeThresholdFV0A = defaults::AmplitudeThresholdFV0A,
7081
float amplitudeThresholdFT0A = defaults::AmplitudeThresholdFT0A,
7182
float amplitudeThresholdFT0C = defaults::AmplitudeThresholdFT0C)
@@ -74,10 +85,10 @@ inline auto determineGapType(TCollision const& collision,
7485

7586
// Configure SGSelector thresholds
7687
SGCutParHolder sgCuts;
77-
sgCuts.SetNDtcoll(defaults::NDtColl);
78-
sgCuts.SetMinNBCs(defaults::MinNBCs);
79-
sgCuts.SetNTracks(defaults::MinNTracks, defaults::MaxNTracks);
80-
sgCuts.SetMaxFITtime(defaults::MaxFITTime);
88+
sgCuts.SetNDtcoll(nDtColl);
89+
sgCuts.SetMinNBCs(nBCsMin);
90+
sgCuts.SetNTracks(nPVCsMin, nPVCsMax);
91+
sgCuts.SetMaxFITtime(fITTimeMax);
8192
sgCuts.SetFITAmpLimits({amplitudeThresholdFV0A, amplitudeThresholdFT0A, amplitudeThresholdFT0C});
8293

8394
// Get BC and BC range
@@ -108,6 +119,11 @@ inline auto determineGapType(TCollision const& collision,
108119
HfUpcGapThresholds const& thresholds)
109120
{
110121
return determineGapType(collision, bcs,
122+
thresholds.fNDtColl.value,
123+
thresholds.fNBCsMin.value,
124+
thresholds.fNPVCsMin.value,
125+
thresholds.fNPVCsMax.value,
126+
thresholds.fFITTimeMax.value,
111127
thresholds.fv0aThreshold.value,
112128
thresholds.ft0aThreshold.value,
113129
thresholds.ft0cThreshold.value);

0 commit comments

Comments
 (0)