|
|
Go to the documentation of this file.
10 #include <cuda_runtime.h>
37 uint32_t
const *__restrict__
nCells,
58 printf(
"number of found cells %d, found tuples %d with total hits %d out of %d\n",
80 printf(
"Tuples overflow\n");
82 printf(
"Cells overflow\n");
84 printf(
"cellNeighbors overflow\n");
86 printf(
"cellTracks overflow\n");
91 if (thisCell.outerNeighbors().full())
92 printf(
"OuterNeighbors overflow %d in %d\n",
idx, thisCell.layerPairId());
93 if (thisCell.tracks().full())
94 printf(
"Tracks overflow %d in %d\n",
idx, thisCell.layerPairId());
95 if (thisCell.isKilled())
97 if (thisCell.unused())
99 if (0 ==
hitToTuple->size(thisCell.inner_hit_id()) && 0 ==
hitToTuple->size(thisCell.outer_hit_id()))
105 printf(
"OuterHitOfCell overflow %d\n",
idx);
115 if (!thisCell.isKilled())
118 for (
auto it : thisCell.tracks())
136 if (thisCell.tracks().size() < 2)
144 for (
auto it : thisCell.tracks()) {
149 for (
auto it : thisCell.tracks()) {
157 uint32_t
const *__restrict__
nCells,
169 if (thisCell.tracks().size() < 2)
176 auto score = [&](
auto it) {
182 for (
auto it : thisCell.tracks()) {
189 for (
auto it : thisCell.tracks()) {
190 if (
tracks->quality(it) !=
bad && it != im)
200 uint32_t
const *__restrict__
nCells,
205 float CAThetaCutBarrel,
206 float CAThetaCutForward,
207 float dcaCutInnerTriplet,
208 float dcaCutOuterTriplet) {
209 auto const &
hh = *
hhp;
215 if (0 == (firstCellIndex +
first)) {
221 auto cellIndex =
idx;
223 auto innerHitId = thisCell.inner_hit_id();
227 auto ri = thisCell.inner_r(
hh);
228 auto zi = thisCell.inner_z(
hh);
230 auto ro = thisCell.outer_r(
hh);
231 auto zo = thisCell.outer_z(
hh);
235 auto otherCell =
__ldg(vi +
j);
236 auto &oc =
cells[otherCell];
237 auto r1 = oc.inner_r(
hh);
238 auto z1 = oc.inner_z(
hh);
239 bool aligned = GPUCACell::areAlignedRZ(
247 isBarrel ? CAThetaCutBarrel : CAThetaCutForward);
248 if (aligned && thisCell.dcaCut(
hh,
251 : dcaCutOuterTriplet,
254 thisCell.setUsedBit(1);
268 unsigned int minHitsPerNtuplet) {
270 auto const &
hh = *
hhp;
275 if (thisCell.isKilled())
278 auto pid = thisCell.layerPairId();
279 auto doit = minHitsPerNtuplet > 3 ? pid < 3 : pid < 8 || pid > 12;
296 if (!thisCell.tracks().empty())
297 thisCell.setUsedBit(2);
313 printf(
"wrong mult %d %d\n", it,
nhits);
331 printf(
"wrong mult %d %d\n", it,
nhits);
343 auto nhits = tuples->size(it);
359 for (
int i = 0;
i < 5; ++
i) {
364 printf(
"NaN in fit %d size %d chi2 %f\n", it, tuples->size(it),
tracks->chi2(it));
375 float pt = std::min<float>(
tracks->pt(it),
cuts.chi2MaxPt);
381 printf(
"Bad fit %d size %d pt %f eta %f chi2 %f\n",
410 if (tuples->size(
idx) == 0)
423 if (tuples->size(
idx) == 0)
427 for (
auto h = tuples->begin(
idx);
h != tuples->end(
idx); ++
h)
437 if (tuples->size(
idx) == 0)
441 for (
auto h = tuples->begin(
idx);
h != tuples->end(
idx); ++
h)
490 auto const &
hh = *
hhp;
512 if (idx < l1end and nh >
nmin)
532 if (
quality[it] != bad && it != im)
552 printf(
"TK: %d %d %d %f %f %f %f %f %f %f %d %d %d %d %d\n",
575 "||Counters | nEvents | nHits | nCells | nTuples | nFitTacks | nGoodTracks | nUsedHits | nDupHits | "
577 "nEmptyCells | nZeroTrackCells ||\n");
578 printf(
"Counters Raw %lld %lld %lld %lld %lld %lld %lld %lld %lld %lld %lld\n",
590 printf(
"Counters Norm %lld || %.1f| %.1f| %.1f| %.1f| %.1f| %.1f| %.1f| %.1f| %.3f| %.3f||\n",
592 c.nHits /
double(
c.nEvents),
593 c.nCells /
double(
c.nEvents),
594 c.nTuples /
double(
c.nEvents),
595 c.nFitTracks /
double(
c.nEvents),
596 c.nGoodTracks /
double(
c.nEvents),
597 c.nUsedHits /
double(
c.nEvents),
598 c.nDupHits /
double(
c.nEvents),
599 c.nKilledCells /
double(
c.nEvents),
600 c.nEmptyCells /
double(
c.nCells),
601 c.nZeroTrackCells /
double(
c.nCells));
const HitContainer *__restrict__ const TkSoA *__restrict__ const Quality *__restrict__ const CAHitNtupletGeneratorKernelsGPU::HitToTuple *__restrict__ uint32_t int iev
const caConstants::TupleMultiplicity const CAHitNtupletGeneratorKernelsGPU::HitToTuple cms::cuda::AtomicPairCounter const GPUCACell *__restrict__ const uint32_t *__restrict__ const gpuPixelDoublets::CellNeighborsVector * cellNeighbors
const TkSoA *__restrict__ CAHitNtupletGeneratorKernelsGPU::QualityCuts cuts
const caConstants::TupleMultiplicity const CAHitNtupletGeneratorKernelsGPU::HitToTuple cms::cuda::AtomicPairCounter const GPUCACell *__restrict__ const uint32_t *__restrict__ const gpuPixelDoublets::CellNeighborsVector const gpuPixelDoublets::CellTracksVector const GPUCACell::OuterHitOfCell *__restrict__ isOuterHitOfCell
constexpr uint32_t last_bpix1_detIndex
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
const caConstants::TupleMultiplicity const CAHitNtupletGeneratorKernelsGPU::HitToTuple cms::cuda::AtomicPairCounter const GPUCACell *__restrict__ cells
const HitContainer *__restrict__ const TkSoA *__restrict__ ptracks
constexpr uint32_t maxNumberOfQuadruplets
const caConstants::TupleMultiplicity const CAHitNtupletGeneratorKernelsGPU::HitToTuple cms::cuda::AtomicPairCounter const GPUCACell *__restrict__ const uint32_t *__restrict__ nCells
TrackingRecHit2DHeterogeneous< cms::cudacompat::GPUTraits > TrackingRecHit2DCUDA
const TrackingRecHit2DSOAView *__restrict__ hhp
constexpr uint32_t last_barrel_detIndex
const uint32_t *__restrict__ Quality * quality
const caConstants::TupleMultiplicity const CAHitNtupletGeneratorKernelsGPU::HitToTuple cms::cuda::AtomicPairCounter const GPUCACell *__restrict__ const uint32_t *__restrict__ const gpuPixelDoublets::CellNeighborsVector const gpuPixelDoublets::CellTracksVector const GPUCACell::OuterHitOfCell *__restrict__ uint32_t uint32_t CAHitNtupletGeneratorKernelsGPU::Counters * counters
cms::cuda::OneToManyAssoc< tindex_type, 8, maxTuples > TupleMultiplicity
T1 atomicAdd(T1 *a, T2 b)
const HitContainer *__restrict__ const TkSoA *__restrict__ Quality *__restrict__ uint16_t nmin
const uint32_t *__restrict__ const HitContainer *__restrict__ TkSoA *__restrict__ tracks
const caConstants::TupleMultiplicity * tupleMultiplicity
const uint32_t *__restrict__ HitContainer * foundNtuplets
const HitContainer *__restrict__ const TkSoA *__restrict__ const Quality *__restrict__ const CAHitNtupletGeneratorKernelsGPU::HitToTuple *__restrict__ uint32_t maxPrint
static constexpr uint32_t nbins()
const caConstants::TupleMultiplicity const CAHitNtupletGeneratorKernelsGPU::HitToTuple cms::cuda::AtomicPairCounter * apc
const HitContainer *__restrict__ const TkSoA *__restrict__ Quality *__restrict__ uint16_t const CAHitNtupletGeneratorKernelsGPU::HitToTuple *__restrict__ phitToTuple
const caConstants::TupleMultiplicity const CAHitNtupletGeneratorKernelsGPU::HitToTuple cms::cuda::AtomicPairCounter const GPUCACell *__restrict__ const uint32_t *__restrict__ const gpuPixelDoublets::CellNeighborsVector const gpuPixelDoublets::CellTracksVector const GPUCACell::OuterHitOfCell *__restrict__ uint32_t uint32_t maxNumberOfDoublets
const HitContainer *__restrict__ ptuples
const caConstants::TupleMultiplicity const CAHitNtupletGeneratorKernelsGPU::HitToTuple * hitToTuple
const TrackingRecHit2DSOAView *__restrict__ HitContainer *__restrict__ hitDetIndices
const caConstants::TupleMultiplicity const CAHitNtupletGeneratorKernelsGPU::HitToTuple cms::cuda::AtomicPairCounter const GPUCACell *__restrict__ const uint32_t *__restrict__ const gpuPixelDoublets::CellNeighborsVector const gpuPixelDoublets::CellTracksVector * cellTracks
TrackSoA::HitContainer HitContainer
cms::cuda::OneToManyAssoc< tindex_type, pixelGPUConstants::maxNumberOfHits, 4 *maxTuples > HitToTuple
Abs< T >::type abs(const T &t)
TrackSoAHeterogeneousT< maxNumber()> TrackSoA
__host__ __device__ const index_type uint32_t n
const caConstants::TupleMultiplicity const CAHitNtupletGeneratorKernelsGPU::HitToTuple cms::cuda::AtomicPairCounter const GPUCACell *__restrict__ const uint32_t *__restrict__ const gpuPixelDoublets::CellNeighborsVector const gpuPixelDoublets::CellTracksVector const GPUCACell::OuterHitOfCell *__restrict__ uint32_t nHits