Skip to content

Commit 81270aa

Browse files
[PWGDQ] Adding config for IR estimator (#14458)
Co-authored-by: Lucamicheletti93 <luca.mike93@gmail.com>
1 parent 0cb2a2c commit 81270aa

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

PWGDQ/TableProducer/tableMaker_withAssoc.cxx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ struct TableMaker {
221221
Configurable<std::string> fConfigAddTrackHistogram{"cfgAddTrackHistogram", "", "Comma separated list of histograms"};
222222
Configurable<std::string> fConfigAddMuonHistogram{"cfgAddMuonHistogram", "", "Comma separated list of histograms"};
223223
Configurable<std::string> fConfigAddJSONHistograms{"cfgAddJSONHistograms", "", "Histograms in JSON format"};
224+
Configurable<std::string> fConfigIrEstimator{"cfgIrEstimator", "", "Estimator of the interaction rate (pp,OO --> T0VTX, Pb-Pb --> ZNC hadronic), to be used with cfgFillBcStat"};
224225
} fConfigHistOutput;
225226

226227
Configurable<bool> fIsRun2{"cfgIsRun2", false, "Whether we analyze Run-2 or Run-3 data"};
@@ -821,7 +822,14 @@ struct TableMaker {
821822

822823
auto bfilling = mLHCIFdata->getBunchFilling();
823824
double nbc = bfilling.getFilledBCs().size();
824-
double tvxRate = mRateFetcher.fetch(&ccdbMgr, timeStamp, bc.runNumber(), "T0VTX");
825+
826+
double tvxRate;
827+
if (fConfigHistOutput.fConfigIrEstimator.value.empty()) {
828+
tvxRate = mRateFetcher.fetch(&ccdbMgr, timeStamp, bc.runNumber(), "T0VTX");
829+
} else {
830+
tvxRate = mRateFetcher.fetch(&ccdbMgr, timeStamp, bc.runNumber(), fConfigHistOutput.fConfigIrEstimator.value);
831+
}
832+
825833
double nTriggersPerFilledBC = tvxRate / nbc / o2::constants::lhc::LHCRevFreq;
826834
double mu = -std::log(1 - nTriggersPerFilledBC);
827835
return mu;

0 commit comments

Comments
 (0)