Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions RecoTracker/LSTCore/interface/Common.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,17 @@ namespace lst {
using ArrayUxHits = edm::StdArray<unsigned int, kHits>;
};
struct Params_T5 {
static constexpr int kLayers = 5, kHits = 10;
static constexpr int kLayers = 7, kHits = 14; // 5 base + max 2 extensions
static constexpr int kBaseLayers = 5;
static constexpr int kEmbed = 6;
using ArrayU8xLayers = edm::StdArray<uint8_t, kLayers>;
using ArrayU16xLayers = edm::StdArray<uint16_t, kLayers>;
using ArrayUxHits = edm::StdArray<unsigned int, kHits>;
using ArrayFxEmbed = edm::StdArray<float, kEmbed>;
};
struct Params_pT5 {
static constexpr int kLayers = 7, kHits = 14;
static constexpr int kLayers = 9, kHits = 18; // 2 pixel + 7 OT (= T5::kLayers after extension)
static constexpr int kBaseLayers = 7;
using ArrayU8xLayers = edm::StdArray<uint8_t, kLayers>;
using ArrayU16xLayers = edm::StdArray<uint16_t, kLayers>;
using ArrayUxHits = edm::StdArray<unsigned int, kHits>;
Expand Down
1 change: 1 addition & 0 deletions RecoTracker/LSTCore/interface/ModulesSoA.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ namespace lst {
SOA_COLUMN(short, subdets),
SOA_COLUMN(short, sides),
SOA_COLUMN(float, eta),
SOA_COLUMN(float, phi),
SOA_COLUMN(float, r),
SOA_COLUMN(float, z),
SOA_COLUMN(bool, isInverted),
Expand Down
1 change: 1 addition & 0 deletions RecoTracker/LSTCore/interface/PixelQuintupletsSoA.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ namespace lst {
SOA_COLUMN(FPX, centerX), // T3-based circle center x
SOA_COLUMN(FPX, centerY), // T3-based circle center y
SOA_COLUMN(bool, isDup),
SOA_COLUMN(unsigned int, nLayers),
SOA_SCALAR(unsigned int, nPixelQuintuplets),
SOA_SCALAR(unsigned int, totOccupancyPixelQuintuplets));

Expand Down
15 changes: 9 additions & 6 deletions RecoTracker/LSTCore/interface/QuintupletsSoA.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,28 @@ namespace lst {
SOA_COLUMN(Params_T5::ArrayFxEmbed, t5Embed), // t5 embedding vector
SOA_COLUMN(FPX, eta),
SOA_COLUMN(FPX, phi),
SOA_COLUMN(FPX, score_rphisum), // r-phi based score
SOA_COLUMN(char, isDup), // duplicate flag
SOA_COLUMN(bool, tightCutFlag), // tight pass to be a TC
SOA_COLUMN(FPX, score_rphisum), // r-phi based score
SOA_COLUMN(char, isDup), // duplicate flag
SOA_COLUMN(unsigned int, nLayers), // number of active layers (5 base)
SOA_COLUMN(bool, tightCutFlag), // tight pass to be a TC
SOA_COLUMN(bool, partOfPT5),
SOA_COLUMN(float, regressionRadius),
SOA_COLUMN(float, regressionCenterX),
SOA_COLUMN(float, regressionCenterY),
SOA_COLUMN(float, dnnScore),
SOA_COLUMN(FPX, innerRadius), // inner triplet circle radius
SOA_COLUMN(FPX, bridgeRadius), // "middle"/bridge triplet radius
SOA_COLUMN(FPX, outerRadius), // outer triplet radius
SOA_COLUMN(FPX, pt),
SOA_COLUMN(FPX, pt)
#ifdef CUT_VALUE_DEBUG
,
SOA_COLUMN(float, rzChiSquared), // r-z only chi2
SOA_COLUMN(float, chiSquared),
SOA_COLUMN(float, nonAnchorChiSquared),
SOA_COLUMN(float, dBeta1),
SOA_COLUMN(float, dBeta2),
SOA_COLUMN(float, dBeta2)
#endif
SOA_COLUMN(bool, partOfPT5));
);

using QuintupletsSoA = QuintupletsSoALayout<>;
using Quintuplets = QuintupletsSoA::View;
Expand Down
9 changes: 7 additions & 2 deletions RecoTracker/LSTCore/src/ModuleMethods.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ namespace lst {
float m_y,
float m_z,
float& eta,
float& phi,
float& r) {
subdet = (detId & (7 << 25)) >> 25;
side = (subdet == Endcap) ? (detId & (3 << 23)) >> 23 : (detId & (3 << 18)) >> 18;
Expand All @@ -179,6 +180,7 @@ namespace lst {

r = std::sqrt(m_x * m_x + m_y * m_y + m_z * m_z);
eta = ((m_z > 0) - (m_z < 0)) * std::acosh(r / std::sqrt(m_x * m_x + m_y * m_y));
phi = std::atan2(m_y, m_x);
}

inline void loadCentroidsFromFile(const char* filePath, ModuleMetaData& mmd, uint16_t& nModules) {
Expand Down Expand Up @@ -252,6 +254,7 @@ namespace lst {
std::span<short> host_subdets = modules_view.subdets();
std::span<short> host_sides = modules_view.sides();
std::span<float> host_eta = modules_view.eta();
std::span<float> host_phi = modules_view.phi();
std::span<float> host_r = modules_view.r();
std::span<float> host_z = modules_view.z();
std::span<bool> host_isInverted = modules_view.isInverted();
Expand Down Expand Up @@ -279,7 +282,7 @@ namespace lst {
float m_z = mmd.module_z[detId];
unsigned int m_t = mmd.module_type[detId];

float eta, r;
float eta, phi, r;

uint16_t index;
unsigned short layer, ring, rod, module, subdet, side;
Expand All @@ -294,9 +297,10 @@ namespace lst {
isInverted = false;
isLower = false;
eta = 0;
phi = 0;
r = 0;
} else {
setDerivedQuantities(detId, layer, ring, rod, module, subdet, side, m_x, m_y, m_z, eta, r);
setDerivedQuantities(detId, layer, ring, rod, module, subdet, side, m_x, m_y, m_z, eta, phi, r);
isInverted = parseIsInverted(subdet, side, module, layer);
isLower = parseIsLower(isInverted, detId);
}
Expand All @@ -319,6 +323,7 @@ namespace lst {
host_subdets[index] = subdet;
host_sides[index] = side;
host_eta[index] = eta;
host_phi[index] = phi;
host_r[index] = r;
host_z[index] = m_z;
host_isInverted[index] = isInverted;
Expand Down
Loading