diff --git a/RecoTracker/LSTCore/standalone/Makefile b/RecoTracker/LSTCore/standalone/Makefile index 4e8071b3e7a80..bd33806a3c059 100644 --- a/RecoTracker/LSTCore/standalone/Makefile +++ b/RecoTracker/LSTCore/standalone/Makefile @@ -10,7 +10,7 @@ OBJECTS=$(OBJECTS_CPU) $(OBJECTS_CUDA) $(OBJECTS_ROCM) CXX = g++ CXXFLAGS = -g -O2 -Wall -fPIC -Wshadow -Woverloaded-virtual -Wno-unused-function -fno-var-tracking -std=c++17 -INCLUDEFLAGS= -ISDL -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/alpaka/ -I../src/alpaka/ +INCLUDEFLAGS= -ISDL -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/ ifdef CMSSW_RELEASE_BASE INCLUDEFLAGS:= ${INCLUDEFLAGS} -I${CMSSW_RELEASE_BASE}/src endif diff --git a/RecoTracker/LSTCore/standalone/SDL/Makefile b/RecoTracker/LSTCore/standalone/SDL/Makefile index df2fbb6d9f8af..4a90bd4c1301c 100644 --- a/RecoTracker/LSTCore/standalone/SDL/Makefile +++ b/RecoTracker/LSTCore/standalone/SDL/Makefile @@ -2,10 +2,11 @@ # stuff to make # -CCSOURCES=$(filter-out ../../src.alpaka/LST.dev.cc, $(wildcard ../../src/alpaka/*.dev.cc)) -CCOBJECTS_CPU=$(patsubst ../../src/alpaka/%.dev.cc, %_cpu.o, $(CCSOURCES)) -CCOBJECTS_CUDA=$(patsubst ../../src/alpaka/%.dev.cc, %_cuda.o, $(CCSOURCES)) -CCOBJECTS_ROCM=$(patsubst ../../src/alpaka/%.dev.cc, %_rocm.o, $(CCSOURCES)) +CCSOURCES=$(wildcard ../../src/*.cc) +ALPAKACCSOURCES=$(filter-out ../../src.alpaka/LST.dev.cc, $(wildcard ../../src/alpaka/*.dev.cc)) +CCOBJECTS_CPU=$(patsubst ../../src/alpaka/%.dev.cc, %_cpu.o, $(ALPAKACCSOURCES)) $(patsubst ../../src/%.cc, %_cpu.o, $(CCSOURCES)) +CCOBJECTS_CUDA=$(patsubst ../../src/alpaka/%.dev.cc, %_cuda.o, $(ALPAKACCSOURCES)) $(patsubst ../../src/%.cc, %_cuda.o, $(CCSOURCES)) +CCOBJECTS_ROCM=$(patsubst ../../src/alpaka/%.dev.cc, %_rocm.o, $(ALPAKACCSOURCES)) $(patsubst ../../src/%.cc, %_rocm.o, $(CCSOURCES)) LSTSOURCES=../../src/alpaka/LST.dev.cc LSTOBJECTS_CPU=$(patsubst ../../src/alpaka/%.dev.cc, %_cpu.o, $(LSTSOURCES)) @@ -99,6 +100,15 @@ CUTVALUEFLAG_FLAGS = -DCUT_VALUE_DEBUG %_rocm.o: ../../src/alpaka/%.dev.cc $(COMPILE_CMD_ROCM) $(CXXFLAGS_ROCM) $(ROOTINCLUDE) $(PRINTFLAG) $(CACHEFLAG) $(CUTVALUEFLAG) $(LSTWARNINGSFLAG) $(CMSSW_WERRORS_ROCM) $(T5CUTFLAGS) $(PTCUTFLAG) $(DUPLICATES) $(ALPAKAINCLUDE) $(ALPAKABACKEND_ROCM) $< -o $@ +%_cpu.o: ../../src/%.cc + $(COMPILE_CMD_CPU) $(CXXFLAGS_CPU) $(ROOTINCLUDE) $(PRINTFLAG) $(CACHEFLAG) $(CUTVALUEFLAG) $(LSTWARNINGSFLAG) $(CMSSW_WERRORS_CPU) $(T5CUTFLAGS) $(PTCUTFLAG) $(DUPLICATES) $(ALPAKAINCLUDE) $(ALPAKABACKEND_CPU) $< -o $@ + +%_cuda.o: ../../src/%.cc + $(COMPILE_CMD_CUDA) $(CXXFLAGS_CUDA) $(ROOTINCLUDE) $(PRINTFLAG) $(CACHEFLAG) $(CUTVALUEFLAG) $(LSTWARNINGSFLAG) $(CMSSW_WERRORS_CUDA) $(T5CUTFLAGS) $(PTCUTFLAG) $(DUPLICATES) $(ALPAKAINCLUDE) $(ALPAKABACKEND_CUDA) $< -o $@ + +%_rocm.o: ../../src/%.cc + $(COMPILE_CMD_ROCM) $(CXXFLAGS_ROCM) $(ROOTINCLUDE) $(PRINTFLAG) $(CACHEFLAG) $(CUTVALUEFLAG) $(LSTWARNINGSFLAG) $(CMSSW_WERRORS_ROCM) $(T5CUTFLAGS) $(PTCUTFLAG) $(DUPLICATES) $(ALPAKAINCLUDE) $(ALPAKABACKEND_ROCM) $< -o $@ + $(LIB_CPU): $(CCOBJECTS_CPU) $(LSTOBJECTS_CPU) $(LD_CPU) $(SOFLAGS_CPU) $^ -o $@ diff --git a/RecoTracker/LSTCore/standalone/bin/sdl.cc b/RecoTracker/LSTCore/standalone/bin/sdl.cc index b6bba324801dd..61639b73068d0 100644 --- a/RecoTracker/LSTCore/standalone/bin/sdl.cc +++ b/RecoTracker/LSTCore/standalone/bin/sdl.cc @@ -2,6 +2,8 @@ #include +using namespace ALPAKA_ACCELERATOR_NAMESPACE; + //___________________________________________________________________________________________________________________________________________________________________________________________ int main(int argc, char **argv) { //******************************************************************************** @@ -253,7 +255,7 @@ int main(int argc, char **argv) { // Printing out the option settings overview std::cout << "=========================================================" << std::endl; - std::cout << " Running for Acc = " << alpaka::getAccName() << std::endl; + std::cout << " Running for Acc = " << alpaka::getAccName() << std::endl; std::cout << " Setting of the analysis job based on provided arguments " << std::endl; std::cout << "---------------------------------------------------------" << std::endl; std::cout << " ana.input_file_list_tstring: " << ana.input_file_list_tstring << std::endl; @@ -296,10 +298,10 @@ int main(int argc, char **argv) { //___________________________________________________________________________________________________________________________________________________________________________________________ void run_sdl() { - SDL::Dev devAcc = alpaka::getDevByIdx(ALPAKA_ACCELERATOR_NAMESPACE::Platform{}, 0u); - std::vector queues; + Device devAcc = alpaka::getDevByIdx(ALPAKA_ACCELERATOR_NAMESPACE::Platform{}, 0u); + std::vector queues; for (int s = 0; s < ana.streams; s++) { - queues.push_back(SDL::QueueAcc(devAcc)); + queues.push_back(Queue(devAcc)); } // Load various maps used in the SDL reconstruction @@ -307,7 +309,7 @@ void run_sdl() { full_timer.Start(); auto hostESData = SDL::loadAndFillESHost(); auto deviceESData = - cms::alpakatools::CopyToDevice>::copyAsync(queues[0], *hostESData.get()); + cms::alpakatools::CopyToDevice>::copyAsync(queues[0], *hostESData.get()); float timeForMapLoading = full_timer.RealTime() * 1000; if (ana.do_write_ntuple) { @@ -383,9 +385,9 @@ void run_sdl() { full_timer.Reset(); full_timer.Start(); - std::vector *> events; + std::vector *> events; for (int s = 0; s < ana.streams; s++) { - SDL::Event *event = new SDL::Event(ana.verbose >= 2, queues[s], &deviceESData); + SDL::Event *event = new SDL::Event(ana.verbose >= 2, queues[s], &deviceESData); events.push_back(event); } float timeForEventCreation = full_timer.RealTime() * 1000; diff --git a/RecoTracker/LSTCore/standalone/code/core/AccessHelper.cc b/RecoTracker/LSTCore/standalone/code/core/AccessHelper.cc index dfae0e4925024..1429957d4626f 100644 --- a/RecoTracker/LSTCore/standalone/code/core/AccessHelper.cc +++ b/RecoTracker/LSTCore/standalone/code/core/AccessHelper.cc @@ -1,12 +1,14 @@ #include "AccessHelper.h" +using namespace ALPAKA_ACCELERATOR_NAMESPACE; + // =============== // ----* Hit *---- // =============== //____________________________________________________________________________________________ std::tuple, std::vector> convertHitsToHitIdxsAndHitTypes( - SDL::Event* event, std::vector hits) { + SDL::Event* event, std::vector hits) { SDL::hitsBuffer& hitsInGPU = *(event->getHits()); std::vector hitidxs; std::vector hittypes; @@ -25,7 +27,7 @@ std::tuple, std::vector> convertHitsToHi // =============== //____________________________________________________________________________________________ -std::vector getPixelHitsFrompLS(SDL::Event* event, unsigned int pLS) { +std::vector getPixelHitsFrompLS(SDL::Event* event, unsigned int pLS) { SDL::segmentsBuffer& segments_ = *(event->getSegments()); SDL::miniDoubletsBuffer& miniDoublets_ = *(event->getMiniDoublets()); SDL::objectRangesBuffer& rangesInGPU = (*event->getRanges()); @@ -44,7 +46,7 @@ std::vector getPixelHitsFrompLS(SDL::Event* event, unsig } //____________________________________________________________________________________________ -std::vector getPixelHitIdxsFrompLS(SDL::Event* event, unsigned int pLS) { +std::vector getPixelHitIdxsFrompLS(SDL::Event* event, unsigned int pLS) { SDL::hitsBuffer& hitsInGPU = *(event->getHits()); std::vector hits = getPixelHitsFrompLS(event, pLS); std::vector hitidxs; @@ -54,7 +56,7 @@ std::vector getPixelHitIdxsFrompLS(SDL::Event* event, un } //____________________________________________________________________________________________ -std::vector getPixelHitTypesFrompLS(SDL::Event* event, unsigned int pLS) { +std::vector getPixelHitTypesFrompLS(SDL::Event* event, unsigned int pLS) { std::vector hits = getPixelHitsFrompLS(event, pLS); std::vector hittypes(hits.size(), 0); return hittypes; @@ -62,7 +64,7 @@ std::vector getPixelHitTypesFrompLS(SDL::Event* event, u //____________________________________________________________________________________________ std::tuple, std::vector> getHitIdxsAndHitTypesFrompLS( - SDL::Event* event, unsigned pLS) { + SDL::Event* event, unsigned pLS) { return convertHitsToHitIdxsAndHitTypes(event, getPixelHitsFrompLS(event, pLS)); } @@ -71,7 +73,7 @@ std::tuple, std::vector> getHitIdxsAndHi // ============== //____________________________________________________________________________________________ -std::vector getHitsFromMD(SDL::Event* event, unsigned int MD) { +std::vector getHitsFromMD(SDL::Event* event, unsigned int MD) { SDL::miniDoubletsBuffer& miniDoublets_ = *(event->getMiniDoublets()); unsigned int hit_1 = miniDoublets_.anchorHitIndices[MD]; unsigned int hit_2 = miniDoublets_.outerHitIndices[MD]; @@ -80,7 +82,7 @@ std::vector getHitsFromMD(SDL::Event* event, unsigned in //____________________________________________________________________________________________ std::tuple, std::vector> getHitIdxsAndHitTypesFromMD( - SDL::Event* event, unsigned MD) { + SDL::Event* event, unsigned MD) { return convertHitsToHitIdxsAndHitTypes(event, getHitsFromMD(event, MD)); } @@ -89,7 +91,7 @@ std::tuple, std::vector> getHitIdxsAndHi // ============== //____________________________________________________________________________________________ -std::vector getMDsFromLS(SDL::Event* event, unsigned int LS) { +std::vector getMDsFromLS(SDL::Event* event, unsigned int LS) { SDL::segmentsBuffer& segments_ = *(event->getSegments()); unsigned int MD_1 = segments_.mdIndices[2 * LS]; unsigned int MD_2 = segments_.mdIndices[2 * LS + 1]; @@ -97,7 +99,7 @@ std::vector getMDsFromLS(SDL::Event* event, unsigned int } //____________________________________________________________________________________________ -std::vector getHitsFromLS(SDL::Event* event, unsigned int LS) { +std::vector getHitsFromLS(SDL::Event* event, unsigned int LS) { std::vector MDs = getMDsFromLS(event, LS); std::vector hits_0 = getHitsFromMD(event, MDs[0]); std::vector hits_1 = getHitsFromMD(event, MDs[1]); @@ -106,7 +108,7 @@ std::vector getHitsFromLS(SDL::Event* event, unsigned in //____________________________________________________________________________________________ std::tuple, std::vector> getHitIdxsAndHitTypesFromLS( - SDL::Event* event, unsigned LS) { + SDL::Event* event, unsigned LS) { return convertHitsToHitIdxsAndHitTypes(event, getHitsFromLS(event, LS)); } @@ -115,7 +117,7 @@ std::tuple, std::vector> getHitIdxsAndHi // ============== //____________________________________________________________________________________________ -std::vector getLSsFromT3(SDL::Event* event, unsigned int T3) { +std::vector getLSsFromT3(SDL::Event* event, unsigned int T3) { SDL::tripletsBuffer& triplets_ = *(event->getTriplets()); unsigned int LS_1 = triplets_.segmentIndices[2 * T3]; unsigned int LS_2 = triplets_.segmentIndices[2 * T3 + 1]; @@ -123,7 +125,7 @@ std::vector getLSsFromT3(SDL::Event* event, unsigned int } //____________________________________________________________________________________________ -std::vector getMDsFromT3(SDL::Event* event, unsigned int T3) { +std::vector getMDsFromT3(SDL::Event* event, unsigned int T3) { std::vector LSs = getLSsFromT3(event, T3); std::vector MDs_0 = getMDsFromLS(event, LSs[0]); std::vector MDs_1 = getMDsFromLS(event, LSs[1]); @@ -131,7 +133,7 @@ std::vector getMDsFromT3(SDL::Event* event, unsigned int } //____________________________________________________________________________________________ -std::vector getHitsFromT3(SDL::Event* event, unsigned int T3) { +std::vector getHitsFromT3(SDL::Event* event, unsigned int T3) { std::vector MDs = getMDsFromT3(event, T3); std::vector hits_0 = getHitsFromMD(event, MDs[0]); std::vector hits_1 = getHitsFromMD(event, MDs[1]); @@ -141,7 +143,7 @@ std::vector getHitsFromT3(SDL::Event* event, unsigned in //____________________________________________________________________________________________ std::tuple, std::vector> getHitIdxsAndHitTypesFromT3( - SDL::Event* event, unsigned T3) { + SDL::Event* event, unsigned T3) { return convertHitsToHitIdxsAndHitTypes(event, getHitsFromT3(event, T3)); } @@ -150,7 +152,7 @@ std::tuple, std::vector> getHitIdxsAndHi // ============== //____________________________________________________________________________________________ -std::vector getT3sFromT5(SDL::Event* event, unsigned int T5) { +std::vector getT3sFromT5(SDL::Event* event, unsigned int T5) { SDL::quintupletsBuffer& quintuplets_ = *(event->getQuintuplets()); unsigned int T3_1 = quintuplets_.tripletIndices[2 * T5]; unsigned int T3_2 = quintuplets_.tripletIndices[2 * T5 + 1]; @@ -158,7 +160,7 @@ std::vector getT3sFromT5(SDL::Event* event, unsigned int } //____________________________________________________________________________________________ -std::vector getLSsFromT5(SDL::Event* event, unsigned int T5) { +std::vector getLSsFromT5(SDL::Event* event, unsigned int T5) { std::vector T3s = getT3sFromT5(event, T5); std::vector LSs_0 = getLSsFromT3(event, T3s[0]); std::vector LSs_1 = getLSsFromT3(event, T3s[1]); @@ -166,7 +168,7 @@ std::vector getLSsFromT5(SDL::Event* event, unsigned int } //____________________________________________________________________________________________ -std::vector getMDsFromT5(SDL::Event* event, unsigned int T5) { +std::vector getMDsFromT5(SDL::Event* event, unsigned int T5) { std::vector LSs = getLSsFromT5(event, T5); std::vector MDs_0 = getMDsFromLS(event, LSs[0]); std::vector MDs_1 = getMDsFromLS(event, LSs[1]); @@ -176,7 +178,7 @@ std::vector getMDsFromT5(SDL::Event* event, unsigned int } //____________________________________________________________________________________________ -std::vector getHitsFromT5(SDL::Event* event, unsigned int T5) { +std::vector getHitsFromT5(SDL::Event* event, unsigned int T5) { std::vector MDs = getMDsFromT5(event, T5); std::vector hits_0 = getHitsFromMD(event, MDs[0]); std::vector hits_1 = getHitsFromMD(event, MDs[1]); @@ -187,7 +189,7 @@ std::vector getHitsFromT5(SDL::Event* event, unsigned in } //____________________________________________________________________________________________ -std::vector getHitIdxsFromT5(SDL::Event* event, unsigned int T5) { +std::vector getHitIdxsFromT5(SDL::Event* event, unsigned int T5) { SDL::hitsBuffer& hitsInGPU = *(event->getHits()); std::vector hits = getHitsFromT5(event, T5); std::vector hitidxs; @@ -196,7 +198,7 @@ std::vector getHitIdxsFromT5(SDL::Event* event, unsigned return hitidxs; } //____________________________________________________________________________________________ -std::vector getModuleIdxsFromT5(SDL::Event* event, unsigned int T5) { +std::vector getModuleIdxsFromT5(SDL::Event* event, unsigned int T5) { std::vector hits = getHitsFromT5(event, T5); std::vector module_idxs; SDL::hitsBuffer& hitsInGPU = *(event->getHits()); @@ -206,14 +208,14 @@ std::vector getModuleIdxsFromT5(SDL::Event* event, unsig return module_idxs; } //____________________________________________________________________________________________ -std::vector getHitTypesFromT5(SDL::Event* event, unsigned int T5) { +std::vector getHitTypesFromT5(SDL::Event* event, unsigned int T5) { return {4, 4, 4, 4, 4, 4, 4, 4, 4, 4}; ; } //____________________________________________________________________________________________ std::tuple, std::vector> getHitIdxsAndHitTypesFromT5( - SDL::Event* event, unsigned T5) { + SDL::Event* event, unsigned T5) { return convertHitsToHitIdxsAndHitTypes(event, getHitsFromT5(event, T5)); } @@ -222,7 +224,7 @@ std::tuple, std::vector> getHitIdxsAndHi // =============== //____________________________________________________________________________________________ -unsigned int getPixelLSFrompT3(SDL::Event* event, unsigned int pT3) { +unsigned int getPixelLSFrompT3(SDL::Event* event, unsigned int pT3) { SDL::pixelTripletsBuffer& pixelTriplets_ = *(event->getPixelTriplets()); SDL::objectRangesBuffer& rangesInGPU = (*event->getRanges()); SDL::modulesBuffer& modulesInGPU = (*event->getModules()); @@ -231,37 +233,37 @@ unsigned int getPixelLSFrompT3(SDL::Event* event, unsigned int pT3) { } //____________________________________________________________________________________________ -unsigned int getT3FrompT3(SDL::Event* event, unsigned int pT3) { +unsigned int getT3FrompT3(SDL::Event* event, unsigned int pT3) { SDL::pixelTriplets& pixelTriplets_ = *(event->getPixelTriplets()); return pixelTriplets_.tripletIndices[pT3]; } //____________________________________________________________________________________________ -std::vector getLSsFrompT3(SDL::Event* event, unsigned int pT3) { +std::vector getLSsFrompT3(SDL::Event* event, unsigned int pT3) { unsigned int T3 = getT3FrompT3(event, pT3); return getLSsFromT3(event, T3); } //____________________________________________________________________________________________ -std::vector getMDsFrompT3(SDL::Event* event, unsigned int pT3) { +std::vector getMDsFrompT3(SDL::Event* event, unsigned int pT3) { unsigned int T3 = getT3FrompT3(event, pT3); return getMDsFromT3(event, T3); } //____________________________________________________________________________________________ -std::vector getOuterTrackerHitsFrompT3(SDL::Event* event, unsigned int pT3) { +std::vector getOuterTrackerHitsFrompT3(SDL::Event* event, unsigned int pT3) { unsigned int T3 = getT3FrompT3(event, pT3); return getHitsFromT3(event, T3); } //____________________________________________________________________________________________ -std::vector getPixelHitsFrompT3(SDL::Event* event, unsigned int pT3) { +std::vector getPixelHitsFrompT3(SDL::Event* event, unsigned int pT3) { unsigned int pLS = getPixelLSFrompT3(event, pT3); return getPixelHitsFrompLS(event, pLS); } //____________________________________________________________________________________________ -std::vector getHitsFrompT3(SDL::Event* event, unsigned int pT3) { +std::vector getHitsFrompT3(SDL::Event* event, unsigned int pT3) { unsigned int pLS = getPixelLSFrompT3(event, pT3); unsigned int T3 = getT3FrompT3(event, pT3); std::vector pixelHits = getPixelHitsFrompLS(event, pLS); @@ -271,7 +273,7 @@ std::vector getHitsFrompT3(SDL::Event* event, unsigned i } //____________________________________________________________________________________________ -std::vector getHitIdxsFrompT3(SDL::Event* event, unsigned int pT3) { +std::vector getHitIdxsFrompT3(SDL::Event* event, unsigned int pT3) { SDL::hitsBuffer& hitsInGPU = *(event->getHits()); std::vector hits = getHitsFrompT3(event, pT3); std::vector hitidxs; @@ -280,7 +282,7 @@ std::vector getHitIdxsFrompT3(SDL::Event* event, unsigne return hitidxs; } //____________________________________________________________________________________________ -std::vector getModuleIdxsFrompT3(SDL::Event* event, unsigned int pT3) { +std::vector getModuleIdxsFrompT3(SDL::Event* event, unsigned int pT3) { std::vector hits = getOuterTrackerHitsFrompT3(event, pT3); std::vector module_idxs; SDL::hitsBuffer& hitsInGPU = *(event->getHits()); @@ -290,7 +292,7 @@ std::vector getModuleIdxsFrompT3(SDL::Event* event, unsi return module_idxs; } //____________________________________________________________________________________________ -std::vector getHitTypesFrompT3(SDL::Event* event, unsigned int pT3) { +std::vector getHitTypesFrompT3(SDL::Event* event, unsigned int pT3) { unsigned int pLS = getPixelLSFrompT3(event, pT3); std::vector pixelHits = getPixelHitsFrompLS(event, pLS); // pixel Hits list will be either 3 or 4 and depending on it return accordingly @@ -302,7 +304,7 @@ std::vector getHitTypesFrompT3(SDL::Event* event, unsign //____________________________________________________________________________________________ std::tuple, std::vector> getHitIdxsAndHitTypesFrompT3( - SDL::Event* event, unsigned pT3) { + SDL::Event* event, unsigned pT3) { return convertHitsToHitIdxsAndHitTypes(event, getHitsFrompT3(event, pT3)); } @@ -311,7 +313,7 @@ std::tuple, std::vector> getHitIdxsAndHi // =============== //____________________________________________________________________________________________ -unsigned int getPixelLSFrompT5(SDL::Event* event, unsigned int pT5) { +unsigned int getPixelLSFrompT5(SDL::Event* event, unsigned int pT5) { SDL::pixelQuintupletsBuffer& pixelQuintuplets_ = *(event->getPixelQuintuplets()); SDL::objectRangesBuffer& rangesInGPU = (*event->getRanges()); SDL::modulesBuffer& modulesInGPU = (*event->getModules()); @@ -320,43 +322,43 @@ unsigned int getPixelLSFrompT5(SDL::Event* event, unsigned int pT5) { } //____________________________________________________________________________________________ -unsigned int getT5FrompT5(SDL::Event* event, unsigned int pT5) { +unsigned int getT5FrompT5(SDL::Event* event, unsigned int pT5) { SDL::pixelQuintupletsBuffer& pixelQuintuplets_ = *(event->getPixelQuintuplets()); return pixelQuintuplets_.T5Indices[pT5]; } //____________________________________________________________________________________________ -std::vector getT3sFrompT5(SDL::Event* event, unsigned int pT5) { +std::vector getT3sFrompT5(SDL::Event* event, unsigned int pT5) { unsigned int T5 = getT5FrompT5(event, pT5); return getT3sFromT5(event, T5); } //____________________________________________________________________________________________ -std::vector getLSsFrompT5(SDL::Event* event, unsigned int pT5) { +std::vector getLSsFrompT5(SDL::Event* event, unsigned int pT5) { unsigned int T5 = getT5FrompT5(event, pT5); return getLSsFromT5(event, T5); } //____________________________________________________________________________________________ -std::vector getMDsFrompT5(SDL::Event* event, unsigned int pT5) { +std::vector getMDsFrompT5(SDL::Event* event, unsigned int pT5) { unsigned int T5 = getT5FrompT5(event, pT5); return getMDsFromT5(event, T5); } //____________________________________________________________________________________________ -std::vector getOuterTrackerHitsFrompT5(SDL::Event* event, unsigned int pT5) { +std::vector getOuterTrackerHitsFrompT5(SDL::Event* event, unsigned int pT5) { unsigned int T5 = getT5FrompT5(event, pT5); return getHitsFromT5(event, T5); } //____________________________________________________________________________________________ -std::vector getPixelHitsFrompT5(SDL::Event* event, unsigned int pT5) { +std::vector getPixelHitsFrompT5(SDL::Event* event, unsigned int pT5) { unsigned int pLS = getPixelLSFrompT5(event, pT5); return getPixelHitsFrompLS(event, pLS); } //____________________________________________________________________________________________ -std::vector getHitsFrompT5(SDL::Event* event, unsigned int pT5) { +std::vector getHitsFrompT5(SDL::Event* event, unsigned int pT5) { unsigned int pLS = getPixelLSFrompT5(event, pT5); unsigned int T5 = getT5FrompT5(event, pT5); std::vector pixelHits = getPixelHitsFrompLS(event, pLS); @@ -366,7 +368,7 @@ std::vector getHitsFrompT5(SDL::Event* event, unsigned i } //____________________________________________________________________________________________ -std::vector getHitIdxsFrompT5(SDL::Event* event, unsigned int pT5) { +std::vector getHitIdxsFrompT5(SDL::Event* event, unsigned int pT5) { SDL::hitsBuffer& hitsInGPU = *(event->getHits()); std::vector hits = getHitsFrompT5(event, pT5); std::vector hitidxs; @@ -376,7 +378,7 @@ std::vector getHitIdxsFrompT5(SDL::Event* event, unsigne } //____________________________________________________________________________________________ -std::vector getModuleIdxsFrompT5(SDL::Event* event, unsigned int pT5) { +std::vector getModuleIdxsFrompT5(SDL::Event* event, unsigned int pT5) { std::vector hits = getOuterTrackerHitsFrompT5(event, pT5); std::vector module_idxs; SDL::hitsBuffer& hitsInGPU = *(event->getHits()); @@ -387,7 +389,7 @@ std::vector getModuleIdxsFrompT5(SDL::Event* event, unsi } //____________________________________________________________________________________________ -std::vector getHitTypesFrompT5(SDL::Event* event, unsigned int pT5) { +std::vector getHitTypesFrompT5(SDL::Event* event, unsigned int pT5) { unsigned int pLS = getPixelLSFrompT5(event, pT5); std::vector pixelHits = getPixelHitsFrompLS(event, pLS); // pixel Hits list will be either 3 or 4 and depending on it return accordingly @@ -399,7 +401,7 @@ std::vector getHitTypesFrompT5(SDL::Event* event, unsign //____________________________________________________________________________________________ std::tuple, std::vector> getHitIdxsAndHitTypesFrompT5( - SDL::Event* event, unsigned pT5) { + SDL::Event* event, unsigned pT5) { return convertHitsToHitIdxsAndHitTypes(event, getHitsFrompT5(event, pT5)); } @@ -408,7 +410,7 @@ std::tuple, std::vector> getHitIdxsAndHi // ============== //____________________________________________________________________________________________ -std::vector getLSsFromTC(SDL::Event* event, unsigned int TC) { +std::vector getLSsFromTC(SDL::Event* event, unsigned int TC) { // Get the type of the track candidate SDL::trackCandidatesBuffer& trackCandidatesInGPU = (*event->getTrackCandidates()); short type = trackCandidatesInGPU.trackCandidateType[TC]; @@ -431,7 +433,7 @@ std::vector getLSsFromTC(SDL::Event* event, unsigned int //____________________________________________________________________________________________ std::tuple, std::vector> getHitIdxsAndHitTypesFromTC( - SDL::Event* event, unsigned TC) { + SDL::Event* event, unsigned TC) { // Get the type of the track candidate SDL::trackCandidatesBuffer& trackCandidatesInGPU = (*event->getTrackCandidates()); short type = trackCandidatesInGPU.trackCandidateType[TC]; diff --git a/RecoTracker/LSTCore/standalone/code/core/AccessHelper.h b/RecoTracker/LSTCore/standalone/code/core/AccessHelper.h index 589f1e2d59cd2..efe1cdb68f585 100644 --- a/RecoTracker/LSTCore/standalone/code/core/AccessHelper.h +++ b/RecoTracker/LSTCore/standalone/code/core/AccessHelper.h @@ -9,77 +9,77 @@ enum { kpT5 = 7, kpT3 = 5, kT5 = 4, kpLS = 8 }; // ----* Hit *---- std::tuple, std::vector> convertHitsToHitIdxsAndHitTypes( - SDL::Event* event, std::vector hits); + SDL::Event* event, std::vector hits); // ----* pLS *---- -std::vector getPixelHitsFrompLS(SDL::Event* event, unsigned int pLS); -std::vector getPixelHitIdxsFrompLS(SDL::Event* event, unsigned int pLS); -std::vector getPixelHitTypesFrompLS(SDL::Event* event, unsigned int pLS); +std::vector getPixelHitsFrompLS(SDL::Event* event, unsigned int pLS); +std::vector getPixelHitIdxsFrompLS(SDL::Event* event, unsigned int pLS); +std::vector getPixelHitTypesFrompLS(SDL::Event* event, unsigned int pLS); std::tuple, std::vector> getHitIdxsAndHitTypesFrompLS( - SDL::Event* event, unsigned pLS); + SDL::Event* event, unsigned pLS); // ----* MD *---- -std::vector getHitsFromMD(SDL::Event* event, unsigned int MD); +std::vector getHitsFromMD(SDL::Event* event, unsigned int MD); std::tuple, std::vector> getHitIdxsAndHitTypesFromMD( - SDL::Event* event, unsigned MD); + SDL::Event* event, unsigned MD); // ----* LS *---- -std::vector getMDsFromLS(SDL::Event* event, unsigned int LS); -std::vector getHitsFromLS(SDL::Event* event, unsigned int LS); +std::vector getMDsFromLS(SDL::Event* event, unsigned int LS); +std::vector getHitsFromLS(SDL::Event* event, unsigned int LS); std::tuple, std::vector> getHitIdxsAndHitTypesFromLS( - SDL::Event* event, unsigned LS); + SDL::Event* event, unsigned LS); // ----* T3 *---- -std::vector getLSsFromT3(SDL::Event* event, unsigned int T3); -std::vector getMDsFromT3(SDL::Event* event, unsigned int T3); -std::vector getHitsFromT3(SDL::Event* event, unsigned int T3); +std::vector getLSsFromT3(SDL::Event* event, unsigned int T3); +std::vector getMDsFromT3(SDL::Event* event, unsigned int T3); +std::vector getHitsFromT3(SDL::Event* event, unsigned int T3); std::tuple, std::vector> getHitIdxsAndHitTypesFromT3( - SDL::Event* event, unsigned T3); + SDL::Event* event, unsigned T3); // ----* T5 *---- -std::vector getT3sFromT5(SDL::Event* event, unsigned int T5); -std::vector getLSsFromT5(SDL::Event* event, unsigned int T5); -std::vector getMDsFromT5(SDL::Event* event, unsigned int T5); -std::vector getHitsFromT5(SDL::Event* event, unsigned int T5); -std::vector getHitIdxsFromT5(SDL::Event* event, unsigned int T5); -std::vector getHitTypesFromT5(SDL::Event* event, unsigned int T5); -std::vector getModuleIdxsFromT5(SDL::Event* event, unsigned int T5); +std::vector getT3sFromT5(SDL::Event* event, unsigned int T5); +std::vector getLSsFromT5(SDL::Event* event, unsigned int T5); +std::vector getMDsFromT5(SDL::Event* event, unsigned int T5); +std::vector getHitsFromT5(SDL::Event* event, unsigned int T5); +std::vector getHitIdxsFromT5(SDL::Event* event, unsigned int T5); +std::vector getHitTypesFromT5(SDL::Event* event, unsigned int T5); +std::vector getModuleIdxsFromT5(SDL::Event* event, unsigned int T5); std::tuple, std::vector> getHitIdxsAndHitTypesFromT5( - SDL::Event* event, unsigned T5); + SDL::Event* event, unsigned T5); // ----* pT3 *---- -unsigned int getPixelLSFrompT3(SDL::Event* event, unsigned int pT3); -unsigned int getT3FrompT3(SDL::Event* event, unsigned int pT3); -std::vector getLSsFrompT3(SDL::Event* event, unsigned int pT3); -std::vector getMDsFrompT3(SDL::Event* event, unsigned int pT3); -std::vector getOuterTrackerHitsFrompT3(SDL::Event* event, unsigned int pT3); -std::vector getPixelHitsFrompT3(SDL::Event* event, unsigned int pT3); -std::vector getHitsFrompT3(SDL::Event* event, unsigned int pT3); -std::vector getHitIdxsFrompT3(SDL::Event* event, unsigned int pT3); -std::vector getHitTypesFrompT3(SDL::Event* event, unsigned int pT3); -std::vector getModuleIdxsFrompT3(SDL::Event* event, unsigned int pT3); +unsigned int getPixelLSFrompT3(SDL::Event* event, unsigned int pT3); +unsigned int getT3FrompT3(SDL::Event* event, unsigned int pT3); +std::vector getLSsFrompT3(SDL::Event* event, unsigned int pT3); +std::vector getMDsFrompT3(SDL::Event* event, unsigned int pT3); +std::vector getOuterTrackerHitsFrompT3(SDL::Event* event, unsigned int pT3); +std::vector getPixelHitsFrompT3(SDL::Event* event, unsigned int pT3); +std::vector getHitsFrompT3(SDL::Event* event, unsigned int pT3); +std::vector getHitIdxsFrompT3(SDL::Event* event, unsigned int pT3); +std::vector getHitTypesFrompT3(SDL::Event* event, unsigned int pT3); +std::vector getModuleIdxsFrompT3(SDL::Event* event, unsigned int pT3); std::tuple, std::vector> getHitIdxsAndHitTypesFrompT3( - SDL::Event* event, unsigned pT3); + SDL::Event* event, unsigned pT3); // ----* pT5 *---- -unsigned int getPixelLSFrompT5(SDL::Event* event, unsigned int pT5); -unsigned int getT5FrompT5(SDL::Event* event, unsigned int pT5); -std::vector getT3sFrompT5(SDL::Event* event, unsigned int pT5); -std::vector getLSsFrompT5(SDL::Event* event, unsigned int pT5); -std::vector getMDsFrompT5(SDL::Event* event, unsigned int pT5); -std::vector getOuterTrackerHitsFrompT5(SDL::Event* event, unsigned int pT5); -std::vector getPixelHitsFrompT5(SDL::Event* event, unsigned int pT5); -std::vector getHitsFrompT5(SDL::Event* event, unsigned int pT5); -std::vector getHitIdxsFrompT5(SDL::Event* event, unsigned int pT5); -std::vector getHitTypesFrompT5(SDL::Event* event, unsigned int pT5); -std::vector getModuleIdxsFrompT5(SDL::Event* event, unsigned int pT5); +unsigned int getPixelLSFrompT5(SDL::Event* event, unsigned int pT5); +unsigned int getT5FrompT5(SDL::Event* event, unsigned int pT5); +std::vector getT3sFrompT5(SDL::Event* event, unsigned int pT5); +std::vector getLSsFrompT5(SDL::Event* event, unsigned int pT5); +std::vector getMDsFrompT5(SDL::Event* event, unsigned int pT5); +std::vector getOuterTrackerHitsFrompT5(SDL::Event* event, unsigned int pT5); +std::vector getPixelHitsFrompT5(SDL::Event* event, unsigned int pT5); +std::vector getHitsFrompT5(SDL::Event* event, unsigned int pT5); +std::vector getHitIdxsFrompT5(SDL::Event* event, unsigned int pT5); +std::vector getHitTypesFrompT5(SDL::Event* event, unsigned int pT5); +std::vector getModuleIdxsFrompT5(SDL::Event* event, unsigned int pT5); std::tuple, std::vector> getHitIdxsAndHitTypesFrompT5( - SDL::Event* event, unsigned pT5); + SDL::Event* event, unsigned pT5); // ----* TC *---- -std::vector getLSsFromTC(SDL::Event* event, unsigned int TC); -std::vector getHitsFromTC(SDL::Event* event, unsigned int TC); +std::vector getLSsFromTC(SDL::Event* event, unsigned int TC); +std::vector getHitsFromTC(SDL::Event* event, unsigned int TC); std::tuple, std::vector> getHitIdxsAndHitTypesFromTC( - SDL::Event* event, unsigned int TC); + SDL::Event* event, unsigned int TC); #endif diff --git a/RecoTracker/LSTCore/standalone/code/core/AnalysisConfig.h b/RecoTracker/LSTCore/standalone/code/core/AnalysisConfig.h index 14b3df631c6c8..e1404b7f8f9bc 100644 --- a/RecoTracker/LSTCore/standalone/code/core/AnalysisConfig.h +++ b/RecoTracker/LSTCore/standalone/code/core/AnalysisConfig.h @@ -100,7 +100,7 @@ class AnalysisConfig { std::map>> moduleSimHits; std::map modulePopulation; - SDL::ModuleConnectionMap moduleConnectiongMapLoose; + SDL::ModuleConnectionMap moduleConnectiongMapLoose; // Boolean to trigger whether to run cut_value_ntupling bool do_cut_value_ntuple; diff --git a/RecoTracker/LSTCore/standalone/code/core/trkCore.cc b/RecoTracker/LSTCore/standalone/code/core/trkCore.cc index 4233ec8c5e3e2..cff1ef733e1f6 100644 --- a/RecoTracker/LSTCore/standalone/code/core/trkCore.cc +++ b/RecoTracker/LSTCore/standalone/code/core/trkCore.cc @@ -1,5 +1,7 @@ #include "trkCore.h" +using namespace ALPAKA_ACCELERATOR_NAMESPACE; + //___________________________________________________________________________________________________________________________________________________________________________________________ bool goodEvent() { if (ana.specific_event_index >= 0) { @@ -20,7 +22,7 @@ bool goodEvent() { } //___________________________________________________________________________________________________________________________________________________________________________________________ -float runMiniDoublet(SDL::Event *event, int evt) { +float runMiniDoublet(SDL::Event *event, int evt) { TStopwatch my_timer; if (ana.verbose >= 2) std::cout << "Reco Mini-Doublet start " << evt << std::endl; @@ -72,7 +74,7 @@ float runMiniDoublet(SDL::Event *event, int evt) { } //___________________________________________________________________________________________________________________________________________________________________________________________ -float runSegment(SDL::Event *event) { +float runSegment(SDL::Event *event) { TStopwatch my_timer; if (ana.verbose >= 2) std::cout << "Reco Segment start" << std::endl; @@ -109,7 +111,7 @@ float runSegment(SDL::Event *event) { } //___________________________________________________________________________________________________________________________________________________________________________________________ -float runT3(SDL::Event *event) { +float runT3(SDL::Event *event) { TStopwatch my_timer; if (ana.verbose >= 2) std::cout << "Reco T3 start" << std::endl; @@ -150,7 +152,7 @@ float runT3(SDL::Event *event) { } //___________________________________________________________________________________________________________________________________________________________________________________________ -float runpT3(SDL::Event *event) { +float runpT3(SDL::Event *event) { TStopwatch my_timer; if (ana.verbose >= 2) std::cout << "Reco Pixel Triplet pT3 start" << std::endl; @@ -166,7 +168,7 @@ float runpT3(SDL::Event *event) { } //___________________________________________________________________________________________________________________________________________________________________________________________ -float runQuintuplet(SDL::Event *event) { +float runQuintuplet(SDL::Event *event) { TStopwatch my_timer; if (ana.verbose >= 2) std::cout << "Reco Quintuplet start" << std::endl; @@ -211,7 +213,7 @@ float runQuintuplet(SDL::Event *event) { } //___________________________________________________________________________________________________________________________________________________________________________________________ -float runPixelLineSegment(SDL::Event *event, bool no_pls_dupclean) { +float runPixelLineSegment(SDL::Event *event, bool no_pls_dupclean) { TStopwatch my_timer; if (ana.verbose >= 2) std::cout << "Reco Pixel Line Segment start" << std::endl; @@ -225,7 +227,7 @@ float runPixelLineSegment(SDL::Event *event, bool no_pls_dupclean) { } //___________________________________________________________________________________________________________________________________________________________________________________________ -float runPixelQuintuplet(SDL::Event *event) { +float runPixelQuintuplet(SDL::Event *event) { TStopwatch my_timer; if (ana.verbose >= 2) std::cout << "Reco Pixel Quintuplet start" << std::endl; @@ -241,7 +243,7 @@ float runPixelQuintuplet(SDL::Event *event) { } //___________________________________________________________________________________________________________________________________________________________________________________________ -float runTrackCandidate(SDL::Event *event, bool no_pls_dupclean, bool tc_pls_triplets) { +float runTrackCandidate(SDL::Event *event, bool no_pls_dupclean, bool tc_pls_triplets) { TStopwatch my_timer; if (ana.verbose >= 2) std::cout << "Reco TrackCandidate start" << std::endl; @@ -837,7 +839,7 @@ void addInputsToLineSegmentTrackingPreLoad(std::vector> &out_ } //___________________________________________________________________________________________________________________________________________________________________________________________ -float addInputsToEventPreLoad(SDL::Event *event, +float addInputsToEventPreLoad(SDL::Event *event, bool useOMP, std::vector trkX, std::vector trkY, @@ -1141,7 +1143,7 @@ void writeMetaData() { // DEPRECATED FUNCTIONS //__________________________________________________________________________________________ -[[deprecated]] float addInputsToLineSegmentTracking(SDL::Event &event, bool useOMP) { +[[deprecated]] float addInputsToLineSegmentTracking(SDL::Event &event, bool useOMP) { TStopwatch my_timer; if (ana.verbose >= 2) std::cout << "Loading Inputs (i.e. outer tracker hits, and pixel line segements) to the Line Segment Tracking.... " @@ -1336,6 +1338,6 @@ void writeMetaData() { } //__________________________________________________________________________________________ -[[deprecated]] float addInputsToLineSegmentTrackingUsingExplicitMemory(SDL::Event &event) { +[[deprecated]] float addInputsToLineSegmentTrackingUsingExplicitMemory(SDL::Event &event) { return addInputsToLineSegmentTracking(event, true); } diff --git a/RecoTracker/LSTCore/standalone/code/core/trkCore.h b/RecoTracker/LSTCore/standalone/code/core/trkCore.h index a407f303cf1a6..237f7670da738 100644 --- a/RecoTracker/LSTCore/standalone/code/core/trkCore.h +++ b/RecoTracker/LSTCore/standalone/code/core/trkCore.h @@ -14,17 +14,17 @@ // --------------------- ======================== --------------------- bool goodEvent(); -float runMiniDoublet(SDL::Event *event, int evt); -float runSegment(SDL::Event *event); -float runT4(SDL::Event *event); -float runT4x(SDL::Event *event); -float runpT4(SDL::Event *event); -float runT3(SDL::Event *event); -float runTrackCandidate(SDL::Event *event, bool no_pls_dupclean, bool tc_pls_triplets); -float runQuintuplet(SDL::Event *event); -float runPixelQuintuplet(SDL::Event *event); -float runPixelLineSegment(SDL::Event *event, bool no_pls_dupclean); -float runpT3(SDL::Event *event); +float runMiniDoublet(SDL::Event *event, int evt); +float runSegment(SDL::Event *event); +float runT4(SDL::Event *event); +float runT4x(SDL::Event *event); +float runpT4(SDL::Event *event); +float runT3(SDL::Event *event); +float runTrackCandidate(SDL::Event *event, bool no_pls_dupclean, bool tc_pls_triplets); +float runQuintuplet(SDL::Event *event); +float runPixelQuintuplet(SDL::Event *event); +float runPixelLineSegment(SDL::Event *event, bool no_pls_dupclean); +float runpT3(SDL::Event *event); // --------------------- ======================== --------------------- @@ -69,7 +69,7 @@ void addInputsToLineSegmentTrackingPreLoad(std::vector> &out_ std::vector> &out_pixelType_vec, std::vector> &out_isQuad_vec); -float addInputsToEventPreLoad(SDL::Event *event, +float addInputsToEventPreLoad(SDL::Event *event, bool useOMP, std::vector trkX, std::vector trkY, @@ -105,7 +105,7 @@ void writeMetaData(); // --------------------- ======================== --------------------- // DEPRECATED FUNCTION -float addInputsToLineSegmentTrackingUsingExplicitMemory(SDL::Event &event); -float addInputsToLineSegmentTracking(SDL::Event &event, bool useOMP); +float addInputsToLineSegmentTrackingUsingExplicitMemory(SDL::Event &event); +float addInputsToLineSegmentTracking(SDL::Event &event, bool useOMP); #endif diff --git a/RecoTracker/LSTCore/standalone/code/core/write_sdl_ntuple.cc b/RecoTracker/LSTCore/standalone/code/core/write_sdl_ntuple.cc index 4ed069536ec39..2529586907d08 100644 --- a/RecoTracker/LSTCore/standalone/code/core/write_sdl_ntuple.cc +++ b/RecoTracker/LSTCore/standalone/code/core/write_sdl_ntuple.cc @@ -1,5 +1,7 @@ #include "write_sdl_ntuple.h" +using namespace ALPAKA_ACCELERATOR_NAMESPACE; + //________________________________________________________________________________________________________________________________ void createOutputBranches() { createRequiredOutputBranches(); @@ -7,7 +9,7 @@ void createOutputBranches() { } //________________________________________________________________________________________________________________________________ -void fillOutputBranches(SDL::Event* event) { +void fillOutputBranches(SDL::Event* event) { setOutputBranches(event); setOptionalOutputBranches(event); if (ana.gnn_ntuple) @@ -181,7 +183,7 @@ void createGnnNtupleBranches() { } //________________________________________________________________________________________________________________________________ -void setOutputBranches(SDL::Event* event) { +void setOutputBranches(SDL::Event* event) { // ============ Sim tracks ============= int n_accepted_simtrk = 0; for (unsigned int isimtrk = 0; isimtrk < trk.sim_pt().size(); ++isimtrk) { @@ -276,7 +278,7 @@ void setOutputBranches(SDL::Event* event) { } //________________________________________________________________________________________________________________________________ -void setOptionalOutputBranches(SDL::Event* event) { +void setOptionalOutputBranches(SDL::Event* event) { #ifdef CUT_VALUE_DEBUG setPixelQuintupletOutputBranches(event); @@ -287,7 +289,7 @@ void setOptionalOutputBranches(SDL::Event* event) { } //________________________________________________________________________________________________________________________________ -void setPixelQuintupletOutputBranches(SDL::Event* event) { +void setPixelQuintupletOutputBranches(SDL::Event* event) { // ============ pT5 ============= SDL::pixelQuintupletsBuffer& pixelQuintupletsInGPU = (*event->getPixelQuintuplets()); SDL::quintupletsBuffer& quintupletsInGPU = (*event->getQuintuplets()); @@ -363,7 +365,7 @@ void setPixelQuintupletOutputBranches(SDL::Event* event) { } //________________________________________________________________________________________________________________________________ -void setQuintupletOutputBranches(SDL::Event* event) { +void setQuintupletOutputBranches(SDL::Event* event) { SDL::quintupletsBuffer& quintupletsInGPU = (*event->getQuintuplets()); SDL::objectRangesBuffer& rangesInGPU = (*event->getRanges()); SDL::modulesBuffer& modulesInGPU = (*event->getModules()); @@ -434,7 +436,7 @@ void setQuintupletOutputBranches(SDL::Event* event) { } //________________________________________________________________________________________________________________________________ -void setPixelTripletOutputBranches(SDL::Event* event) { +void setPixelTripletOutputBranches(SDL::Event* event) { SDL::pixelTripletsBuffer& pixelTripletsInGPU = (*event->getPixelTriplets()); SDL::tripletsBuffer& tripletsInGPU = *(event->getTriplets()); SDL::modulesBuffer& modulesInGPU = *(event->getModules()); @@ -499,7 +501,7 @@ void setPixelTripletOutputBranches(SDL::Event* event) { } //________________________________________________________________________________________________________________________________ -void setGnnNtupleBranches(SDL::Event* event) { +void setGnnNtupleBranches(SDL::Event* event) { // Get relevant information SDL::segmentsBuffer& segmentsInGPU = (*event->getSegments()); SDL::miniDoubletsBuffer& miniDoubletsInGPU = (*event->getMiniDoublets()); @@ -640,7 +642,7 @@ void setGnnNtupleBranches(SDL::Event* event) { } //________________________________________________________________________________________________________________________________ -void setGnnNtupleMiniDoublet(SDL::Event* event, unsigned int MD) { +void setGnnNtupleMiniDoublet(SDL::Event* event, unsigned int MD) { // Get relevant information SDL::miniDoubletsBuffer& miniDoubletsInGPU = (*event->getMiniDoublets()); SDL::hitsBuffer& hitsInGPU = (*event->getHits()); @@ -708,7 +710,7 @@ void setGnnNtupleMiniDoublet(SDL::Event* event, unsigned int MD) { } //________________________________________________________________________________________________________________________________ -std::tuple> parseTrackCandidate(SDL::Event* event, +std::tuple> parseTrackCandidate(SDL::Event* event, unsigned int idx) { // Get the type of the track candidate SDL::trackCandidatesBuffer& trackCandidatesInGPU = (*event->getTrackCandidates()); @@ -743,7 +745,7 @@ std::tuple> parseTrackCandidate( //________________________________________________________________________________________________________________________________ std::tuple, std::vector> parsepT5( - SDL::Event* event, unsigned int idx) { + SDL::Event* event, unsigned int idx) { // Get relevant information SDL::trackCandidatesBuffer& trackCandidatesInGPU = (*event->getTrackCandidates()); SDL::quintupletsBuffer& quintupletsInGPU = (*event->getQuintuplets()); @@ -855,7 +857,7 @@ std::tuple, std::vector, std::vector> parsepT3( - SDL::Event* event, unsigned int idx) { + SDL::Event* event, unsigned int idx) { // Get relevant information SDL::trackCandidatesBuffer& trackCandidatesInGPU = (*event->getTrackCandidates()); SDL::tripletsBuffer& tripletsInGPU = (*event->getTriplets()); @@ -890,7 +892,7 @@ std::tuple, std::vector, std::vector> parseT5( - SDL::Event* event, unsigned int idx) { + SDL::Event* event, unsigned int idx) { SDL::trackCandidatesBuffer& trackCandidatesInGPU = (*event->getTrackCandidates()); SDL::quintupletsBuffer& quintupletsInGPU = (*event->getQuintuplets()); unsigned int T5 = trackCandidatesInGPU.directObjectIndices[idx]; @@ -924,7 +926,7 @@ std::tuple, std::vector, std::vector> parsepLS( - SDL::Event* event, unsigned int idx) { + SDL::Event* event, unsigned int idx) { SDL::trackCandidatesBuffer& trackCandidatesInGPU = (*event->getTrackCandidates()); SDL::segmentsBuffer& segmentsInGPU = (*event->getSegments()); @@ -944,7 +946,7 @@ std::tuple, std::vector* event) { +void printHitMultiplicities(SDL::Event* event) { SDL::modulesBuffer& modulesInGPU = (*event->getModules()); SDL::objectRangesBuffer& rangesInGPU = (*event->getRanges()); @@ -959,7 +961,7 @@ void printHitMultiplicities(SDL::Event* event) { } //________________________________________________________________________________________________________________________________ -void printMiniDoubletMultiplicities(SDL::Event* event) { +void printMiniDoubletMultiplicities(SDL::Event* event) { SDL::miniDoubletsBuffer& miniDoubletsInGPU = (*event->getMiniDoublets()); SDL::modulesBuffer& modulesInGPU = (*event->getModules()); @@ -978,7 +980,7 @@ void printMiniDoubletMultiplicities(SDL::Event* event) { } //________________________________________________________________________________________________________________________________ -void printAllObjects(SDL::Event* event) { +void printAllObjects(SDL::Event* event) { printMDs(event); printLSs(event); printpLSs(event); @@ -986,7 +988,7 @@ void printAllObjects(SDL::Event* event) { } //________________________________________________________________________________________________________________________________ -void printMDs(SDL::Event* event) { +void printMDs(SDL::Event* event) { SDL::miniDoubletsBuffer& miniDoubletsInGPU = (*event->getMiniDoublets()); SDL::hitsBuffer& hitsInGPU = (*event->getHits()); SDL::modulesBuffer& modulesInGPU = (*event->getModules()); @@ -1008,7 +1010,7 @@ void printMDs(SDL::Event* event) { } //________________________________________________________________________________________________________________________________ -void printLSs(SDL::Event* event) { +void printLSs(SDL::Event* event) { SDL::segmentsBuffer& segmentsInGPU = (*event->getSegments()); SDL::miniDoubletsBuffer& miniDoubletsInGPU = (*event->getMiniDoublets()); SDL::hitsBuffer& hitsInGPU = (*event->getHits()); @@ -1040,7 +1042,7 @@ void printLSs(SDL::Event* event) { } //________________________________________________________________________________________________________________________________ -void printpLSs(SDL::Event* event) { +void printpLSs(SDL::Event* event) { SDL::segmentsBuffer& segmentsInGPU = (*event->getSegments()); SDL::miniDoubletsBuffer& miniDoubletsInGPU = (*event->getMiniDoublets()); SDL::hitsBuffer& hitsInGPU = (*event->getHits()); @@ -1070,7 +1072,7 @@ void printpLSs(SDL::Event* event) { } //________________________________________________________________________________________________________________________________ -void printT3s(SDL::Event* event) { +void printT3s(SDL::Event* event) { SDL::tripletsBuffer& tripletsInGPU = (*event->getTriplets()); SDL::segmentsBuffer& segmentsInGPU = (*event->getSegments()); SDL::miniDoubletsBuffer& miniDoubletsInGPU = (*event->getMiniDoublets()); @@ -1112,7 +1114,7 @@ void printT3s(SDL::Event* event) { } //________________________________________________________________________________________________________________________________ -void debugPrintOutlierMultiplicities(SDL::Event* event) { +void debugPrintOutlierMultiplicities(SDL::Event* event) { SDL::trackCandidatesBuffer& trackCandidatesInGPU = (*event->getTrackCandidates()); SDL::tripletsBuffer& tripletsInGPU = (*event->getTriplets()); SDL::segmentsBuffer& segmentsInGPU = (*event->getSegments()); diff --git a/RecoTracker/LSTCore/standalone/code/core/write_sdl_ntuple.h b/RecoTracker/LSTCore/standalone/code/core/write_sdl_ntuple.h index 811aedd58f809..e61250f196ae4 100644 --- a/RecoTracker/LSTCore/standalone/code/core/write_sdl_ntuple.h +++ b/RecoTracker/LSTCore/standalone/code/core/write_sdl_ntuple.h @@ -17,41 +17,41 @@ void createRequiredOutputBranches(); void createOptionalOutputBranches(); void createGnnNtupleBranches(); -void fillOutputBranches(SDL::Event* event); -void setOutputBranches(SDL::Event* event); -void setOptionalOutputBranches(SDL::Event* event); -void setPixelQuintupletOutputBranches(SDL::Event* event); -void setQuintupletOutputBranches(SDL::Event* event); -void setPixelTripletOutputBranches(SDL::Event* event); -void setGnnNtupleBranches(SDL::Event* event); -void setGnnNtupleMiniDoublet(SDL::Event* event, unsigned int MD); - -std::tuple> parseTrackCandidate(SDL::Event* event, +void fillOutputBranches(SDL::Event* event); +void setOutputBranches(SDL::Event* event); +void setOptionalOutputBranches(SDL::Event* event); +void setPixelQuintupletOutputBranches(SDL::Event* event); +void setQuintupletOutputBranches(SDL::Event* event); +void setPixelTripletOutputBranches(SDL::Event* event); +void setGnnNtupleBranches(SDL::Event* event); +void setGnnNtupleMiniDoublet(SDL::Event* event, unsigned int MD); + +std::tuple> parseTrackCandidate(SDL::Event* event, unsigned int); std::tuple, std::vector> parsepT5( - SDL::Event* event, unsigned int); + SDL::Event* event, unsigned int); std::tuple, std::vector> parsepT3( - SDL::Event* event, unsigned int); + SDL::Event* event, unsigned int); std::tuple, std::vector> parseT5( - SDL::Event* event, unsigned int); + SDL::Event* event, unsigned int); std::tuple, std::vector> parsepLS( - SDL::Event* event, unsigned int); + SDL::Event* event, unsigned int); // Print multiplicities -void printMiniDoubletMultiplicities(SDL::Event* event); -void printHitMultiplicities(SDL::Event* event); +void printMiniDoubletMultiplicities(SDL::Event* event); +void printHitMultiplicities(SDL::Event* event); // Print objects (GPU) -void printAllObjects(SDL::Event* event); -void printpT4s(SDL::Event* event); -void printMDs(SDL::Event* event); -void printLSs(SDL::Event* event); -void printpLSs(SDL::Event* event); -void printT3s(SDL::Event* event); -void printT4s(SDL::Event* event); -void printTCs(SDL::Event* event); +void printAllObjects(SDL::Event* event); +void printpT4s(SDL::Event* event); +void printMDs(SDL::Event* event); +void printLSs(SDL::Event* event); +void printpLSs(SDL::Event* event); +void printT3s(SDL::Event* event); +void printT4s(SDL::Event* event); +void printTCs(SDL::Event* event); // Print anomalous multiplicities -void debugPrintOutlierMultiplicities(SDL::Event* event); +void debugPrintOutlierMultiplicities(SDL::Event* event); #endif