Skip to content

Commit

Permalink
Renaming of classes/structs/macros/constants
Browse files Browse the repository at this point in the history
  • Loading branch information
VourMa committed Jul 22, 2024
1 parent a22faeb commit 7fdcabd
Show file tree
Hide file tree
Showing 23 changed files with 499 additions and 499 deletions.
16 changes: 8 additions & 8 deletions RecoTracker/LSTCore/interface/Constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,18 @@ namespace lst {
constexpr float PT_CUT = 0.8f;
#endif

constexpr unsigned int MAX_BLOCKS = 80;
constexpr unsigned int MAX_CONNECTED_MODULES = 40;
constexpr unsigned int max_blocks = 80;
constexpr unsigned int max_connected_modules = 40;

constexpr unsigned int N_MAX_PIXEL_SEGMENTS_PER_MODULE = 50000;
constexpr unsigned int n_max_pixel_segments_per_module = 50000;

constexpr unsigned int N_MAX_PIXEL_MD_PER_MODULES = 2 * N_MAX_PIXEL_SEGMENTS_PER_MODULE;
constexpr unsigned int n_max_pixel_md_per_modules = 2 * n_max_pixel_segments_per_module;

constexpr unsigned int N_MAX_PIXEL_TRIPLETS = 5000;
constexpr unsigned int N_MAX_PIXEL_QUINTUPLETS = 15000;
constexpr unsigned int n_max_pixel_triplets = 5000;
constexpr unsigned int n_max_pixel_quintuplets = 15000;

constexpr unsigned int N_MAX_PIXEL_TRACK_CANDIDATES = 30000;
constexpr unsigned int N_MAX_NONPIXEL_TRACK_CANDIDATES = 1000;
constexpr unsigned int n_max_pixel_track_candidates = 30000;
constexpr unsigned int n_max_nonpixel_track_candidates = 1000;

constexpr unsigned int size_superbins = 45000;

Expand Down
4 changes: 2 additions & 2 deletions RecoTracker/LSTCore/interface/LSTESData.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ namespace lst {
unsigned int nEndCapMap;
std::shared_ptr<const ModulesBuffer<TDev>> modulesBuffers;
std::shared_ptr<const EndcapGeometryBuffer<TDev>> endcapGeometryBuffers;
std::shared_ptr<const pixelMap> pixelMapping;
std::shared_ptr<const PixelMap> pixelMapping;

LSTESData(uint16_t const& nModulesIn,
uint16_t const& nLowerModulesIn,
unsigned int const& nPixelsIn,
unsigned int const& nEndCapMapIn,
std::shared_ptr<const ModulesBuffer<TDev>> const& modulesBuffersIn,
std::shared_ptr<const EndcapGeometryBuffer<TDev>> const& endcapGeometryBuffersIn,
std::shared_ptr<const pixelMap> const& pixelMappingIn)
std::shared_ptr<const PixelMap> const& pixelMappingIn)
: nModules(nModulesIn),
nLowerModules(nLowerModulesIn),
nPixels(nPixelsIn),
Expand Down
2 changes: 1 addition & 1 deletion RecoTracker/LSTCore/interface/Module.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ namespace lst {

ModulesBuffer(TDev const& dev, unsigned int nMod, unsigned int nPixs)
: detIds_buf(allocBufWrapper<unsigned int>(dev, nMod)),
moduleMap_buf(allocBufWrapper<uint16_t>(dev, nMod * MAX_CONNECTED_MODULES)),
moduleMap_buf(allocBufWrapper<uint16_t>(dev, nMod * max_connected_modules)),
mapdetId_buf(allocBufWrapper<unsigned int>(dev, nMod)),
mapIdx_buf(allocBufWrapper<uint16_t>(dev, nMod)),
nConnectedModules_buf(allocBufWrapper<uint16_t>(dev, nMod)),
Expand Down
4 changes: 2 additions & 2 deletions RecoTracker/LSTCore/interface/PixelMap.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include "RecoTracker/LSTCore/interface/Constants.h"

namespace lst {
struct pixelMap {
struct PixelMap {
uint16_t pixelModuleIndex;

std::vector<unsigned int> connectedPixelsIndex;
Expand All @@ -19,7 +19,7 @@ namespace lst {

int* pixelType;

pixelMap(unsigned int sizef = size_superbins)
PixelMap(unsigned int sizef = size_superbins)
: pixelModuleIndex(0),
connectedPixelsIndex(sizef),
connectedPixelsSizes(sizef),
Expand Down
24 changes: 12 additions & 12 deletions RecoTracker/LSTCore/interface/alpaka/Constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,20 +87,20 @@ namespace lst {
ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float lst_INF = 123456789.0;

namespace t5dnn {
//

// Working points matching LST fake rate (43.9%) or signal acceptance (82.0%)
ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float LSTWP1 = 0.3418833f; // 94.0% TPR, 43.9% FPR
ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float LSTWP2 = 0.6177366f; // 82.0% TPR, 20.0% FPR
ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float lstwp1 = 0.3418833f; // 94.0% TPR, 43.9% FPR
ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float lstwp2 = 0.6177366f; // 82.0% TPR, 20.0% FPR
// Other working points
ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float WP70 = 0.7776195f; // 70.0% TPR, 10.0% FPR
ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float WP75 = 0.7181118f; // 75.0% TPR, 13.5% FPR
ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float WP80 = 0.6492643f; // 80.0% TPR, 17.9% FPR
ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float WP85 = 0.5655319f; // 85.0% TPR, 23.8% FPR
ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float WP90 = 0.4592205f; // 90.0% TPR, 32.6% FPR
ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float WP95 = 0.3073708f; // 95.0% TPR, 47.7% FPR
ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float WP97p5 = 0.2001348f; // 97.5% TPR, 61.2% FPR
ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float WP99 = 0.1120605f; // 99.0% TPR, 75.9% FPR
ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float WP99p9 = 0.0218196f; // 99.9% TPR, 95.4% FPR
ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float wp70 = 0.7776195f; // 70.0% TPR, 10.0% FPR
ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float wp75 = 0.7181118f; // 75.0% TPR, 13.5% FPR
ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float wp80 = 0.6492643f; // 80.0% TPR, 17.9% FPR
ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float wp85 = 0.5655319f; // 85.0% TPR, 23.8% FPR
ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float wp90 = 0.4592205f; // 90.0% TPR, 32.6% FPR
ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float wp95 = 0.3073708f; // 95.0% TPR, 47.7% FPR
ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float wp97p5 = 0.2001348f; // 97.5% TPR, 61.2% FPR
ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float wp99 = 0.1120605f; // 99.0% TPR, 75.9% FPR
ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float wp99p9 = 0.0218196f; // 99.9% TPR, 95.4% FPR

} // namespace t5dnn

Expand Down
2 changes: 1 addition & 1 deletion RecoTracker/LSTCore/src/LSTESData.cc
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ std::unique_ptr<lst::LSTESData<alpaka_common::DevHost>> lst::loadAndFillESHost()
auto pLStoLayer = std::make_shared<MapPLStoLayer>();
auto endcapGeometry = std::make_shared<EndcapGeometry>();
auto tiltedGeometry = std::make_shared<TiltedGeometry>();
auto pixelMapping = std::make_shared<pixelMap>();
auto pixelMapping = std::make_shared<PixelMap>();
auto moduleConnectionMap = std::make_shared<ModuleConnectionMap>();
::loadMapsHost(*pLStoLayer, endcapGeometry, tiltedGeometry, moduleConnectionMap);

Expand Down
8 changes: 4 additions & 4 deletions RecoTracker/LSTCore/src/ModuleMethods.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace lst {
inline void fillPixelMap(std::shared_ptr<ModulesBuffer<alpaka_common::DevHost>>& modulesBuf,
uint16_t nModules,
unsigned int& nPixels,
pixelMap& pixelMapping,
PixelMap& pixelMapping,
TQueue queue,
const MapPLStoLayer& pLStoLayer,
struct ModuleMetaData& mmd) {
Expand Down Expand Up @@ -111,7 +111,7 @@ namespace lst {
struct ModuleMetaData& mmd,
const ModuleConnectionMap* moduleConnectionMap) {
alpaka_common::DevHost const& devHost = cms::alpakatools::host();
auto moduleMap_buf = allocBufWrapper<uint16_t>(devHost, nMod * MAX_CONNECTED_MODULES);
auto moduleMap_buf = allocBufWrapper<uint16_t>(devHost, nMod * max_connected_modules);
uint16_t* moduleMap = alpaka::getPtrNative(moduleMap_buf);

auto nConnectedModules_buf = allocBufWrapper<uint16_t>(devHost, nMod);
Expand All @@ -123,7 +123,7 @@ namespace lst {
auto& connectedModules = moduleConnectionMap->getConnectedModuleDetIds(detId);
nConnectedModules[index] = connectedModules.size();
for (uint16_t i = 0; i < nConnectedModules[index]; i++) {
moduleMap[index * MAX_CONNECTED_MODULES + i] = mmd.detIdToIndex[connectedModules[i]];
moduleMap[index * max_connected_modules + i] = mmd.detIdToIndex[connectedModules[i]];
}
}

Expand Down Expand Up @@ -224,7 +224,7 @@ namespace lst {
uint16_t& nLowerModules,
unsigned int& nPixels,
std::shared_ptr<ModulesBuffer<alpaka_common::DevHost>>& modulesBuf,
pixelMap* pixelMapping,
PixelMap* pixelMapping,
const EndcapGeometry* endcapGeometry,
const TiltedGeometry* tiltedGeometry,
const ModuleConnectionMap* moduleConnectionMap) {
Expand Down
Loading

0 comments on commit 7fdcabd

Please sign in to comment.