Skip to content

Commit 76a29a7

Browse files
authored
Merge 4b156fe into sapling-pr-archive-ktf
2 parents 55d4b7b + 4b156fe commit 76a29a7

7 files changed

Lines changed: 54 additions & 30 deletions

File tree

Detectors/ITSMFT/common/base/include/ITSMFTBase/DPLAlpideParam.h

Lines changed: 0 additions & 13 deletions
This file was deleted.

Detectors/Upgrades/ALICE3/TRK/simulation/src/TRKServices.cxx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -881,35 +881,35 @@ void TRKServices::createOTServicesPeacock(TGeoVolume* motherVolume)
881881
// TODO: add cables/connections at ends of OT barrels
882882
// Set rMin, rMax and dZ
883883

884-
double rMin = 45.0;
885-
double rMax = rMinOuterServices;
886-
double zCur = 145.0;
887-
double dZ = siO2FiberAreaB / (4 * 3.14 * rMax);
888-
TGeoTube* outerBarrelFiberSIO2 = new TGeoTube(Form("TRK_OUTERBARREL_FIBER_SIO2sh_%s", orLabel.c_str()), rMin, rMax, dZ);
884+
double rMinOTbarrelServices = 45.0; // cm, radius of first OT layer
885+
double rMaxOTbarrelServices = 80; // cm, radius of last OT layer
886+
double zCur = 135.0; // cm, approximate position of OT services in z
887+
double dZ = siO2FiberAreaB / (4 * 3.14 * rMaxOTbarrelServices);
888+
TGeoTube* outerBarrelFiberSIO2 = new TGeoTube(Form("TRK_OUTERBARREL_FIBER_SIO2sh_%s", orLabel.c_str()), rMinOTbarrelServices, rMaxOTbarrelServices, dZ);
889889
TGeoVolume* outerBarrelFiberSIO2Volume = new TGeoVolume(Form("TRK_OUTERBARREL_FIBER_SIO2_%s", orLabel.c_str()), outerBarrelFiberSIO2, medSiO2);
890890
outerBarrelFiberSIO2Volume->SetLineColor(kGray);
891891
auto* combiTrans = new TGeoCombiTrans(0, 0, (int)orientation * (zCur + dZ), nullptr);
892892
motherVolume->AddNode(outerBarrelFiberSIO2Volume, 1, combiTrans);
893893

894894
zCur += 2 * dZ;
895-
dZ = peFiberAreaB / (4 * 3.14 * rMax);
896-
TGeoTube* outerBarrelFiberPE = new TGeoTube(Form("TRK_OUTERBARREL_FIBER_PEsh_%s", orLabel.c_str()), rMin, rMax, dZ);
895+
dZ = peFiberAreaB / (4 * 3.14 * rMaxOTbarrelServices);
896+
TGeoTube* outerBarrelFiberPE = new TGeoTube(Form("TRK_OUTERBARREL_FIBER_PEsh_%s", orLabel.c_str()), rMinOTbarrelServices, rMaxOTbarrelServices, dZ);
897897
TGeoVolume* outerBarrelFiberPEVolume = new TGeoVolume(Form("TRK_OUTERBARREL_FIBER_PE_%s", orLabel.c_str()), outerBarrelFiberPE, medPE);
898898
outerBarrelFiberPEVolume->SetLineColor(kGray);
899899
combiTrans = new TGeoCombiTrans(0, 0, (int)orientation * (zCur + dZ), nullptr);
900900
motherVolume->AddNode(outerBarrelFiberPEVolume, 1, combiTrans);
901901

902902
zCur += 2 * dZ;
903-
dZ = cuPowerAreaB / (4 * 3.14 * rMax);
904-
TGeoTube* outerBarrelPowerCu = new TGeoTube(Form("TRK_OUTERBARREL_POWER_CUsh_%s", orLabel.c_str()), rMin, rMax, dZ);
903+
dZ = cuPowerAreaB / (4 * 3.14 * rMaxOTbarrelServices);
904+
TGeoTube* outerBarrelPowerCu = new TGeoTube(Form("TRK_OUTERBARREL_POWER_CUsh_%s", orLabel.c_str()), rMinOTbarrelServices, rMaxOTbarrelServices, dZ);
905905
TGeoVolume* outerBarrelPowerCuVolume = new TGeoVolume(Form("TRK_OUTERBARREL_POWER_CU_%s", orLabel.c_str()), outerBarrelPowerCu, medCu);
906-
outerBarrelFiberSIO2Volume->SetLineColor(kGray);
906+
outerBarrelPowerCuVolume->SetLineColor(kGray);
907907
combiTrans = new TGeoCombiTrans(0, 0, (int)orientation * (zCur + dZ), nullptr);
908908
motherVolume->AddNode(outerBarrelPowerCuVolume, 1, combiTrans);
909909

