diff --git a/SDL/Event.cc b/SDL/Event.cc index 54aea9b3..0bea0d16 100644 --- a/SDL/Event.cc +++ b/SDL/Event.cc @@ -1675,6 +1675,7 @@ SDL::tripletsBuffer* SDL::Event::getTriplets() { alpaka::memcpy(queue, tripletsInCPU->logicalLayers_buf, tripletsBuffers->logicalLayers_buf, 3 * nMemHost); alpaka::memcpy(queue, tripletsInCPU->segmentIndices_buf, tripletsBuffers->segmentIndices_buf, 2 * nMemHost); alpaka::memcpy(queue, tripletsInCPU->betaIn_buf, tripletsBuffers->betaIn_buf, nMemHost); + alpaka::memcpy(queue, tripletsInCPU->circleRadius_buf, tripletsBuffers->circleRadius_buf, nMemHost); alpaka::memcpy(queue, tripletsInCPU->nTriplets_buf, tripletsBuffers->nTriplets_buf); alpaka::memcpy(queue, tripletsInCPU->totOccupancyTriplets_buf, tripletsBuffers->totOccupancyTriplets_buf); alpaka::wait(queue); diff --git a/SDL/Triplet.h b/SDL/Triplet.h index 89363d61..3ea9571a 100644 --- a/SDL/Triplet.h +++ b/SDL/Triplet.h @@ -377,8 +377,7 @@ namespace SDL { float alpha_InLo = __H2F(segmentsInGPU.dPhiChanges[innerSegmentIndex]); float tl_axis_x = mdsInGPU.anchorX[thirdMDIndex] - mdsInGPU.anchorX[firstMDIndex]; float tl_axis_y = mdsInGPU.anchorY[thirdMDIndex] - mdsInGPU.anchorY[firstMDIndex]; - float betaInRHmin = - alpha_InLo - SDL::phi_mpi_pi(acc, SDL::phi(acc, tl_axis_x, tl_axis_y) - mdsInGPU.anchorPhi[firstMDIndex]); + betaIn = alpha_InLo - SDL::phi_mpi_pi(acc, SDL::phi(acc, tl_axis_x, tl_axis_y) - mdsInGPU.anchorPhi[firstMDIndex]); //beta computation float drt_tl_axis = alpaka::math::sqrt(acc, tl_axis_x * tl_axis_x + tl_axis_y * tl_axis_y); @@ -396,7 +395,7 @@ namespace SDL { (0.02f / drt_InSeg); //Cut #3: first beta cut - pass = pass and (alpaka::math::abs(acc, betaInRHmin) < betaInCut); + pass = pass and (alpaka::math::abs(acc, betaIn) < betaInCut); return pass; }; @@ -821,7 +820,6 @@ namespace SDL { float& sdlCut, float& betaInCut) { bool pass = true; - //this cut reduces the number of candidates by a factor of 4, i.e., 3 out of 4 warps can end right here! if (segmentsInGPU.mdIndices[2 * innerSegmentIndex + 1] != segmentsInGPU.mdIndices[2 * outerSegmentIndex]) return false; diff --git a/code/core/write_sdl_ntuple.cc b/code/core/write_sdl_ntuple.cc index 327a5995..0b60d254 100644 --- a/code/core/write_sdl_ntuple.cc +++ b/code/core/write_sdl_ntuple.cc @@ -911,6 +911,7 @@ std::tuple, vector> pars { // Get relevant information SDL::trackCandidatesBuffer& trackCandidatesInGPU = (*event->getTrackCandidates()); + SDL::tripletsBuffer& tripletsInGPU = (*event->getTriplets()); SDL::segmentsBuffer& segmentsInGPU = (*event->getSegments()); // @@ -922,14 +923,16 @@ std::tuple, vector> pars // **** oo -- oo -- oo pT3 unsigned int pT3 = trackCandidatesInGPU.directObjectIndices[idx]; unsigned int pLS = getPixelLSFrompT3(event, pT3); + unsigned int T3 = getT3FrompT3(event, pT3); // pixel pt const float pt_pLS = segmentsInGPU.ptIn[pLS]; const float eta_pLS = segmentsInGPU.eta[pLS]; const float phi_pLS = segmentsInGPU.phi[pLS]; + float pt_T3 = tripletsInGPU.circleRadius[T3] * 2 * SDL::k2Rinv1GeVf; // average pt - const float pt = pt_pLS; + const float pt = (pt_pLS+pt_T3)/2; // Form the hit idx/type vector std::vector hit_idx = getHitIdxsFrompT3(event, pT3);