26 #include <fmt/printf.h> 71 useQualityCut_ = iConfig.
getParameter<
bool>(
"useQualityCut");
80 const auto& tsoaHandle =
iEvent.getHandle(tokenSoATrack_);
81 if (!tsoaHandle.isValid()) {
82 edm::LogWarning(
"SiPixelMonitorTrackSoA") <<
"No Track SoA found \n returning!" << std::endl;
87 auto const& tsoa = *tsoaHandle.product();
88 auto maxTracks = tsoa.view().metadata().size();
89 auto const*
quality = tsoa.view().quality();
91 int32_t nLooseAndAboveTracks = 0;
98 float pt = tsoa.view()[
it].pt();
104 hquality->Fill(
int(
qual));
107 if (useQualityCut_ &&
quality[
it] < minQuality_)
111 float chi2 = tsoa.view()[
it].chi2();
112 float phi = helper::phi(tsoa.const_view(),
it);
114 float eta = tsoa.view()[
it].eta();
133 nLooseAndAboveTracks++;
136 hnLooseAndAboveTracks->Fill(nLooseAndAboveTracks);
142 template <
typename T>
151 hnTracks = iBook.
book1D(
"nTracks", fmt::sprintf(
";%s per event;#events",toRep), 1001, -0.5, 2001.5);
152 hnLooseAndAboveTracks = iBook.
book1D(
"nLooseAndAboveTracks", fmt::sprintf(
";%s (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::sprintf(
";%s;#tracks",toRep), 15, -0.5, 14.5);
156 hnHitsVsPhi = iBook.
bookProfile(
"nHitsPerTrackVsPhi", fmt::sprintf(
"%s vs track #phi;Track #phi;%s",toRep,toRep), 30, -
M_PI,
M_PI,0., 15.);
157 hnHitsVsEta = iBook.
bookProfile(
"nHitsPerTrackVsEta", fmt::sprintf(
"%s vs track #eta;Track #eta;%s",toRep,toRep), 30, -3., 3., 0., 15.);
159 toRep =
"Number of all layers per track (quality #geq loose)";
160 hnLayers = iBook.
book1D(
"nLayers", fmt::sprintf(
";%s;#tracks",toRep), 15, -0.5, 14.5);
161 hnLayersVsPhi = iBook.
bookProfile(
"nLayersPerTrackVsPhi", fmt::sprintf(
"%s vs track #phi;Track #phi;%s",toRep,toRep), 30, -
M_PI,
M_PI,0., 15.);
162 hnLayersVsEta = iBook.
bookProfile(
"nLayersPerTrackVsEta", fmt::sprintf(
"%s vs track #eta;Track #eta;%s",toRep,toRep), 30, -3., 3., 0., 15.);
164 toRep =
"Track (quality #geq loose) #chi^{2}/ndof";
165 hchi2 = iBook.
book1D(
"nChi2ndof", fmt::sprintf(
";%s;#tracks",toRep), 40, 0., 20.);
166 hChi2VsPhi = iBook.
bookProfile(
"nChi2ndofVsPhi", fmt::sprintf(
"%s vs track #phi;Track #phi;%s",toRep,toRep), 30, -
M_PI,
M_PI, 0., 20.);
167 hChi2VsEta = iBook.
bookProfile(
"nChi2ndofVsEta", fmt::sprintf(
"%s vs track #eta;Track #eta;%s",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, 1);
184 template <
typename T>
189 desc.add<
std::string>(
"topFolderName",
"SiPixelHeterogeneous/PixelTrackSoA");
190 desc.add<
bool>(
"useQualityCut",
true);
MonitorElement * hChi2VsEta
std::string topFolderName_
MonitorElement * hnLayers
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
T getParameter(std::string const &) const
pixelTrack::Quality minQuality_
virtual void setCurrentFolder(std::string const &fullpath)
Quality qualityByName(std::string const &name)
MonitorElement * hnHitsVsEta
ALPAKA_FN_HOST_ACC ALPAKA_FN_INLINE constexpr float zip(ConstView const &tracks, int32_t i)
MonitorElement * hnHitsVsPhi
const std::string qualityName[qualitySize]
edm::EDGetTokenT< PixelTrackHeterogeneous > tokenSoATrack_
void bookHistograms(DQMStore::IBooker &ibooker, edm::Run const &iRun, edm::EventSetup const &iSetup) override
MonitorElement * hnTracks
MonitorElement * hCurvature
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())
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
#define DEFINE_FWK_MODULE(type)
SiPixelMonitorTrackSoA(const edm::ParameterSet &)
MonitorElement * hnLayersVsPhi
void analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup) override
MonitorElement * hnLayersVsEta
MonitorElement * hnLooseAndAboveTracks
MonitorElement * hChi2VsPhi
Log< level::Warning, false > LogWarning
MonitorElement * hquality
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
~SiPixelMonitorTrackSoA() override=default