910910
zCur += 2 * dZ;
911-
dZ = pePowerAreaB / (4 * 3.14 * rMax);
912-
TGeoTube* outerBarrelPowerPE = new TGeoTube(Form("TRK_OUTERBARREL_POWER_PEsh_%s", orLabel.c_str()), rMin, rMax, dZ);
911+
dZ = pePowerAreaB / (4 * 3.14 * rMaxOTbarrelServices);
912+
TGeoTube* outerBarrelPowerPE = new TGeoTube(Form("TRK_OUTERBARREL_POWER_PEsh_%s", orLabel.c_str()), rMinOTbarrelServices, rMaxOTbarrelServices, dZ);
913913
TGeoVolume* outerBarrelPowerPEVolume = new TGeoVolume(Form("TRK_OUTERBARREL_POWER_PE_%s", orLabel.c_str()), outerBarrelPowerPE, medPE);
914914
outerBarrelPowerPEVolume->SetLineColor(kGray);
915915
combiTrans = new TGeoCombiTrans(0, 0, (int)orientation * (zCur + dZ), nullptr);

Detectors/Vertexing/include/DetectorsVertexing/PVertexer.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#include "ReconstructionDataFormats/PrimaryVertex.h"
3030
#include "DetectorsVertexing/PVertexerHelpers.h"
3131
#include "DetectorsVertexing/PVertexerParams.h"
32+
#include "DetectorsBase/Propagator.h"
3233
#include "ReconstructionDataFormats/GlobalTrackID.h"
3334
#include "DataFormatsCalibration/MeanVertexObject.h"
3435
#include "DataFormatsITSMFT/DPLAlpideParam.h"
@@ -85,6 +86,7 @@ class PVertexer
8586
void setBunchFilling(const o2::BunchFilling& bf);
8687

8788
void setBz(float bz) { mBz = bz; }
89+
void setMatCorrType(o2::base::Propagator::MatCorrType type) { mMatCorr = type; }
8890
void setValidateWithIR(bool v) { mValidateWithIR = v; }
8991
bool getValidateWithIR() const { return mValidateWithIR; }
9092
void setTrackSources(GTrackID::mask_t s);
@@ -187,6 +189,7 @@ class PVertexer
187189
std::vector<TimeZCluster> mTimeZClusters; ///< set of time clusters
188190
float mITSROFrameLengthMUS = 0; ///< ITS readout time span in \mus
189191
float mBz = 0.; ///< mag.field at beam line
192+
o2::base::Propagator::MatCorrType mMatCorr = o2::base::Propagator::MatCorrType::USEMatCorrLUT; ///< material correction for propagation
190193
float mDBScanDeltaT = 0.; ///< deltaT cut for DBScan check
191194
float mDBSMaxZ2InvCorePoint = 0; ///< inverse of max sigZ^2 of the track which can be core point in the DBScan
192195
bool mValidateWithIR = false; ///< require vertex validation with InteractionCandidates (if available)

Detectors/Vertexing/src/PVertexer.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1218,7 +1218,7 @@ bool PVertexer::relateTrackToMeanVertex(o2::track::TrackParCov& trc, float vtxEr
12181218
z = mMeanVertex.getZ();
12191219
}
12201220
mMeanVertex.setMeanXYVertexAtZ(mMeanVertexSeed, z);
1221-
if (!o2::base::Propagator::Instance()->propagateToDCA(mMeanVertex, trc, mBz, 2.0f, o2::base::Propagator::MatCorrType::USEMatCorrLUT, &dca, nullptr, 0, mPVParams->dcaTolerance)) {
1221+
if (!o2::base::Propagator::Instance()->propagateToDCA(mMeanVertex, trc, mBz, 2.0f, mMatCorr, &dca, nullptr, 0, mPVParams->dcaTolerance)) {
12221222
return false;
12231223
}
12241224
return dca.getY() * dca.getY() / (dca.getSigmaY2() + vtxErr2) < mPVParams->pullIniCut;
@@ -1227,7 +1227,7 @@ bool PVertexer::relateTrackToMeanVertex(o2::track::TrackParCov& trc, float vtxEr
12271227
//______________________________________________
12281228
bool PVertexer::relateTrackToVertex(o2::track::TrackParCov& trc, const o2d::VertexBase& vtxSeed) const
12291229
{
1230-
return o2::base::Propagator::Instance()->propagateToDCA(vtxSeed, trc, mBz, 2.0f, o2::base::Propagator::MatCorrType::USEMatCorrLUT);
1230+
return o2::base::Propagator::Instance()->propagateToDCA(vtxSeed, trc, mBz, 2.0f, mMatCorr);
12311231
}
12321232

12331233
//______________________________________________

Framework/Core/src/CommonServices.cxx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -768,6 +768,22 @@ o2::framework::ServiceSpec
768768
.user<DecongestionContext>({.ref = services, .oldestPossibleOutput = oldestPossibleOutput}));
769769
}
770770

