Skip to content

Commit 4c80c05

Browse files
[Common] Force the update of the LUT when changing runs (#17197)
Co-authored-by: ALICE Builder <alibuild@users.noreply.github.com>
1 parent c6d549a commit 4c80c05

2 files changed

Lines changed: 12 additions & 8 deletions

File tree

Common/Tools/StandardCCDBLoader.h

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ class StandardCCDBLoader
9090
} else {
9191
LOGF(info, "GRPMagField object returned nullptr, will attempt alternate method");
9292

93-
o2::parameters::GRPObject* grpo = 0x0;
93+
o2::parameters::GRPObject* grpo = nullptr;
9494
grpo = ccdb->template getForRun<o2::parameters::GRPObject>(cGroup.grpPath.value, currentRunNumber);
9595
if (!grpo) {
9696
LOG(fatal) << "Alternate path failed! Got nullptr from CCDB for path " << cGroup.grpPath << " of object GRPObject for run " << currentRunNumber;
@@ -105,12 +105,8 @@ class StandardCCDBLoader
105105
}
106106

107107
// load matLUT for this timestamp
108-
if (!lut) {
109-
LOG(info) << "Loading material look-up table for timestamp: " << currentRunNumber;
110-
lut = o2::base::MatLayerCylSet::rectifyPtrFromFile(ccdb->template getForRun<o2::base::MatLayerCylSet>(cGroup.lutPath.value, currentRunNumber));
111-
} else {
112-
LOG(info) << "Material look-up table already in place. Not reloading.";
113-
}
108+
LOG(info) << "Loading material look-up table for timestamp: " << currentRunNumber;
109+
lut = o2::base::MatLayerCylSet::rectifyPtrFromFile(ccdb->template getForRun<o2::base::MatLayerCylSet>(cGroup.lutPath.value, currentRunNumber));
114110
LOG(info) << "Setting global propagator material propagation LUT";
115111
o2::base::Propagator::Instance()->setMatLUT(lut);
116112

Common/Tools/TrackPropagationModule.h

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ class TrackPropagationModule
177177
/// to understand whether the TrackTuner::getDcaGraphs function can be called here (input path from string/configurables)
178178
/// or inside the process function, to "auto-detect" the input file based on the run number
179179
const auto& workflows = initContext.services().template get<o2::framework::RunningWorkflowInfo const>();
180-
for (const o2::framework::DeviceSpec& device : workflows.devices) { /// loop over devices
180+
for (o2::framework::DeviceSpec const& device : workflows.devices) { /// loop over devices
181181
if (device.name == "propagation-service") {
182182
// loop over the options
183183
// to find the value of TrackTuner::autoDetectDcaCalib
@@ -208,6 +208,11 @@ class TrackPropagationModule
208208
registry.template add<TH2>("hDCAxyVsPtMC", "hDCAxyVsPtMC", o2::framework::HistType::kTH2F, {axisBinsDCA, cGroup.axisPtQA});
209209
registry.template add<TH2>("hDCAzVsPtRec", "hDCAzVsPtRec", o2::framework::HistType::kTH2F, {axisBinsDCA, cGroup.axisPtQA});
210210
registry.template add<TH2>("hDCAzVsPtMC", "hDCAzVsPtMC", o2::framework::HistType::kTH2F, {axisBinsDCA, cGroup.axisPtQA});
211+
212+
registry.template add<TH1>("hPropagation", "hPropagation", o2::framework::HistType::kTH1D, {{3, 0.f, 3.f}});
213+
registry.template get<TH1>(HIST("hPropagation"))->GetXaxis()->SetBinLabel(1, "All");
214+
registry.template get<TH1>(HIST("hPropagation"))->GetXaxis()->SetBinLabel(2, Form("TracksIU, x < %g cm", cGroup.minPropagationRadius.value));
215+
registry.template get<TH1>(HIST("hPropagation"))->GetXaxis()->SetBinLabel(3, "Propagation OK");
211216
}
212217

213218
template <bool isMc, typename TConfigurableGroup, typename TCCDBLoader, typename TCollisions, typename TTracks, typename TOutputGroup, typename THistoRegistry>
@@ -279,6 +284,7 @@ class TrackPropagationModule
279284
// std::array<float, 3> trackPxPyPzTuned = {0.0, 0.0, 0.0};
280285
double q2OverPtNew = -9999.;
281286
// Only propagate tracks which have passed the innermost wall of the TPC (e.g. skipping loopers etc). Others fill unpropagated.
287+
registry.fill(HIST("hPropagation"), 0.5);
282288
if (track.trackType() == o2::aod::track::TrackIU && track.x() < cGroup.minPropagationRadius.value) {
283289
if (fillTracksCov) {
284290
if constexpr (isMc) { // checking MC and fillCovMat block begins
@@ -295,6 +301,7 @@ class TrackPropagationModule
295301
} // MC and fillCovMat block ends
296302
}
297303
bool isPropagationOK = true;
304+
registry.fill(HIST("hPropagation"), 1.5);
298305

299306
if (track.has_collision()) {
300307
auto const& collision = collisions.rawIteratorAt(track.collisionId());
@@ -316,6 +323,7 @@ class TrackPropagationModule
316323
}
317324
if (isPropagationOK) {
318325
trackType = o2::aod::track::Track;
326+
registry.fill(HIST("hPropagation"), 2.5);
319327
}
320328
// filling some QA histograms for track tuner test purpose
321329
if (fillTracksCov) {

0 commit comments

Comments
 (0)