Skip to content

Commit 5d4f65d

Browse files
committed
Update
1 parent 31b19b4 commit 5d4f65d

File tree

2 files changed

+22
-21
lines changed

2 files changed

+22
-21
lines changed

Common/TableProducer/centralityTable.cxx

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -120,12 +120,12 @@ struct CentralityTable {
120120
Configurable<std::string> ccdbUrl{"ccdbUrl", "http://alice-ccdb.cern.ch", "The CCDB endpoint url address"};
121121
Configurable<bool> doNotCrashOnNull{"doNotCrashOnNull", false, {"Option to not crash on null and instead fill required tables with dummy info"}};
122122
Configurable<std::string> reconstructionPass{"reconstructionPass", "", {"Apass to use when fetching the calibration tables. Empty (default) does not check for any pass. Use `metadata` to fetch it from the AO2D metadata. Otherwise it will override the metadata."}};
123+
Configurable<std::string> ccdbPathCent{"ccdbPathCent", "Centrality/Calibration", "The CCDB path for centrality/multiplicity information"};
124+
Configurable<std::string> genName{"genName", "", "Genearator name: HIJING, PYTHIA8, ... Default: \"\""};
123125
} ccdbConfig;
124126

125127
// Configurable centrality
126128
struct : ConfigurableGroup {
127-
Configurable<std::string> ccdbPath{"ccdbPath", "Centrality/Estimators", "The CCDB path for centrality/multiplicity information"};
128-
Configurable<std::string> genName{"genName", "", "Genearator name: HIJING, PYTHIA8, ... Default: \"\""};
129129
Configurable<bool> embedINELgtZEROselection{"embedINELgtZEROselection", false, {"Option to do percentile 100.5 if not INELgtZERO"}};
130130
ConfigurableAxis binsPercentile{"binsPercentile", {VARIABLE_WIDTH, 0, 0.001, 0.002, 0.003, 0.004, 0.005, 0.006, 0.007, 0.008, 0.009, 0.01, 0.011, 0.012, 0.013, 0.014, 0.015, 0.016, 0.017, 0.018, 0.019, 0.02, 0.021, 0.022, 0.023, 0.024, 0.025, 0.026, 0.027, 0.028, 0.029, 0.03, 0.031, 0.032, 0.033, 0.034, 0.035, 0.036, 0.037, 0.038, 0.039, 0.04, 0.041, 0.042, 0.043, 0.044, 0.045, 0.046, 0.047, 0.048, 0.049, 0.05, 0.051, 0.052, 0.053, 0.054, 0.055, 0.056, 0.057, 0.058, 0.059, 0.06, 0.061, 0.062, 0.063, 0.064, 0.065, 0.066, 0.067, 0.068, 0.069, 0.07, 0.071, 0.072, 0.073, 0.074, 0.075, 0.076, 0.077, 0.078, 0.079, 0.08, 0.081, 0.082, 0.083, 0.084, 0.085, 0.086, 0.087, 0.088, 0.089, 0.09, 0.091, 0.092, 0.093, 0.094, 0.095, 0.096, 0.097, 0.098, 0.099, 0.1, 0.11, 0.12, 0.13, 0.14, 0.15, 0.16, 0.17, 0.18, 0.19, 0.2, 0.21, 0.22, 0.23, 0.24, 0.25, 0.26, 0.27, 0.28, 0.29, 0.3, 0.31, 0.32, 0.33, 0.34, 0.35, 0.36, 0.37, 0.38, 0.39, 0.4, 0.41, 0.42, 0.43, 0.44, 0.45, 0.46, 0.47, 0.48, 0.49, 0.5, 0.51, 0.52, 0.53, 0.54, 0.55, 0.56, 0.57, 0.58, 0.59, 0.6, 0.61, 0.62, 0.63, 0.64, 0.65, 0.66, 0.67, 0.68, 0.69, 0.7, 0.71, 0.72, 0.73, 0.74, 0.75, 0.76, 0.77, 0.78, 0.79, 0.8, 0.81, 0.82, 0.83, 0.84, 0.85, 0.86, 0.87, 0.88, 0.89, 0.9, 0.91, 0.92, 0.93, 0.94, 0.95, 0.96, 0.97, 0.98, 0.99, 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2.0, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 2.8, 2.9, 3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9, 4.0, 4.1, 4.2, 4.3, 4.4, 4.5, 4.6, 4.7, 4.8, 4.9, 5.0, 5.1, 5.2, 5.3, 5.4, 5.5, 5.6, 5.7, 5.8, 5.9, 6.0, 6.1, 6.2, 6.3, 6.4, 6.5, 6.6, 6.7, 6.8, 6.9, 7.0, 7.1, 7.2, 7.3, 7.4, 7.5, 7.6, 7.7, 7.8, 7.9, 8.0, 8.1, 8.2, 8.3, 8.4, 8.5, 8.6, 8.7, 8.8, 8.9, 9.0, 9.1, 9.2, 9.3, 9.4, 9.5, 9.6, 9.7, 9.8, 9.9, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0, 24.0, 25.0, 26.0, 27.0, 28.0, 29.0, 30.0, 31.0, 32.0, 33.0, 34.0, 35.0, 36.0, 37.0, 38.0, 39.0, 40.0, 41.0, 42.0, 43.0, 44.0, 45.0, 46.0, 47.0, 48.0, 49.0, 50.0, 51.0, 52.0, 53.0, 54.0, 55.0, 56.0, 57.0, 58.0, 59.0, 60.0, 61.0, 62.0, 63.0, 64.0, 65.0, 66.0, 67.0, 68.0, 69.0, 70.0, 71.0, 72.0, 73.0, 74.0, 75.0, 76.0, 77.0, 78.0, 79.0, 80.0, 81.0, 82.0, 83.0, 84.0, 85.0, 86.0, 87.0, 88.0, 89.0, 90.0, 91.0, 92.0, 93.0, 94.0, 95.0, 96.0, 97.0, 98.0, 99.0, 100.0}, "Binning of the percentile axis"};
131131
} centralityConfig;
@@ -229,16 +229,16 @@ struct CentralityTable {
229229
LOGF(info, "timestamp=%llu, run number=%d", bc.timestamp(), bc.runNumber());
230230
TList* calibrationList = nullptr;
231231
// Check if the ccdb path is a root file
232-
if (centralityConfig.ccdbPath.value.find(".root") != std::string::npos) { // File
233-
LOG(info) << "Fetching centrality calibration from TFile" << centralityConfig.ccdbPath.value.c_str() << " and pass '" << ccdbConfig.reconstructionPass.value << "'";
234-
TFile f(centralityConfig.ccdbPath.value.c_str(), "READ");
232+
if (ccdbConfig.ccdbPathCent.value.find(".root") != std::string::npos) { // File
233+
LOG(info) << "Fetching centrality calibration from TFile" << ccdbConfig.ccdbPathCent.value.c_str() << " and pass '" << ccdbConfig.reconstructionPass.value << "'";
234+
TFile f(ccdbConfig.ccdbPathCent.value.c_str(), "READ");
235235
f.GetObject(ccdbConfig.reconstructionPass.value.c_str(), calibrationList);
236236
if (!calibrationList) {
237237
f.ls();
238-
LOG(fatal) << "No calibration list " << ccdbConfig.reconstructionPass.value << " found in the file " << centralityConfig.ccdbPath.value;
238+
LOG(fatal) << "No calibration list " << ccdbConfig.reconstructionPass.value << " found in the file " << ccdbConfig.ccdbPathCent.value;
239239
}
240240
} else { // CCDB
241-
LOG(info) << "Fetching centrality calibration from ccdb" << centralityConfig.ccdbPath.value << " and pass '" << ccdbConfig.reconstructionPass.value << "'";
241+
LOG(info) << "Fetching centrality calibration from ccdb" << ccdbConfig.ccdbPathCent.value << " and pass '" << ccdbConfig.reconstructionPass.value << "'";
242242
std::map<std::string, std::string> metadata;
243243
if (ccdbConfig.reconstructionPass.value == "") {
244244
LOG(info) << "No pass required";
@@ -249,7 +249,7 @@ struct CentralityTable {
249249
}
250250
metadata["RecoPassName"] = ccdbConfig.reconstructionPass.value;
251251
}
252-
calibrationList = ccdb->getSpecificForRun<TList>(centralityConfig.ccdbPath, bc.runNumber(), metadata);
252+
calibrationList = ccdb->getSpecificForRun<TList>(ccdbConfig.ccdbPathCent, bc.runNumber(), metadata);
253253
}
254254

255255
Run2V0MInfo.mCalibrationStored = false;
@@ -311,9 +311,9 @@ struct CentralityTable {
311311
Run2V0MInfo.mhVtxAmpCorrV0A = getccdbRun2("hVtx_fAmplitude_V0A_Normalized");
312312
Run2V0MInfo.mhVtxAmpCorrV0C = getccdbRun2("hVtx_fAmplitude_V0C_Normalized");
313313
Run2V0MInfo.mhMultSelCalib = getccdbRun2("hMultSelCalib_V0M");
314-
Run2V0MInfo.mMCScale = getformulaccdb(TString::Format("%s-V0M", centralityConfig.genName->c_str()).Data());
314+
Run2V0MInfo.mMCScale = getformulaccdb(TString::Format("%s-V0M", ccdbConfig.genName->c_str()).Data());
315315
if ((Run2V0MInfo.mhVtxAmpCorrV0A != nullptr) && (Run2V0MInfo.mhVtxAmpCorrV0C != nullptr) && (Run2V0MInfo.mhMultSelCalib != nullptr)) {
316-
if (centralityConfig.genName->length() != 0) {
316+
if (ccdbConfig.genName->length() != 0) {
317317
if (Run2V0MInfo.mMCScale != nullptr) {
318318
for (int ixpar = 0; ixpar < 6; ++ixpar) {
319319
Run2V0MInfo.mMCScalePars[ixpar] = Run2V0MInfo.mMCScale->GetParameter(ixpar);
@@ -407,31 +407,31 @@ struct CentralityTable {
407407
}
408408
break;
409409
case centrality::kFV0As:
410-
getccdbRun3(fv0aInfo, centralityConfig.genName);
410+
getccdbRun3(fv0aInfo, ccdbConfig.genName);
411411
break;
412412
case centrality::kFT0Ms:
413-
getccdbRun3(ft0mInfo, centralityConfig.genName);
413+
getccdbRun3(ft0mInfo, ccdbConfig.genName);
414414
break;
415415
case centrality::kFT0As:
416-
getccdbRun3(ft0aInfo, centralityConfig.genName);
416+
getccdbRun3(ft0aInfo, ccdbConfig.genName);
417417
break;
418418
case centrality::kFT0Cs:
419-
getccdbRun3(ft0cInfo, centralityConfig.genName);
419+
getccdbRun3(ft0cInfo, ccdbConfig.genName);
420420
break;
421421
case centrality::kFT0CVariant1s:
422-
getccdbRun3(ft0cVariant1Info, centralityConfig.genName);
422+
getccdbRun3(ft0cVariant1Info, ccdbConfig.genName);
423423
break;
424424
case centrality::kFDDMs:
425-
getccdbRun3(fddmInfo, centralityConfig.genName);
425+
getccdbRun3(fddmInfo, ccdbConfig.genName);
426426
break;
427427
case centrality::kNTPVs:
428-
getccdbRun3(ntpvInfo, centralityConfig.genName);
428+
getccdbRun3(ntpvInfo, ccdbConfig.genName);
429429
break;
430430
case centrality::kNGlobals:
431-
getccdbRun3(nGlobalInfo, centralityConfig.genName);
431+
getccdbRun3(nGlobalInfo, ccdbConfig.genName);
432432
break;
433433
case centrality::kMFTs:
434-
getccdbRun3(mftInfo, centralityConfig.genName);
434+
getccdbRun3(mftInfo, ccdbConfig.genName);
435435
break;
436436
default:
437437
LOGF(fatal, "Table %d not supported in Run3", table);
@@ -529,9 +529,9 @@ struct CentralityTable {
529529

530530
using BCsWithTimestampsAndRun2Infos = soa::Join<aod::BCs, aod::Run2BCInfos, aod::Timestamps>;
531531
void processRun2(soa::Join<aod::Collisions, aod::Mults>::iterator const& collision,
532-
BCsWithTimestampsAndRun2Infos const&)
532+
BCsWithTimestampsAndRun2Infos const& bcs)
533533
{
534-
auto bc = collision.bc_as<BCsWithTimestampsAndRun2Infos>();
534+
auto bc = bcs.iteratorAt(0);
535535
initCentCalib(bc);
536536
auto scaleMC = [](float x, float pars[6]) {
537537
return std::pow(((pars[0] + pars[1] * std::pow(x, pars[2])) - pars[3]) / pars[4], 1.0f / pars[5]);

Common/TableProducer/multiplicityCentrality.cxx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -663,6 +663,7 @@ struct multiplicityPercentile {
663663
}
664664
std::sort(mEnabledMultiplicityTables.begin(), mEnabledMultiplicityTables.end());
665665

666+
LOG(info) << "Initializing centrality table producer";
666667
/* Checking the tables which are requested in the workflow and enabling them */
667668
for (int i = 0; i < centrality::kNTables; i++) {
668669
int f = enabledCentralityTables->get(centrality::tableNames[i].c_str(), "Enable");

0 commit comments

Comments
 (0)