From 1ff4d57f4477bec8c824396b9a09c82f3a714cc3 Mon Sep 17 00:00:00 2001 From: Manos Vourliotis Date: Fri, 6 Dec 2024 13:48:58 -0800 Subject: [PATCH] Improvements to the LST workflows and small general LST fixes --- Configuration/PyReleaseValidation/README.md | 2 +- .../PyReleaseValidation/python/relval_Run4.py | 5 ++- .../PyReleaseValidation/python/relval_gpu.py | 6 ++-- .../python/upgradeWorkflowComponents.py | 23 ++++++++----- .../python/TrackingSourceConfig_Tier0_cff.py | 5 +++ RecoTracker/LST/plugins/LSTOutputConverter.cc | 3 +- RecoTracker/LSTCore/BuildFile.xml | 1 + RecoTracker/LSTCore/interface/Common.h | 2 +- .../LSTCore/interface/QuintupletsSoA.h | 4 +-- RecoTracker/LSTCore/interface/alpaka/Common.h | 6 ++++ RecoTracker/LSTCore/src/ModuleMethods.h | 5 ++- RecoTracker/LSTCore/src/alpaka/Hit.h | 31 +++++------------- .../LSTCore/src/alpaka/LSTEvent.dev.cc | 24 +++++++------- .../LSTCore/src/alpaka/PixelQuintuplet.h | 4 +-- RecoTracker/LSTCore/src/alpaka/Quintuplet.h | 32 +++++++++---------- .../LSTCore/src/alpaka/TrackCandidate.h | 4 +-- RecoTracker/LSTCore/standalone/LST/Makefile | 2 +- RecoTracker/LSTCore/standalone/Makefile | 4 +-- RecoTracker/LSTCore/standalone/setup.sh | 5 +-- 19 files changed, 86 insertions(+), 82 deletions(-) diff --git a/Configuration/PyReleaseValidation/README.md b/Configuration/PyReleaseValidation/README.md index a8690b3454cb6..e4a98de091923 100644 --- a/Configuration/PyReleaseValidation/README.md +++ b/Configuration/PyReleaseValidation/README.md @@ -66,7 +66,7 @@ The offsets currently in use are: * 0.701: DisplacedRegionalStep tracking iteration for Run-3 * 0.702: trackingMkFit modifier for Phase-2 (initialStep only) * 0.703: LST tracking (Phase-2 only), initialStep+HighPtTripletStep only, on CPU -* 0.704: LST tracking (Phase-2 only), initialStep+HighPtTripletStep only, on GPU +* 0.704: LST tracking (Phase-2 only), initialStep+HighPtTripletStep only, on GPU (if available) * 0.75: HLT phase-2 timing menu * 0.751: HLT phase-2 timing menu Alpaka variant * 0.752: HLT phase-2 timing menu ticl_v5 variant diff --git a/Configuration/PyReleaseValidation/python/relval_Run4.py b/Configuration/PyReleaseValidation/python/relval_Run4.py index 8bf373840841b..a4e587868c493 100644 --- a/Configuration/PyReleaseValidation/python/relval_Run4.py +++ b/Configuration/PyReleaseValidation/python/relval_Run4.py @@ -37,9 +37,6 @@ numWFIB.extend([32034.0]) #Run4D115 numWFIB.extend([32434.0]) #Run4D116 -# Temporary placement for LST workflow to workaround PR conflicts - to be formatted and placed in an upcoming PR -numWFIB.extend([24834.703]) #Run4D98 LST tracking (initialStep+HighPtTripletStep only) - #Additional sample for short matrix and IB #Default Phase-2 Det NoPU numWFIB.extend([prefixDet+34.911]) #DD4hep XML @@ -47,6 +44,7 @@ numWFIB.extend([prefixDet+34.5]) #pixelTrackingOnly numWFIB.extend([prefixDet+34.9]) #vector hits numWFIB.extend([prefixDet+34.402]) #Alpaka local reconstruction offloaded on device (GPU if available) +numWFIB.extend([prefixDet+34.703]) #LST tracking on CPU (initialStep+HighPtTripletStep only) numWFIB.extend([prefixDet+34.21]) #prodlike numWFIB.extend([prefixDet+96.0]) #CloseByPGun CE_E_Front_120um numWFIB.extend([prefixDet+100.0]) #CloseByPGun CE_H_Coarse_Scint @@ -60,6 +58,7 @@ numWFIB.extend([prefixDet+234.21]) #prodlike PU numWFIB.extend([prefixDet+234.9921]) #prodlike premix stage1+stage2 numWFIB.extend([prefixDet+234.114]) #PU, with 10% OT inefficiency +numWFIB.extend([prefixDet+234.703]) #LST tracking on CPU (initialStep+HighPtTripletStep only) # numWFIB.extend([24834.911]) #D98 XML, to monitor instability of DD4hep for numWF in numWFIB: diff --git a/Configuration/PyReleaseValidation/python/relval_gpu.py b/Configuration/PyReleaseValidation/python/relval_gpu.py index e70d877c1daaa..8fb4653b9e77c 100644 --- a/Configuration/PyReleaseValidation/python/relval_gpu.py +++ b/Configuration/PyReleaseValidation/python/relval_gpu.py @@ -70,13 +70,11 @@ 13061.402, # Run4, Alpaka-based noPU - 29634.402, 29634.403, 29634.404, 29634.406, + 29634.402, 29634.403, 29634.404, 29634.406, 29634.704, 29661.402, - # Run4, Alpaka-based noPU GPU LST tracking D98 - 24834.704, # Run4, Alpaka-based PU - 29834.402, 29834.403, 29834.404 + 29834.402, 29834.403, 29834.404, 29834.704 ] for numWF in numWFIB: diff --git a/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py b/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py index aebfd585dc480..62bd1c56ad649 100644 --- a/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py +++ b/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py @@ -498,8 +498,9 @@ def setup__(self, step, stepName, stepDict, k, properties): if 'Reco' in step: stepDict[stepName][k] = merge([self.step3, stepDict[step][k]]) elif 'HARVEST' in step: stepDict[stepName][k] = merge([{'-s': 'HARVESTING:@trackingOnlyValidation+@trackingOnlyDQM'}, stepDict[step][k]]) elif 'ALCA' in step: stepDict[stepName][k] = None - def condition_(self, fragment, stepList, key, hasHarvest): - return ('Run4' in key) + def condition(self, fragment, stepList, key, hasHarvest): + result = (fragment=="TTbar_14TeV") and hasHarvest and ('Run4' in key) + return result upgradeWFs['lstOnCPUIters01TrackingOnly'] = UpgradeWorkflow_lstOnCPUIters01TrackingOnly( steps = [ 'RecoGlobal', @@ -508,7 +509,10 @@ def condition_(self, fragment, stepList, key, hasHarvest): 'ALCA', 'ALCAPhase2' ], - PU = [], + PU = [ + 'RecoGlobal', + 'HARVESTGlobal', + ], suffix = '_lstOnCPUIters01TrackingOnly', offset = 0.703, ) @@ -517,14 +521,15 @@ def condition_(self, fragment, stepList, key, hasHarvest): '--accelerators' : 'cpu' } -# LST on GPU, initialStep+highPtTripletStep-only tracking-only +# LST on GPU (if available), initialStep+highPtTripletStep-only tracking-only class UpgradeWorkflow_lstOnGPUIters01TrackingOnly(UpgradeWorkflowTracking): def setup__(self, step, stepName, stepDict, k, properties): if 'Reco' in step: stepDict[stepName][k] = merge([self.step3, stepDict[step][k]]) elif 'HARVEST' in step: stepDict[stepName][k] = merge([{'-s': 'HARVESTING:@trackingOnlyValidation+@trackingOnlyDQM'}, stepDict[step][k]]) elif 'ALCA' in step: stepDict[stepName][k] = None - def condition_(self, fragment, stepList, key, hasHarvest): - return ('Run4' in key) + def condition(self, fragment, stepList, key, hasHarvest): + result = (fragment=="TTbar_14TeV") and hasHarvest and ('Run4' in key) + return result upgradeWFs['lstOnGPUIters01TrackingOnly'] = UpgradeWorkflow_lstOnGPUIters01TrackingOnly( steps = [ 'RecoGlobal', @@ -533,13 +538,15 @@ def condition_(self, fragment, stepList, key, hasHarvest): 'ALCA', 'ALCAPhase2' ], - PU = [], + PU = [ + 'RecoGlobal', + 'HARVESTGlobal', + ], suffix = '_lstOnGPUIters01TrackingOnly', offset = 0.704, ) upgradeWFs['lstOnGPUIters01TrackingOnly'].step3 = upgradeWFs['trackingOnly'].step3 | { '--procModifiers': 'trackingIters01,trackingLST', - '--accelerators' : 'gpu-*' } #DeepCore seeding for JetCore iteration workflow diff --git a/DQM/TrackingMonitorSource/python/TrackingSourceConfig_Tier0_cff.py b/DQM/TrackingMonitorSource/python/TrackingSourceConfig_Tier0_cff.py index faef9e465b492..aaeb59bb3fe03 100644 --- a/DQM/TrackingMonitorSource/python/TrackingSourceConfig_Tier0_cff.py +++ b/DQM/TrackingMonitorSource/python/TrackingSourceConfig_Tier0_cff.py @@ -395,6 +395,11 @@ def _copyIfExists(mod, pset, name): from Configuration.ProcessModifiers.seedingDeepCore_cff import seedingDeepCore seedingDeepCore.toReplaceWith(TrackSeedMonSequence,_seedingDeepCore_TrackSeedMonSequence) +from Configuration.ProcessModifiers.trackingLST_cff import trackingLST +trackingLST.toModify(locals()["TrackSeedMonhighPtTripletStep"], + SeedProducer = "lstPixelSeedInputProducer" +) + TrackingDQMSourceTier0 += TrackSeedMonSequence from DQM.TrackingMonitorSource.shortTrackResolution_cff import * diff --git a/RecoTracker/LST/plugins/LSTOutputConverter.cc b/RecoTracker/LST/plugins/LSTOutputConverter.cc index 73209db234b5e..13849e52a1209 100644 --- a/RecoTracker/LST/plugins/LSTOutputConverter.cc +++ b/RecoTracker/LST/plugins/LSTOutputConverter.cc @@ -259,6 +259,7 @@ void LSTOutputConverter::produce(edm::Event& iEvent, const edm::EventSetup& iSet LogDebug("LSTOutputConverter") << "done with conversion: Track candidate output size = " << outputpTC.size() << " (p* objects) + " << outputT5TC.size() << " (T5 objects)"; + std::vector outputSeedStopInfo(pixelSeeds.size()); iEvent.emplace(trajectorySeedPutToken_, std::move(outputTS)); iEvent.emplace(trajectorySeedpLSPutToken_, std::move(outputpLSTS)); iEvent.emplace(trackCandidatePutToken_, std::move(outputTC)); @@ -267,7 +268,7 @@ void LSTOutputConverter::produce(edm::Event& iEvent, const edm::EventSetup& iSet iEvent.emplace(trackCandidateNopLSTCPutToken_, std::move(outputNopLSTC)); iEvent.emplace(trackCandidatepTTCPutToken_, std::move(outputpTTC)); iEvent.emplace(trackCandidatepLSTCPutToken_, std::move(outputpLSTC)); - iEvent.emplace(seedStopInfoPutToken_, 0U); //dummy stop info + iEvent.emplace(seedStopInfoPutToken_, std::move(outputSeedStopInfo)); //dummy stop info } DEFINE_FWK_MODULE(LSTOutputConverter); diff --git a/RecoTracker/LSTCore/BuildFile.xml b/RecoTracker/LSTCore/BuildFile.xml index 8dd2b885bf1b4..10260860cdf2e 100644 --- a/RecoTracker/LSTCore/BuildFile.xml +++ b/RecoTracker/LSTCore/BuildFile.xml @@ -1,6 +1,7 @@ + diff --git a/RecoTracker/LSTCore/interface/Common.h b/RecoTracker/LSTCore/interface/Common.h index 00c9dabbaffc5..5f96da2773f15 100644 --- a/RecoTracker/LSTCore/interface/Common.h +++ b/RecoTracker/LSTCore/interface/Common.h @@ -1,8 +1,8 @@ #ifndef RecoTracker_LSTCore_interface_Common_h #define RecoTracker_LSTCore_interface_Common_h -#include "HeterogeneousCore/AlpakaInterface/interface/config.h" #include "DataFormats/Common/interface/StdArray.h" +#include "HeterogeneousCore/AlpakaInterface/interface/config.h" #if defined(FP16_Base) #if defined ALPAKA_ACC_GPU_CUDA_ENABLED diff --git a/RecoTracker/LSTCore/interface/QuintupletsSoA.h b/RecoTracker/LSTCore/interface/QuintupletsSoA.h index e2991a7fe28d3..3a76b3a26c893 100644 --- a/RecoTracker/LSTCore/interface/QuintupletsSoA.h +++ b/RecoTracker/LSTCore/interface/QuintupletsSoA.h @@ -24,8 +24,8 @@ namespace lst { SOA_COLUMN(bool, tightCutFlag), // tight pass to be a TC SOA_COLUMN(bool, partOfPT5), SOA_COLUMN(float, regressionRadius), - SOA_COLUMN(float, regressionG), - SOA_COLUMN(float, regressionF), + SOA_COLUMN(float, regressionCenterX), + SOA_COLUMN(float, regressionCenterY), SOA_COLUMN(float, rzChiSquared), // r-z only chi2 SOA_COLUMN(float, chiSquared), SOA_COLUMN(float, nonAnchorChiSquared), diff --git a/RecoTracker/LSTCore/interface/alpaka/Common.h b/RecoTracker/LSTCore/interface/alpaka/Common.h index fd59555fe8588..16e53e7bfe099 100644 --- a/RecoTracker/LSTCore/interface/alpaka/Common.h +++ b/RecoTracker/LSTCore/interface/alpaka/Common.h @@ -3,6 +3,7 @@ #include +#include "FWCore/MessageLogger/interface/MessageLogger.h" #include "RecoTracker/LSTCore/interface/Common.h" namespace ALPAKA_ACCELERATOR_NAMESPACE::lst { @@ -11,6 +12,11 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE::lst { Vec3D constexpr elementsPerThread(Vec3D::all(static_cast(1))); + ALPAKA_FN_HOST ALPAKA_FN_INLINE void lstWarning(std::string warning) { + edm::LogWarning("LST") << warning; + return; + } + // Adjust grid and block sizes based on backend configuration template > ALPAKA_FN_HOST ALPAKA_FN_INLINE WorkDiv createWorkDiv(const Vec& blocksPerGrid, diff --git a/RecoTracker/LSTCore/src/ModuleMethods.h b/RecoTracker/LSTCore/src/ModuleMethods.h index d2cf81be21d02..13421dbd7e011 100644 --- a/RecoTracker/LSTCore/src/ModuleMethods.h +++ b/RecoTracker/LSTCore/src/ModuleMethods.h @@ -334,9 +334,8 @@ namespace lst { host_moduleType[index] = (m_t == 25 ? lst::TwoS : lst::PS); host_moduleLayerType[index] = (m_t == 23 ? lst::Pixel : lst::Strip); - if (host_moduleType[index] == lst::PS and host_moduleLayerType[index] == lst::Pixel) { - host_isAnchor[index] = true; - } else if (host_moduleType[index] == lst::TwoS and host_isLower[index]) { + if ((host_moduleType[index] == lst::PS and host_moduleLayerType[index] == lst::Pixel) || + (host_moduleType[index] == lst::TwoS and host_isLower[index])) { host_isAnchor[index] = true; } else { host_isAnchor[index] = false; diff --git a/RecoTracker/LSTCore/src/alpaka/Hit.h b/RecoTracker/LSTCore/src/alpaka/Hit.h index 166be95cb432f..e5d3eb4226abc 100644 --- a/RecoTracker/LSTCore/src/alpaka/Hit.h +++ b/RecoTracker/LSTCore/src/alpaka/Hit.h @@ -56,27 +56,6 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE::lst { return dPhi; } - ALPAKA_FN_HOST_ACC ALPAKA_FN_INLINE int binary_search(const unsigned int* data, // Array that we are searching over - unsigned int search_val, // Value we want to find in data array - unsigned int ndata) // Number of elements in data array - { - unsigned int low = 0; - unsigned int high = ndata - 1; - - while (low <= high) { - unsigned int mid = (low + high) / 2; - unsigned int test_val = data[mid]; - if (test_val == search_val) - return mid; - else if (test_val > search_val) - high = mid - 1; - else - low = mid + 1; - } - // Couldn't find search value in array. - return -1; - } - struct ModuleRangesKernel { template ALPAKA_FN_ACC void operator()(TAcc const& acc, @@ -129,13 +108,19 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE::lst { ((ihit_z > 0) - (ihit_z < 0)) * alpaka::math::acosh( acc, alpaka::math::sqrt(acc, ihit_x * ihit_x + ihit_y * ihit_y + ihit_z * ihit_z) / hits.rts()[ihit]); - int found_index = binary_search(modules.mapdetId(), iDetId, nModules); + auto found_pointer = std::lower_bound(modules.mapdetId(), modules.mapdetId() + nModules, iDetId); + int found_index = std::distance(modules.mapdetId(), found_pointer); + if (found_pointer == modules.mapdetId() + nModules) + found_index = -1; uint16_t lastModuleIndex = modules.mapIdx()[found_index]; hits.moduleIndices()[ihit] = lastModuleIndex; if (modules.subdets()[lastModuleIndex] == Endcap && modules.moduleType()[lastModuleIndex] == TwoS) { - found_index = binary_search(geoMapDetId, iDetId, nEndCapMap); + found_pointer = std::lower_bound(geoMapDetId, geoMapDetId + nEndCapMap, iDetId); + found_index = std::distance(geoMapDetId, found_pointer); + if (found_pointer == geoMapDetId + nEndCapMap) + found_index = -1; float phi = geoMapPhi[found_index]; float cos_phi = alpaka::math::cos(acc, phi); hits.highEdgeXs()[ihit] = ihit_x + 2.5f * cos_phi; diff --git a/RecoTracker/LSTCore/src/alpaka/LSTEvent.dev.cc b/RecoTracker/LSTCore/src/alpaka/LSTEvent.dev.cc index cb8a2bcbb457e..8de38b530f93e 100644 --- a/RecoTracker/LSTCore/src/alpaka/LSTEvent.dev.cc +++ b/RecoTracker/LSTCore/src/alpaka/LSTEvent.dev.cc @@ -173,11 +173,12 @@ void LSTEvent::addPixelSegmentToEvent(std::vector const& hitIndice unsigned int size = ptIn.size(); if (size > n_max_pixel_segments_per_module) { - printf( - "*********************************************************\n" - "* Warning: Pixel line segments will be truncated. *\n" - "* You need to increase n_max_pixel_segments_per_module. *\n" - "*********************************************************\n"); + lstWarning( + "\ + *********************************************************\n\ + * Warning: Pixel line segments will be truncated. *\n\ + * You need to increase n_max_pixel_segments_per_module. *\n\ + *********************************************************"); size = n_max_pixel_segments_per_module; } @@ -714,12 +715,13 @@ void LSTEvent::createTrackCandidates(bool no_pls_dupclean, bool tc_pls_triplets) auto nTrackCandidatesT5 = *nTrackCanT5Host_buf.data(); if ((nTrackCandidatespT5 + nTrackCandidatespT3 + nTrackCandidatespLS == n_max_pixel_track_candidates) || (nTrackCandidatesT5 == n_max_nonpixel_track_candidates)) { - printf( - "****************************************************************************************************\n" - "* Warning: Track candidates were possibly truncated. *\n" - "* You may need to increase either n_max_pixel_track_candidates or n_max_nonpixel_track_candidates. *\n" - "* Run the code with the WARNINGS flag activated for more details. *\n" - "****************************************************************************************************\n"); + lstWarning( + "\ + ****************************************************************************************************\n\ + * Track candidates were possibly truncated. *\n\ + * You may need to increase either n_max_pixel_track_candidates or n_max_nonpixel_track_candidates. *\n\ + * Run the code with the WARNINGS flag activated for more details. *\n\ + ****************************************************************************************************"); } } diff --git a/RecoTracker/LSTCore/src/alpaka/PixelQuintuplet.h b/RecoTracker/LSTCore/src/alpaka/PixelQuintuplet.h index 5ec314ef7bb1e..08b7d7d414bf7 100644 --- a/RecoTracker/LSTCore/src/alpaka/PixelQuintuplet.h +++ b/RecoTracker/LSTCore/src/alpaka/PixelQuintuplet.h @@ -597,8 +597,8 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE::lst { centerX = segmentsPixel.circleCenterX()[pixelSegmentArrayIndex]; centerY = segmentsPixel.circleCenterY()[pixelSegmentArrayIndex]; - float T5CenterX = quintuplets.regressionG()[quintupletIndex]; - float T5CenterY = quintuplets.regressionF()[quintupletIndex]; + float T5CenterX = quintuplets.regressionCenterX()[quintupletIndex]; + float T5CenterY = quintuplets.regressionCenterY()[quintupletIndex]; quintupletRadius = quintuplets.regressionRadius()[quintupletIndex]; rPhiChiSquared = computePT5RPhiChiSquared(acc, modules, lowerModuleIndices, centerX, centerY, pixelRadius, xs, ys); diff --git a/RecoTracker/LSTCore/src/alpaka/Quintuplet.h b/RecoTracker/LSTCore/src/alpaka/Quintuplet.h index 679b1334038b2..8bb9a16a5a38b 100644 --- a/RecoTracker/LSTCore/src/alpaka/Quintuplet.h +++ b/RecoTracker/LSTCore/src/alpaka/Quintuplet.h @@ -31,8 +31,8 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE::lst { float innerRadius, float bridgeRadius, float outerRadius, - float regressionG, - float regressionF, + float regressionCenterX, + float regressionCenterY, float regressionRadius, float rzChiSquared, float rPhiChiSquared, @@ -63,8 +63,8 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE::lst { quintuplets.isDup()[quintupletIndex] = 0; quintuplets.tightCutFlag()[quintupletIndex] = tightCutFlag; quintuplets.regressionRadius()[quintupletIndex] = regressionRadius; - quintuplets.regressionG()[quintupletIndex] = regressionG; - quintuplets.regressionF()[quintupletIndex] = regressionF; + quintuplets.regressionCenterX()[quintupletIndex] = regressionCenterX; + quintuplets.regressionCenterY()[quintupletIndex] = regressionCenterY; quintuplets.logicalLayers()[quintupletIndex][0] = triplets.logicalLayers()[innerTripletIndex][0]; quintuplets.logicalLayers()[quintupletIndex][1] = triplets.logicalLayers()[innerTripletIndex][1]; quintuplets.logicalLayers()[quintupletIndex][2] = triplets.logicalLayers()[innerTripletIndex][2]; @@ -1456,8 +1456,8 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE::lst { float& innerRadius, float& outerRadius, float& bridgeRadius, - float& regressionG, - float& regressionF, + float& regressionCenterX, + float& regressionCenterY, float& regressionRadius, float& rzChiSquared, float& chiSquared, @@ -1597,8 +1597,8 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE::lst { delta2, slopes, isFlat, - regressionG, - regressionF, + regressionCenterX, + regressionCenterY, sigmas2, chiSquared); @@ -1633,8 +1633,8 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE::lst { nonAnchorDelta2, nonAnchorSlopes, isFlat, - regressionG, - regressionF, + regressionCenterX, + regressionCenterY, regressionRadius); return true; } @@ -1681,8 +1681,8 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE::lst { uint16_t lowerModule4 = triplets.lowerModuleIndices()[outerTripletIndex][1]; uint16_t lowerModule5 = triplets.lowerModuleIndices()[outerTripletIndex][2]; - float innerRadius, outerRadius, bridgeRadius, regressionG, regressionF, regressionRadius, rzChiSquared, - chiSquared, nonAnchorChiSquared, dBeta1, dBeta2; //required for making distributions + float innerRadius, outerRadius, bridgeRadius, regressionCenterX, regressionCenterY, regressionRadius, + rzChiSquared, chiSquared, nonAnchorChiSquared, dBeta1, dBeta2; //required for making distributions bool tightCutFlag = false; bool success = runQuintupletDefaultAlgo(acc, @@ -1700,8 +1700,8 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE::lst { innerRadius, outerRadius, bridgeRadius, - regressionG, - regressionF, + regressionCenterX, + regressionCenterY, regressionRadius, rzChiSquared, chiSquared, @@ -1748,8 +1748,8 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE::lst { innerRadius, bridgeRadius, outerRadius, - regressionG, - regressionF, + regressionCenterX, + regressionCenterY, regressionRadius, rzChiSquared, chiSquared, diff --git a/RecoTracker/LSTCore/src/alpaka/TrackCandidate.h b/RecoTracker/LSTCore/src/alpaka/TrackCandidate.h index 1863f262ffd7d..315263919aa87 100644 --- a/RecoTracker/LSTCore/src/alpaka/TrackCandidate.h +++ b/RecoTracker/LSTCore/src/alpaka/TrackCandidate.h @@ -379,8 +379,8 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE::lst { quintuplets.lowerModuleIndices()[quintupletIndex].data(), quintuplets.hitIndices()[quintupletIndex].data(), -1 /*no pixel seed index for T5s*/, - quintuplets.regressionG()[quintupletIndex], - quintuplets.regressionF()[quintupletIndex], + quintuplets.regressionCenterX()[quintupletIndex], + quintuplets.regressionCenterY()[quintupletIndex], quintuplets.regressionRadius()[quintupletIndex], trackCandidateIdx, quintupletIndex); diff --git a/RecoTracker/LSTCore/standalone/LST/Makefile b/RecoTracker/LSTCore/standalone/LST/Makefile index 3790a6031b0c8..f77f18b61c7cb 100644 --- a/RecoTracker/LSTCore/standalone/LST/Makefile +++ b/RecoTracker/LSTCore/standalone/LST/Makefile @@ -47,7 +47,7 @@ CXX = g++ CXXFLAGS_CPU = -march=native -mtune=native -Ofast -fno-reciprocal-math -fopenmp-simd -g -Wall -Woverloaded-virtual -fPIC -fopenmp -I.. CXXFLAGS_CUDA = -O3 -g --compiler-options -Wall --compiler-options -Woverloaded-virtual --compiler-options -fPIC --compiler-options -fopenmp -dc -lineinfo --ptxas-options=-v --cudart shared $(GENCODE_CUDA) --use_fast_math --default-stream per-thread -I.. CXXFLAGS_ROCM = -O3 -g -Wall -Woverloaded-virtual -fPIC -I${ROCM_ROOT}/include -I.. -CMSSWINCLUDE := -I${TRACKLOOPERDIR}/../../../ -I${CMSSW_BASE}/src +CMSSWINCLUDE := -I${TRACKLOOPERDIR}/../../../ -I${CMSSW_BASE}/src -I${FMT_ROOT}/include ifdef CMSSW_RELEASE_BASE CMSSWINCLUDE := ${CMSSWINCLUDE} -I${CMSSW_RELEASE_BASE}/src endif diff --git a/RecoTracker/LSTCore/standalone/Makefile b/RecoTracker/LSTCore/standalone/Makefile index 18ec73db8d975..5a5594bcdfbb0 100644 --- a/RecoTracker/LSTCore/standalone/Makefile +++ b/RecoTracker/LSTCore/standalone/Makefile @@ -10,11 +10,11 @@ OBJECTS=$(OBJECTS_CPU) $(OBJECTS_CUDA) $(OBJECTS_ROCM) CXX = g++ CXXFLAGS = -g -O2 -Wall -fPIC -Woverloaded-virtual -Wno-unused-function -fno-var-tracking -std=c++20 -INCLUDEFLAGS= -ILST -I$(shell pwd) -Icode -Icode/core -I${ALPAKA_ROOT}/include -I/${BOOST_ROOT}/include $(shell rooutil-config --include) -I$(shell root-config --incdir) -I${TRACKLOOPERDIR}/../../../ -I${CMSSW_BASE}/src -I../interface/ -I../interface/alpaka/ -I../src/ -I../src/alpaka/ +INCLUDEFLAGS= -ILST -I$(shell pwd) -Icode -Icode/core -I${ALPAKA_ROOT}/include -I/${BOOST_ROOT}/include $(shell rooutil-config --include) -I$(shell root-config --incdir) -I${TRACKLOOPERDIR}/../../../ -I${CMSSW_BASE}/src -I${FMT_ROOT}/include -I../interface/ -I../interface/alpaka/ -I../src/ -I../src/alpaka/ ifdef CMSSW_RELEASE_BASE INCLUDEFLAGS:= ${INCLUDEFLAGS} -I${CMSSW_RELEASE_BASE}/src endif -LDFLAGS = -g -O2 $(LSTLIB) -L${TRACKLOOPERDIR}/LST $(shell rooutil-config --libs) $(shell root-config --libs) +LDFLAGS = -g -O2 $(LSTLIB) -L${TRACKLOOPERDIR}/LST $(shell rooutil-config --libs) $(shell root-config --libs) -L${CMSSW_BASE}/lib/${SCRAM_ARCH} -lFWCoreMessageLogger LDFLAGS_CUDA= -L${CUDA_HOME}/lib64 -lcudart LDFLAGS_ROCM= -L${ROCM_ROOT}/lib -lamdhip64 ALPAKAFLAGS = -DALPAKA_DEBUG=0 diff --git a/RecoTracker/LSTCore/standalone/setup.sh b/RecoTracker/LSTCore/standalone/setup.sh index 570a7ae9fee81..f08180201192d 100644 --- a/RecoTracker/LSTCore/standalone/setup.sh +++ b/RecoTracker/LSTCore/standalone/setup.sh @@ -23,11 +23,12 @@ else fi # Export paths to libraries we need -export BOOST_ROOT=$(scram tool info boost | grep BOOST_BASE | cut -d'=' -f2) export ALPAKA_ROOT=$(scram tool info alpaka | grep ALPAKA_BASE | cut -d'=' -f2) +export BOOST_ROOT=$(scram tool info boost | grep BOOST_BASE | cut -d'=' -f2) export CUDA_HOME=$(scram tool info cuda | grep CUDA_BASE | cut -d'=' -f2) -export ROOT_ROOT=$(scram tool info root_interface | grep ROOT_INTERFACE_BASE | cut -d'=' -f2) +export FMT_ROOT=$(scram tool info fmt | grep FMT_BASE | cut -d'=' -f2) export ROCM_ROOT=$(scram tool info rocm | grep ROCM_BASE | cut -d'=' -f2) +export ROOT_ROOT=$(scram tool info root_interface | grep ROOT_INTERFACE_BASE | cut -d'=' -f2) cd - > /dev/null echo "Setup following ROOT. Make sure the appropriate setup file has been run. Otherwise the looper won't compile."