147 const auto& tsoaHandleRef =
iEvent.getHandle(tokenRef);
148 const auto& tsoaHandleTar =
iEvent.getHandle(tokenTar);
150 if (not tsoaHandleRef
or not tsoaHandleTar) {
152 if (not tsoaHandleRef) {
153 out <<
"reference tracks not found; ";
155 if (not tsoaHandleTar) {
156 out <<
"target tracks not found; ";
158 out <<
"the comparison will not run.";
162 auto const& tsoaRef = *tsoaHandleRef;
163 auto const& tsoaTar = *tsoaHandleTar;
165 auto maxTracksRef = tsoaRef.view().metadata().size();
166 auto maxTracksTar = tsoaTar.view().metadata().size();
168 auto const* qualityRef = tsoaRef.view().quality();
169 auto const* qualityTar = tsoaTar.view().quality();
171 int32_t nTracksRef = 0;
172 int32_t nTracksTar = 0;
173 int32_t nLooseAndAboveTracksRef = 0;
174 int32_t nLooseAndAboveTracksRef_matchedTar = 0;
175 int32_t nLooseAndAboveTracksTar = 0;
178 std::vector<int32_t> looseTrkidxTar;
179 for (int32_t jt = 0; jt < maxTracksTar; ++jt) {
182 if (!(tsoaTar.view()[jt].pt() > 0.))
187 nLooseAndAboveTracksTar++;
188 looseTrkidxTar.emplace_back(jt);
192 for (int32_t
it = 0;
it < maxTracksRef; ++
it) {
198 float ptRef = tsoaRef.view()[
it].pt();
199 float etaRef = tsoaRef.view()[
it].eta();
209 nLooseAndAboveTracksRef++;
215 for (
auto gid : looseTrkidxTar) {
216 float etaTar = tsoaTar.view()[gid].eta();
217 float phiTar =
reco::phi(tsoaTar.view(), gid);
231 nLooseAndAboveTracksRef_matchedTar++;
233 hchi2_->
Fill(tsoaRef.view()[
it].chi2(), tsoaTar.view()[closestTkidx].chi2());
236 hnLayers_->
Fill(tsoaRef.view()[
it].nLayers(), tsoaTar.view()[closestTkidx].nLayers());
237 hpt_->
Fill(ptRef, tsoaTar.view()[closestTkidx].pt());
239 heta_->
Fill(etaRef, tsoaTar.view()[closestTkidx].eta());
245 (
reco::charge(tsoaTar.view(), closestTkidx) / tsoaTar.view()[closestTkidx].pt()));
constexpr double deltaPhi(double phi1, double phi2)
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 * hzdiffMatched_
MonitorElement * hetadiffMatched_
constexpr auto deltaR2(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
static const GlobalPoint notFound(0, 0, 0)
const pixelTrack::Quality minQuality_
MonitorElement * htipdiffMatched_
TupleMultiplicity< TrackerTraits > const *__restrict__ uint32_t nHits