diff --git a/Detectors/Align/Workflow/src/BarrelAlignmentSpec.cxx b/Detectors/Align/Workflow/src/BarrelAlignmentSpec.cxx index cae835a99a2aa..7681380692033 100644 --- a/Detectors/Align/Workflow/src/BarrelAlignmentSpec.cxx +++ b/Detectors/Align/Workflow/src/BarrelAlignmentSpec.cxx @@ -265,7 +265,7 @@ void BarrelAlignmentSpec::updateTimeDependentParams(ProcessingContext& pc) prevField = newField; if (mDetMask[DetID::TPC]) { mTPCParam.reset(new o2::gpu::GPUParam); - mTPCParam->SetDefaults(o2::base::Propagator::Instance()->getNominalBz()); + mTPCParam->SetDefaults(o2::base::Propagator::Instance()->getNominalBz(), false); mController->setTPCParam(mTPCParam.get()); } } diff --git a/GPU/GPUTracking/Base/GPUParam.cxx b/GPU/GPUTracking/Base/GPUParam.cxx index 57f23792e472a..3062e1c4d2064 100644 --- a/GPU/GPUTracking/Base/GPUParam.cxx +++ b/GPU/GPUTracking/Base/GPUParam.cxx @@ -30,7 +30,7 @@ using namespace o2::gpu; #include "utils/qconfigrtc.h" -void GPUParam::SetDefaults(float solenoidBz) +void GPUParam::SetDefaults(float solenoidBz, bool assumeConstantBz) { memset((void*)this, 0, sizeof(*this)); new (&rec) GPUSettingsRec; @@ -83,8 +83,7 @@ void GPUParam::SetDefaults(float solenoidBz) } #endif - par.dAlpha = 0.349066f; - UpdateBzOnly(solenoidBz); + UpdateBzOnly(solenoidBz, assumeConstantBz); par.dodEdx = 0; constexpr float plusZmin = 0.0529937; @@ -102,28 +101,23 @@ void GPUParam::SetDefaults(float solenoidBz) if (tmp >= GPUCA_NSECTORS / 4) { tmp -= GPUCA_NSECTORS / 2; } - SectorParam[i].Alpha = 0.174533f + par.dAlpha * tmp; + SectorParam[i].Alpha = 0.174533f + dAlpha * tmp; SectorParam[i].CosAlpha = CAMath::Cos(SectorParam[i].Alpha); SectorParam[i].SinAlpha = CAMath::Sin(SectorParam[i].Alpha); - SectorParam[i].AngleMin = SectorParam[i].Alpha - par.dAlpha / 2.f; - SectorParam[i].AngleMax = SectorParam[i].Alpha + par.dAlpha / 2.f; + SectorParam[i].AngleMin = SectorParam[i].Alpha - dAlpha / 2.f; + SectorParam[i].AngleMax = SectorParam[i].Alpha + dAlpha / 2.f; } - par.assumeConstantBz = false; - par.toyMCEventsFlag = false; par.continuousTracking = false; continuousMaxTimeBin = 0; tpcCutTimeBin = 0; - par.debugLevel = 0; par.earlyTpcTransform = false; } void GPUParam::UpdateSettings(const GPUSettingsGRP* g, const GPUSettingsProcessing* p, const GPURecoStepConfiguration* w, const GPUSettingsRecDynamic* d) { if (g) { - UpdateBzOnly(g->solenoidBzNominalGPU); - par.assumeConstantBz = g->constBz; - par.toyMCEventsFlag = g->homemadeEvents; + UpdateBzOnly(g->solenoidBzNominalGPU, g->constBz); par.continuousTracking = g->grpContinuousMaxTimeBin != 0; continuousMaxTimeBin = g->grpContinuousMaxTimeBin == -1 ? GPUSettings::TPC_MAX_TF_TIME_BIN : g->grpContinuousMaxTimeBin; tpcCutTimeBin = g->tpcCutTimeBin; @@ -131,7 +125,6 @@ void GPUParam::UpdateSettings(const GPUSettingsGRP* g, const GPUSettingsProcessi par.earlyTpcTransform = rec.tpc.forceEarlyTransform == -1 ? (!par.continuousTracking) : rec.tpc.forceEarlyTransform; qptB5Scaler = CAMath::Abs(bzkG) > 0.1f ? CAMath::Abs(bzkG) / 5.006680f : 1.f; // Repeat here, since passing in g is optional if (p) { - par.debugLevel = p->debugLevel; UpdateRun3ClusterErrors(p->param.tpcErrorParamY, p->param.tpcErrorParamZ); } if (w) { @@ -145,12 +138,12 @@ void GPUParam::UpdateSettings(const GPUSettingsGRP* g, const GPUSettingsProcessi } } -void GPUParam::UpdateBzOnly(float newSolenoidBz) +void GPUParam::UpdateBzOnly(float newSolenoidBz, bool assumeConstantBz) { bzkG = newSolenoidBz; bzCLight = bzkG * o2::gpu::gpu_common_constants::kCLight; polynomialField.Reset(); - if (par.assumeConstantBz) { + if (assumeConstantBz) { GPUTPCGMPolynomialFieldManager::GetPolynomialField(GPUTPCGMPolynomialFieldManager::kUniform, bzkG, polynomialField); } else { GPUTPCGMPolynomialFieldManager::GetPolynomialField(bzkG, polynomialField); @@ -160,7 +153,7 @@ void GPUParam::UpdateBzOnly(float newSolenoidBz) void GPUParam::SetDefaults(const GPUSettingsGRP* g, const GPUSettingsRec* r, const GPUSettingsProcessing* p, const GPURecoStepConfiguration* w) { - SetDefaults(g->solenoidBzNominalGPU); + SetDefaults(g->solenoidBzNominalGPU, g->constBz); if (r) { rec = *r; if (rec.fitPropagateBzOnly == -1) { diff --git a/GPU/GPUTracking/Base/GPUParam.h b/GPU/GPUTracking/Base/GPUParam.h index 076d25d72d178..2564fc9bf0462 100644 --- a/GPU/GPUTracking/Base/GPUParam.h +++ b/GPU/GPUTracking/Base/GPUParam.h @@ -47,6 +47,8 @@ namespace internal { template struct GPUParam_t { + static constexpr float dAlpha = 0.349066f; + T rec; S par; @@ -77,10 +79,10 @@ struct GPUParam_t { struct GPUParam : public internal::GPUParam_t { #ifndef GPUCA_GPUCODE - void SetDefaults(float solenoidBz); + void SetDefaults(float solenoidBz, bool assumeConstantBz); void SetDefaults(const GPUSettingsGRP* g, const GPUSettingsRec* r = nullptr, const GPUSettingsProcessing* p = nullptr, const GPURecoStepConfiguration* w = nullptr); void UpdateSettings(const GPUSettingsGRP* g, const GPUSettingsProcessing* p = nullptr, const GPURecoStepConfiguration* w = nullptr, const GPUSettingsRecDynamic* d = nullptr); - void UpdateBzOnly(float newSolenoidBz); + void UpdateBzOnly(float newSolenoidBz, bool assumeConstantBz); void UpdateRun3ClusterErrors(const float* yErrorParam, const float* zErrorParam); #endif @@ -92,7 +94,7 @@ struct GPUParam : public internal::GPUParam_t if (iSector >= GPUCA_NSECTORS / 4) { iSector -= GPUCA_NSECTORS / 2; } - return 0.174533f + par.dAlpha * iSector; + return 0.174533f + dAlpha * iSector; } GPUd() float GetClusterErrorSeeding(int32_t yz, int32_t type, float zDiff, float angle2, float unscaledMult) const; GPUd() void GetClusterErrorsSeeding2(uint8_t sector, int32_t row, float z, float sinPhi, float DzDs, float time, float& ErrY2, float& ErrZ2) const; diff --git a/GPU/GPUTracking/Base/GPUReconstructionTimeframe.cxx b/GPU/GPUTracking/Base/GPUReconstructionTimeframe.cxx index b25b93e957b15..fefcd0ac925fe 100644 --- a/GPU/GPUTracking/Base/GPUReconstructionTimeframe.cxx +++ b/GPU/GPUTracking/Base/GPUReconstructionTimeframe.cxx @@ -25,14 +25,13 @@ #include "TPCFastTransform.h" #include "CorrectionMapsHelper.h" #include "GPUO2DataTypes.h" +#include "GPUSettings.h" #include #include #include #include -#include "utils/qconfig.h" - using namespace o2::gpu; namespace o2::gpu diff --git a/GPU/GPUTracking/DataCompression/GPUTPCCompressionTrackModel.cxx b/GPU/GPUTracking/DataCompression/GPUTPCCompressionTrackModel.cxx index 1f84aa4599a27..ab7b0c99e09df 100644 --- a/GPU/GPUTracking/DataCompression/GPUTPCCompressionTrackModel.cxx +++ b/GPU/GPUTracking/DataCompression/GPUTPCCompressionTrackModel.cxx @@ -27,7 +27,6 @@ GPUd() void GPUTPCCompressionTrackModel::Init(float x, float y, float z, float a { mProp.SetMaterialTPC(); mProp.SetMaxSinPhi(GPUCA_MAX_SIN_PHI); - mProp.SetToyMCEventsFlag(false); mProp.SetSeedingErrors(true); // Larger errors for seeds, better since we don't start with good hypothesis mProp.SetFitInProjections(true); mProp.SetPropagateBzOnly(true); diff --git a/GPU/GPUTracking/DataTypes/GPUSettings.h b/GPU/GPUTracking/DataTypes/GPUSettings.h index c81a8e20e9926..9e3a3e9bd6ce8 100644 --- a/GPU/GPUTracking/DataTypes/GPUSettings.h +++ b/GPU/GPUTracking/DataTypes/GPUSettings.h @@ -52,7 +52,7 @@ struct GPUSettingsGRP { // All new members must be sizeof(int32_t) 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 int32_t constBz = 0; // for test-MC events with constant Bz - int32_t homemadeEvents = 0; // Toy-MC events + int32_t removed0 = 0; // Obsolete parameter, dummy value needed to support reading old dumps int32_t grpContinuousMaxTimeBin = -2; // 0 for triggered events, -1 for automatic setting, -2 invalid default int32_t needsClusterer = 0; // Set to true if the data requires the clusterizer int32_t doCompClusterDecode = 0; // Set to true if the data contains compressed TPC clusters diff --git a/GPU/GPUTracking/Definitions/GPUSettingsList.h b/GPU/GPUTracking/Definitions/GPUSettingsList.h index 238994ee53af5..c0f1b38530673 100644 --- a/GPU/GPUTracking/Definitions/GPUSettingsList.h +++ b/GPU/GPUTracking/Definitions/GPUSettingsList.h @@ -650,13 +650,9 @@ EndConfig() // Derrived parameters used in GPUParam BeginHiddenConfig(GPUSettingsParam, param) -AddVariableRTC(dAlpha, float, 0.f) // angular size -AddVariableRTC(assumeConstantBz, int8_t, 0) // Assume a constant magnetic field -AddVariableRTC(toyMCEventsFlag, int8_t, 0) // events were build with home-made event generator AddVariableRTC(continuousTracking, int8_t, 0) // Continuous tracking, estimate bz and errors for abs(z) = 125cm during seeding AddVariableRTC(dodEdx, int8_t, 0) // Do dEdx computation AddVariableRTC(earlyTpcTransform, int8_t, 0) // do Early TPC transformation -AddVariableRTC(debugLevel, int8_t, 0) // Debug level EndConfig() EndNamespace() // gpu diff --git a/GPU/GPUTracking/ITS/GPUITSFitterKernels.cxx b/GPU/GPUTracking/ITS/GPUITSFitterKernels.cxx index 1601e11f2c6fa..798efb7d7964e 100644 --- a/GPU/GPUTracking/ITS/GPUITSFitterKernels.cxx +++ b/GPU/GPUTracking/ITS/GPUITSFitterKernels.cxx @@ -63,7 +63,6 @@ GPUdii() void GPUITSFitterKernels::Thread<0>(int32_t nBlocks, int32_t nThreads, GPUTPCGMPropagator prop; prop.SetPolynomialField(&processors.param.polynomialField); prop.SetMaxSinPhi(GPUCA_MAX_SIN_PHI); - prop.SetToyMCEventsFlag(0); prop.SetFitInProjections(1); float bz = -5.f; // FIXME diff --git a/GPU/GPUTracking/Interface/GPUO2InterfaceDisplay.cxx b/GPU/GPUTracking/Interface/GPUO2InterfaceDisplay.cxx index f84f29d826f1d..60d5eaf9ae162 100644 --- a/GPU/GPUTracking/Interface/GPUO2InterfaceDisplay.cxx +++ b/GPU/GPUTracking/Interface/GPUO2InterfaceDisplay.cxx @@ -35,7 +35,7 @@ GPUO2InterfaceDisplay::GPUO2InterfaceDisplay(const GPUO2InterfaceConfiguration* mQA.reset(new GPUQA(nullptr, &config->configQA, mParam.get())); mQA->InitO2MCData(); } - mDisplay.reset(GPUDisplayInterface::getDisplay(mFrontend.get(), nullptr, mQA.get(), mParam.get(), &mConfig->configCalib, &mConfig->configDisplay)); + mDisplay.reset(GPUDisplayInterface::getDisplay(mFrontend.get(), nullptr, mQA.get(), mParam.get(), &mConfig->configCalib, &mConfig->configDisplay, &mConfig->configProcessing)); } GPUO2InterfaceDisplay::~GPUO2InterfaceDisplay() = default; diff --git a/GPU/GPUTracking/Interface/GPUO2InterfaceRefit.cxx b/GPU/GPUTracking/Interface/GPUO2InterfaceRefit.cxx index 10a1a75368c96..f09c5d0a4b1cb 100644 --- a/GPU/GPUTracking/Interface/GPUO2InterfaceRefit.cxx +++ b/GPU/GPUTracking/Interface/GPUO2InterfaceRefit.cxx @@ -129,7 +129,7 @@ GPUO2InterfaceRefit::GPUO2InterfaceRefit(const ClusterNativeAccess* cl, const Co void GPUO2InterfaceRefit::updateCalib(const CorrectionMapsHelper* trans, float bzNominalGPU) { - mParam->UpdateBzOnly(bzNominalGPU); + mParam->UpdateBzOnly(bzNominalGPU, false); mRefit->SetFastTransformHelper(trans); } diff --git a/GPU/GPUTracking/Interface/GPUO2InterfaceUtils.cxx b/GPU/GPUTracking/Interface/GPUO2InterfaceUtils.cxx index fa5705e903d1a..9454c9a2389ae 100644 --- a/GPU/GPUTracking/Interface/GPUO2InterfaceUtils.cxx +++ b/GPU/GPUTracking/Interface/GPUO2InterfaceUtils.cxx @@ -51,7 +51,7 @@ template <> void GPUO2InterfaceUtils::RunZSEncoder(const DigitArray& in, std::unique_ptr* outBuffer, uint32_t* outSizes, o2::raw::RawFileWriter* raw, const o2::InteractionRecord* ir, int32_t version, bool verify, float threshold, bool padding, std::function&)> digitsFilter) { GPUParam param; - param.SetDefaults(5.00668); + param.SetDefaults(5.00668, false); o2::gpu::GPUReconstructionConvert::RunZSEncoder(in, outBuffer, outSizes, raw, ir, param, version, verify, threshold, padding, digitsFilter); } template <> diff --git a/GPU/GPUTracking/Merger/GPUTPCGMMerger.cxx b/GPU/GPUTracking/Merger/GPUTPCGMMerger.cxx index 533e697cc5852..ab35e7f9a3c36 100644 --- a/GPU/GPUTracking/Merger/GPUTPCGMMerger.cxx +++ b/GPU/GPUTracking/Merger/GPUTPCGMMerger.cxx @@ -493,7 +493,6 @@ GPUd() int32_t GPUTPCGMMerger::RefitSectorTrack(GPUTPCGMSectorTrack& sectorTrack GPUTPCGMPropagator prop; prop.SetMaterialTPC(); prop.SetMaxSinPhi(GPUCA_MAX_SIN_PHI); - prop.SetToyMCEventsFlag(false); prop.SetSeedingErrors(true); // Larger errors for seeds, better since we don't start with good hypothesis prop.SetFitInProjections(false); prop.SetPolynomialField(&Param().polynomialField); @@ -666,7 +665,7 @@ GPUd() void GPUTPCGMMerger::MergeSectorsPrepareStep2(int32_t nBlocks, int32_t nT float fieldBz = Param().bzCLight; - float dAlpha = Param().par.dAlpha / 2; + float dAlpha = Param().dAlpha / 2; float x0 = 0; if (iBorder == 0) { // transport to the left edge of the sector and rotate horizontally diff --git a/GPU/GPUTracking/Merger/GPUTPCGMPropagator.cxx b/GPU/GPUTracking/Merger/GPUTPCGMPropagator.cxx index 90612fc98f836..c0dd6cfbcf918 100644 --- a/GPU/GPUTracking/Merger/GPUTPCGMPropagator.cxx +++ b/GPU/GPUTracking/Merger/GPUTPCGMPropagator.cxx @@ -74,23 +74,10 @@ GPUd() void GPUTPCGMPropagator::GetBxByBzBase(float cosAlpha, float sinAlpha, fl B[0] = bb[0] * cosAlpha + bb[1] * sinAlpha; B[1] = -bb[0] * sinAlpha + bb[1] * cosAlpha; B[2] = bb[2]; - /*if( mToyMCEvents ){ // special treatment for toy monte carlo - B[0] = 0; - B[1] = 0; - B[2] = mField->GetNominalBz(); - }*/ } GPUd() float GPUTPCGMPropagator::GetBzBase(float cosAlpha, float sinAlpha, float X, float Y, float Z) const { - if (mToyMCEvents) { // special treatment for toy monte carlo - float B[3]; - GetBxByBzBase(cosAlpha, sinAlpha, X, Y, Z, B); - return B[2]; - } - - // get global coordinates - float gx = getGlobalX(cosAlpha, sinAlpha, X, Y); float gy = getGlobalY(cosAlpha, sinAlpha, X, Y); @@ -529,8 +516,7 @@ GPUd() int32_t GPUTPCGMPropagator::FollowLinearization(const GPUTPCGMPhysicalTra float dLabs = CAMath::Abs(dLmask); // Energy Loss - - if (1 || !mToyMCEvents) { + if (true) { // std::cout<<"APPLY ENERGY LOSS!!!"<Param().polynomialField); prop.SetMaxSinPhi(GPUCA_MAX_SIN_PHI); - prop.SetToyMCEventsFlag(Merger->Param().par.toyMCEventsFlag); prop.SetMatLUT(Merger->Param().rec.useMatLUT ? Merger->GetConstantMem()->calibObjects.matLUT : nullptr); prop.SetSeedingErrors(false); prop.SetFitInProjections(true); diff --git a/GPU/GPUTracking/Merger/macros/checkPropagation.C b/GPU/GPUTracking/Merger/macros/checkPropagation.C index fd32cf0bc3a85..3dc3193992d46 100644 --- a/GPU/GPUTracking/Merger/macros/checkPropagation.C +++ b/GPU/GPUTracking/Merger/macros/checkPropagation.C @@ -91,7 +91,6 @@ int32_t checkPropagation() GPUTPCGMPropagator prop; prop.SetPolynomialField(&field); - prop.SetToyMCEventsFlag(kTRUE); const int32_t nTracks = 1000; diff --git a/GPU/GPUTracking/Refit/GPUTrackingRefit.cxx b/GPU/GPUTracking/Refit/GPUTrackingRefit.cxx index 7c7ce8d07ffb9..3f342c6111f04 100644 --- a/GPU/GPUTracking/Refit/GPUTrackingRefit.cxx +++ b/GPU/GPUTracking/Refit/GPUTrackingRefit.cxx @@ -88,7 +88,6 @@ GPUd() void GPUTrackingRefit::initProp(GPUTPCGM { prop.SetMaterialTPC(); prop.SetMaxSinPhi(GPUCA_MAX_SIN_PHI); - prop.SetToyMCEventsFlag(false); prop.SetSeedingErrors(false); prop.SetFitInProjections(mPparam->rec.fitInProjections != 0); prop.SetPropagateBzOnly(false); diff --git a/GPU/GPUTracking/SectorTracker/GPUTPCExtrapolationTracking.cxx b/GPU/GPUTracking/SectorTracker/GPUTPCExtrapolationTracking.cxx index 3ffead1c5902b..df998ca7cbb9a 100644 --- a/GPU/GPUTracking/SectorTracker/GPUTPCExtrapolationTracking.cxx +++ b/GPU/GPUTracking/SectorTracker/GPUTPCExtrapolationTracking.cxx @@ -129,11 +129,11 @@ GPUd() void GPUTPCExtrapolationTracking::PerformExtrapolationTracking(int32_t nB float Y = (float)tracker.Data().HitDataY(row, tracker.TrackHits()[tmpHit].HitIndex()) * row.HstepY() + row.Grid().YMin(); if (!right && Y < -row.MaxY() * tracker.Param().rec.tpc.extrapolationTrackingYRangeLower) { // GPUInfo("Track %d, lower row %d, left border (%f of %f)", i, mTrackHits[tmpHit].RowIndex(), Y, -row.MaxY()); - PerformExtrapolationTrackingRun(sectorTarget, smem, tracker, i, rowIndex, -tracker.Param().par.dAlpha, -1); + PerformExtrapolationTrackingRun(sectorTarget, smem, tracker, i, rowIndex, -tracker.Param().dAlpha, -1); } if (right && Y > row.MaxY() * tracker.Param().rec.tpc.extrapolationTrackingYRangeLower) { // GPUInfo("Track %d, lower row %d, right border (%f of %f)", i, mTrackHits[tmpHit].RowIndex(), Y, row.MaxY()); - PerformExtrapolationTrackingRun(sectorTarget, smem, tracker, i, rowIndex, tracker.Param().par.dAlpha, -1); + PerformExtrapolationTrackingRun(sectorTarget, smem, tracker, i, rowIndex, tracker.Param().dAlpha, -1); } } } @@ -146,11 +146,11 @@ GPUd() void GPUTPCExtrapolationTracking::PerformExtrapolationTracking(int32_t nB float Y = (float)tracker.Data().HitDataY(row, tracker.TrackHits()[tmpHit].HitIndex()) * row.HstepY() + row.Grid().YMin(); if (!right && Y < -row.MaxY() * tracker.Param().rec.tpc.extrapolationTrackingYRangeUpper) { // GPUInfo("Track %d, upper row %d, left border (%f of %f)", i, mTrackHits[tmpHit].RowIndex(), Y, -row.MaxY()); - PerformExtrapolationTrackingRun(sectorTarget, smem, tracker, i, rowIndex, -tracker.Param().par.dAlpha, 1); + PerformExtrapolationTrackingRun(sectorTarget, smem, tracker, i, rowIndex, -tracker.Param().dAlpha, 1); } if (right && Y > row.MaxY() * tracker.Param().rec.tpc.extrapolationTrackingYRangeUpper) { // GPUInfo("Track %d, upper row %d, right border (%f of %f)", i, mTrackHits[tmpHit].RowIndex(), Y, row.MaxY()); - PerformExtrapolationTrackingRun(sectorTarget, smem, tracker, i, rowIndex, tracker.Param().par.dAlpha, 1); + PerformExtrapolationTrackingRun(sectorTarget, smem, tracker, i, rowIndex, tracker.Param().dAlpha, 1); } } } diff --git a/GPU/GPUTracking/SectorTracker/GPUTPCTrackingData.cxx b/GPU/GPUTracking/SectorTracker/GPUTPCTrackingData.cxx index 9a4d2eebcb953..6c3ffbb5120bc 100644 --- a/GPU/GPUTracking/SectorTracker/GPUTPCTrackingData.cxx +++ b/GPU/GPUTracking/SectorTracker/GPUTPCTrackingData.cxx @@ -41,7 +41,7 @@ void GPUTPCTrackingData::InitializeRows(const GPUParam& p) } for (int32_t i = 0; i < GPUCA_ROW_COUNT; i++) { mRows[i].mX = GPUTPCGeometry::Row2X(i); - mRows[i].mMaxY = CAMath::Tan(p.par.dAlpha / 2.f) * mRows[i].mX; + mRows[i].mMaxY = CAMath::Tan(p.dAlpha / 2.f) * mRows[i].mX; } } diff --git a/GPU/GPUTracking/Standalone/Benchmark/standalone.cxx b/GPU/GPUTracking/Standalone/Benchmark/standalone.cxx index d4c83f92a2157..5277195752c56 100644 --- a/GPU/GPUTracking/Standalone/Benchmark/standalone.cxx +++ b/GPU/GPUTracking/Standalone/Benchmark/standalone.cxx @@ -286,7 +286,7 @@ int32_t SetupReconstruction() printf("Error reading event config file\n"); return 1; } - printf("Read event settings from dir %s (solenoidBz: %f, home-made events %d, constBz %d, maxTimeBin %d)\n", filename, rec->GetGRPSettings().solenoidBzNominalGPU, (int32_t)rec->GetGRPSettings().homemadeEvents, (int32_t)rec->GetGRPSettings().constBz, rec->GetGRPSettings().grpContinuousMaxTimeBin); + printf("Read event settings from dir %s (solenoidBz: %f, constBz %d, maxTimeBin %d)\n", filename, rec->GetGRPSettings().solenoidBzNominalGPU, (int32_t)rec->GetGRPSettings().constBz, rec->GetGRPSettings().grpContinuousMaxTimeBin); if (configStandalone.testSyncAsync) { recAsync->ReadSettings(filename); } @@ -305,9 +305,6 @@ int32_t SetupReconstruction() procSet = configStandalone.proc; GPURecoStepConfiguration steps; - if (configStandalone.eventGenerator) { - grp.homemadeEvents = true; - } if (configStandalone.solenoidBzNominalGPU != -1e6f) { grp.solenoidBzNominalGPU = configStandalone.solenoidBzNominalGPU; } diff --git a/GPU/GPUTracking/TRDTracking/GPUTRDInterfaces.h b/GPU/GPUTracking/TRDTracking/GPUTRDInterfaces.h index d26d46495069b..d45959f99b056 100644 --- a/GPU/GPUTracking/TRDTracking/GPUTRDInterfaces.h +++ b/GPU/GPUTracking/TRDTracking/GPUTRDInterfaces.h @@ -187,7 +187,6 @@ class propagatorInterface : public GPUTPCGMPropagator this->SetMaterialTPC(); this->SetPolynomialField(pField); this->SetMaxSinPhi(GPUCA_MAX_SIN_PHI); - this->SetToyMCEventsFlag(0); this->SetFitInProjections(0); this->SelectFieldRegion(GPUTPCGMPropagator::TRD); }; diff --git a/GPU/GPUTracking/display/GPUDisplay.cxx b/GPU/GPUTracking/display/GPUDisplay.cxx index 5b0960919da15..136b1947f60ee 100644 --- a/GPU/GPUTracking/display/GPUDisplay.cxx +++ b/GPU/GPUTracking/display/GPUDisplay.cxx @@ -34,7 +34,7 @@ #include "GPUTPCTracker.h" #include "GPUTPCGMMergedTrack.h" #include "GPUO2DataTypes.h" -#include "utils/qconfig.h" +#include "GPUSettings.h" #include "frontend/GPUDisplayFrontend.h" #include "backend/GPUDisplayBackend.h" @@ -44,17 +44,19 @@ constexpr hmm_mat4 MY_HMM_IDENTITY = {{{1, 0, 0, 0}, {0, 1, 0, 0}, {0, 0, 1, 0}, using namespace o2::gpu; -static const GPUSettingsDisplay& GPUDisplay_GetConfig(GPUChainTracking* chain) +const GPUSettingsDisplay& GPUDisplay::GetConfig(GPUChainTracking* chain) { static GPUSettingsDisplay defaultConfig; - if (chain && chain->mConfigDisplay) { - return *chain->mConfigDisplay; - } else { - return defaultConfig; - } + return (chain && chain->mConfigDisplay) ? *chain->mConfigDisplay : defaultConfig; +} + +const GPUSettingsProcessing& GPUDisplay::GetProcessingConfig(GPUChainTracking* chain) +{ + static GPUSettingsProcessing defaultConfig; + return chain ? chain->GetProcessingSettings() : defaultConfig; } -GPUDisplay::GPUDisplay(GPUDisplayFrontend* frontend, GPUChainTracking* chain, GPUQA* qa, const GPUParam* param, const GPUCalibObjectsConst* calib, const GPUSettingsDisplay* config) : GPUDisplayInterface(), mFrontend(frontend), mChain(chain), mConfig(config ? *config : GPUDisplay_GetConfig(chain)), mQA(qa) +GPUDisplay::GPUDisplay(GPUDisplayFrontend* frontend, GPUChainTracking* chain, GPUQA* qa, const GPUParam* param, const GPUCalibObjectsConst* calib, const GPUSettingsDisplay* config, const GPUSettingsProcessing* proc) : GPUDisplayInterface(), mFrontend(frontend), mChain(chain), mConfig(config ? *config : GetConfig(chain)), mProcessingSettings(proc ? *proc : GetProcessingConfig(chain)), mQA(qa) { mParam = param ? param : &mChain->GetParam(); mCalib = calib; diff --git a/GPU/GPUTracking/display/GPUDisplay.h b/GPU/GPUTracking/display/GPUDisplay.h index dbd90020698b2..06977c26e0b63 100644 --- a/GPU/GPUTracking/display/GPUDisplay.h +++ b/GPU/GPUTracking/display/GPUDisplay.h @@ -18,6 +18,7 @@ #include "frontend/GPUDisplayFrontend.h" #include "backend/GPUDisplayBackend.h" #include "GPUDisplayInterface.h" +#include "GPUSettings.h" #include "../utils/vecpod.h" #include "../utils/qsem.h" @@ -37,7 +38,7 @@ class GPUTRDGeometry; class GPUDisplay : public GPUDisplayInterface { public: - GPUDisplay(GPUDisplayFrontend* frontend, GPUChainTracking* chain, GPUQA* qa, const GPUParam* param = nullptr, const GPUCalibObjectsConst* calib = nullptr, const GPUSettingsDisplay* config = nullptr); + GPUDisplay(GPUDisplayFrontend* frontend, GPUChainTracking* chain, GPUQA* qa, const GPUParam* param = nullptr, const GPUCalibObjectsConst* calib = nullptr, const GPUSettingsDisplay* config = nullptr, const GPUSettingsProcessing* proc = nullptr); GPUDisplay(const GPUDisplay&) = delete; ~GPUDisplay() override = default; @@ -71,6 +72,7 @@ class GPUDisplay : public GPUDisplayInterface }; vecpod* vertexBuffer() { return mVertexBuffer; } const GPUParam* param() { return mParam; } + const GPUSettingsProcessing& GetProcessingSettings() const { return mProcessingSettings; } GPUDisplayFrontend* frontend() { return mFrontend; } bool drawTextInCompatMode() const { return mDrawTextInCompatMode; } int32_t& drawTextFontSize() { return mDrawTextFontSize; } @@ -140,6 +142,9 @@ class GPUDisplay : public GPUDisplayInterface bool mVerbose = false; }; + static const GPUSettingsDisplay& GetConfig(GPUChainTracking* chain); + static const GPUSettingsProcessing& GetProcessingConfig(GPUChainTracking* chain); + void DrawGLScene_internal(float animateTime = -1.f, bool renderToMixBuffer = false); void DrawGLScene_updateEventData(); void DrawGLScene_cameraAndAnimation(float animateTime, float& mixSlaveImage, hmm_mat4& nextViewMatrix); @@ -214,6 +219,7 @@ class GPUDisplay : public GPUDisplayInterface GPUSettingsDisplayLight mCfgL; GPUSettingsDisplayHeavy mCfgH; GPUSettingsDisplayRenderer mCfgR; + const GPUSettingsProcessing& mProcessingSettings; GPUQA* mQA; qSem mSemLockDisplay; diff --git a/GPU/GPUTracking/display/GPUDisplayInterface.cxx b/GPU/GPUTracking/display/GPUDisplayInterface.cxx index 2f5cc9cbb5dd5..2eddef998fa8b 100644 --- a/GPU/GPUTracking/display/GPUDisplayInterface.cxx +++ b/GPU/GPUTracking/display/GPUDisplayInterface.cxx @@ -65,9 +65,9 @@ static void* loadUnloadLib(bool load) return nullptr; } -GPUDisplayInterface* GPUDisplayInterface::getDisplay(GPUDisplayFrontendInterface* frontend, GPUChainTracking* chain, GPUQA* qa, const GPUParam* param, const GPUCalibObjectsConst* calib, const GPUSettingsDisplay* config) +GPUDisplayInterface* GPUDisplayInterface::getDisplay(GPUDisplayFrontendInterface* frontend, GPUChainTracking* chain, GPUQA* qa, const GPUParam* param, const GPUCalibObjectsConst* calib, const GPUSettingsDisplay* config, const GPUSettingsProcessing* proc) { - std::tuple args = {frontend, chain, qa, param, calib, config}; + std::tuple args = {frontend, chain, qa, param, calib, config, proc}; auto func = (GPUDisplayInterface * (*)(const char*, void*)) loadUnloadLib(true); return func ? func("display", &args) : nullptr; } diff --git a/GPU/GPUTracking/display/GPUDisplayInterface.h b/GPU/GPUTracking/display/GPUDisplayInterface.h index 3c6928c78e5a1..574a8cffc71f0 100644 --- a/GPU/GPUTracking/display/GPUDisplayInterface.h +++ b/GPU/GPUTracking/display/GPUDisplayInterface.h @@ -15,7 +15,7 @@ #ifndef GPUDISPLAYINTERFACE_H #define GPUDISPLAYINTERFACE_H -#include "GPUSettings.h" +#include namespace o2::gpu { @@ -23,6 +23,16 @@ namespace o2::gpu class GPUChainTracking; class GPUQA; struct GPUParam; +struct GPUTrackingInOutPointers; +template +struct ConstPtr; +template