Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions Common/Core/TPCVDriftManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,27 @@
LOGP(info, "Updated VDrift for timestamp {} with vdrift={:.7f} (cm/ns)", mVD->creationTime, mTPCVDriftNS);
}

// Adopts a drift correction obtained elsewhere, typically straight from the
// aod::TpcCalibCCDBObjects column, so no CCDB manager is involved at all.
void update(const o2::tpc::VDriftCorrFact& vd) noexcept
{
if (mVD == &vd) { // same object as last time, nothing to recompute
return;
}
if (vd.firstTime < 0 || vd.lastTime < 0) {
LOGP(error, "Got invalid VDriftCorrFact created at {}", vd.creationTime);
mValid = false;
return;
}
mVD = &vd;

// TODO account for laser calib

mTPCVDriftNS = mVD->refVDrift * mVD->corrFact * 1e-3;
mValid = true;
LOGP(debug, "Updated VDrift for timestamp {} with vdrift={:.7f} (cm/ns)", mVD->creationTime, mTPCVDriftNS);
}

template <typename BCs, typename Collisions, typename Collision, typename TrackExtra, typename Track>
[[nodiscard]] bool moveTPCTrack(const Collision& col, const TrackExtra& trackExtra, Track& track) noexcept
{
Expand Down Expand Up @@ -115,7 +136,7 @@
float dTime = tTB - trackExtra.trackTime();
float dDrift = dTime * mTPCVDriftNS;
float dDriftErr = tTBErr * mTPCVDriftNS;
if (dDriftErr < 0.f || dDrift > 250.f) { // we cannot move a track outside the drift volume

Check failure on line 139 in Common/Core/TPCVDriftManager.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
if (mOutside < mWarningLimit) {
LOGP(warn, "Skipping correction outside of tpc volume with dDrift={} +- {}", dDrift, dDriftErr);
const auto trackBC = trackExtra.template collision_as<Collisions>().template foundBC_as<BCs>().globalBC();
Expand Down
93 changes: 65 additions & 28 deletions Common/Tools/TrackPropagationModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "Common/Tools/TrackTuner.h"

#include <CommonConstants/GeomConstants.h>
#include <DataFormatsCalibration/MeanVertexObject.h>
#include <DetectorsBase/Propagator.h>
#include <Framework/AnalysisDataModel.h>
#include <Framework/AnalysisHelpers.h>
Expand All @@ -31,13 +32,13 @@
#include <Framework/HistogramRegistry.h>
#include <Framework/HistogramSpec.h>
#include <Framework/Logger.h>
#include <Framework/RunningWorkflowInfo.h>
#include <ReconstructionDataFormats/DCA.h>
#include <ReconstructionDataFormats/TrackParametrization.h>
#include <ReconstructionDataFormats/TrackParametrizationWithError.h>

#include <TH1.h>
#include <TH2.h>
#include <TList.h>

#include <array>
#include <cmath>
Expand Down Expand Up @@ -72,7 +73,7 @@

struct TrackPropagationConfigurables : o2::framework::ConfigurableGroup {
std::string prefix = "trackPropagation";
o2::framework::Configurable<float> minPropagationRadius{"minPropagationDistance", o2::constants::geom::XTPCInnerRef + 0.1, "Only tracks which are at a smaller radius will be propagated, defaults to TPC inner wall"};

Check failure on line 76 in Common/Tools/TrackPropagationModule.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/configurable]

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)
// for TrackTuner only (MC smearing)
o2::framework::Configurable<bool> useTrackTuner{"useTrackTuner", false, "Apply track tuner corrections to MC"};
o2::framework::Configurable<bool> useTrkPid{"useTrkPid", false, "use pid in tracking"};
Expand Down Expand Up @@ -109,7 +110,9 @@
bool autoDetectDcaCalib = false; // track tuner setting

template <typename TConfigurableGroup, typename TInitContext, typename THistoRegistry>
void init(TConfigurableGroup const& cGroup, TrackTuner& trackTunerObj, THistoRegistry& registry, TInitContext& initContext)
/// \param calibFromCCDBColumns the task supplies the TrackTuner calibrations from the
/// aod::TrackTunerCCDBObjects columns, so nothing is fetched from CCDB here.
void init(TConfigurableGroup const& cGroup, TrackTuner& trackTunerObj, THistoRegistry& registry, TInitContext& initContext, bool calibFromCCDBColumns = false)
{
// Checking if the tables are requested in the workflow and enabling them
fillTracks = o2::common::core::isTableRequiredInWorkflow(initContext, "Tracks");
Expand Down Expand Up @@ -176,23 +179,31 @@
/// read the track tuner instance configurations,
/// to understand whether the TrackTuner::getDcaGraphs function can be called here (input path from string/configurables)
/// or inside the process function, to "auto-detect" the input file based on the run number
const auto& workflows = initContext.services().template get<o2::framework::RunningWorkflowInfo const>();
for (o2::framework::DeviceSpec const& device : workflows.devices) { /// loop over devices
if (device.name == "propagation-service") {
// loop over the options
// to find the value of TrackTuner::autoDetectDcaCalib
for (const auto& option : device.options) { /// loop over options
if (option.name == "trackTuner.autoDetectDcaCalib") {
// found it!
autoDetectDcaCalib = option.defaultValue.get<bool>();
break;
}
} /// end loop over options
// Read the option off the device we are actually running in. This used to search
// the workflow for a device literally named "propagation-service", which silently
// matched nothing in any other task (propagation-service-v2, -run2, ...), leaving
// autoDetectDcaCalib at its default no matter how the task was configured.
o2::framework::DeviceSpec const& device = initContext.services().template get<o2::framework::DeviceSpec const>();
for (const auto& option : device.options) { /// loop over options
if (option.name == "trackTuner.autoDetectDcaCalib") {
// found it!
autoDetectDcaCalib = option.defaultValue.get<bool>();
break;
}
} /// end loop over devices
} /// end loop over options
LOG(info) << "[TrackPropagationModule] trackTuner.autoDetectDcaCalib it's equal to " << autoDetectDcaCalib;
if (!autoDetectDcaCalib) {
if (calibFromCCDBColumns && trackTunerObj.isInputFileFromCCDB) {
// The column is the single source of truth for the path: its default carries the
// per-period mapping and it is overridden through "ccdb:fTrackTunerDca". Silently
// preferring one of two path settings is how calibrations diverge unnoticed, so a
// leftover trackTuner.pathInputFile is an error rather than a shadowed value.
if (!trackTunerObj.pathInputFile.empty()) {
LOG(fatal) << "[TrackPropagationModule] trackTuner.pathInputFile is set to '" << trackTunerObj.pathInputFile
<< "' while the TrackTuner calibrations are taken from the aod::TrackTunerCCDBObjects columns. "
<< "Set the path through the \"ccdb:fTrackTunerDca\" option instead, or unset trackTuner.pathInputFile.";
}
LOG(info) << "[TrackPropagationModule] TrackTuner calibrations come from CCDB columns; graphs retrieved in the process function";
} else if (!autoDetectDcaCalib) {
LOG(info) << "[TrackPropagationModule] retrieve the graphs already (we are in propagationService::Init() function)";
trackTunerObj.getDcaGraphs();
} else {
Expand All @@ -215,24 +226,50 @@
registry.template get<TH1>(HIST("hPropagation"))->GetXaxis()->SetBinLabel(3, "Propagation OK");
}

/// Legacy overload for callers still holding a StandardCCDBLoader; forwards the two
/// run-scoped values actually used. Prefer the overload below, which lets the caller
/// source them from CCDB columns instead of a CCDB query.
template <bool isMc, typename TConfigurableGroup, typename TCCDBLoader, typename TCollisions, typename TTracks, typename TOutputGroup, typename THistoRegistry>
void fillTrackTables(TConfigurableGroup const& cGroup, TrackTuner& trackTunerObj, TCCDBLoader const& ccdbLoader, TCollisions const& collisions, TTracks const& tracks, TOutputGroup& cursors, THistoRegistry& registry)
{
fillTrackTables<isMc>(cGroup, trackTunerObj, ccdbLoader.runNumber, ccdbLoader.mMeanVtx, collisions, tracks, cursors, registry);
}

/// Takes the run-scoped conditions it actually needs (run number for the TrackTuner
/// path, mean vertex for the DCA reference) rather than a CCDB loader object, so that
/// callers are free to source them from CCDB columns instead of a CCDB query.
template <bool isMc, typename TConfigurableGroup, typename TCollisions, typename TTracks, typename TOutputGroup, typename THistoRegistry>
void fillTrackTables(TConfigurableGroup const& cGroup, TrackTuner& trackTunerObj, int currentRunNumber, o2::dataformats::MeanVertexObject const* meanVtx, TCollisions const& collisions, TTracks const& tracks, TOutputGroup& cursors, THistoRegistry& registry)
{
fillTrackTables<isMc>(cGroup, trackTunerObj, currentRunNumber, meanVtx, nullptr, nullptr, collisions, tracks, cursors, registry);
}

/// As above, plus the TrackTuner calibration lists taken from the
/// aod::TrackTunerCCDBObjects columns. When they are given, the run-range table that
/// getPathInputFileAutomaticFromCCDB() would have walked has already been applied by
/// the CCDB fetcher, so no CCDB query happens here at all.
template <bool isMc, typename TConfigurableGroup, typename TCollisions, typename TTracks, typename TOutputGroup, typename THistoRegistry>
void fillTrackTables(TConfigurableGroup const& cGroup, TrackTuner& trackTunerObj, int currentRunNumber, o2::dataformats::MeanVertexObject const* meanVtx, TList* dcaCalib, TList* qOverPtCalib, TCollisions const& collisions, TTracks const& tracks, TOutputGroup& cursors, THistoRegistry& registry)
{

/// retrieve the TrackTuner calibration graphs *if not done yet*
/// i.e. if autodetect is required
if (cGroup.useTrackTuner.value && autoDetectDcaCalib && !trackTunerObj.areGraphsConfigured) {
if (cGroup.useTrackTuner.value && !trackTunerObj.areGraphsConfigured && (autoDetectDcaCalib || dcaCalib != nullptr)) {

/// get the run number from the ccdb loader, already initialized
const int runNumber = ccdbLoader.runNumber;
trackTunerObj.setRunNumber(runNumber);
trackTunerObj.setRunNumber(currentRunNumber);

/// setup the "auto-detected" path based on the run number
trackTunerObj.getPathInputFileAutomaticFromCCDB();
trackTunedTracks->SetTitle(trackTunerObj.outputString.c_str());
if (dcaCalib != nullptr) {
/// the path was resolved by the CCDB fetcher from the column's run-range mapping
trackTunedTracks->SetTitle(trackTunerObj.outputString.c_str());
trackTunerObj.getDcaGraphs(dcaCalib, qOverPtCalib);
} else {
/// setup the "auto-detected" path based on the run number
trackTunerObj.getPathInputFileAutomaticFromCCDB();
trackTunedTracks->SetTitle(trackTunerObj.outputString.c_str());

/// now that the path is ok, retrieve the graphs
trackTunerObj.getDcaGraphs();
/// now that the path is ok, retrieve the graphs
trackTunerObj.getDcaGraphs();
}
}

if (!fillTracks) {
Expand Down Expand Up @@ -314,11 +351,11 @@
}
} else {
if (fillTracksCov) {
mVtx.setPos({ccdbLoader.mMeanVtx->getX(), ccdbLoader.mMeanVtx->getY(), ccdbLoader.mMeanVtx->getZ()});
mVtx.setCov(ccdbLoader.mMeanVtx->getSigmaX() * ccdbLoader.mMeanVtx->getSigmaX(), 0.0f, ccdbLoader.mMeanVtx->getSigmaY() * ccdbLoader.mMeanVtx->getSigmaY(), 0.0f, 0.0f, ccdbLoader.mMeanVtx->getSigmaZ() * ccdbLoader.mMeanVtx->getSigmaZ());
mVtx.setPos({meanVtx->getX(), meanVtx->getY(), meanVtx->getZ()});
mVtx.setCov(meanVtx->getSigmaX() * meanVtx->getSigmaX(), 0.0f, meanVtx->getSigmaY() * meanVtx->getSigmaY(), 0.0f, 0.0f, meanVtx->getSigmaZ() * meanVtx->getSigmaZ());
isPropagationOK = o2::base::Propagator::Instance()->propagateToDCABxByBz(mVtx, mTrackParCov, 2.f, matCorr, &mDcaInfoCov);
} else {
isPropagationOK = o2::base::Propagator::Instance()->propagateToDCABxByBz({ccdbLoader.mMeanVtx->getX(), ccdbLoader.mMeanVtx->getY(), ccdbLoader.mMeanVtx->getZ()}, mTrackPar, 2.f, matCorr, &mDcaInfo);
isPropagationOK = o2::base::Propagator::Instance()->propagateToDCABxByBz({meanVtx->getX(), meanVtx->getY(), meanVtx->getZ()}, mTrackPar, 2.f, matCorr, &mDcaInfo);
}
}
if (isPropagationOK) {
Expand Down
15 changes: 14 additions & 1 deletion Common/Tools/TrackTuner.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#define COMMON_TOOLS_TRACKTUNER_H_

#include <CCDB/BasicCCDBManager.h>
#include <CCDB/CcdbApi.h>
#include <CommonConstants/MathConstants.h>
#include <DetectorsBase/Propagator.h>
#include <Framework/AnalysisDataModel.h>
Expand Down Expand Up @@ -156,7 +155,7 @@
LOG(fatal) << "[TrackTuner::getPathInputFileAutomaticFromCCDB] runNumber==" << runNumber << ", automatic detection of dca calibration file from CCDB not possible. Did you call the function TrackTuner::setrunNumber()?";
}
/// check than the number of phi bins for the track tuner calibrations is 24
if (nPhiBins != 24) {

Check failure on line 158 in Common/Tools/TrackTuner.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
LOG(fatal) << "[TrackTuner::getPathInputFileAutomaticFromCCDB] nPhiBins==" << nPhiBins << ", but the automatic detection of dca calibration file from CCDB is supported only for nPhiBins==24. Either put nPhiBins=24, or disable the auto-detection (autoDetectDcaCalib=false)";
}

Expand Down Expand Up @@ -197,7 +196,7 @@

LOG(info) << "[TrackTuner::getPathInputFileAutomaticFromCCDB]: current run number = " << runNumber;

if ((520259 <= runNumber && runNumber <= 529691) || (534998 <= runNumber && runNumber <= 543113)) {

Check failure on line 199 in Common/Tools/TrackTuner.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
///
/// [CASE 1]: pp, 13.6 TeV 2022, 2023: CCDB path Users/m/mfaggin/test/inputsTrackTuner/pp2023/pass4/vsPhi
/// Run list: (520259 (LHC22f) <= runNumber <= 529691 (LHC22t)) || (534998 (LHC23zc) <= runNumber <= 543113 (LHC23zw))
Expand All @@ -205,7 +204,7 @@
pathInputFile = "Users/m/mfaggin/test/inputsTrackTuner/pp2023/pass4/vsPhi";
LOG(info) << "[TrackTuner::getPathInputFileAutomaticFromCCDB]: >>> pp, 13.6 TeV 2022, 2023: CCDB path " << pathInputFile;
LOG(info) << " >>> Run list: (520259 (LHC22f) <= runNumber <= 529691 (LHC22t)) || (534998 (LHC23zc) <= runNumber <= 543113 (LHC23zw))";
} else if ((529397 <= runNumber && runNumber <= 529418) || (543437 <= runNumber && runNumber <= 545367)) {

Check failure on line 207 in Common/Tools/TrackTuner.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
///
/// [CASE 2]: Pb-Pb, 5.34 TeV 2022, 2023, 2024: CCDB path Users/m/mfaggin/test/inputsTrackTuner/PbPb2023/apass4/vsPhi
/// Run list: (529397 <= runNumber <= 529418 (LHC22o)) || (543437 (LHC23zx) <= runNumber <= 545367 (LHC23zzo))
Expand All @@ -213,7 +212,7 @@
pathInputFile = "Users/m/mfaggin/test/inputsTrackTuner/PbPb2023/apass4/vsPhi";
LOG(info) << "[TrackTuner::getPathInputFileAutomaticFromCCDB]: >>> Pb-Pb, 5.34 TeV 2022, 2023, 2024: CCDB path " << pathInputFile;
LOG(info) << " >>> Run list: (529397 <= runNumber <= 529418 (LHC22o)) || (543437 (LHC23zx) <= runNumber <= 545367 (LHC23zzo))";
} else if (549559 <= runNumber && runNumber <= 558807) {

Check failure on line 215 in Common/Tools/TrackTuner.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
///
/// [CASE 3]: pp, 13.6 TeV 2024: CCDB path Users/m/mfaggin/test/inputsTrackTuner/pp2024/pass1_minBias/vsPhi
/// Run list: 549559 (LHC24ac) <= runNumber && runNumber <= 558807 (LHC24ao)
Expand All @@ -221,7 +220,7 @@
pathInputFile = "Users/m/mfaggin/test/inputsTrackTuner/pp2024/pass1_minBias/vsPhi";
LOG(info) << "[TrackTuner::getPathInputFileAutomaticFromCCDB]: >>> pp, 13.6 TeV 2024: CCDB path " << pathInputFile;
LOG(info) << " >>> Run list: 549559 (LHC24ac) <= runNumber && runNumber <= 558807 (LHC24ao)";
} else if (564356 <= runNumber && runNumber <= 564445) {

Check failure on line 223 in Common/Tools/TrackTuner.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
///
/// [CASE 4]: OO, 5.36 TeV 2025, period LHC25ae: CCDB path Users/m/mfaggin/test/inputsTrackTuner/OO/LHC25ae
/// Run list: 564356 <= runNumber && runNumber <= 564445
Expand All @@ -229,7 +228,7 @@
pathInputFile = "Users/m/mfaggin/test/inputsTrackTuner/OO/LHC25ae";
LOG(info) << "[TrackTuner::getPathInputFileAutomaticFromCCDB]: >>> OO, 5.36 TeV 2025, period LHC25ae: CCDB path " << pathInputFile;
LOG(info) << " >>> Run list: 564356 <= runNumber && runNumber <= 564445";
} else if (564468 <= runNumber && runNumber <= 564472) {

Check failure on line 231 in Common/Tools/TrackTuner.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
///
/// [CASE 5]: OO, 5.36 TeV 2025, period LHC25af: CCDB path Users/m/mfaggin/test/inputsTrackTuner/OO/LHC25af
/// Run list: 564468 <= runNumber && runNumber <= 564472
Expand Down Expand Up @@ -371,7 +370,7 @@

LOG(info) << "[TrackTuner]";
LOG(info) << "[TrackTuner] >>> String slices:";
for (const std::string& s : slices)

Check failure on line 373 in Common/Tools/TrackTuner.h

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
LOG(info) << "[TrackTuner] " << s;

/// check if the number of input parameters is correct
Expand Down Expand Up @@ -630,6 +629,20 @@
ccdb_object_qoverpt = dynamic_cast<TList*>(inputFileQoverPt->Get("ccdb_object"));
}

getDcaGraphs(ccdb_object_dca, ccdb_object_qoverpt);
}

/// \brief Builds the correction graphs from lists obtained elsewhere, typically straight
/// from the aod::TrackTunerCCDBObjects columns, so no CCDB client is involved.
void getDcaGraphs(TList* ccdb_object_dca, TList* ccdb_object_qoverpt)
{
/// abort if the graphs were already loaded
if (areGraphsConfigured) {
LOG(fatal) << "[TrackTuner::getDcaGraphs()] Function already called, i.e. the calibrations are already loaded. This further call should never happen. Aborting...";
}
std::string grOneOverPtPionNameMC = "sigmaVsPtMc";
std::string grOneOverPtPionNameData = "sigmaVsPtData";

// choose wheter to use corrections w/ PV refit or w/o it, and retrieve the proper TList
std::string dir = "woPvRefit";
if (usePvRefitCorrections) {
Expand Down Expand Up @@ -745,7 +758,7 @@
// get phibin
double phiMC = mcparticle.phi();
if (phiMC < 0.)
phiMC += o2::constants::math::TwoPI; // 2 * std::numbers::pi;//

Check failure on line 761 in Common/Tools/TrackTuner.h

View workflow job for this annotation

GitHub Actions / O2 linter

[two-pi-add-subtract]

Use RecoDecay::constrainAngle to restrict angle to a given range.
int phiBin = phiMC / (o2::constants::math::TwoPI + 0.0000001) * nPhiBins; // 0.0000001 just a numerical protection

dcaXYResMC = evalGraph(ptMC, grDcaXYResVsPtPionMC[phiBin].get());
Expand Down
47 changes: 43 additions & 4 deletions PWGLF/Utils/strangenessBuilderModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@

#include <array>
#include <cmath>
#include <cstddef>
#include <cstdint>
#include <cstdlib>
#include <numeric>
Expand Down Expand Up @@ -844,6 +845,30 @@ class BuilderModule
return idx;
}

// Feed the V-drift manager from the aod::TpcCalibCCDBObjects column when the BC table
// carries it, else fall back to a CCDB query. Lets migrated and un-migrated tasks share
// this module unchanged.
template <typename TBCs, typename TCollision>
void updateVDrift(TCollision const& collision)
{
auto const& bc = collision.template bc_as<TBCs>();
if constexpr (requires { bc.vdriftTgl(); }) {
mVDriftMgr.update(bc.vdriftTgl());
} else {
mVDriftMgr.update(bc.timestamp());
}
}

// Overload for tasks whose BC table carries the V-drift CCDB column: nothing in here
// needs a CCDB manager any more, so they need not own one.
template <typename TCollisions, typename TBCs>
bool initCCDB(TBCs const& bcs, TCollisions const& collisions)
{
static_assert(requires(typename TBCs::iterator bc) { bc.vdriftTgl(); }, "initCCDB without a CCDB manager needs a BC table joined with aod::TpcCalibCCDBObjects");
std::nullptr_t noCCDB{};
return initCCDB<TCollisions>(noCCDB, bcs, collisions);
}

template <typename TCollisions, typename TCCDB, typename TBCs>
bool initCCDB(TCCDB& ccdb, TBCs const& bcs, TCollisions const& collisions)
{
Expand Down Expand Up @@ -872,8 +897,12 @@ class BuilderModule

if (v0BuilderOpts.generatePhotonCandidates.value && v0BuilderOpts.moveTPCOnlyTracks.value) {
// initialize only if needed, avoid unnecessary CCDB calls
mVDriftMgr.init(&ccdb->instance());
mVDriftMgr.update(timestamp);
if constexpr (requires { bc.vdriftTgl(); }) {
mVDriftMgr.update(bc.vdriftTgl());
} else {
mVDriftMgr.init(&ccdb->instance());
mVDriftMgr.update(timestamp);
}
}

return true;
Expand Down Expand Up @@ -1021,7 +1050,7 @@ class BuilderModule
// handle TPC-only tracks properly (photon conversions)
if (v0BuilderOpts.moveTPCOnlyTracks) {
if (collision.has_bc()) {
mVDriftMgr.update(collision.template bc_as<aod::BCsWithTimestamps>().timestamp());
updateVDrift<TBCs>(collision);
}
if (isPosTPCOnly) {
// Nota bene: positive is TPC-only -> this entire V0 merits treatment as photon candidate
Expand Down Expand Up @@ -1498,7 +1527,7 @@ class BuilderModule
continue;
}
if (v0BuilderOpts.generatePhotonCandidates && v0BuilderOpts.moveTPCOnlyTracks && collision.has_bc()) {
mVDriftMgr.update(collision.template bc_as<aod::BCsWithTimestamps>().timestamp());
updateVDrift<TBCs>(collision);
}
}
auto const& posTrack = tracks.rawIteratorAt(v0.posTrackId);
Expand Down Expand Up @@ -2757,6 +2786,16 @@ class BuilderModule
return returnValue;
}

//__________________________________________________
// Overload for tasks sourcing every conditions object from CCDB columns; see initCCDB above.
template <typename THistoRegistry, typename TCollisions, typename TMCCollisions, typename TV0s, typename TCascades, typename TTrackedCascades, typename TTracks, typename TBCs, typename TMCParticles, typename TProducts>
void dataProcess(THistoRegistry& histos, TCollisions const& collisions, TMCCollisions const& mccollisions, TV0s const& v0s, TCascades const& cascades, TTrackedCascades const& trackedCascades, TTracks const& tracks, TBCs const& bcs, TMCParticles const& mcParticles, TProducts& products)
{
static_assert(requires(typename TBCs::iterator bc) { bc.vdriftTgl(); }, "dataProcess without a CCDB manager needs a BC table joined with aod::TpcCalibCCDBObjects");
std::nullptr_t noCCDB{};
dataProcess(noCCDB, histos, collisions, mccollisions, v0s, cascades, trackedCascades, tracks, bcs, mcParticles, products);
}

//__________________________________________________
template <typename TCCDB, typename THistoRegistry, typename TCollisions, typename TMCCollisions, typename TV0s, typename TCascades, typename TTrackedCascades, typename TTracks, typename TBCs, typename TMCParticles, typename TProducts>
void dataProcess(TCCDB& ccdb, THistoRegistry& histos, TCollisions const& collisions, TMCCollisions const& mccollisions, TV0s const& v0s, TCascades const& cascades, TTrackedCascades const& trackedCascades, TTracks const& tracks, TBCs const& bcs, TMCParticles const& mcParticles, TProducts& products)
Expand Down
Loading