Skip to content

Commit

Permalink
GPU/TPC: Some fixes for number of time bins not determined correctly …
Browse files Browse the repository at this point in the history
…for triggered data
  • Loading branch information
davidrohr committed Aug 14, 2024
1 parent 6ff2d76 commit 0cb6393
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
5 changes: 4 additions & 1 deletion Detectors/TPC/qc/src/Tracking.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ void Tracking::initialize(outputModes outputMode, bool postprocessOnly)
} else {
throw std::runtime_error("Failed to initialize run parameters from GRP");
}
mQAConfig->ReadConfigurableParam();
auto global = mQAConfig->ReadConfigurableParam();
if (grp->isDetReadOut(o2::detectors::DetID::TPC) && global.tpcTriggeredMode ^ !grp->isDetContinuousReadOut(o2::detectors::DetID::TPC)) {
throw std::runtime_error("TPC triggered mode (GPU_global.tpcTriggeredMode) not set correctly");
}
mQAConfig->configQA.shipToQCAsCanvas = mOutputMode == outputLayout;
mQA = std::make_unique<GPUO2InterfaceQA>(mQAConfig.get());
if (!postprocessOnly) {
Expand Down
4 changes: 2 additions & 2 deletions GPU/GPUTracking/DataTypes/GPUSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ class GPUSettings
#ifdef GPUCA_NOCOMPAT
// Settings describing the global run parameters
struct GPUSettingsGRP {
// All new members must be sizeof(int) resp. sizeof(float) for alignment reasons!
// All new members must be sizeof(int) resp. sizeof(float) for alignment reasons!, default value for newly added members for old data will be 0.
float solenoidBzNominalGPU = -5.00668f; // solenoid field strength
int constBz = 0; // for test-MC events with constant Bz
int homemadeEvents = 0; // Toy-MC events
int continuousMaxTimeBin = 0; // 0 for triggered events, -1 for default of 23ms
int continuousMaxTimeBin = 0; // 0 for triggered events, -1 for default TF length
int needsClusterer = 0; // Set to true if the data requires the clusterizer
int doCompClusterDecode = 0; // Set to true if the data contains compressed TPC clusters
};
Expand Down
10 changes: 6 additions & 4 deletions GPU/GPUTracking/Interface/GPUO2InterfaceConfigurableParam.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,12 @@ GPUSettingsO2 GPUO2InterfaceConfiguration::ReadConfigurableParam(GPUO2InterfaceC
obj.configReconstruction = rec;
obj.configDisplay = display;
obj.configQA = QA;
if (global.continuousMaxTimeBin) {
obj.configGRP.continuousMaxTimeBin = global.continuousMaxTimeBin;
} else {
obj.configGRP.continuousMaxTimeBin = global.tpcTriggeredMode ? 0 : -1;
if (obj.configGRP.continuousMaxTimeBin == 0 || obj.configGRP.continuousMaxTimeBin == -1) {
if (global.continuousMaxTimeBin) {
obj.configGRP.continuousMaxTimeBin = global.continuousMaxTimeBin;
} else {
obj.configGRP.continuousMaxTimeBin = global.tpcTriggeredMode ? 0 : -1;
}
}
if (global.solenoidBzNominalGPU > -1e6f) {
obj.configGRP.solenoidBzNominalGPU = global.solenoidBzNominalGPU;
Expand Down
2 changes: 2 additions & 0 deletions GPU/GPUTracking/Interface/GPUO2InterfaceUtils.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,10 @@ std::unique_ptr<GPUParam> GPUO2InterfaceUtils::getFullParam(float solenoidBz, un
if (!pConfiguration) {
tmpConfig = std::make_unique<GPUO2InterfaceConfiguration>();
pConfiguration = &tmpConfig;
(*pConfiguration)->configGRP.continuousMaxTimeBin = -1;
} else if (!*pConfiguration) {
*pConfiguration = std::make_unique<GPUO2InterfaceConfiguration>();
(*pConfiguration)->configGRP.continuousMaxTimeBin = -1;
}
(*pConfiguration)->configGRP.solenoidBzNominalGPU = solenoidBz;
if (pO2Settings && *pO2Settings) {
Expand Down

0 comments on commit 0cb6393

Please sign in to comment.