140 if (not tsoaHandleCPU
or not tsoaHandleGPU) {
142 if (not tsoaHandleCPU) {
143 out <<
"reference (cpu) tracks not found; ";
145 if (not tsoaHandleGPU) {
146 out <<
"target (gpu) tracks not found; ";
148 out <<
"the comparison will not run.";
152 auto const& tsoaCPU = *tsoaHandleCPU;
153 auto const& tsoaGPU = *tsoaHandleGPU;
154 auto maxTracksCPU = tsoaCPU.view().metadata().size();
155 auto maxTracksGPU = tsoaGPU.view().metadata().size();
156 auto const* qualityCPU = tsoaCPU.view().quality();
157 auto const* qualityGPU = tsoaGPU.view().quality();
158 int32_t nTracksCPU = 0;
159 int32_t nTracksGPU = 0;
160 int32_t nLooseAndAboveTracksCPU = 0;
161 int32_t nLooseAndAboveTracksCPU_matchedGPU = 0;
162 int32_t nLooseAndAboveTracksGPU = 0;
165 std::vector<int32_t> looseTrkidxGPU;
166 for (int32_t jt = 0; jt < maxTracksGPU; ++jt) {
169 if (!(tsoaGPU.view()[jt].pt() > 0.))
174 nLooseAndAboveTracksGPU++;
175 looseTrkidxGPU.emplace_back(jt);
179 for (int32_t it = 0; it < maxTracksCPU; ++it) {
185 float ptCPU = tsoaCPU.view()[it].pt();
186 float etaCPU = tsoaCPU.view()[it].eta();
187 float phiCPU = helper::phi(tsoaCPU.view(), it);
196 nLooseAndAboveTracksCPU++;
202 for (
auto gid : looseTrkidxGPU) {
203 float etaGPU = tsoaGPU.view()[gid].eta();
204 float phiGPU = helper::phi(tsoaGPU.view(), gid);
218 nLooseAndAboveTracksCPU_matchedGPU++;
220 hchi2_->
Fill(tsoaCPU.view()[it].chi2(), tsoaGPU.view()[closestTkidx].chi2());
223 hnLayers_->
Fill(tsoaCPU.view()[it].nLayers(), tsoaGPU.view()[closestTkidx].nLayers());
224 hpt_->
Fill(tsoaCPU.view()[it].pt(), tsoaGPU.view()[closestTkidx].pt());
225 hptLogLog_->
Fill(tsoaCPU.view()[it].pt(), tsoaGPU.view()[closestTkidx].pt());
226 heta_->
Fill(etaCPU, tsoaGPU.view()[closestTkidx].eta());
227 hphi_->
Fill(etaCPU, helper::phi(tsoaGPU.view(), closestTkidx));
232 (
helper::charge(tsoaGPU.view(), closestTkidx) / tsoaGPU.view()[closestTkidx].pt()));
constexpr double deltaPhi(double phi1, double phi2)
MonitorElement * hetadiffMatched_
const bool useQualityCut_
MonitorElement * hphi_z_tkAllCPUMatched_
const edm::EDGetTokenT< PixelTrackSoA > tokenSoATrackGPU_
MonitorElement * hptdiffMatched_
MonitorElement * hptLogLog_
MonitorElement * hnLooseAndAboveTracks_matched_
MonitorElement * hpt_eta_tkAllCPU_
OutputIterator zip(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result, Compare comp)
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 * hphi_z_tkAllCPU_
MonitorElement * hzdiffMatched_
MonitorElement * hpt_eta_tkAllCPUMatched_
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_
const edm::EDGetTokenT< PixelTrackSoA > tokenSoATrackCPU_
MonitorElement * hnLayers_
MonitorElement * hphidiffMatched_