7 #include "Math/Vector3D.h" 8 #include "Math/VectorUtil.h" 13 const float pt =
p3.rho();
14 const float p =
p3.r();
23 std::vector<unsigned int> getHitIdxs(
short trackCandidateType,
24 Params_pT5::ArrayUxHits
const& tcHitIndices,
25 unsigned int const* hitIndices) {
26 std::vector<unsigned int>
hits;
28 unsigned int maxNHits = 0;
30 maxNHits = Params_pT5::kHits;
32 maxNHits = Params_pT3::kHits;
34 maxNHits = Params_T5::kHits;
36 maxNHits = Params_pLS::kHits;
38 for (
unsigned int i = 0;
i < maxNHits;
i++) {
39 unsigned int hitIdxDev = tcHitIndices[
i];
43 : hitIndices[hitIdxDev];
49 hits.back() == hitIdx)
52 hits.push_back(hitIdx);
61 std::vector<float>
const&
see_py,
62 std::vector<float>
const&
see_pz,
63 std::vector<float>
const&
see_dxy,
64 std::vector<float>
const&
see_dz,
73 std::vector<int>
const&
see_q,
75 std::vector<unsigned int>
const&
ph2_detId,
76 std::vector<float>
const&
ph2_x,
77 std::vector<float>
const&
ph2_y,
78 std::vector<float>
const&
ph2_z) {
103 unsigned int count = 0;
127 const int hit_size =
in_trkX_.size();
129 for (
size_t iSeed = 0; iSeed < n_see; iSeed++) {
131 float ptIn = p3LH.rho();
132 float eta = p3LH.eta();
135 if ((ptIn > 0.8 - 2 *
ptErr)) {
152 else if (ptIn >= (0.8 - 2 *
ptErr) and ptIn < 2.0) {
153 if (pixelSegmentDeltaPhiChange >= 0)
160 unsigned int hitIdx0 = hit_size +
count;
162 unsigned int hitIdx1 = hit_size +
count;
164 unsigned int hitIdx2 = hit_size +
count;
166 unsigned int hitIdx3;
170 hitIdx3 = hit_size +
count;
178 float p3PCA_Eta = p3PCA.eta();
180 float p3PCA_Phi = p3PCA.phi();
206 float phi = p3LH.phi();
223 int etabin = (p3PCA_Eta + 2.6) / ((2 * 2.6) /
neta);
224 int phibin = (p3PCA_Phi +
kPi) / ((2. *
kPi) /
nphi);
225 int dzbin = (
see_dz[iSeed] + 30) / (2 * 30 / nz);
226 int isuperbin = (nz *
nphi) * etabin + (nz)*phibin + dzbin;
240 auto const hits =
event.getHits<
HitsSoA>(
true,
false);
241 auto const& trackCandidates =
event.getTrackCandidates(
true,
true);
243 unsigned int nTrackCandidates = trackCandidates.nTrackCandidates();
245 for (
unsigned int idx = 0;
idx < nTrackCandidates;
idx++) {
258 LSTESData<Device>
const* deviceESData,
259 std::vector<float>
const&
see_px,
260 std::vector<float>
const&
see_py,
261 std::vector<float>
const&
see_pz,
262 std::vector<float>
const&
see_dxy,
263 std::vector<float>
const&
see_dz,
272 std::vector<int>
const&
see_q,
274 std::vector<unsigned int>
const&
ph2_detId,
275 std::vector<float>
const&
ph2_x,
276 std::vector<float>
const&
ph2_y,
277 std::vector<float>
const&
ph2_z,
278 bool no_pls_dupclean,
279 bool tc_pls_triplets) {
320 event.createMiniDoublets();
323 printf(
"# of Mini-doublets produced: %d\n",
event.getNumberOfMiniDoublets());
324 printf(
"# of Mini-doublets produced barrel layer 1: %d\n",
event.getNumberOfMiniDoubletsByLayerBarrel(0));
325 printf(
"# of Mini-doublets produced barrel layer 2: %d\n",
event.getNumberOfMiniDoubletsByLayerBarrel(1));
326 printf(
"# of Mini-doublets produced barrel layer 3: %d\n",
event.getNumberOfMiniDoubletsByLayerBarrel(2));
327 printf(
"# of Mini-doublets produced barrel layer 4: %d\n",
event.getNumberOfMiniDoubletsByLayerBarrel(3));
328 printf(
"# of Mini-doublets produced barrel layer 5: %d\n",
event.getNumberOfMiniDoubletsByLayerBarrel(4));
329 printf(
"# of Mini-doublets produced barrel layer 6: %d\n",
event.getNumberOfMiniDoubletsByLayerBarrel(5));
330 printf(
"# of Mini-doublets produced endcap layer 1: %d\n",
event.getNumberOfMiniDoubletsByLayerEndcap(0));
331 printf(
"# of Mini-doublets produced endcap layer 2: %d\n",
event.getNumberOfMiniDoubletsByLayerEndcap(1));
332 printf(
"# of Mini-doublets produced endcap layer 3: %d\n",
event.getNumberOfMiniDoubletsByLayerEndcap(2));
333 printf(
"# of Mini-doublets produced endcap layer 4: %d\n",
event.getNumberOfMiniDoubletsByLayerEndcap(3));
334 printf(
"# of Mini-doublets produced endcap layer 5: %d\n",
event.getNumberOfMiniDoubletsByLayerEndcap(4));
337 event.createSegmentsWithModuleMap();
340 printf(
"# of Segments produced: %d\n",
event.getNumberOfSegments());
341 printf(
"# of Segments produced layer 1-2: %d\n",
event.getNumberOfSegmentsByLayerBarrel(0));
342 printf(
"# of Segments produced layer 2-3: %d\n",
event.getNumberOfSegmentsByLayerBarrel(1));
343 printf(
"# of Segments produced layer 3-4: %d\n",
event.getNumberOfSegmentsByLayerBarrel(2));
344 printf(
"# of Segments produced layer 4-5: %d\n",
event.getNumberOfSegmentsByLayerBarrel(3));
345 printf(
"# of Segments produced layer 5-6: %d\n",
event.getNumberOfSegmentsByLayerBarrel(4));
346 printf(
"# of Segments produced endcap layer 1: %d\n",
event.getNumberOfSegmentsByLayerEndcap(0));
347 printf(
"# of Segments produced endcap layer 2: %d\n",
event.getNumberOfSegmentsByLayerEndcap(1));
348 printf(
"# of Segments produced endcap layer 3: %d\n",
event.getNumberOfSegmentsByLayerEndcap(2));
349 printf(
"# of Segments produced endcap layer 4: %d\n",
event.getNumberOfSegmentsByLayerEndcap(3));
350 printf(
"# of Segments produced endcap layer 5: %d\n",
event.getNumberOfSegmentsByLayerEndcap(4));
353 event.createTriplets();
356 printf(
"# of T3s produced: %d\n",
event.getNumberOfTriplets());
357 printf(
"# of T3s produced layer 1-2-3: %d\n",
event.getNumberOfTripletsByLayerBarrel(0));
358 printf(
"# of T3s produced layer 2-3-4: %d\n",
event.getNumberOfTripletsByLayerBarrel(1));
359 printf(
"# of T3s produced layer 3-4-5: %d\n",
event.getNumberOfTripletsByLayerBarrel(2));
360 printf(
"# of T3s produced layer 4-5-6: %d\n",
event.getNumberOfTripletsByLayerBarrel(3));
361 printf(
"# of T3s produced endcap layer 1-2-3: %d\n",
event.getNumberOfTripletsByLayerEndcap(0));
362 printf(
"# of T3s produced endcap layer 2-3-4: %d\n",
event.getNumberOfTripletsByLayerEndcap(1));
363 printf(
"# of T3s produced endcap layer 3-4-5: %d\n",
event.getNumberOfTripletsByLayerEndcap(2));
364 printf(
"# of T3s produced endcap layer 1: %d\n",
event.getNumberOfTripletsByLayerEndcap(0));
365 printf(
"# of T3s produced endcap layer 2: %d\n",
event.getNumberOfTripletsByLayerEndcap(1));
366 printf(
"# of T3s produced endcap layer 3: %d\n",
event.getNumberOfTripletsByLayerEndcap(2));
367 printf(
"# of T3s produced endcap layer 4: %d\n",
event.getNumberOfTripletsByLayerEndcap(3));
368 printf(
"# of T3s produced endcap layer 5: %d\n",
event.getNumberOfTripletsByLayerEndcap(4));
371 event.createQuintuplets();
374 printf(
"# of Quintuplets produced: %d\n",
event.getNumberOfQuintuplets());
375 printf(
"# of Quintuplets produced layer 1-2-3-4-5-6: %d\n",
event.getNumberOfQuintupletsByLayerBarrel(0));
376 printf(
"# of Quintuplets produced layer 2: %d\n",
event.getNumberOfQuintupletsByLayerBarrel(1));
377 printf(
"# of Quintuplets produced layer 3: %d\n",
event.getNumberOfQuintupletsByLayerBarrel(2));
378 printf(
"# of Quintuplets produced layer 4: %d\n",
event.getNumberOfQuintupletsByLayerBarrel(3));
379 printf(
"# of Quintuplets produced layer 5: %d\n",
event.getNumberOfQuintupletsByLayerBarrel(4));
380 printf(
"# of Quintuplets produced layer 6: %d\n",
event.getNumberOfQuintupletsByLayerBarrel(5));
381 printf(
"# of Quintuplets produced endcap layer 1: %d\n",
event.getNumberOfQuintupletsByLayerEndcap(0));
382 printf(
"# of Quintuplets produced endcap layer 2: %d\n",
event.getNumberOfQuintupletsByLayerEndcap(1));
383 printf(
"# of Quintuplets produced endcap layer 3: %d\n",
event.getNumberOfQuintupletsByLayerEndcap(2));
384 printf(
"# of Quintuplets produced endcap layer 4: %d\n",
event.getNumberOfQuintupletsByLayerEndcap(3));
385 printf(
"# of Quintuplets produced endcap layer 5: %d\n",
event.getNumberOfQuintupletsByLayerEndcap(4));
388 event.pixelLineSegmentCleaning(no_pls_dupclean);
390 event.createPixelQuintuplets();
393 printf(
"# of Pixel Quintuplets produced: %d\n",
event.getNumberOfPixelQuintuplets());
396 event.createPixelTriplets();
399 printf(
"# of Pixel T3s produced: %d\n",
event.getNumberOfPixelTriplets());
402 event.createTrackCandidates(no_pls_dupclean, tc_pls_triplets);
405 printf(
"# of TrackCandidates produced: %d\n",
event.getNumberOfTrackCandidates());
406 printf(
" # of Pixel TrackCandidates produced: %d\n",
event.getNumberOfPixelTrackCandidates());
407 printf(
" # of pT5 TrackCandidates produced: %d\n",
event.getNumberOfPT5TrackCandidates());
408 printf(
" # of pT3 TrackCandidates produced: %d\n",
event.getNumberOfPT3TrackCandidates());
409 printf(
" # of pLS TrackCandidates produced: %d\n",
event.getNumberOfPLSTrackCandidates());
410 printf(
" # of T5 TrackCandidates produced: %d\n",
event.getNumberOfT5TrackCandidates());
std::vector< unsigned int > in_hitIdxs_
std::vector< float > in_phi_vec_
const std::vector< int > & see_q()
const std::vector< float > & see_py()
std::vector< std::vector< unsigned int > > out_tc_hitIdxs_
std::vector< PixelType > in_pixelType_vec_
const std::vector< float > & ph2_z()
const std::vector< float > & see_stateTrajGlbX()
const std::vector< float > & see_stateTrajGlbY()
const std::vector< float > & ph2_x()
const std::vector< float > & see_ptErr()
std::vector< float > in_trkX_
void getOutput(LSTEvent &event)
std::vector< short > const & trackCandidateType() const
std::vector< unsigned int > in_hitIndices_vec3_
std::vector< int > in_charge_vec_
ALPAKA_ACCELERATOR_NAMESPACE::lst::LSTEvent LSTEvent
std::vector< float > in_eta_vec_
std::vector< float > in_py_vec_
std::vector< int > in_superbin_vec_
const std::vector< float > & see_stateTrajGlbPz()
std::vector< char > in_isQuad_vec_
const std::vector< float > & see_stateTrajGlbPy()
ALPAKA_ACCELERATOR_NAMESPACE::Queue Queue
std::vector< float > in_etaErr_vec_
std::vector< unsigned int > in_hitIndices_vec2_
ALPAKA_FN_HOST_ACC ALPAKA_FN_INLINE float phi(TAcc const &acc, float x, float y)
TVector3 calculateR3FromPCA(const TVector3 &p3, const float dxy, const float dz)
std::vector< unsigned int > in_hitIndices_vec0_
const std::vector< float > & see_stateTrajGlbPx()
std::vector< std::vector< unsigned int > > const & hits() const
std::vector< float > in_trkZ_
std::vector< unsigned int > in_hitIndices_vec1_
void run(Queue &queue, bool verbose, LSTESData< Device > const *deviceESData, std::vector< float > const &see_px, std::vector< float > const &see_py, std::vector< float > const &see_pz, std::vector< float > const &see_dxy, std::vector< float > const &see_dz, std::vector< float > const &see_ptErr, std::vector< float > const &see_etaErr, std::vector< float > const &see_stateTrajGlbX, std::vector< float > const &see_stateTrajGlbY, std::vector< float > const &see_stateTrajGlbZ, std::vector< float > const &see_stateTrajGlbPx, std::vector< float > const &see_stateTrajGlbPy, std::vector< float > const &see_stateTrajGlbPz, std::vector< int > const &see_q, std::vector< std::vector< int >> const &see_hitIdx, std::vector< unsigned int > const &ph2_detId, std::vector< float > const &ph2_x, std::vector< float > const &ph2_y, std::vector< float > const &ph2_z, bool no_pls_dupclean, bool tc_pls_triplets)
Transform3DPJ::Vector XYZVector
std::vector< float > in_pz_vec_
std::vector< unsigned int > in_seedIdx_vec_
std::vector< short > out_tc_trackCandidateType_
const std::vector< float > & see_dz()
std::vector< float > in_ptErr_vec_
const std::vector< float > & see_etaErr()
ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float kPi
std::vector< float > in_deltaPhi_vec_
std::vector< float > in_px_vec_
const std::vector< float > & see_px()
const std::vector< unsigned int > & ph2_detId()
const std::vector< float > & see_dxy()
std::vector< float > in_trkY_
void prepareInput(std::vector< float > const &see_px, std::vector< float > const &see_py, std::vector< float > const &see_pz, std::vector< float > const &see_dxy, std::vector< float > const &see_dz, std::vector< float > const &see_ptErr, std::vector< float > const &see_etaErr, std::vector< float > const &see_stateTrajGlbX, std::vector< float > const &see_stateTrajGlbY, std::vector< float > const &see_stateTrajGlbZ, std::vector< float > const &see_stateTrajGlbPx, std::vector< float > const &see_stateTrajGlbPy, std::vector< float > const &see_stateTrajGlbPz, std::vector< int > const &see_q, std::vector< std::vector< int >> const &see_hitIdx, std::vector< unsigned int > const &ph2_detId, std::vector< float > const &ph2_x, std::vector< float > const &ph2_y, std::vector< float > const &ph2_z)
std::vector< unsigned int > out_tc_len_
math::XYZVector XYZVector
std::vector< unsigned int > in_hitId_
std::vector< int > out_tc_seedIdx_
const std::vector< float > & see_pz()
const std::vector< float > & ph2_y()
std::vector< float > in_ptIn_vec_
const std::vector< float > & see_stateTrajGlbZ()
const std::vector< std::vector< int > > & see_hitIdx()
ALPAKA_FN_HOST_ACC ALPAKA_FN_INLINE float eta(TAcc const &acc, float x, float y, float z)