Skip to content

Reduce minYsizeB1 and minYsizeB2 CA cuts for Phase1 #47271

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 8, 2025
Merged
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: 0 additions & 6 deletions Geometry/CommonTopologies/interface/SimplePixelTopology.h
Original file line number Diff line number Diff line change
Expand Up @@ -367,9 +367,6 @@ namespace pixelTopology {

static constexpr float dzdrFact = 8 * 0.0285 / 0.015; // from dz/dr to "DY"

static constexpr int minYsizeB1 = 25;
static constexpr int minYsizeB2 = 15;

static constexpr int nPairsMinimal = 33;
static constexpr int nPairsFarForwards = nPairsMinimal + 8; // include barrel "jumping" layer pairs
static constexpr int nPairs = phase2PixelTopology::nPairs; // include far forward layer pairs
Expand Down Expand Up @@ -464,9 +461,6 @@ namespace pixelTopology {

static constexpr float dzdrFact = 8 * 0.0285 / 0.015; // from dz/dr to "DY"

static constexpr int minYsizeB1 = 36;
static constexpr int minYsizeB2 = 28;

static constexpr int nPairsForQuadruplets = 13; // quadruplets require hits in all layers
static constexpr int nPairsForTriplets = nPairsForQuadruplets + 2; // include barrel "jumping" layer pairs
static constexpr int nPairs = nPairsForTriplets + 4; // include forward "jumping" layer pairs
Expand Down
11 changes: 11 additions & 0 deletions RecoTracker/PixelSeeding/plugins/CAHitNtupletGeneratorOnGPU.cc
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@ namespace {
cfg.getParameter<bool>("idealConditions"),
(float)cfg.getParameter<double>("z0Cut"),
(float)cfg.getParameter<double>("ptCut"),
cfg.getParameter<int>("minYsizeB1"),
cfg.getParameter<int>("minYsizeB2"),
cfg.getParameter<std::vector<int>>("phiCuts")};
}

Expand Down Expand Up @@ -197,6 +199,9 @@ void CAHitNtupletGeneratorOnGPU<pixelTopology::Phase1>::fillDescriptions(edm::Pa
trackQualityCuts.add<double>("quadrupletMaxTip", 0.5)->setComment("Max |Tip| for quadruplets, in cm");
trackQualityCuts.add<double>("quadrupletMaxZip", 12.)->setComment("Max |Zip| for quadruplets, in cm");

desc.add<int>("minYsizeB1", 1)->setComment("Min Y cluster size in pixel B1");
desc.add<int>("minYsizeB2", 1)->setComment("Min Y cluster size in pixel B2");
Copy link
Contributor

@mmusich mmusich Feb 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cms-sw/orp-l2, it would be great to get this PR into CMSSW_15_0_0 for 2025 HLT development purposes.
As it is, it does change (HLT) physics, could it enter in pre3 still?
Otherwise I guess it would be more acceptable if it would just make the parameters configurable, followed by a change in the HLT menu configuration?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's try to get it merged tomorrow, that will be fine for pre3

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

excellent, thanks.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like for some reason the commands to enable gpu and test are not being received correctly?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It now seems to have worked, although tests are still pending - I see a similar behavior in other PRs


desc.add<std::vector<int>>(
"phiCuts", std::vector<int>(std::begin(phase1PixelTopology::phicuts), std::end(phase1PixelTopology::phicuts)))
->setComment("Cuts in phi for cells");
Expand Down Expand Up @@ -230,6 +235,9 @@ void CAHitNtupletGeneratorOnGPU<pixelTopology::HIonPhase1>::fillDescriptions(edm
trackQualityCuts.add<double>("quadrupletMaxTip", 0.5)->setComment("Max |Tip| for quadruplets, in cm");
trackQualityCuts.add<double>("quadrupletMaxZip", 6.)->setComment("Max |Zip| for quadruplets, in cm");

desc.add<int>("minYsizeB1", 36)->setComment("Min Y cluster size in pixel B1");
desc.add<int>("minYsizeB2", 28)->setComment("Min Y cluster size in pixel B2");

desc.add<std::vector<int>>(
"phiCuts", std::vector<int>(std::begin(phase1PixelTopology::phicuts), std::end(phase1PixelTopology::phicuts)))
->setComment("Cuts in phi for cells");
Expand All @@ -256,6 +264,9 @@ void CAHitNtupletGeneratorOnGPU<pixelTopology::Phase2>::fillDescriptions(edm::Pa
trackQualityCuts.add<double>("maxTip", 0.3)->setComment("Max |Tip| in cm");
trackQualityCuts.add<double>("maxZip", 12.)->setComment("Max |Zip|, in cm");

desc.add<int>("minYsizeB1", 25)->setComment("Min Y cluster size in pixel B1");
desc.add<int>("minYsizeB2", 15)->setComment("Min Y cluster size in pixel B2");

desc.add<std::vector<int>>(
"phiCuts", std::vector<int>(std::begin(phase2PixelTopology::phicuts), std::end(phase2PixelTopology::phicuts)))
->setComment("Cuts in phi for cells");
Expand Down
11 changes: 11 additions & 0 deletions RecoTracker/PixelSeeding/plugins/alpaka/CAHitNtupletGenerator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE {
cfg.getParameter<bool>("idealConditions"),
(float)cfg.getParameter<double>("cellZ0Cut"),
(float)cfg.getParameter<double>("cellPtCut"),
cfg.getParameter<int>("minYsizeB1"),
cfg.getParameter<int>("minYsizeB2"),
cfg.getParameter<std::vector<int>>("phiCuts")};
}

Expand Down Expand Up @@ -221,6 +223,9 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE {
"\"region "
"cuts\" based on the fit results (pT, Tip, Zip).");

desc.add<int>("minYsizeB1", 1)->setComment("Min Y cluster size in pixel B1");
desc.add<int>("minYsizeB2", 1)->setComment("Min Y cluster size in pixel B2");

desc.add<std::vector<int>>(
"phiCuts",
std::vector<int>(std::begin(phase1PixelTopology::phicuts), std::end(phase1PixelTopology::phicuts)))
Expand Down Expand Up @@ -257,6 +262,9 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE {
"\"region "
"cuts\" based on the fit results (pT, Tip, Zip).");

desc.add<int>("minYsizeB1", 36)->setComment("Min Y cluster size in pixel B1");
desc.add<int>("minYsizeB2", 28)->setComment("Min Y cluster size in pixel B2");

desc.add<std::vector<int>>(
"phiCuts",
std::vector<int>(std::begin(phase1PixelTopology::phicuts), std::end(phase1PixelTopology::phicuts)))
Expand Down Expand Up @@ -284,6 +292,9 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE {
"Quality cuts based on the results of the track fit:\n - apply cuts based on the fit results (pT, Tip, "
"Zip).");

desc.add<int>("minYsizeB1", 25)->setComment("Min Y cluster size in pixel B1");
desc.add<int>("minYsizeB2", 15)->setComment("Min Y cluster size in pixel B2");

desc.add<std::vector<int>>(
"phiCuts",
std::vector<int>(std::begin(phase2PixelTopology::phicuts), std::end(phase2PixelTopology::phicuts)))
Expand Down
13 changes: 10 additions & 3 deletions RecoTracker/PixelSeeding/plugins/alpaka/CAPixelDoubletsAlgos.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,17 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE::caPixelDoublets {
const bool idealConditions,
const float z0Cut,
const float ptCut,
const int minYsizeB1,
const int minYsizeB2,
const std::vector<int>& phiCutsV)
: doClusterCut_(doClusterCut),
doZ0Cut_(doZ0Cut),
doPtCut_(doPtCut),
idealConditions_(idealConditions),
z0Cut_(z0Cut),
ptCut_(ptCut) {
ptCut_(ptCut),
minYsizeB1_(minYsizeB1),
minYsizeB2_(minYsizeB2) {
assert(phiCutsV.size() == TrackerTraits::nPairs);
std::copy(phiCutsV.begin(), phiCutsV.end(), &phiCuts[0]);
}
Expand All @@ -71,6 +75,9 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE::caPixelDoublets {
float z0Cut_; //FIXME: check if could be const now
float ptCut_;

int minYsizeB1_;
int minYsizeB2_;

int phiCuts[T::nPairs];

template <typename TAcc>
Expand Down Expand Up @@ -119,11 +126,11 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE::caPixelDoublets {
auto mes = (!innerB1) || isOuterLadder ? hh[i].clusterSizeY() : -1;

if (innerB1) // B1
if (mes > 0 && mes < T::minYsizeB1)
if (mes > 0 && mes < minYsizeB1_)
return true; // only long cluster (5*8)
bool innerB2 = (mi >= T::last_bpix1_detIndex) && (mi < T::last_bpix2_detIndex); //FIXME number
if (innerB2) // B2 and F1
if (mes > 0 && mes < T::minYsizeB2)
if (mes > 0 && mes < minYsizeB2_)
return true;

return false;
Expand Down
13 changes: 10 additions & 3 deletions RecoTracker/PixelSeeding/plugins/gpuPixelDoubletsAlgos.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,17 @@ namespace gpuPixelDoublets {
const bool idealConditions,
const float z0Cut,
const float ptCut,
const int minYsizeB1,
const int minYsizeB2,
const std::vector<int>& phiCutsV)
: doClusterCut_(doClusterCut),
doZ0Cut_(doZ0Cut),
doPtCut_(doPtCut),
idealConditions_(idealConditions),
z0Cut_(z0Cut),
ptCut_(ptCut) {
ptCut_(ptCut),
minYsizeB1_(minYsizeB1),
minYsizeB2_(minYsizeB2) {
assert(phiCutsV.size() == TrackerTraits::nPairs);
std::copy(phiCutsV.begin(), phiCutsV.end(), &phiCuts[0]);
}
Expand All @@ -66,6 +70,9 @@ namespace gpuPixelDoublets {
float z0Cut_;
float ptCut_;

int minYsizeB1_;
int minYsizeB2_;

int phiCuts[T::nPairs];

__device__ __forceinline__ bool zSizeCut(H hh, int i, int o) const {
Expand Down Expand Up @@ -107,11 +114,11 @@ namespace gpuPixelDoublets {
auto mes = (!innerB1) || isOuterLadder ? hh[i].clusterSizeY() : -1;

if (innerB1) // B1
if (mes > 0 && mes < T::minYsizeB1)
if (mes > 0 && mes < minYsizeB1_)
return true; // only long cluster (5*8)
bool innerB2 = (mi >= T::last_bpix1_detIndex) && (mi < T::last_bpix2_detIndex); //FIXME number
if (innerB2) // B2 and F1
if (mes > 0 && mes < T::minYsizeB2)
if (mes > 0 && mes < minYsizeB2_)
return true;

return false;
Expand Down