129 if (not tsoaHandleCPU
or not tsoaHandleGPU) {
131 if (not tsoaHandleCPU) {
132 out <<
"reference (cpu) tracks not found; ";
134 if (not tsoaHandleGPU) {
135 out <<
"target (gpu) tracks not found; ";
137 out <<
"the comparison will not run.";
141 auto const& tsoaCPU = *tsoaHandleCPU->get();
142 auto const& tsoaGPU = *tsoaHandleGPU->get();
143 auto maxTracksCPU = tsoaCPU.stride();
144 auto maxTracksGPU = tsoaGPU.stride();
145 auto const* qualityCPU = tsoaCPU.qualityData();
146 auto const* qualityGPU = tsoaGPU.qualityData();
147 int32_t nTracksCPU = 0;
148 int32_t nTracksGPU = 0;
149 int32_t nLooseAndAboveTracksCPU = 0;
150 int32_t nLooseAndAboveTracksCPU_matchedGPU = 0;
151 int32_t nLooseAndAboveTracksGPU = 0;
154 std::vector<int32_t> looseTrkidxGPU;
155 for (int32_t jt = 0; jt < maxTracksGPU; ++jt) {
156 if (tsoaGPU.nHits(jt) == 0)
158 if (!(tsoaGPU.pt(jt) > 0.))
163 nLooseAndAboveTracksGPU++;
164 looseTrkidxGPU.emplace_back(jt);
168 for (int32_t it = 0; it < maxTracksCPU; ++it) {
169 if (tsoaCPU.nHits(it) == 0)
171 if (!(tsoaCPU.pt(it) > 0.))
176 nLooseAndAboveTracksCPU++;
181 float etacpu = tsoaCPU.eta(it);
182 float phicpu = tsoaCPU.phi(it);
183 for (
auto gid : looseTrkidxGPU) {
184 float etagpu = tsoaGPU.eta(gid);
185 float phigpu = tsoaGPU.phi(gid);
199 nLooseAndAboveTracksCPU_matchedGPU++;
201 hchi2_->
Fill(tsoaCPU.chi2(it), tsoaGPU.chi2(closestTkidx));
202 hnHits_->
Fill(tsoaCPU.nHits(it), tsoaGPU.nHits(closestTkidx));
203 hnLayers_->
Fill(tsoaCPU.nLayers(it), tsoaGPU.nLayers(closestTkidx));
204 hpt_->
Fill(tsoaCPU.pt(it), tsoaGPU.pt(closestTkidx));
206 heta_->
Fill(etacpu, tsoaGPU.eta(closestTkidx));
207 hphi_->
Fill(phicpu, tsoaGPU.phi(closestTkidx));
208 hz_->
Fill(tsoaCPU.zip(it), tsoaGPU.zip(closestTkidx));
209 htip_->
Fill(tsoaCPU.tip(it), tsoaGPU.tip(closestTkidx));
constexpr double deltaPhi(double phi1, double phi2)
MonitorElement * hzdiffMatched_
MonitorElement * hpt_eta_tkAllCPUMatched_
MonitorElement * hetadiffMatched_
const edm::EDGetTokenT< PixelTrackHeterogeneous > tokenSoATrackGPU_
MonitorElement * hnLooseAndAboveTracks_
const edm::EDGetTokenT< PixelTrackHeterogeneous > tokenSoATrackCPU_
MonitorElement * hpt_eta_tkAllCPU_
MonitorElement * hnLooseAndAboveTracks_matched_
const bool useQualityCut_
MonitorElement * hnLayers_
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 * hphidiffMatched_
constexpr auto deltaR2(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
MonitorElement * hptdiffMatched_
static const GlobalPoint notFound(0, 0, 0)
MonitorElement * hptLogLog_
MonitorElement * hphi_z_tkAllCPUMatched_
MonitorElement * hphi_z_tkAllCPU_
const pixelTrack::Quality minQuality_
MonitorElement * hnTracks_