Skip to content

Commit 34fd1de

Browse files
mmasciovBrunella DAnzi
authored andcommitted
Make cuts on minYsizeB1 and minYsizeB2 configurable
1 parent 142684c commit 34fd1de

File tree

5 files changed

+42
-12
lines changed

5 files changed

+42
-12
lines changed

Geometry/CommonTopologies/interface/SimplePixelTopology.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -367,9 +367,6 @@ namespace pixelTopology {
367367

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

370-
static constexpr int minYsizeB1 = 25;
371-
static constexpr int minYsizeB2 = 15;
372-
373370
static constexpr int nPairsMinimal = 33;
374371
static constexpr int nPairsFarForwards = nPairsMinimal + 8; // include barrel "jumping" layer pairs
375372
static constexpr int nPairs = phase2PixelTopology::nPairs; // include far forward layer pairs
@@ -464,9 +461,6 @@ namespace pixelTopology {
464461

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

467-
static constexpr int minYsizeB1 = 1;
468-
static constexpr int minYsizeB2 = 1;
469-
470464
static constexpr int nPairsForQuadruplets = 13; // quadruplets require hits in all layers
471465
static constexpr int nPairsForTriplets = nPairsForQuadruplets + 2; // include barrel "jumping" layer pairs
472466
static constexpr int nPairs = nPairsForTriplets + 4; // include forward "jumping" layer pairs

RecoTracker/PixelSeeding/plugins/CAHitNtupletGeneratorOnGPU.cc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,8 @@ namespace {
130130
cfg.getParameter<bool>("idealConditions"),
131131
(float)cfg.getParameter<double>("z0Cut"),
132132
(float)cfg.getParameter<double>("ptCut"),
133+
cfg.getParameter<int>("minYsizeB1"),
134+
cfg.getParameter<int>("minYsizeB2"),
133135
cfg.getParameter<std::vector<int>>("phiCuts")};
134136
}
135137

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

202+
desc.add<int>("minYsizeB1", 1)->setComment("Min Y cluster size in pixel B1");
203+
desc.add<int>("minYsizeB2", 1)->setComment("Min Y cluster size in pixel B2");
204+
200205
desc.add<std::vector<int>>(
201206
"phiCuts", std::vector<int>(std::begin(phase1PixelTopology::phicuts), std::end(phase1PixelTopology::phicuts)))
202207
->setComment("Cuts in phi for cells");
@@ -230,6 +235,9 @@ void CAHitNtupletGeneratorOnGPU<pixelTopology::HIonPhase1>::fillDescriptions(edm
230235
trackQualityCuts.add<double>("quadrupletMaxTip", 0.5)->setComment("Max |Tip| for quadruplets, in cm");
231236
trackQualityCuts.add<double>("quadrupletMaxZip", 6.)->setComment("Max |Zip| for quadruplets, in cm");
232237

238+
desc.add<int>("minYsizeB1", 36)->setComment("Min Y cluster size in pixel B1");
239+
desc.add<int>("minYsizeB2", 28)->setComment("Min Y cluster size in pixel B2");
240+
233241
desc.add<std::vector<int>>(
234242
"phiCuts", std::vector<int>(std::begin(phase1PixelTopology::phicuts), std::end(phase1PixelTopology::phicuts)))
235243
->setComment("Cuts in phi for cells");
@@ -256,6 +264,9 @@ void CAHitNtupletGeneratorOnGPU<pixelTopology::Phase2>::fillDescriptions(edm::Pa
256264
trackQualityCuts.add<double>("maxTip", 0.3)->setComment("Max |Tip| in cm");
257265
trackQualityCuts.add<double>("maxZip", 12.)->setComment("Max |Zip|, in cm");
258266

267+
desc.add<int>("minYsizeB1", 25)->setComment("Min Y cluster size in pixel B1");
268+
desc.add<int>("minYsizeB2", 15)->setComment("Min Y cluster size in pixel B2");
269+
259270
desc.add<std::vector<int>>(
260271
"phiCuts", std::vector<int>(std::begin(phase2PixelTopology::phicuts), std::end(phase2PixelTopology::phicuts)))
261272
->setComment("Cuts in phi for cells");

RecoTracker/PixelSeeding/plugins/alpaka/CAHitNtupletGenerator.cc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,8 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE {
150150
cfg.getParameter<bool>("idealConditions"),
151151
(float)cfg.getParameter<double>("cellZ0Cut"),
152152
(float)cfg.getParameter<double>("cellPtCut"),
153+
cfg.getParameter<int>("minYsizeB1"),
154+
cfg.getParameter<int>("minYsizeB2"),
153155
cfg.getParameter<std::vector<int>>("phiCuts")};
154156
}
155157

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

226+
desc.add<int>("minYsizeB1", 1)->setComment("Min Y cluster size in pixel B1");
227+
desc.add<int>("minYsizeB2", 1)->setComment("Min Y cluster size in pixel B2");
228+
224229
desc.add<std::vector<int>>(
225230
"phiCuts",
226231
std::vector<int>(std::begin(phase1PixelTopology::phicuts), std::end(phase1PixelTopology::phicuts)))
@@ -257,6 +262,9 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE {
257262
"\"region "
258263
"cuts\" based on the fit results (pT, Tip, Zip).");
259264

265+
desc.add<int>("minYsizeB1", 36)->setComment("Min Y cluster size in pixel B1");
266+
desc.add<int>("minYsizeB2", 28)->setComment("Min Y cluster size in pixel B2");
267+
260268
desc.add<std::vector<int>>(
261269
"phiCuts",
262270
std::vector<int>(std::begin(phase1PixelTopology::phicuts), std::end(phase1PixelTopology::phicuts)))
@@ -284,6 +292,9 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE {
284292
"Quality cuts based on the results of the track fit:\n - apply cuts based on the fit results (pT, Tip, "
285293
"Zip).");
286294

295+
desc.add<int>("minYsizeB1", 25)->setComment("Min Y cluster size in pixel B1");
296+
desc.add<int>("minYsizeB2", 15)->setComment("Min Y cluster size in pixel B2");
297+
287298
desc.add<std::vector<int>>(
288299
"phiCuts",
289300
std::vector<int>(std::begin(phase2PixelTopology::phicuts), std::end(phase2PixelTopology::phicuts)))

RecoTracker/PixelSeeding/plugins/alpaka/CAPixelDoubletsAlgos.h

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,17 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE::caPixelDoublets {
5252
const bool idealConditions,
5353
const float z0Cut,
5454
const float ptCut,
55+
const int minYsizeB1,
56+
const int minYsizeB2,
5557
const std::vector<int>& phiCutsV)
5658
: doClusterCut_(doClusterCut),
5759
doZ0Cut_(doZ0Cut),
5860
doPtCut_(doPtCut),
5961
idealConditions_(idealConditions),
6062
z0Cut_(z0Cut),
61-
ptCut_(ptCut) {
63+
ptCut_(ptCut),
64+
minYsizeB1_(minYsizeB1),
65+
minYsizeB2_(minYsizeB2) {
6266
assert(phiCutsV.size() == TrackerTraits::nPairs);
6367
std::copy(phiCutsV.begin(), phiCutsV.end(), &phiCuts[0]);
6468
}
@@ -71,6 +75,9 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE::caPixelDoublets {
7175
float z0Cut_; //FIXME: check if could be const now
7276
float ptCut_;
7377

78+
int minYsizeB1_;
79+
int minYsizeB2_;
80+
7481
int phiCuts[T::nPairs];
7582

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

121128
if (innerB1) // B1
122-
if (mes > 0 && mes < T::minYsizeB1)
129+
if (mes > 0 && mes < minYsizeB1_)
123130
return true; // only long cluster (5*8)
124131
bool innerB2 = (mi >= T::last_bpix1_detIndex) && (mi < T::last_bpix2_detIndex); //FIXME number
125132
if (innerB2) // B2 and F1
126-
if (mes > 0 && mes < T::minYsizeB2)
133+
if (mes > 0 && mes < minYsizeB2_)
127134
return true;
128135

129136
return false;

RecoTracker/PixelSeeding/plugins/gpuPixelDoubletsAlgos.h

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,17 @@ namespace gpuPixelDoublets {
4747
const bool idealConditions,
4848
const float z0Cut,
4949
const float ptCut,
50+
const int minYsizeB1,
51+
const int minYsizeB2,
5052
const std::vector<int>& phiCutsV)
5153
: doClusterCut_(doClusterCut),
5254
doZ0Cut_(doZ0Cut),
5355
doPtCut_(doPtCut),
5456
idealConditions_(idealConditions),
5557
z0Cut_(z0Cut),
56-
ptCut_(ptCut) {
58+
ptCut_(ptCut),
59+
minYsizeB1_(minYsizeB1),
60+
minYsizeB2_(minYsizeB2) {
5761
assert(phiCutsV.size() == TrackerTraits::nPairs);
5862
std::copy(phiCutsV.begin(), phiCutsV.end(), &phiCuts[0]);
5963
}
@@ -66,6 +70,9 @@ namespace gpuPixelDoublets {
6670
float z0Cut_;
6771
float ptCut_;
6872

73+
int minYsizeB1_;
74+
int minYsizeB2_;
75+
6976
int phiCuts[T::nPairs];
7077

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

109116
if (innerB1) // B1
110-
if (mes > 0 && mes < T::minYsizeB1)
117+
if (mes > 0 && mes < minYsizeB1_)
111118
return true; // only long cluster (5*8)
112119
bool innerB2 = (mi >= T::last_bpix1_detIndex) && (mi < T::last_bpix2_detIndex); //FIXME number
113120
if (innerB2) // B2 and F1
114-
if (mes > 0 && mes < T::minYsizeB2)
121+
if (mes > 0 && mes < minYsizeB2_)
115122
return true;
116123

117124
return false;

0 commit comments

Comments
 (0)