From 607974503fd3c6efd3ba11ab20e36db968e40b52 Mon Sep 17 00:00:00 2001 From: thboettc Date: Thu, 2 Feb 2023 17:25:01 -0500 Subject: [PATCH 1/6] Remove GaudiAllenSeedAndMatchNoUTToV2Tracks --- Rec/Allen/CMakeLists.txt | 1 - .../GaudiAllenSeedAndMatchNoUTToV2Tracks.cpp | 187 ------------------ 2 files changed, 188 deletions(-) delete mode 100644 Rec/Allen/src/GaudiAllenSeedAndMatchNoUTToV2Tracks.cpp diff --git a/Rec/Allen/CMakeLists.txt b/Rec/Allen/CMakeLists.txt index 1d33d5d0fc0..aa4715c8b2d 100755 --- a/Rec/Allen/CMakeLists.txt +++ b/Rec/Allen/CMakeLists.txt @@ -18,7 +18,6 @@ gaudi_add_module(AllenWrapper src/GaudiAllenCaloToCaloClusters.cpp src/GaudiAllenCountAndDumpLineDecisions.cpp src/GaudiAllenForwardToV2Tracks.cpp - src/GaudiAllenSeedAndMatchNoUTToV2Tracks.cpp src/GaudiAllenReportsToRawEvent.cpp src/GaudiAllenLumiSummaryToRawEvent.cpp src/GaudiAllenSVsToRecVertexV2.cpp diff --git a/Rec/Allen/src/GaudiAllenSeedAndMatchNoUTToV2Tracks.cpp b/Rec/Allen/src/GaudiAllenSeedAndMatchNoUTToV2Tracks.cpp deleted file mode 100644 index cbe0654189d..00000000000 --- a/Rec/Allen/src/GaudiAllenSeedAndMatchNoUTToV2Tracks.cpp +++ /dev/null @@ -1,187 +0,0 @@ -/***************************************************************************** \ - * (c) Copyright 2000-2018 CERN for the benefit of the LHCb Collaboration * -\*****************************************************************************/ - -// Gaudi -#include "GaudiAlg/Transformer.h" -#include "GaudiKernel/StdArrayAsProperty.h" - -// LHCb -#include "Event/Track.h" - -// Allen -#include "Logger.h" -#include "ParKalmanFittedTrack.cuh" -#include "VeloConsolidated.cuh" -#include "SciFiConsolidated.cuh" - -class GaudiAllenSeedAndMatchNoUTToV2Tracks final - : public Gaudi::Functional::Transformer( - const std::vector&, - const std::vector&, - const std::vector&, - const std::vector&, - const std::vector&, - const std::vector&, - const std::vector&, - const std::vector&, - const std::vector&, - const std::vector&)> { - -public: - /// Standard constructor - GaudiAllenSeedAndMatchNoUTToV2Tracks(const std::string& name, ISvcLocator* pSvcLocator); - - /// initialization - StatusCode initialize() override; - - /// Algorithm execution - std::vector operator()( - const std::vector& offsets_all_velo_tracks, - const std::vector& offsets_velo_track_hit_number, - const std::vector& velo_track_hits, - const std::vector& atomics_scifi, - const std::vector& scifi_track_hit_number, - const std::vector& scifi_track_hits, - const std::vector& scifi_track_velo_indices, - const std::vector& scifi_qop, - const std::vector& scifi_states, - const std::vector& kf_tracks) const override; - -private: - const std::array m_default_covarianceValues {4.0, 400.0, 4.e-6, 1.e-4, 0.1}; - Gaudi::Property> m_covarianceValues {this, "COVARIANCEVALUES", m_default_covarianceValues}; -}; - -DECLARE_COMPONENT(GaudiAllenSeedAndMatchNoUTToV2Tracks) - -GaudiAllenSeedAndMatchNoUTToV2Tracks::GaudiAllenSeedAndMatchNoUTToV2Tracks( - const std::string& name, - ISvcLocator* pSvcLocator) : - Transformer( - name, - pSvcLocator, - // Inputs - {KeyValue {"offsets_all_velo_tracks", ""}, - KeyValue {"offsets_velo_track_hit_number", ""}, - KeyValue {"velo_track_hits", ""}, - KeyValue {"atomics_scifi", ""}, - KeyValue {"scifi_track_hit_number", ""}, - KeyValue {"scifi_track_hits", ""}, - KeyValue {"scifi_track_velo_indices", ""}, - KeyValue {"scifi_qop", ""}, - KeyValue {"scifi_states", ""}, - KeyValue {"kf_tracks", ""}}, - // Outputs - {KeyValue {"OutputTracks", "Allen/Track/v2/SeedAndMatchTracks"}}) -{} - -StatusCode GaudiAllenSeedAndMatchNoUTToV2Tracks::initialize() -{ - auto sc = Transformer::initialize(); - if (sc.isFailure()) return sc; - if (msgLevel(MSG::DEBUG)) debug() << "==> Initialize" << endmsg; - - return sc; -} - -std::vector GaudiAllenSeedAndMatchNoUTToV2Tracks::operator()( - const std::vector& offsets_all_velo_tracks, - const std::vector& offsets_velo_track_hit_number, - const std::vector& velo_track_hits, - const std::vector& atomics_scifi, - const std::vector& scifi_track_hit_number, - const std::vector& scifi_track_hits, - const std::vector& scifi_track_velo_indices, - const std::vector& scifi_qop, - const std::vector& scifi_states, - const std::vector& kf_tracks) const -{ - // Make the consolidated tracks. - const unsigned i_event = 0; - const unsigned number_of_events = 1; - const Velo::Consolidated::Tracks velo_tracks { - offsets_all_velo_tracks.data(), offsets_velo_track_hit_number.data(), i_event, number_of_events}; - - const SciFi::Consolidated::ConstTracks scifi_tracks {atomics_scifi.data(), - scifi_track_hit_number.data(), - scifi_qop.data(), - scifi_states.data(), - scifi_track_velo_indices.data(), - i_event, - number_of_events}; - - // Do the conversion - const unsigned number_of_tracks = scifi_tracks.number_of_tracks(i_event); - if (msgLevel(MSG::DEBUG)) debug() << "Number of SciFi tracks to convert = " << number_of_tracks << endmsg; - - std::vector seed_and_match_tracks; - seed_and_match_tracks.reserve(number_of_tracks); - for (unsigned t = 0; t < number_of_tracks; t++) { - ParKalmanFilter::FittedTrack track = kf_tracks[t]; - auto& newTrack = seed_and_match_tracks.emplace_back(); - - // set track flags - newTrack.setType(LHCb::Event::v2::Track::Type::Long); - newTrack.setHistory(LHCb::Event::v2::Track::History::PrForward); - newTrack.setPatRecStatus(LHCb::Event::v2::Track::PatRecStatus::PatRecIDs); - newTrack.setFitStatus(LHCb::Event::v2::Track::FitStatus::Fitted); - - // get momentum - float qop = track.state[4]; - float qopError = m_covarianceValues[4] * qop * qop; - - // closest to beam state - LHCb::State closesttobeam_state; - closesttobeam_state.setState( - track.state[0], track.state[1], track.z, track.state[2], track.state[3], track.state[4]); - - closesttobeam_state.covariance()(0, 0) = track.cov(0, 0); - closesttobeam_state.covariance()(0, 2) = track.cov(2, 0); - closesttobeam_state.covariance()(2, 2) = track.cov(2, 2); - closesttobeam_state.covariance()(1, 1) = track.cov(1, 1); - closesttobeam_state.covariance()(1, 3) = track.cov(3, 1); - closesttobeam_state.covariance()(3, 3) = track.cov(3, 3); - closesttobeam_state.covariance()(4, 4) = qopError; - - closesttobeam_state.setLocation(LHCb::State::Location::ClosestToBeam); - newTrack.addToStates(closesttobeam_state); - - // SciFi state - LHCb::State scifi_state; - const MiniState& state = scifi_tracks.states(t); - scifi_state.setState(state.x, state.y, state.z, state.tx, state.ty, qop); - - scifi_state.covariance()(0, 0) = m_covarianceValues[0]; - scifi_state.covariance()(0, 2) = 0.f; - scifi_state.covariance()(2, 2) = m_covarianceValues[2]; - scifi_state.covariance()(1, 1) = m_covarianceValues[1]; - scifi_state.covariance()(1, 3) = 0.f; - scifi_state.covariance()(3, 3) = m_covarianceValues[3]; - scifi_state.covariance()(4, 4) = qopError; - - scifi_state.setLocation(LHCb::State::Location::AtT); - - // set chi2 / chi2ndof - newTrack.setChi2PerDoF(LHCb::Event::v2::Track::Chi2PerDoF {track.chi2 / track.ndof, static_cast(track.ndof)}); - - // set LHCb IDs - std::vector lhcbids; - // add SciFi hits - std::vector scifi_ids = scifi_tracks.get_lhcbids_for_track(scifi_track_hits.data(), t); - for (const auto id : scifi_ids) { - const LHCb::LHCbID lhcbid = LHCb::LHCbID(id); - newTrack.addToLhcbIDs(lhcbid); - } - - // add Velo hits - const int velo_track_index = scifi_tracks.ut_track(t); - std::vector velo_ids = velo_tracks.get_lhcbids_for_track(velo_track_hits.data(), velo_track_index); - for (const auto id : velo_ids) { - const LHCb::LHCbID lhcbid = LHCb::LHCbID(id); - newTrack.addToLhcbIDs(lhcbid); - } - } - - return seed_and_match_tracks; -} -- GitLab From 649a1f266c0d6878bb7708ca09addf4f179c91b7 Mon Sep 17 00:00:00 2001 From: thboettc Date: Thu, 2 Feb 2023 17:46:24 -0500 Subject: [PATCH 2/6] Use views in GaudiAllenVeloToV2Tracks --- Rec/Allen/src/GaudiAllenVeloToV2Tracks.cpp | 67 +++++++++------------- 1 file changed, 28 insertions(+), 39 deletions(-) diff --git a/Rec/Allen/src/GaudiAllenVeloToV2Tracks.cpp b/Rec/Allen/src/GaudiAllenVeloToV2Tracks.cpp index f46b408485d..c75655febd4 100644 --- a/Rec/Allen/src/GaudiAllenVeloToV2Tracks.cpp +++ b/Rec/Allen/src/GaudiAllenVeloToV2Tracks.cpp @@ -12,26 +12,23 @@ // Allen #include "Logger.h" #include "VeloConsolidated.cuh" +#include "States.cuh" /** * Convert Velo::Consolidated::Tracks into LHCb::Event::v2::Track */ class GaudiAllenVeloToV2Tracks final : public Gaudi::Functional::Transformer( - const std::vector&, - const std::vector&, - const std::vector&, - const std::vector&)> { + const std::vector&, + const std::vector&)> { public: /// Standard constructor GaudiAllenVeloToV2Tracks(const std::string& name, ISvcLocator* pSvcLocator); /// Algorithm execution std::vector operator()( - const std::vector& allen_velo_track_atomics, - const std::vector& allen_velo_track_offsets, - const std::vector& allen_velo_track_hits, - const std::vector& allen_velo_kalman_states) const override; + const std::vector& allen_velo_tracks_mec, + const std::vector& allen_velo_kalman_states) const override; private: Gaudi::Property m_ptVelo {this, "ptVelo", 400 * Gaudi::Units::MeV, "Default pT for Velo tracks"}; @@ -44,30 +41,21 @@ GaudiAllenVeloToV2Tracks::GaudiAllenVeloToV2Tracks(const std::string& name, ISvc name, pSvcLocator, // Inputs - {KeyValue {"AllenVeloTrackOffsets", ""}, - KeyValue {"AllenVeloTrackHitOffsets", ""}, - KeyValue {"AllenVeloTrackHits", ""}, + {KeyValue {"AllenVeloTracks", ""}, KeyValue {"AllenVeloKalmanStates", ""}}, // Outputs {KeyValue {"OutputTracks", "Allen/Track/v2/Velo"}}) {} std::vector GaudiAllenVeloToV2Tracks::operator()( - const std::vector& allen_velo_track_offsets, - const std::vector& allen_velo_track_hit_offsets, - const std::vector& allen_velo_track_hits, - const std::vector& allen_velo_kalman_states) const + const std::vector& allen_velo_tracks_mec, + const std::vector& allen_velo_kalman_states) const { // Make the consolidated tracks. const unsigned i_event = 0; - const unsigned number_of_events = 1; - const Velo::Consolidated::Tracks velo_tracks { - allen_velo_track_offsets.data(), allen_velo_track_hit_offsets.data(), i_event, number_of_events}; - const Velo::Consolidated::ConstStates velo_states( - allen_velo_kalman_states.data(), velo_tracks.total_number_of_tracks()); - const unsigned event_tracks_offset = velo_tracks.tracks_offset(i_event); - - const unsigned number_of_tracks = velo_tracks.number_of_tracks(i_event); + const auto velo_tracks_view = allen_velo_tracks_mec[0].container(i_event); + const unsigned number_of_tracks = velo_tracks_view.size(); + std::vector output; output.reserve(number_of_tracks); @@ -77,34 +65,35 @@ std::vector GaudiAllenVeloToV2Tracks::operator()( auto& newTrack = output.emplace_back(); // add Velo hits - Velo::Consolidated::ConstHits track_hits = velo_tracks.get_hits(allen_velo_track_hits.data(), t); - for (unsigned i = 0; i < velo_tracks.number_of_hits(t); ++i) { - const auto id = track_hits.id(i); + const auto track = velo_tracks_view.track(t); + const unsigned n_hits = track.number_of_ids(); + for (unsigned i = 0; i < n_hits; ++i) { + const auto id = track.id(i); const LHCb::LHCbID lhcbid {id}; newTrack.addToLhcbIDs(lhcbid); if (msgLevel(MSG::DEBUG)) debug() << "Adding LHCbID " << std::hex << id << std::dec << endmsg; } // set state at beamline - const unsigned current_track_offset = event_tracks_offset + t; + const auto state = track.state(allen_velo_kalman_states[0]); LHCb::State closesttobeam_state; closesttobeam_state.setState( - velo_states.x(current_track_offset), - velo_states.y(current_track_offset), - velo_states.z(current_track_offset), - velo_states.tx(current_track_offset), - velo_states.ty(current_track_offset), + state.x(), + state.y(), + state.z(), + state.tx(), + state.ty(), 0.f); - closesttobeam_state.covariance()(0, 0) = velo_states.c00(current_track_offset); - closesttobeam_state.covariance()(1, 1) = velo_states.c11(current_track_offset); - closesttobeam_state.covariance()(0, 2) = velo_states.c20(current_track_offset); - closesttobeam_state.covariance()(2, 2) = velo_states.c22(current_track_offset); - closesttobeam_state.covariance()(1, 3) = velo_states.c31(current_track_offset); - closesttobeam_state.covariance()(3, 3) = velo_states.c33(current_track_offset); + closesttobeam_state.covariance()(0, 0) = state.c00(); + closesttobeam_state.covariance()(1, 1) = state.c11(); + closesttobeam_state.covariance()(0, 2) = state.c20(); + closesttobeam_state.covariance()(2, 2) = state.c22(); + closesttobeam_state.covariance()(1, 3) = state.c31(); + closesttobeam_state.covariance()(3, 3) = state.c33(); closesttobeam_state.setLocation(LHCb::State::Location::ClosestToBeam); newTrack.addToStates(closesttobeam_state); - const bool backward = closesttobeam_state.z() > track_hits.z(0); + const bool backward = closesttobeam_state.z() > track.hit(0).z(); if (backward) newTrack.setType(LHCb::Event::v2::Track::Type::VeloBackward); -- GitLab From d0149b8b60a608e8828aae9d56503458dc5a6cbc Mon Sep 17 00:00:00 2001 From: thboettc Date: Thu, 2 Feb 2023 17:47:15 -0500 Subject: [PATCH 3/6] Remove empty header --- Rec/Allen/src/GaudiAllenVeloToV2Tracks.h | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 Rec/Allen/src/GaudiAllenVeloToV2Tracks.h diff --git a/Rec/Allen/src/GaudiAllenVeloToV2Tracks.h b/Rec/Allen/src/GaudiAllenVeloToV2Tracks.h deleted file mode 100644 index e69de29bb2d..00000000000 -- GitLab From de29fad4fee6148ed48e4bd4adf15beef276c875 Mon Sep 17 00:00:00 2001 From: thboettc Date: Thu, 2 Feb 2023 18:03:31 -0500 Subject: [PATCH 4/6] Use views in GaudiAllenUTToV2Tracks --- Rec/Allen/src/GaudiAllenUTToV2Tracks.cpp | 114 ++++++++--------------- 1 file changed, 37 insertions(+), 77 deletions(-) diff --git a/Rec/Allen/src/GaudiAllenUTToV2Tracks.cpp b/Rec/Allen/src/GaudiAllenUTToV2Tracks.cpp index 8f7f2c9700e..ed0ed35a7b1 100644 --- a/Rec/Allen/src/GaudiAllenUTToV2Tracks.cpp +++ b/Rec/Allen/src/GaudiAllenUTToV2Tracks.cpp @@ -25,34 +25,21 @@ #include "Logger.h" #include "VeloConsolidated.cuh" #include "UTConsolidated.cuh" +#include "States.cuh" class GaudiAllenUTToV2Tracks final : public Gaudi::Functional::Transformer( - const std::vector&, - const std::vector&, - const std::vector&, - const std::vector&, - const std::vector&, - const std::vector&, - const std::vector&, - const std::vector&, - const std::vector&, - const std::vector&)> { + const std::vector&, + const std::vector&, + const std::vector&)> { public: /// Standard constructor GaudiAllenUTToV2Tracks(const std::string& name, ISvcLocator* pSvcLocator); /// Algorithm execution std::vector operator()( - const std::vector&, - const std::vector&, - const std::vector&, - const std::vector&, - const std::vector&, - const std::vector&, - const std::vector&, - const std::vector&, - const std::vector&, - const std::vector&) const override; + const std::vector& allen_ut_tracks_mec, + const std::vector& allen_beamline_states, + const std::vector& allen_endvelo_states) const override; private: }; @@ -66,53 +53,24 @@ GaudiAllenUTToV2Tracks::GaudiAllenUTToV2Tracks(const std::string& name, ISvcLoca name, pSvcLocator, // Inputs - {KeyValue {"offsets_all_velo_tracks", ""}, - KeyValue {"offsets_velo_track_hit_number", ""}, - KeyValue {"velo_track_hits", ""}, - KeyValue {"velo_kalman_beamline_states", ""}, - KeyValue {"velo_kalman_endvelo_states", ""}, - KeyValue {"atomics_ut", ""}, - KeyValue {"ut_track_hit_number", ""}, - KeyValue {"ut_qop", ""}, - KeyValue {"ut_track_velo_indices", ""}, - KeyValue {"ut_track_hits", ""}}, + {KeyValue {"AllenUTTracks", ""}, + KeyValue {"AllenVeloBeamlineStates", ""}, + KeyValue {"AllenVeloKalmanStates", ""}}, // Outputs {KeyValue {"OutputTracks", "Allen/Track/v2/VeloUT"}}) {} std::vector GaudiAllenUTToV2Tracks::operator()( - const std::vector& offsets_all_velo_tracks, - const std::vector& offsets_velo_track_hit_number, - const std::vector& velo_track_hits, - const std::vector& velo_kalman_beamline_states, - const std::vector& velo_kalman_endvelo_states, - const std::vector& atomics_ut, - const std::vector& ut_track_hit_number, - const std::vector& ut_qop, - const std::vector& ut_track_velo_indices, - const std::vector& ut_track_hits) const + const std::vector& allen_ut_tracks_mec, + const std::vector& allen_beamline_states, + const std::vector& allen_endvelo_states) const { // Make the consolidated tracks. const unsigned i_event = 0; - const unsigned number_of_events = 1; - - const Velo::Consolidated::Tracks velo_tracks { - offsets_all_velo_tracks.data(), offsets_velo_track_hit_number.data(), i_event, number_of_events}; - const Velo::Consolidated::ConstStates velo_beamline_states( - velo_kalman_beamline_states.data(), velo_tracks.total_number_of_tracks()); - const Velo::Consolidated::ConstStates velo_endvelo_states( - velo_kalman_endvelo_states.data(), velo_tracks.total_number_of_tracks()); - const unsigned velo_event_tracks_offset = velo_tracks.tracks_offset(i_event); - - const UT::Consolidated::ConstExtendedTracks ut_tracks {atomics_ut.data(), - ut_track_hit_number.data(), - ut_qop.data(), - ut_track_velo_indices.data(), - i_event, - number_of_events}; - - const unsigned number_of_tracks = ut_tracks.number_of_tracks(i_event); + const auto ut_tracks_view = allen_ut_tracks_mec[0].container(i_event); + const unsigned number_of_tracks = ut_tracks_view.size(); + std::vector output; output.reserve(number_of_tracks); @@ -122,44 +80,46 @@ std::vector GaudiAllenUTToV2Tracks::operator()( auto& newTrack = output.emplace_back(); // add UT hits - std::vector ut_ids = ut_tracks.get_lhcbids_for_track(ut_track_hits.data(), t); - for (const auto id : ut_ids) { + const auto track = ut_tracks_view.track(t); + const unsigned n_hits = track.number_of_ids(); + for (unsigned int i = 0; i < n_hits; i++) { + const auto id = track.id(i); const LHCb::LHCbID lhcbid = LHCb::LHCbID(id); newTrack.addToLhcbIDs(lhcbid); } // add Velo hits - const int velo_track_index = ut_tracks.velo_track(t); - std::vector velo_ids = velo_tracks.get_lhcbids_for_track(velo_track_hits.data(), velo_track_index); - for (const auto id : velo_ids) { + const auto velo_track = track.velo_track(); + const unsigned n_velo_hits = velo_track.number_of_ids(); + for (unsigned int i = 0; i < n_velo_hits; i++) { + const auto id = velo_track.id(i); const LHCb::LHCbID lhcbid = LHCb::LHCbID(id); newTrack.addToLhcbIDs(lhcbid); } // set state at beamline - const unsigned velo_state_index = velo_event_tracks_offset + velo_track_index; - const auto velo_beamline_state = velo_beamline_states.get(velo_state_index); + const auto velo_beamline_state = velo_track.state(allen_beamline_states[0]); LHCb::State closesttobeam_state; - const float qop = ut_tracks.qop(t); + const float qop = track.qop(); closesttobeam_state.setState( - velo_beamline_state.x, - velo_beamline_state.y, - velo_beamline_state.z, - velo_beamline_state.tx, - velo_beamline_state.ty, + velo_beamline_state.x(), + velo_beamline_state.y(), + velo_beamline_state.z(), + velo_beamline_state.tx(), + velo_beamline_state.ty(), qop); closesttobeam_state.setLocation(LHCb::State::Location::ClosestToBeam); newTrack.addToStates(closesttobeam_state); // set state at endvelo - const auto velo_endvelo_state = velo_endvelo_states.get(velo_state_index); + const auto velo_endvelo_state = velo_track.state(allen_endvelo_states[0]); LHCb::State endvelo_state; endvelo_state.setState( - velo_endvelo_state.x, - velo_endvelo_state.y, - velo_endvelo_state.z, - velo_endvelo_state.tx, - velo_endvelo_state.ty, + velo_endvelo_state.x(), + velo_endvelo_state.y(), + velo_endvelo_state.z(), + velo_endvelo_state.tx(), + velo_endvelo_state.ty(), qop); endvelo_state.setLocation(LHCb::State::Location::EndVelo); newTrack.addToStates(endvelo_state); -- GitLab From b7dd24572fa261887747aa6c1bdf645c17a0e7c6 Mon Sep 17 00:00:00 2001 From: thboettc Date: Thu, 2 Feb 2023 18:29:27 -0500 Subject: [PATCH 5/6] Use IMultiEventContainers in converters --- Rec/Allen/src/GaudiAllenUTToV2Tracks.cpp | 14 +++++++------- Rec/Allen/src/GaudiAllenVeloToV2Tracks.cpp | 12 ++++++------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Rec/Allen/src/GaudiAllenUTToV2Tracks.cpp b/Rec/Allen/src/GaudiAllenUTToV2Tracks.cpp index ed0ed35a7b1..0f0029411eb 100644 --- a/Rec/Allen/src/GaudiAllenUTToV2Tracks.cpp +++ b/Rec/Allen/src/GaudiAllenUTToV2Tracks.cpp @@ -28,7 +28,7 @@ #include "States.cuh" class GaudiAllenUTToV2Tracks final : public Gaudi::Functional::Transformer( - const std::vector&, + const std::vector&, const std::vector&, const std::vector&)> { public: @@ -37,7 +37,7 @@ public: /// Algorithm execution std::vector operator()( - const std::vector& allen_ut_tracks_mec, + const std::vector& allen_ut_tracks_mec, const std::vector& allen_beamline_states, const std::vector& allen_endvelo_states) const override; @@ -53,22 +53,22 @@ GaudiAllenUTToV2Tracks::GaudiAllenUTToV2Tracks(const std::string& name, ISvcLoca name, pSvcLocator, // Inputs - {KeyValue {"AllenUTTracks", ""}, - KeyValue {"AllenVeloBeamlineStates", ""}, - KeyValue {"AllenVeloKalmanStates", ""}}, + {KeyValue {"allen_ut_tracks_mec", ""}, + KeyValue {"allen_beamline_states_view", ""}, + KeyValue {"allen_endvelo_states_view", ""}}, // Outputs {KeyValue {"OutputTracks", "Allen/Track/v2/VeloUT"}}) {} std::vector GaudiAllenUTToV2Tracks::operator()( - const std::vector& allen_ut_tracks_mec, + const std::vector& allen_ut_tracks_mec, const std::vector& allen_beamline_states, const std::vector& allen_endvelo_states) const { // Make the consolidated tracks. const unsigned i_event = 0; - const auto ut_tracks_view = allen_ut_tracks_mec[0].container(i_event); + const auto ut_tracks_view = static_cast(allen_ut_tracks_mec[0])->container(i_event); const unsigned number_of_tracks = ut_tracks_view.size(); std::vector output; diff --git a/Rec/Allen/src/GaudiAllenVeloToV2Tracks.cpp b/Rec/Allen/src/GaudiAllenVeloToV2Tracks.cpp index c75655febd4..91ba52e76d0 100644 --- a/Rec/Allen/src/GaudiAllenVeloToV2Tracks.cpp +++ b/Rec/Allen/src/GaudiAllenVeloToV2Tracks.cpp @@ -19,7 +19,7 @@ */ class GaudiAllenVeloToV2Tracks final : public Gaudi::Functional::Transformer( - const std::vector&, + const std::vector&, const std::vector&)> { public: /// Standard constructor @@ -27,7 +27,7 @@ public: /// Algorithm execution std::vector operator()( - const std::vector& allen_velo_tracks_mec, + const std::vector& allen_velo_tracks_mec, const std::vector& allen_velo_kalman_states) const override; private: @@ -41,19 +41,19 @@ GaudiAllenVeloToV2Tracks::GaudiAllenVeloToV2Tracks(const std::string& name, ISvc name, pSvcLocator, // Inputs - {KeyValue {"AllenVeloTracks", ""}, - KeyValue {"AllenVeloKalmanStates", ""}}, + {KeyValue {"allen_velo_tracks_mec", ""}, + KeyValue {"allen_velo_states_view", ""}}, // Outputs {KeyValue {"OutputTracks", "Allen/Track/v2/Velo"}}) {} std::vector GaudiAllenVeloToV2Tracks::operator()( - const std::vector& allen_velo_tracks_mec, + const std::vector& allen_velo_tracks_mec, const std::vector& allen_velo_kalman_states) const { // Make the consolidated tracks. const unsigned i_event = 0; - const auto velo_tracks_view = allen_velo_tracks_mec[0].container(i_event); + const auto velo_tracks_view = static_cast(allen_velo_tracks_mec[0])->container(i_event); const unsigned number_of_tracks = velo_tracks_view.size(); std::vector output; -- GitLab From 1810abc032d48e929252129bf30446e702b15543 Mon Sep 17 00:00:00 2001 From: Gitlab CI Date: Thu, 2 Feb 2023 23:35:28 +0000 Subject: [PATCH 6/6] Fixed formatting patch generated by https://gitlab.cern.ch/lhcb/Allen/-/jobs/27312026 --- Rec/Allen/src/GaudiAllenUTToV2Tracks.cpp | 3 ++- Rec/Allen/src/GaudiAllenVeloToV2Tracks.cpp | 14 ++++---------- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/Rec/Allen/src/GaudiAllenUTToV2Tracks.cpp b/Rec/Allen/src/GaudiAllenUTToV2Tracks.cpp index 0f0029411eb..96a65691006 100644 --- a/Rec/Allen/src/GaudiAllenUTToV2Tracks.cpp +++ b/Rec/Allen/src/GaudiAllenUTToV2Tracks.cpp @@ -68,7 +68,8 @@ std::vector GaudiAllenUTToV2Tracks::operator()( // Make the consolidated tracks. const unsigned i_event = 0; - const auto ut_tracks_view = static_cast(allen_ut_tracks_mec[0])->container(i_event); + const auto ut_tracks_view = + static_cast(allen_ut_tracks_mec[0])->container(i_event); const unsigned number_of_tracks = ut_tracks_view.size(); std::vector output; diff --git a/Rec/Allen/src/GaudiAllenVeloToV2Tracks.cpp b/Rec/Allen/src/GaudiAllenVeloToV2Tracks.cpp index 91ba52e76d0..c5ba743abd6 100644 --- a/Rec/Allen/src/GaudiAllenVeloToV2Tracks.cpp +++ b/Rec/Allen/src/GaudiAllenVeloToV2Tracks.cpp @@ -41,8 +41,7 @@ GaudiAllenVeloToV2Tracks::GaudiAllenVeloToV2Tracks(const std::string& name, ISvc name, pSvcLocator, // Inputs - {KeyValue {"allen_velo_tracks_mec", ""}, - KeyValue {"allen_velo_states_view", ""}}, + {KeyValue {"allen_velo_tracks_mec", ""}, KeyValue {"allen_velo_states_view", ""}}, // Outputs {KeyValue {"OutputTracks", "Allen/Track/v2/Velo"}}) {} @@ -53,7 +52,8 @@ std::vector GaudiAllenVeloToV2Tracks::operator()( { // Make the consolidated tracks. const unsigned i_event = 0; - const auto velo_tracks_view = static_cast(allen_velo_tracks_mec[0])->container(i_event); + const auto velo_tracks_view = + static_cast(allen_velo_tracks_mec[0])->container(i_event); const unsigned number_of_tracks = velo_tracks_view.size(); std::vector output; @@ -77,13 +77,7 @@ std::vector GaudiAllenVeloToV2Tracks::operator()( // set state at beamline const auto state = track.state(allen_velo_kalman_states[0]); LHCb::State closesttobeam_state; - closesttobeam_state.setState( - state.x(), - state.y(), - state.z(), - state.tx(), - state.ty(), - 0.f); + closesttobeam_state.setState(state.x(), state.y(), state.z(), state.tx(), state.ty(), 0.f); closesttobeam_state.covariance()(0, 0) = state.c00(); closesttobeam_state.covariance()(1, 1) = state.c11(); closesttobeam_state.covariance()(0, 2) = state.c20(); -- GitLab