144 if (not tsoaHandleCPU
or not tsoaHandleGPU) {
146 if (not tsoaHandleCPU) {
147 out <<
"reference (cpu) tracks not found; ";
149 if (not tsoaHandleGPU) {
150 out <<
"target (gpu) tracks not found; ";
152 out <<
"the comparison will not run.";
156 auto const& tsoaCPU = *tsoaHandleCPU;
157 auto const& tsoaGPU = *tsoaHandleGPU;
158 auto maxTracksCPU = tsoaCPU.view().metadata().size();
159 auto maxTracksGPU = tsoaGPU.view().metadata().size();
160 auto const* qualityCPU = tsoaCPU.view().quality();
161 auto const* qualityGPU = tsoaGPU.view().quality();
162 int32_t nTracksCPU = 0;
163 int32_t nTracksGPU = 0;
164 int32_t nLooseAndAboveTracksCPU = 0;
165 int32_t nLooseAndAboveTracksCPU_matchedGPU = 0;
166 int32_t nLooseAndAboveTracksGPU = 0;
169 std::vector<int32_t> looseTrkidxGPU;
170 for (int32_t jt = 0; jt < maxTracksGPU; ++jt) {
173 if (!(tsoaGPU.view()[jt].pt() > 0.))
178 nLooseAndAboveTracksGPU++;
179 looseTrkidxGPU.emplace_back(jt);
183 for (int32_t
it = 0;
it < maxTracksCPU; ++
it) {
189 float ptCPU = tsoaCPU.view()[
it].pt();
190 float etaCPU = tsoaCPU.view()[
it].eta();
191 float phiCPU = helper::phi(tsoaCPU.view(),
it);
201 nLooseAndAboveTracksCPU++;
207 for (
auto gid : looseTrkidxGPU) {
208 float etaGPU = tsoaGPU.view()[gid].eta();
209 float phiGPU = helper::phi(tsoaGPU.view(), gid);
223 nLooseAndAboveTracksCPU_matchedGPU++;
225 hchi2_->
Fill(tsoaCPU.view()[
it].chi2(), tsoaGPU.view()[closestTkidx].chi2());
228 hnLayers_->
Fill(tsoaCPU.view()[
it].nLayers(), tsoaGPU.view()[closestTkidx].nLayers());
229 hpt_->
Fill(ptCPU, tsoaGPU.view()[closestTkidx].pt());
232 heta_->
Fill(etaCPU, tsoaGPU.view()[closestTkidx].eta());
233 hphi_->
Fill(phiCPU, helper::phi(tsoaGPU.view(), closestTkidx));
238 (
helper::charge(tsoaGPU.view(), closestTkidx) / tsoaGPU.view()[closestTkidx].pt()));
248 auto fillHistogram = [](
auto& histogram,
auto xValue,
auto yValue) { histogram->Fill(xValue, yValue); };
251 auto fillDeltaHistogram = [](
auto& histogram,
int cpuValue,
int gpuValue) {
252 histogram->Fill(
std::min(cpuValue, 1000), std::clamp(gpuValue - cpuValue, -100, 100));
256 fillHistogram(
hnTracks_, nTracksCPU, nTracksGPU);
constexpr double deltaPhi(double phi1, double phi2)
MonitorElement * hetadiffMatched_
const bool useQualityCut_
const edm::EDGetTokenT< PixelTrackSoA > tokenSoATrackGPU_
ALPAKA_FN_HOST_ACC ALPAKA_FN_INLINE constexpr float zip(ConstView const &tracks, int32_t i)
MonitorElement * hDeltaNTracks_
MonitorElement * hphi_z_tkAllRef_
MonitorElement * hptdiffMatched_
MonitorElement * hDeltaNLooseAndAboveTracks_matched_
MonitorElement * hptLogLog_
MonitorElement * hnLooseAndAboveTracks_matched_
MonitorElement * hpt_eta_tkAllRef_
MonitorElement * hpt_eta_tkAllRefMatched_
MonitorElement * hphi_z_tkAllRefMatched_
MonitorElement * hDeltaNLooseAndAboveTracks_
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
MonitorElement * htipdiffMatched_
MonitorElement * hzdiffMatched_
constexpr auto deltaR2(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
MonitorElement * hnTracks_
static const GlobalPoint notFound(0, 0, 0)
const pixelTrack::Quality minQuality_
MonitorElement * hnLooseAndAboveTracks_
TupleMultiplicity< TrackerTraits > const *__restrict__ uint32_t nHits
MonitorElement * hCharge_
MonitorElement * hCurvdiffMatched_
MonitorElement * hCurvature_
const edm::EDGetTokenT< PixelTrackSoA > tokenSoATrackCPU_
MonitorElement * hnLayers_
MonitorElement * hphidiffMatched_