152 const auto& tsoaHandleRef =
iEvent.getHandle(tokenRef);
153 const auto& tsoaHandleTar =
iEvent.getHandle(tokenTar);
155 if (not tsoaHandleRef
or not tsoaHandleTar) {
157 if (not tsoaHandleRef) {
158 out <<
"reference tracks not found; ";
160 if (not tsoaHandleTar) {
161 out <<
"target tracks not found; ";
163 out <<
"the comparison will not run.";
167 auto const& tsoaRef = *tsoaHandleRef;
168 auto const& tsoaTar = *tsoaHandleTar;
170 auto maxTracksRef = tsoaRef.view().metadata().size();
171 auto maxTracksTar = tsoaTar.view().metadata().size();
173 auto const* qualityRef = tsoaRef.view().quality();
174 auto const* qualityTar = tsoaTar.view().quality();
176 int32_t nTracksRef = 0;
177 int32_t nTracksTar = 0;
178 int32_t nLooseAndAboveTracksRef = 0;
179 int32_t nLooseAndAboveTracksRef_matchedTar = 0;
180 int32_t nLooseAndAboveTracksTar = 0;
183 std::vector<int32_t> looseTrkidxTar;
184 for (int32_t jt = 0; jt < maxTracksTar; ++jt) {
187 if (!(tsoaTar.view()[jt].pt() > 0.))
192 nLooseAndAboveTracksTar++;
193 looseTrkidxTar.emplace_back(jt);
197 for (int32_t
it = 0;
it < maxTracksRef; ++
it) {
203 float ptRef = tsoaRef.view()[
it].pt();
204 float etaRef = tsoaRef.view()[
it].eta();
215 nLooseAndAboveTracksRef++;
221 for (
auto gid : looseTrkidxTar) {
222 float etaTar = tsoaTar.view()[gid].eta();
223 float phiTar =
reco::phi(tsoaTar.view(), gid);
237 nLooseAndAboveTracksRef_matchedTar++;
239 hchi2_->
Fill(tsoaRef.view()[
it].chi2(), tsoaTar.view()[closestTkidx].chi2());
242 hnLayers_->
Fill(tsoaRef.view()[
it].nLayers(), tsoaTar.view()[closestTkidx].nLayers());
243 hpt_->
Fill(ptRef, tsoaTar.view()[closestTkidx].pt());
246 heta_->
Fill(etaRef, tsoaTar.view()[closestTkidx].eta());
252 (
reco::charge(tsoaTar.view(), closestTkidx) / tsoaTar.view()[closestTkidx].pt()));
262 auto fillHistogram = [](
auto& histogram,
auto xValue,
auto yValue) { histogram->Fill(xValue, yValue); };
265 auto fillDeltaHistogram = [](
auto& histogram,
int cpuValue,
int gpuValue) {
266 histogram->Fill(
std::min(cpuValue, 1000), std::clamp(gpuValue - cpuValue, -100, 100));
270 fillHistogram(
hnTracks_, nTracksRef, nTracksTar);
constexpr double deltaPhi(double phi1, double phi2)
MonitorElement * hDeltaNTracks_
const bool useQualityCut_
MonitorElement * hnLooseAndAboveTracks_
MonitorElement * hptdiffMatched_
MonitorElement * hphi_z_tkAllRef_
MonitorElement * hptLogLog_
ALPAKA_FN_HOST_ACC ALPAKA_FN_INLINE constexpr float zip(ConstView const &tracks, int32_t i)
MonitorElement * hphi_z_tkAllRefMatched_
MonitorElement * hCurvdiffMatched_
MonitorElement * hnTracks_
ALPAKA_FN_HOST_ACC ALPAKA_FN_INLINE constexpr float charge(ConstView const &tracks, int32_t i)
MonitorElement * hpt_eta_tkAllRefMatched_
MonitorElement * hnLooseAndAboveTracks_matched_
MonitorElement * hphidiffMatched_
ALPAKA_FN_HOST_ACC ALPAKA_FN_INLINE constexpr float tip(ConstView const &tracks, int32_t i)
MonitorElement * hpt_eta_tkAllRef_
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 * hCharge_
ALPAKA_FN_HOST_ACC ALPAKA_FN_INLINE constexpr float phi(ConstView const &tracks, int32_t i)
MonitorElement * hDeltaNLooseAndAboveTracks_
MonitorElement * hDeltaNLooseAndAboveTracks_matched_
MonitorElement * hzdiffMatched_
MonitorElement * hetadiffMatched_
constexpr auto deltaR2(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
MonitorElement * hCurvature_
static const GlobalPoint notFound(0, 0, 0)
const pixelTrack::Quality minQuality_
MonitorElement * htipdiffMatched_
TupleMultiplicity< TrackerTraits > const *__restrict__ uint32_t nHits