771+
// When consumeWhenPastOldestPossibleTimeframe is active, we always
772+
// schedule the callback even when oldestPossibleOutput has not changed
773+
// yet. Retry slots held by this policy will be consumed after this
774+
// domainInfoUpdated call (once getReadyToProcess re-checks them), and
775+
// the callback — running in the next iteration — will recompute
776+
// oldestPossibleOutput and forward the updated value downstream.
777+
if (decongestion.consumeWhenPastOldestPossibleTimeframeActive) {
778+
auto& queue = services.get<AsyncQueue>();
779+
AsyncQueueHelpers::post(
780+
queue, AsyncTask{.timeslice = TimesliceId{oldestPossibleTimeslice},
781+
.id = decongestion.oldestPossibleTimesliceTask,
782+
.debounce = -1,
783+
.callback = decongestionCallbackPastOldest}
784+
.user<DecongestionContext>({.ref = services, .oldestPossibleOutput = oldestPossibleOutput}));
785+
}
786+
771787
if (oldestPossibleOutput.timeslice.value == decongestion.lastTimeslice) {
772788
O2_SIGNPOST_EVENT_EMIT(data_processor_context, cid, "oldest_possible_timeslice", "Synchronous: Not sending already sent value: %" PRIu64, (uint64_t)oldestPossibleOutput.timeslice.value);
773789
return;

Framework/Core/src/WorkflowHelpers.cxx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -627,12 +627,15 @@ void WorkflowHelpers::injectServiceDevices(WorkflowSpec& workflow, ConfigContext
627627
// Use the new dummy sink when the AOD reader is there
628628
O2_SIGNPOST_ID_GENERATE(sid, workflow_helpers);
629629
if (tfnsource != workflow.end()) {
630-
O2_SIGNPOST_EVENT_EMIT(workflow_helpers, sid, "injectServiceDevices", "Injecting scheduled dummy sink");
631-
// if there is a tfnsource, make sure the sink gets TFN/TFF
632630
DataSpecUtils::updateInputList(ignored, InputSpec{"tfn", "TFN", "TFNumber", 0, Lifetime::Sporadic});
633631
DataSpecUtils::updateInputList(ignored, InputSpec{"tff", "TFF", "TFFilename", 0, Lifetime::Sporadic});
632+
}
633+
634+
if (tfnsource != workflow.end() && !tfnsource->name.starts_with("aod-producer-workflow")) { // any tfnsource except the aod-producer should use scheduled sink
635+
O2_SIGNPOST_EVENT_EMIT(workflow_helpers, sid, "injectServiceDevices", "Injecting scheduled dummy sink");
636+
// if there is a tfnsource, make sure the sink gets TFN/TFF
634637
extraSpecs.push_back(CommonDataProcessors::getScheduledDummySink(ignored));
635-
} else {
638+
} else { // if there is no tfn source or if that source is aod-producer-workflow, out-of-band channel is used to propagate the number of consumed timeframes
636639
O2_SIGNPOST_EVENT_EMIT(workflow_helpers, sid, "injectServiceDevices", "Injecting rate limited dummy sink");
637640
std::string rateLimitingChannelConfigOutput;
638641
if (rateLimitingIPCID != -1) {

GPU/Common/GPUCommonMath.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ class GPUCommonMath
108108
GPUd() constexpr static float QuietNaN() { return GPUCA_CHOICE(std::numeric_limits<float>::quiet_NaN(), __builtin_nanf(""), nan(0u)); }
109109
#endif
110110
GPUd() constexpr static uint32_t Clz(uint32_t val);
111+
GPUd() constexpr static uint32_t Ctz(uint32_t val);
111112
GPUd() constexpr static uint32_t Popcount(uint32_t val);
112113

113114
GPUd() static void memcpy(void* dst, const void* src, size_t size);
@@ -332,6 +333,20 @@ GPUdi() constexpr uint32_t GPUCommonMath::Clz(uint32_t x)
332333
#endif
333334
}
334335

336+
GPUdi() constexpr uint32_t GPUCommonMath::Ctz(uint32_t x)
337+
{
338+
#if (defined(__GNUC__) || defined(__clang__) || defined(__CUDACC__) || defined(__HIPCC__))
339+
return x == 0 ? 32 : GPUCA_CHOICE(__builtin_ctz(x), __ffs(x) - 1, __builtin_ctz(x));
340+
#else
341+
for (uint32_t i = 0; i < 32; ++i) {
342+
if (x & (1u << i)) {
343+
return i;
344+
}
345+
}
346+
return 32;
347+
#endif
348+
}
349+
335350
GPUdi() constexpr uint32_t GPUCommonMath::Popcount(uint32_t x)
336351
{
337352
#if (defined(__GNUC__) || defined(__clang__) || defined(__CUDACC__) || defined(__HIPCC__)) && !defined(__OPENCL__) // TODO: remove OPENCL when reported SPIR-V bug is fixed

0 commit comments

Comments
 (0)