Skip to content

Commit

Permalink
Merge remote-tracking branch 'SegLink/CMSSW_14_1_0_pre3_LST_X_LSTCore…
Browse files Browse the repository at this point in the history
…_realfiles_batch3' into ESProducer_fixes
  • Loading branch information
ariostas committed Jul 8, 2024
2 parents f46b6cb + c563eb0 commit d3e5999
Showing 35 changed files with 1,211 additions and 1,392 deletions.
2 changes: 2 additions & 0 deletions Configuration/PyReleaseValidation/README.md
Original file line number Diff line number Diff line change
@@ -61,6 +61,8 @@ The offsets currently in use are:
* 0.7: trackingMkFit modifier
* 0.701: DisplacedRegionalStep tracking iteration for Run-3
* 0.702: trackingMkFit modifier for Phase-2 (initialStep only)
* 0.703: LST tracking, initialStep+HighPtTripletStep only, on CPU
* 0.704: LST tracking, initialStep+HighPtTripletStep only, on GPU
* 0.78: Complete L1 workflow
* 0.8: BPH Parking (Run-2)
* 0.81: Running also HeavyFlavor DQM
4 changes: 3 additions & 1 deletion Configuration/PyReleaseValidation/python/relval_2026.py
Original file line number Diff line number Diff line change
@@ -26,7 +26,6 @@
numWFIB.extend([24834.0,24834.911,24834.103]) #2026D98 DDD XML, DD4hep XML, aging
numWFIB.extend([25061.97]) #2026D98 premixing stage1 (NuGun+PU)
numWFIB.extend([24834.702]) #2026D98 mkFit tracking (initialStep)
numWFIB.extend([24834.703,24834.704]) #2026D98 LST tracking (initialStep+HighPtTripletStep only): CPU, GPU
numWFIB.extend([24834.5,24834.9]) #2026D98 pixelTrackingOnly, vector hits
numWFIB.extend([24834.501,24834.502]) #2026D98 Patatrack local reconstruction on CPU, Patatrack local reconstruction on GPU
numWFIB.extend([25034.99,25034.999]) #2026D98 premixing combined stage1+stage2 (ttbar+PU200, ttbar+PU50 for PR test)
@@ -55,5 +54,8 @@
# NuGun
numWFIB.extend([24861.0]) #Nu Gun 2026D98

# Temporary placement for LST workflow to workaround PR conflicts - to be formatted and placed in an upcoming PR
numWFIB.extend([24834.703,24834.704]) #2026D98 LST tracking (initialStep+HighPtTripletStep only): CPU, GPU

for numWF in numWFIB:
workflows[numWF] = _upgrade_workflows[numWF]
Original file line number Diff line number Diff line change
@@ -504,7 +504,8 @@ def condition_(self, fragment, stepList, key, hasHarvest):
offset = 0.703,
)
upgradeWFs['lstOnCPUIters01TrackingOnly'].step3 = upgradeWFs['trackingOnly'].step3 | {
'--procModifiers': 'trackingIters01,trackingLST'
'--procModifiers': 'trackingIters01,trackingLST',
'--accelerators' : 'cpu'
}

# LST on GPU, initialStep+highPtTripletStep-only tracking-only
@@ -536,7 +537,8 @@ def condition_(self, fragment, stepList, key, hasHarvest):
offset = 0.704,
)
upgradeWFs['lstOnGPUIters01TrackingOnly'].step3 = upgradeWFs['trackingOnly'].step3 | {
'--procModifiers': 'gpu,trackingIters01,trackingLST'
'--procModifiers': 'trackingIters01,trackingLST',
'--accelerators' : 'gpu-nvidia'
}

