12 #include <fmt/printf.h> 70 useQualityCut_ = iConfig.
getParameter<
bool>(
"useQualityCut");
79 const auto& tsoaHandle =
iEvent.getHandle(tokenSoATrack_);
80 if (!tsoaHandle.isValid()) {
81 edm::LogWarning(
"SiPixelMonitorTrackSoAAlpaka") <<
"No Track SoA found \n returning!" << std::endl;
85 auto const& tsoa = *tsoaHandle.product();
86 auto maxTracks = tsoa.view().metadata().size();
87 auto const*
quality = tsoa.view().quality();
89 int32_t nLooseAndAboveTracks = 0;
92 auto nHits = tsoa.view().detIndices().size(
it);
96 float pt = tsoa.view()[
it].pt();
102 hquality->Fill(
int(
qual));
105 if (useQualityCut_ &&
quality[
it] < minQuality_)
110 float chi2 = tsoa.view()[
it].chi2();
111 float phi = tsoa.view()[
it].state()(0);
112 float zip = tsoa.view()[
it].state()(4);
113 float eta = tsoa.view()[
it].eta();
114 float tip = tsoa.view()[
it].state()(1);
130 nLooseAndAboveTracks++;
133 hnLooseAndAboveTracks->Fill(nLooseAndAboveTracks);
139 template <
typename T>
148 hnTracks = iBook.
book1D(
"nTracks",
fmt::format(
";{} per event;#events",toRep), 1001, -0.5, 1000.5);
149 hnLooseAndAboveTracks = iBook.
book1D(
"nLooseAndAboveTracks",
fmt::format(
";{} (quality #geq loose) per event;#events",toRep), 1001, -0.5, 1000.5);
151 toRep =
"Number of all RecHits per track (quality #geq loose)";
152 hnHits = iBook.
book1D(
"nRecHits",
fmt::format(
";{};#tracks",toRep), 15, -0.5, 14.5);
154 hnHitsVsEta = iBook.
bookProfile(
"nHitsPerTrackVsEta",
fmt::format(
"{} vs track #eta;Track #eta;{}",toRep,toRep), 30, -3., 3., 0., 15.);
156 toRep =
"Number of all layers per track (quality #geq loose)";
157 hnLayers = iBook.
book1D(
"nLayers",
fmt::format(
";{};#tracks",toRep), 15, -0.5, 14.5);
159 hnLayersVsEta = iBook.
bookProfile(
"nLayersPerTrackVsEta",
fmt::format(
"{} vs track #eta;Track #eta;{}",toRep,toRep), 30, -3., 3., 0., 15.);
161 toRep =
"Track (quality #geq loose) #chi^{2}/ndof";
162 hchi2 = iBook.
book1D(
"nChi2ndof",
fmt::format(
";{};#tracks",toRep), 40, 0., 20.);
164 hChi2VsEta = iBook.
bookProfile(
"nChi2ndofVsEta",
fmt::format(
"{} vs track #eta;Track #eta;{}",toRep,toRep), 30, -3., 3., 0., 20.);
167 hpt = iBook.
book1D(
"pt",
";Track (quality #geq loose) p_{T} [GeV];#tracks", 200, 0., 200.);
168 heta = iBook.
book1D(
"eta",
";Track (quality #geq loose) #eta;#tracks", 30, -3., 3.);
169 hphi = iBook.
book1D(
"phi",
";Track (quality #geq loose) #phi;#tracks", 30, -
M_PI,
M_PI);
170 hz = iBook.
book1D(
"z",
";Track (quality #geq loose) z [cm];#tracks", 30, -30., 30.);
171 htip = iBook.
book1D(
"tip",
";Track (quality #geq loose) TIP [cm];#tracks", 100, -0.5, 0.5);
172 hquality = iBook.
book1D(
"quality",
";Track Quality;#tracks", 7, -0.5, 6.5);
175 hquality->setBinLabel(
i,
q.data(), 1);
180 template <
typename T>
185 desc.add<
std::string>(
"topFolderName",
"SiPixelHeterogeneous/PixelTrackAlpaka");
186 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]
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 * hnHitsVsPhi
pixelTrack::Quality minQuality_
SiPixelMonitorTrackSoAAlpaka(const edm::ParameterSet &)