132 if (not tsoaHandleHost
or not tsoaHandleDevice) {
134 if (not tsoaHandleHost) {
135 out <<
"reference (cpu) tracks not found; ";
137 if (not tsoaHandleDevice) {
138 out <<
"target (gpu) tracks not found; ";
140 out <<
"the comparison will not run.";
144 auto const& tsoaHost = *tsoaHandleHost;
145 auto const& tsoaDevice = *tsoaHandleDevice;
146 auto maxTracksHost = tsoaHost.view().metadata().size();
147 auto maxTracksDevice = tsoaDevice.view().metadata().size();
148 auto const* qualityHost = tsoaHost.view().quality();
149 auto const* qualityDevice = tsoaDevice.view().quality();
150 int32_t nTracksHost = 0;
151 int32_t nTracksDevice = 0;
152 int32_t nLooseAndAboveTracksHost = 0;
153 int32_t nLooseAndAboveTracksHost_matchedDevice = 0;
154 int32_t nLooseAndAboveTracksDevice = 0;
157 std::vector<int32_t> looseTrkidxDevice;
158 for (int32_t jt = 0; jt < maxTracksDevice; ++jt) {
161 if (!(tsoaDevice.view()[jt].pt() > 0.))
166 nLooseAndAboveTracksDevice++;
167 looseTrkidxDevice.emplace_back(jt);
171 for (int32_t
it = 0;
it < maxTracksHost; ++
it) {
177 float ptHost = tsoaHost.view()[
it].pt();
178 float etaHost = tsoaHost.view()[
it].eta();
188 nLooseAndAboveTracksHost++;
194 for (
auto gid : looseTrkidxDevice) {
195 float etaDevice = tsoaDevice.view()[gid].eta();
196 float phiDevice =
reco::phi(tsoaDevice.view(), gid);
197 float dr2 =
reco::deltaR2(etaHost, phiHost, etaDevice, phiDevice);
210 nLooseAndAboveTracksHost_matchedDevice++;
212 hchi2_->
Fill(tsoaHost.view()[
it].chi2(), tsoaDevice.view()[closestTkidx].chi2());
215 hnLayers_->
Fill(tsoaHost.view()[
it].nLayers(), tsoaDevice.view()[closestTkidx].nLayers());
216 hpt_->
Fill(tsoaHost.view()[
it].pt(), tsoaDevice.view()[closestTkidx].pt());
217 hptLogLog_->
Fill(tsoaHost.view()[
it].pt(), tsoaDevice.view()[closestTkidx].pt());
218 heta_->
Fill(etaHost, tsoaDevice.view()[closestTkidx].eta());
224 (
reco::charge(tsoaDevice.view(), closestTkidx) / tsoaDevice.view()[closestTkidx].pt()));
MonitorElement * hetadiffMatched_
constexpr double deltaPhi(double phi1, double phi2)
MonitorElement * hnLooseAndAboveTracks_
ALPAKA_FN_HOST_ACC ALPAKA_FN_INLINE constexpr float zip(ConstView const &tracks, int32_t i)
MonitorElement * hCharge_
MonitorElement * hphi_z_tkAllHostMatched_
MonitorElement * hnLayers_
ALPAKA_FN_HOST_ACC ALPAKA_FN_INLINE constexpr float charge(ConstView const &tracks, int32_t i)
const pixelTrack::Quality minQuality_
MonitorElement * hpt_eta_tkAllHost_
MonitorElement * hnTracks_
ALPAKA_FN_HOST_ACC ALPAKA_FN_INLINE constexpr float tip(ConstView const &tracks, int32_t i)
MonitorElement * hptdiffMatched_
MonitorElement * hnLooseAndAboveTracks_matched_
MonitorElement * htipdiffMatched_
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
ALPAKA_FN_HOST_ACC ALPAKA_FN_INLINE constexpr float phi(ConstView const &tracks, int32_t i)
MonitorElement * hzdiffMatched_
MonitorElement * hphi_z_tkAllHost_
constexpr auto deltaR2(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
const edm::EDGetTokenT< PixelTrackSoA > tokenSoATrackHost_
static const GlobalPoint notFound(0, 0, 0)
MonitorElement * hptLogLog_
MonitorElement * hCurvdiffMatched_
MonitorElement * hpt_eta_tkAllHostMatched_
TupleMultiplicity< TrackerTraits > const *__restrict__ uint32_t nHits
const edm::EDGetTokenT< PixelTrackSoA > tokenSoATrackDevice_
MonitorElement * hphidiffMatched_
const bool useQualityCut_