#DeepCore seeding for JetCore iteration workflow
14 changes: 10 additions & 4 deletions RecoTracker/LST/plugins/alpaka/LSTProducer.cc
Original file line number Diff line number Diff line change
@@ -30,7 +30,9 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE {
lstPhase2OTHitsInputToken_{
consumes<LSTPhase2OTHitsInput>(config.getParameter<edm::InputTag>("phase2OTHitsInput"))},
lstESToken_{esConsumes()},
verbose_(config.getParameter<int>("verbose")),
verbose_(config.getParameter<bool>("verbose")),
nopLSDupClean_(config.getParameter<bool>("nopLSDupClean")),
tcpLSTriplets_(config.getParameter<bool>("tcpLSTriplets")),
lstOutputToken_{produces()} {}

void acquire(device::Event const& event, device::EventSetup const& setup) override {
@@ -61,7 +63,9 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE {
phase2OTHits.detId(),
phase2OTHits.x(),
phase2OTHits.y(),
phase2OTHits.z());
phase2OTHits.z(),
nopLSDupClean_,
tcpLSTriplets_);
}

void produce(device::Event& event, device::EventSetup const&) override {
@@ -74,15 +78,17 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE {
edm::ParameterSetDescription desc;
desc.add<edm::InputTag>("pixelSeedInput", edm::InputTag{"lstPixelSeedInputProducer"});
desc.add<edm::InputTag>("phase2OTHitsInput", edm::InputTag{"lstPhase2OTHitsInputProducer"});
desc.add<int>("verbose", 0);
desc.add<bool>("verbose", false);
desc.add<bool>("nopLSDupClean", false);
desc.add<bool>("tcpLSTriplets", false);
descriptions.addWithDefaultLabel(desc);
}

private:
edm::EDGetTokenT<LSTPixelSeedInput> lstPixelSeedInputToken_;
edm::EDGetTokenT<LSTPhase2OTHitsInput> lstPhase2OTHitsInputToken_;
device::ESGetToken<SDL::LSTESData<Device>, TrackerRecoGeometryRecord> lstESToken_;
const int verbose_;
const bool verbose_, nopLSDupClean_, tcpLSTriplets_;
edm::EDPutTokenT<LSTOutput> lstOutputToken_;

SDL::LST<SDL::Acc> lst_;
2 changes: 1 addition & 1 deletion RecoTracker/LSTCore/BuildFile.xml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
<use name="boost_header"/>
<use name="root"/>
<use name="HeterogeneousCore/AlpakaInterface"/>
<flags CXXFLAGS="-DLST_IS_CMSSW_PACKAGE -DCACHE_ALLOC -DT4FromT3 -DUSE_RZCHI2 -DUSE_T5_DNN -DPT_CUT=0.8 -DDUP_pLS -DDUP_T5 -DDUP_pT5 -DDUP_pT3 -DCrossclean_T5 -DCrossclean_pT3"/>
<flags CXXFLAGS="-DCACHE_ALLOC -DT4FromT3 -DUSE_RZCHI2 -DUSE_T5_DNN -DPT_CUT=0.8 -DDUP_pLS -DDUP_T5 -DDUP_pT5 -DDUP_pT3 -DCrossclean_T5 -DCrossclean_pT3"/>
<flags ALPAKA_BACKENDS="1"/>
<export>
<lib name="1"/>
94 changes: 60 additions & 34 deletions RecoTracker/LSTCore/interface/alpaka/Constants.h
Original file line number Diff line number Diff line change
@@ -104,54 +104,80 @@ namespace SDL {
constexpr float PT_CUT = 0.8f;
#endif

const unsigned int MAX_BLOCKS = 80;
const unsigned int MAX_CONNECTED_MODULES = 40;
constexpr unsigned int MAX_BLOCKS = 80;
constexpr unsigned int MAX_CONNECTED_MODULES = 40;

const unsigned int N_MAX_PIXEL_SEGMENTS_PER_MODULE = 50000;
constexpr unsigned int N_MAX_PIXEL_SEGMENTS_PER_MODULE = 50000;

const 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;

const unsigned int N_MAX_PIXEL_TRIPLETS = 5000;
const unsigned int N_MAX_PIXEL_QUINTUPLETS = 15000;
constexpr unsigned int N_MAX_PIXEL_TRIPLETS = 5000;
constexpr unsigned int N_MAX_PIXEL_QUINTUPLETS = 15000;

const unsigned int N_MAX_PIXEL_TRACK_CANDIDATES = 30000;
const 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;

const unsigned int size_superbins = 45000;
constexpr unsigned int size_superbins = 45000;

//defining the constant host device variables right up here
ALPAKA_STATIC_ACC_MEM_GLOBAL const float miniMulsPtScaleBarrel[6] = {0.0052, 0.0038, 0.0034, 0.0034, 0.0032, 0.0034};
ALPAKA_STATIC_ACC_MEM_GLOBAL const float miniMulsPtScaleEndcap[5] = {0.006, 0.006, 0.006, 0.006, 0.006};
ALPAKA_STATIC_ACC_MEM_GLOBAL const float miniRminMeanBarrel[6] = {
namespace objLayers {
ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr int kpLS =
2; // Currently pixel tracks treated as LSs with 2 double layers (IT layers 1+2 and 3+4). To be potentially handled better in the future.
ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr int kLS = 2;
ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr int kT3 = 3;
ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr int kpT3 = 5;
ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr int kT5 = 5;
ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr int kpT5 = 7;
} // namespace objLayers

namespace objHits {
ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr int kpLS =
4; // Currently pixel tracks treated as LSs with 4 hits. To be potentially handled better in the future.
ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr int kLS = 4;
ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr int kT3 = 6;
ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr int kpT3 = 10;
ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr int kT5 = 10;
ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr int kpT5 = 14;
} // namespace objHits

ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float kMulsInGev2 =
0.015; // 15 MeV constant from the approximate Bethe-Bloch formula
ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float miniMulsPtScaleBarrel[6] = {
0.0052, 0.0038, 0.0034, 0.0034, 0.0032, 0.0034};
ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float miniMulsPtScaleEndcap[5] = {0.006, 0.006, 0.006, 0.006, 0.006};
ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float miniRminMeanBarrel[6] = {
25.007152356, 37.2186993757, 52.3104270826, 68.6658656666, 85.9770373007, 108.301772384};
ALPAKA_STATIC_ACC_MEM_GLOBAL const float miniRminMeanEndcap[5] = {
ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float miniRminMeanEndcap[5] = {
130.992832231, 154.813883559, 185.352604327, 221.635123002, 265.022076742};
ALPAKA_STATIC_ACC_MEM_GLOBAL const float k2Rinv1GeVf = (2.99792458e-3 * 3.8) / 2;
ALPAKA_STATIC_ACC_MEM_GLOBAL const float kR1GeVf = 1. / (2.99792458e-3 * 3.8);
ALPAKA_STATIC_ACC_MEM_GLOBAL const float sinAlphaMax = 0.95;
ALPAKA_STATIC_ACC_MEM_GLOBAL const float ptCut = PT_CUT;
ALPAKA_STATIC_ACC_MEM_GLOBAL const float deltaZLum = 15.0;
ALPAKA_STATIC_ACC_MEM_GLOBAL const float pixelPSZpitch = 0.15;
ALPAKA_STATIC_ACC_MEM_GLOBAL const float strip2SZpitch = 5.0;
ALPAKA_STATIC_ACC_MEM_GLOBAL const float pt_betaMax = 7.0;
ALPAKA_STATIC_ACC_MEM_GLOBAL const float magnetic_field = 3.8112;
ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float k2Rinv1GeVf = (2.99792458e-3 * 3.8) / 2;
ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float kR1GeVf = 1. / (2.99792458e-3 * 3.8);
ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float sinAlphaMax = 0.95;
ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float ptCut = PT_CUT;
ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float deltaZLum = 15.0;
ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float pixelPSZpitch = 0.15;
ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float stripPSZpitch = 2.4;
ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float strip2SZpitch = 5.0;
ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float width2S = 0.009;
ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float widthPS = 0.01;
ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float pt_betaMax = 7.0;
ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float magnetic_field = 3.8112;
// Since C++ can't represent infinity, SDL_INF = 123456789 was used to represent infinity in the data table
ALPAKA_STATIC_ACC_MEM_GLOBAL const float SDL_INF = 123456789.0;
ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float SDL_INF = 123456789.0;
} //namespace SDL

namespace T5DNN {
// Working points matching LST fake rate (43.9%) or signal acceptance (82.0%)
ALPAKA_STATIC_ACC_MEM_GLOBAL const float LSTWP1 = 0.3418833f; // 94.0% TPR, 43.9% FPR
ALPAKA_STATIC_ACC_MEM_GLOBAL const 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 const float WP70 = 0.7776195f; // 70.0% TPR, 10.0% FPR
ALPAKA_STATIC_ACC_MEM_GLOBAL const float WP75 = 0.7181118f; // 75.0% TPR, 13.5% FPR
ALPAKA_STATIC_ACC_MEM_GLOBAL const float WP80 = 0.6492643f; // 80.0% TPR, 17.9% FPR
ALPAKA_STATIC_ACC_MEM_GLOBAL const float WP85 = 0.5655319f; // 85.0% TPR, 23.8% FPR
ALPAKA_STATIC_ACC_MEM_GLOBAL const float WP90 = 0.4592205f; // 90.0% TPR, 32.6% FPR
ALPAKA_STATIC_ACC_MEM_GLOBAL const float WP95 = 0.3073708f; // 95.0% TPR, 47.7% FPR
ALPAKA_STATIC_ACC_MEM_GLOBAL const float WP97p5 = 0.2001348f; // 97.5% TPR, 61.2% FPR
ALPAKA_STATIC_ACC_MEM_GLOBAL const float WP99 = 0.1120605f; // 99.0% TPR, 75.9% FPR
ALPAKA_STATIC_ACC_MEM_GLOBAL const 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
#endif
9 changes: 3 additions & 6 deletions RecoTracker/LSTCore/interface/alpaka/LST.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
#ifndef LST_H
#define LST_H

#ifdef LST_IS_CMSSW_PACKAGE
#include "RecoTracker/LSTCore/interface/alpaka/Constants.h"
#include "RecoTracker/LSTCore/interface/alpaka/LSTESData.h"
#else
#include "Constants.h"
#include "LSTESData.h"
#endif

#include <cstdlib>
#include <numeric>
@@ -47,7 +42,9 @@ namespace SDL {
const std::vector<unsigned int> ph2_detId,
const std::vector<float> ph2_x,
const std::vector<float> ph2_y,
const std::vector<float> ph2_z);
const std::vector<float> ph2_z,
bool no_pls_dupclean,
bool tc_pls_triplets);
std::vector<std::vector<unsigned int>> hits() { return out_tc_hitIdxs_; }
std::vector<unsigned int> len() { return out_tc_len_; }
std::vector<int> seedIdx() { return out_tc_seedIdx_; }
4 changes: 0 additions & 4 deletions RecoTracker/LSTCore/interface/alpaka/Module.h
Original file line number Diff line number Diff line change
@@ -3,11 +3,7 @@

#include <alpaka/alpaka.hpp>

#ifdef LST_IS_CMSSW_PACKAGE
#include "RecoTracker/LSTCore/interface/alpaka/Constants.h"
#else
#include "Constants.h"
#endif

namespace SDL {
enum SubDet { InnerPixel = 0, Barrel = 5, Endcap = 4 };
4 changes: 0 additions & 4 deletions RecoTracker/LSTCore/src/alpaka/EndcapGeometry.h
Original file line number Diff line number Diff line change
@@ -9,11 +9,7 @@
#include <vector>
#include <stdexcept>

#ifdef LST_IS_CMSSW_PACKAGE
#include "RecoTracker/LSTCore/interface/alpaka/Constants.h"
#else
#include "Constants.h"
#endif

namespace SDL {
template <typename>
Loading

0 comments on commit d3e5999

Please sign in to comment.