|
|
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()) {
85 return outerNeighbors().push_back(
t);
132 printf(
"printing cell: %d, on layerPair: %d, innerHitId: %d, outerHitId: %d \n",
142 const float hardCurvCut,
143 const float caThetaCutBarrel,
144 const float caThetaCutForward,
145 const float dcaCutInnerTriplet,
146 const float dcaCutOuterTriplet)
const {
150 auto ri = inner_r(
hh);
151 auto zi = inner_z(
hh);
153 auto ro = outer_r(
hh);
154 auto zo = outer_z(
hh);
156 auto r1 = otherCell.inner_r(
hh);
157 auto z1 = otherCell.inner_z(
hh);
159 bool aligned = areAlignedRZ(
r1,
166 isBarrel ? caThetaCutBarrel : caThetaCutForward);
170 : dcaCutOuterTriplet,
188 const float region_origin_radius_plus_tolerance,
189 const float maxCurv)
const {
190 auto x1 = otherCell.inner_x(
hh);
191 auto y1 = otherCell.inner_y(
hh);
193 auto x2 = inner_x(
hh);
194 auto y2 = inner_y(
hh);
196 auto x3 = outer_x(
hh);
197 auto y3 = outer_y(
hh);
201 if (eq.curvature() > maxCurv)
204 return std::abs(eq.dca0()) < region_origin_radius_plus_tolerance *
std::abs(eq.curvature());
213 const float region_origin_radius_plus_tolerance,
214 const float maxCurv) {
217 if (eq.curvature() > maxCurv)
220 return std::abs(eq.dca0()) < region_origin_radius_plus_tolerance *
std::abs(eq.curvature());
228 int p = innerCell.inner_iphi(
hh);
234 auto r0 =
hh.averageGeometry().ladderR[il];
235 auto ri = innerCell.inner_r(
hh);
236 auto zi = innerCell.inner_z(
hh);
237 auto ro = outer_r(
hh);
238 auto zo = outer_z(
hh);
240 auto z_in_ladder =
std::abs(
z0 -
hh.averageGeometry().ladderZ[il]);
251 int p = outer_iphi(
hh);
257 auto r4 =
hh.averageGeometry().ladderR[il];
258 auto ri = innerCell.inner_r(
hh);
259 auto zi = innerCell.inner_z(
hh);
260 auto ro = outer_r(
hh);
261 auto zo = outer_z(
hh);
263 auto z_in_ladder =
std::abs(z4 -
hh.averageGeometry().ladderZ[il]);
266 auto holeP = z4 >
hh.averageGeometry().ladderMaxZ[il] && z4 <
hh.averageGeometry().endCapZ[0];
267 auto holeN = z4 <
hh.averageGeometry().ladderMinZ[il] && z4 >
hh.averageGeometry().endCapZ[1];
268 return gap || holeP || holeN;
280 const unsigned int minHitsPerNtuplet,
281 bool startAt0)
const {
289 assert(tmpNtuplet.size() <= 4);
292 for (
unsigned int otherCell : outerNeighbors()) {
296 cells[otherCell].find_ntuplets(
300 if ((
unsigned int)(tmpNtuplet.size()) >= minHitsPerNtuplet - 1) {
301 #ifdef ONLY_TRIPLETS_IN_HOLE
303 if (tmpNtuplet.size() >= 3 || (startAt0 && hole4(
hh,
cells[tmpNtuplet[0]])) ||
304 ((!startAt0) && hole0(
hh,
cells[tmpNtuplet[0]])))
309 for (
auto c : tmpNtuplet) {
315 for (
auto c : tmpNtuplet)
322 tmpNtuplet.pop_back();
323 assert(tmpNtuplet.size() < 4);
349 #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