12 #include <fmt/printf.h> 71 useQualityCut_ = iConfig.
getParameter<
bool>(
"useQualityCut");
80 const auto& tsoaHandle =
iEvent.getHandle(tokenSoATrack_);
81 if (!tsoaHandle.isValid()) {
82 edm::LogWarning(
"SiPixelMonitorTrackSoAAlpaka") <<
"No Track SoA found \n returning!" << std::endl;
86 auto const& tsoa = *tsoaHandle.product();
87 auto maxTracks = tsoa.view().metadata().size();
88 auto const*
quality = tsoa.view().quality();
90 int32_t nLooseAndAboveTracks = 0;
93 auto nHits = tsoa.view().detIndices().size(
it);
97 float pt = tsoa.view()[
it].pt();
103 hquality->Fill(
int(
qual));
106 if (useQualityCut_ &&
quality[
it] < minQuality_)
111 float chi2 = tsoa.view()[
it].chi2();
112 float phi = tsoa.view()[
it].state()(0);
113 float zip = tsoa.view()[
it].state()(4);
114 float eta = tsoa.view()[
it].eta();
115 float tip = tsoa.view()[
it].state()(1);
133 nLooseAndAboveTracks++;
136 hnLooseAndAboveTracks->Fill(nLooseAndAboveTracks);
142 template <
typename T>
151 hnTracks = iBook.
book1D(
"nTracks",
fmt::format(
";{} per event;#events",toRep), 1001, -0.5, 2001.5);
152 hnLooseAndAboveTracks = iBook.
book1D(
"nLooseAndAboveTracks",
fmt::format(
";{} (quality #geq loose) per event;#events",toRep), 1001, -0.5, 2001.5);
154 toRep =
"Number of all RecHits per track (quality #geq loose)";
155 hnHits = iBook.
book1D(
"nRecHits",
fmt::format(
";{};#tracks",toRep), 15, -0.5, 14.5);
157 hnHitsVsEta = iBook.
bookProfile(
"nHitsPerTrackVsEta",
fmt::format(
"{} vs track #eta;Track #eta;{}",toRep,toRep), 30, -3., 3., 0., 15.);
159 toRep =
"Number of all layers per track (quality #geq loose)";
160 hnLayers = iBook.
book1D(
"nLayers",
fmt::format(
";{};#tracks",toRep), 15, -0.5, 14.5);
162 hnLayersVsEta = iBook.
bookProfile(
"nLayersPerTrackVsEta",
fmt::format(
"{} vs track #eta;Track #eta;{}",toRep,toRep), 30, -3., 3., 0., 15.);
164 toRep =
"Track (quality #geq loose) #chi^{2}/ndof";
165 hchi2 = iBook.
book1D(
"nChi2ndof",
fmt::format(
";{};#tracks",toRep), 40, 0., 20.);
167 hChi2VsEta = iBook.
bookProfile(
"nChi2ndofVsEta",
fmt::format(
"{} vs track #eta;Track #eta;{}",toRep,toRep), 30, -3., 3., 0., 20.);
170 hpt = iBook.
book1D(
"pt",
";Track (quality #geq loose) p_{T} [GeV];#tracks", 200, 0., 200.);
171 hCurvature = iBook.
book1D(
"curvature",
";Track (quality #geq loose) q/p_{T} [GeV^{-1}];#tracks", 100, -3., 3.);
172 heta = iBook.
book1D(
"eta",
";Track (quality #geq loose) #eta;#tracks", 30, -3., 3.);
173 hphi = iBook.
book1D(
"phi",
";Track (quality #geq loose) #phi;#tracks", 30, -
M_PI,
M_PI);
174 hz = iBook.
book1D(
"z",
";Track (quality #geq loose) z [cm];#tracks", 30, -30., 30.);
175 htip = iBook.
book1D(
"tip",
";Track (quality #geq loose) TIP [cm];#tracks", 100, -0.5, 0.5);
176 hquality = iBook.
book1D(
"quality",
";Track Quality;#tracks", 7, -0.5, 6.5);
179 hquality->setBinLabel(
i,
q.data(), 1);
184 template <
typename T>
189 desc.add<
std::string>(
"topFolderName",
"SiPixelHeterogeneous/PixelTrackAlpaka");
190 desc.add<
bool>(
"useQualityCut",
true);
MonitorElement * hChi2VsPhi
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
MonitorElement * hChi2VsEta
T getParameter(std::string const &) const
void analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup) override
virtual void setCurrentFolder(std::string const &fullpath)
Quality qualityByName(std::string const &name)
ALPAKA_FN_HOST_ACC ALPAKA_FN_INLINE constexpr float zip(ConstView const &tracks, int32_t i)
std::string topFolderName_
const std::string qualityName[qualitySize]
ALPAKA_FN_HOST_ACC ALPAKA_FN_INLINE constexpr float charge(ConstView const &tracks, int32_t i)
MonitorElement * hnLooseAndAboveTracks
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int, double lowY, double highY, char const *option="s", FUNC onbooking=NOOP())
#define DEFINE_FWK_MODULE(type)
edm::EDGetTokenT< PixelTrackHeterogeneous > tokenSoATrack_
MonitorElement * hnLayers
MonitorElement * hnHitsVsEta
~SiPixelMonitorTrackSoAAlpaka() override=default
MonitorElement * hnLayersVsEta
void bookHistograms(DQMStore::IBooker &ibooker, edm::Run const &iRun, edm::EventSetup const &iSetup) override
MonitorElement * hquality
MonitorElement * hnTracks
Log< level::Warning, false > LogWarning
MonitorElement * hnLayersVsPhi
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
TupleMultiplicity< TrackerTraits > const *__restrict__ uint32_t nHits
MonitorElement * hCurvature
MonitorElement * hnHitsVsPhi
pixelTrack::Quality minQuality_
SiPixelMonitorTrackSoAAlpaka(const edm::ParameterSet &)