|
|
Go to the documentation of this file. 1 #ifndef RecoPixelVertexing_PixelTriplets_plugins_GPUCACell_h
2 #define RecoPixelVertexing_PixelTriplets_plugins_GPUCACell_h
10 #include <cuda_runtime.h>
68 if (outerNeighbors().
empty()) {
84 return outerNeighbors().push_back(
t);
130 printf(
"printing cell: %d, on layerPair: %d, innerHitId: %d, outerHitId: %d \n",
140 const float hardCurvCut,
141 const float caThetaCutBarrel,
142 const float caThetaCutForward,
143 const float dcaCutInnerTriplet,
144 const float dcaCutOuterTriplet)
const {
148 auto ri = inner_r(
hh);
149 auto zi = inner_z(
hh);
151 auto ro = outer_r(
hh);
152 auto zo = outer_z(
hh);
154 auto r1 = otherCell.inner_r(
hh);
155 auto z1 = otherCell.inner_z(
hh);
157 bool aligned = areAlignedRZ(
r1,
164 isBarrel ? caThetaCutBarrel : caThetaCutForward);
168 : dcaCutOuterTriplet,
186 const float region_origin_radius_plus_tolerance,
187 const float maxCurv)
const {
188 auto x1 = otherCell.inner_x(
hh);
189 auto y1 = otherCell.inner_y(
hh);
191 auto x2 = inner_x(
hh);
192 auto y2 = inner_y(
hh);
194 auto x3 = outer_x(
hh);
195 auto y3 = outer_y(
hh);
199 if (eq.curvature() > maxCurv)
202 return std::abs(eq.dca0()) < region_origin_radius_plus_tolerance *
std::abs(eq.curvature());
211 const float region_origin_radius_plus_tolerance,
212 const float maxCurv) {
215 if (eq.curvature() > maxCurv)
218 return std::abs(eq.dca0()) < region_origin_radius_plus_tolerance *
std::abs(eq.curvature());
226 int p = innerCell.inner_iphi(
hh);
232 auto r0 =
hh.averageGeometry().ladderR[il];
233 auto ri = innerCell.inner_r(
hh);
234 auto zi = innerCell.inner_z(
hh);
235 auto ro = outer_r(
hh);
236 auto zo = outer_z(
hh);
238 auto z_in_ladder =
std::abs(
z0 -
hh.averageGeometry().ladderZ[il]);
249 int p = outer_iphi(
hh);
255 auto r4 =
hh.averageGeometry().ladderR[il];
256 auto ri = innerCell.inner_r(
hh);
257 auto zi = innerCell.inner_z(
hh);
258 auto ro = outer_r(
hh);
259 auto zo = outer_z(
hh);
261 auto z_in_ladder =
std::abs(z4 -
hh.averageGeometry().ladderZ[il]);
264 auto holeP = z4 >
hh.averageGeometry().ladderMaxZ[il] && z4 <
hh.averageGeometry().endCapZ[0];
265 auto holeN = z4 <
hh.averageGeometry().ladderMinZ[il] && z4 >
hh.averageGeometry().endCapZ[1];
266 return gap || holeP || holeN;
278 const unsigned int minHitsPerNtuplet,
279 bool startAt0)
const {
287 assert(tmpNtuplet.size() <= 4);
290 for (
unsigned int otherCell : outerNeighbors()) {
294 cells[otherCell].find_ntuplets(
298 if ((
unsigned int)(tmpNtuplet.size()) >= minHitsPerNtuplet - 1) {
299 #ifdef ONLY_TRIPLETS_IN_HOLE
301 if (tmpNtuplet.size() >= 3 || (startAt0 && hole4(
hh,
cells[tmpNtuplet[0]])) ||
302 ((!startAt0) && hole0(
hh,
cells[tmpNtuplet[0]])))
307 for (
auto c : tmpNtuplet) {
313 for (
auto c : tmpNtuplet)
320 tmpNtuplet.pop_back();
321 assert(tmpNtuplet.size() < 4);
347 #endif // RecoPixelVertexing_PixelTriplets_plugins_GPUCACell_h
cms::cuda::VecArray< uint32_t, maxCellsPerHit > OuterHitOfCell
const caConstants::TupleMultiplicity const CAHitNtupletGeneratorKernelsGPU::HitToTuple cms::cuda::AtomicPairCounter const GPUCACell *__restrict__ const uint32_t *__restrict__ const gpuPixelDoublets::CellNeighborsVector * cellNeighbors
static constexpr auto bad
__device__ float float float zi
cms::cuda::VecArray< tindex_type, maxCellTracks > CellTracks
caConstants::CellNeighbors CellNeighbors
constexpr uint32_t last_bpix1_detIndex
cms::cuda::VecArray< uint32_t, maxCellNeighbors > CellNeighbors
__device__ CellTracksVector Hits const int layerPairId
constexpr float module_length_bpx0
constexpr unsigned int inner_hit_id() const
constexpr uint32_t max_ladder_bpx0
__device__ bool check_alignment(Hits const &hh, GPUCACell const &otherCell, const float ptmin, const float hardCurvCut, const float caThetaCutBarrel, const float caThetaCutForward, const float dcaCutInnerTriplet, const float dcaCutOuterTriplet) const
const caConstants::TupleMultiplicity const CAHitNtupletGeneratorKernelsGPU::HitToTuple cms::cuda::AtomicPairCounter const GPUCACell *__restrict__ cells
__device__ CellTracksVector & cellTracks
static constexpr auto maxCellsPerHit
constexpr uint32_t maxCellsPerHit
__device__ float float float float float const float const float thetaCut
TrackingRecHit2DSOAView Hits
__device__ CellTracksVector Hits const & hh
constexpr uint32_t last_barrel_detIndex
__device__ CellTracksVector Hits const int int hindex_type hindex_type outerHitId
constexpr float module_tolerance_bpx0
const uint32_t *__restrict__ Quality * quality
caConstants::CellTracks CellTracks
constexpr unsigned int outer_hit_id() const
__device__ void print_cell() const
__device__ CellTracksVector Hits const int int doubletId
caConstants::CellTracksVector CellTracksVector
__device__ float float float float float zo
cms::cuda::VecArray< uint32_t, 6 > TmpTuple
float tan_12_13_half_mul_distance_13_squared
const uint32_t *__restrict__ const HitContainer *__restrict__ TkSoA *__restrict__ tracks
cms::cuda::SimpleVector< CellNeighbors > CellNeighborsVector
__device__ float float float float ro
constexpr uint32_t max_ladder_bpx4
constexpr float module_tolerance_bpx4
const uint32_t *__restrict__ HitContainer * foundNtuplets
constexpr uint32_t first_ladder_bpx4
__device__ float float ri
T1 atomicCAS(T1 *address, T1 compare, T2 val)
constexpr float module_length_bpx4
constexpr uint32_t first_ladder_bpx0
const caConstants::TupleMultiplicity const CAHitNtupletGeneratorKernelsGPU::HitToTuple cms::cuda::AtomicPairCounter * apc
unsigned long long PtrAsInt
TrackSoA::HitContainer HitContainer
Abs< T >::type abs(const T &t)
float distance_13_squared
Hits::hindex_type hindex_type
__device__ int extend(int size=1)
assert(outerNeighbors().empty())
__device__ float float float float float const float ptmin
__device__ CellTracksVector Hits const int int hindex_type innerHitId
cms::cuda::SimpleVector< CellTracks > CellTracksVector