CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Member Functions | Private Attributes
SiPixelMonitorTrackSoA< T > Class Template Reference

#include <SiPixelMonitorTrackSoA.cc>

Inheritance diagram for SiPixelMonitorTrackSoA< T >:

Public Types

using PixelTrackHeterogeneous = TrackSoAHeterogeneousHost< T >
 

Public Member Functions

void analyze (const edm::Event &iEvent, const edm::EventSetup &iSetup) override
 
void bookHistograms (DQMStore::IBooker &ibooker, edm::Run const &iRun, edm::EventSetup const &iSetup) override
 
 SiPixelMonitorTrackSoA (const edm::ParameterSet &)
 
 ~SiPixelMonitorTrackSoA () override=default
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Private Attributes

MonitorElementhchi2
 
MonitorElementhChi2VsEta
 
MonitorElementhChi2VsPhi
 
MonitorElementheta
 
MonitorElementhnHits
 
MonitorElementhnHitsVsEta
 
MonitorElementhnHitsVsPhi
 
MonitorElementhnLayers
 
MonitorElementhnLayersVsEta
 
MonitorElementhnLayersVsPhi
 
MonitorElementhnLooseAndAboveTracks
 
MonitorElementhnTracks
 
MonitorElementhphi
 
MonitorElementhpt
 
MonitorElementhquality
 
MonitorElementhtip
 
MonitorElementhz
 
pixelTrack::Quality minQuality_
 
edm::EDGetTokenT< PixelTrackHeterogeneoustokenSoATrack_
 
std::string topFolderName_
 
bool useQualityCut_
 

Detailed Description

template<typename T>
class SiPixelMonitorTrackSoA< T >

Definition at line 29 of file SiPixelMonitorTrackSoA.cc.

Member Typedef Documentation

◆ PixelTrackHeterogeneous

Definition at line 31 of file SiPixelMonitorTrackSoA.cc.

Constructor & Destructor Documentation

◆ SiPixelMonitorTrackSoA()

template<typename T >
SiPixelMonitorTrackSoA< T >::SiPixelMonitorTrackSoA ( const edm::ParameterSet iConfig)
explicit

Definition at line 67 of file SiPixelMonitorTrackSoA.cc.

References edm::ParameterSet::getParameter(), pixelTrack::qualityByName(), and AlCaHLTBitMon_QueryRunRegistry::string.

67  {
68  tokenSoATrack_ = consumes<PixelTrackHeterogeneous>(iConfig.getParameter<edm::InputTag>("pixelTrackSrc"));
69  topFolderName_ = iConfig.getParameter<std::string>("topFolderName"); //"SiPixelHeterogeneous/PixelTrackSoA";
70  useQualityCut_ = iConfig.getParameter<bool>("useQualityCut");
72 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
pixelTrack::Quality minQuality_
Quality qualityByName(std::string const &name)
edm::EDGetTokenT< PixelTrackHeterogeneous > tokenSoATrack_

◆ ~SiPixelMonitorTrackSoA()

template<typename T >
SiPixelMonitorTrackSoA< T >::~SiPixelMonitorTrackSoA ( )
overridedefault

Member Function Documentation

◆ analyze()

template<typename T >
void SiPixelMonitorTrackSoA< T >::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
override

Definition at line 78 of file SiPixelMonitorTrackSoA.cc.

References nano_mu_local_reco_cff::chi2, PVValHelper::eta, iEvent, ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, DMR_cfg::maxTracks, nHits, MuonTCMETValueMapProducer_cff::nLayers, beamSpotPI::nTracks, PVValHelper::phi, DiDispStaMuonMonitor_cfi::pt, l1tGTMenu_lepSeeds_cff::qual, quality, qcdUeDQM_cfi::tip, and reco::zip().

78  {
79  const auto& tsoaHandle = iEvent.getHandle(tokenSoATrack_);
80  if (!tsoaHandle.isValid()) {
81  edm::LogWarning("SiPixelMonitorTrackSoA") << "No Track SoA found \n returning!" << std::endl;
82  return;
83  }
84 
85  using helper = TracksUtilities<T>;
86  auto const& tsoa = *tsoaHandle.product();
87  auto maxTracks = tsoa.view().metadata().size();
88  auto const* quality = tsoa.view().quality();
89  int32_t nTracks = 0;
90  int32_t nLooseAndAboveTracks = 0;
91 
92  for (int32_t it = 0; it < maxTracks; ++it) {
93  auto nHits = helper::nHits(tsoa.const_view(), it);
94  auto nLayers = tsoa.view()[it].nLayers();
95  if (nHits == 0)
96  break; // this is a guard
97  float pt = tsoa.view()[it].pt();
98  if (!(pt > 0.))
99  continue;
100 
101  // fill the quality for all tracks
103  hquality->Fill(int(qual));
104  nTracks++;
105 
107  continue;
108 
109  // fill parameters only for quality >= loose
110  float chi2 = tsoa.view()[it].chi2();
111  float phi = helper::phi(tsoa.const_view(), it);
112  float zip = helper::zip(tsoa.const_view(), it);
113  float eta = tsoa.view()[it].eta();
114  float tip = helper::tip(tsoa.const_view(), it);
115 
116  hchi2->Fill(chi2);
117  hChi2VsPhi->Fill(phi, chi2);
118  hChi2VsEta->Fill(eta, chi2);
119  hnHits->Fill(nHits);
125  hpt->Fill(pt);
126  heta->Fill(eta);
127  hphi->Fill(phi);
128  hz->Fill(zip);
129  htip->Fill(tip);
130  nLooseAndAboveTracks++;
131  }
133  hnLooseAndAboveTracks->Fill(nLooseAndAboveTracks);
134 }
Definition: helper.py:1
pixelTrack::Quality minQuality_
ALPAKA_FN_HOST_ACC ALPAKA_FN_INLINE constexpr float zip(ConstView const &tracks, int32_t i)
Definition: TracksSoA.h:90
edm::EDGetTokenT< PixelTrackHeterogeneous > tokenSoATrack_
void Fill(long long x)
string quality
int iEvent
Definition: GenABIO.cc:224
maxTracks
Definition: DMR_cfg.py:158
MonitorElement * hnLooseAndAboveTracks
Log< level::Warning, false > LogWarning
TupleMultiplicity< TrackerTraits > const *__restrict__ uint32_t nHits

◆ bookHistograms()

template<typename T >
void SiPixelMonitorTrackSoA< T >::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  iRun,
edm::EventSetup const &  iSetup 
)
override

Definition at line 140 of file SiPixelMonitorTrackSoA.cc.

References dqm::implementation::IBooker::book1D(), dqm::implementation::IBooker::bookProfile(), dqm::implementation::NavigatorBase::cd(), mps_fire::i, M_PI, submitPVResolutionJobs::q, pixelTrack::qualityName, dqm::implementation::NavigatorBase::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, and parallelization::uint.

142  {
143  iBook.cd();
144  iBook.setCurrentFolder(topFolderName_);
145 
146  // clang-format off
147  std::string toRep = "Number of tracks";
148  hnTracks = iBook.book1D("nTracks", fmt::sprintf(";%s per event;#events",toRep), 1001, -0.5, 1000.5);
149  hnLooseAndAboveTracks = iBook.book1D("nLooseAndAboveTracks", fmt::sprintf(";%s (quality #geq loose) per event;#events",toRep), 1001, -0.5, 1000.5);
150 
151  toRep = "Number of all RecHits per track (quality #geq loose)";
152  hnHits = iBook.book1D("nRecHits", fmt::sprintf(";%s;#tracks",toRep), 15, -0.5, 14.5);
153  hnHitsVsPhi = iBook.bookProfile("nHitsPerTrackVsPhi", fmt::sprintf("%s vs track #phi;Track #phi;%s",toRep,toRep), 30, -M_PI, M_PI,0., 15.);
154  hnHitsVsEta = iBook.bookProfile("nHitsPerTrackVsEta", fmt::sprintf("%s vs track #eta;Track #eta;%s",toRep,toRep), 30, -3., 3., 0., 15.);
155 
156  toRep = "Number of all layers per track (quality #geq loose)";
157  hnLayers = iBook.book1D("nLayers", fmt::sprintf(";%s;#tracks",toRep), 15, -0.5, 14.5);
158  hnLayersVsPhi = iBook.bookProfile("nLayersPerTrackVsPhi", fmt::sprintf("%s vs track #phi;Track #phi;%s",toRep,toRep), 30, -M_PI, M_PI,0., 15.);
159  hnLayersVsEta = iBook.bookProfile("nLayersPerTrackVsEta", fmt::sprintf("%s vs track #eta;Track #eta;%s",toRep,toRep), 30, -3., 3., 0., 15.);
160 
161  toRep = "Track (quality #geq loose) #chi^{2}/ndof";
162  hchi2 = iBook.book1D("nChi2ndof", fmt::sprintf(";%s;#tracks",toRep), 40, 0., 20.);
163  hChi2VsPhi = iBook.bookProfile("nChi2ndofVsPhi", fmt::sprintf("%s vs track #phi;Track #phi;%s",toRep,toRep), 30, -M_PI, M_PI, 0., 20.);
164  hChi2VsEta = iBook.bookProfile("nChi2ndofVsEta", fmt::sprintf("%s vs track #eta;Track #eta;%s",toRep,toRep), 30, -3., 3., 0., 20.);
165  // clang-format on
166 
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);
173  uint i = 1;
174  for (const auto& q : pixelTrack::qualityName) {
175  hquality->setBinLabel(i, q, 1);
176  i++;
177  }
178 }
const std::string qualityName[qualitySize]
virtual void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
#define M_PI
MonitorElement * hnLooseAndAboveTracks

◆ fillDescriptions()

template<typename T >
void SiPixelMonitorTrackSoA< T >::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 181 of file SiPixelMonitorTrackSoA.cc.

References edm::ConfigurationDescriptions::addWithDefaultLabel(), submitPVResolutionJobs::desc, ProducerED_cfi::InputTag, and AlCaHLTBitMon_QueryRunRegistry::string.

181  {
182  // monitorpixelTrackSoA
184  desc.add<edm::InputTag>("pixelTrackSrc", edm::InputTag("pixelTracksSoA"));
185  desc.add<std::string>("topFolderName", "SiPixelHeterogeneous/PixelTrackSoA");
186  desc.add<bool>("useQualityCut", true);
187  desc.add<std::string>("minQuality", "loose");
188  descriptions.addWithDefaultLabel(desc);
189 }
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)

Member Data Documentation

◆ hchi2

template<typename T >
MonitorElement* SiPixelMonitorTrackSoA< T >::hchi2
private

Definition at line 51 of file SiPixelMonitorTrackSoA.cc.

◆ hChi2VsEta

template<typename T >
MonitorElement* SiPixelMonitorTrackSoA< T >::hChi2VsEta
private

Definition at line 53 of file SiPixelMonitorTrackSoA.cc.

◆ hChi2VsPhi

template<typename T >
MonitorElement* SiPixelMonitorTrackSoA< T >::hChi2VsPhi
private

Definition at line 52 of file SiPixelMonitorTrackSoA.cc.

◆ heta

template<typename T >
MonitorElement* SiPixelMonitorTrackSoA< T >::heta
private

Definition at line 55 of file SiPixelMonitorTrackSoA.cc.

◆ hnHits

template<typename T >
MonitorElement* SiPixelMonitorTrackSoA< T >::hnHits
private

Definition at line 45 of file SiPixelMonitorTrackSoA.cc.

◆ hnHitsVsEta

template<typename T >
MonitorElement* SiPixelMonitorTrackSoA< T >::hnHitsVsEta
private

Definition at line 47 of file SiPixelMonitorTrackSoA.cc.

◆ hnHitsVsPhi

template<typename T >
MonitorElement* SiPixelMonitorTrackSoA< T >::hnHitsVsPhi
private

Definition at line 46 of file SiPixelMonitorTrackSoA.cc.

◆ hnLayers

template<typename T >
MonitorElement* SiPixelMonitorTrackSoA< T >::hnLayers
private

Definition at line 48 of file SiPixelMonitorTrackSoA.cc.

◆ hnLayersVsEta

template<typename T >
MonitorElement* SiPixelMonitorTrackSoA< T >::hnLayersVsEta
private

Definition at line 50 of file SiPixelMonitorTrackSoA.cc.

◆ hnLayersVsPhi

template<typename T >
MonitorElement* SiPixelMonitorTrackSoA< T >::hnLayersVsPhi
private

Definition at line 49 of file SiPixelMonitorTrackSoA.cc.

◆ hnLooseAndAboveTracks

template<typename T >
MonitorElement* SiPixelMonitorTrackSoA< T >::hnLooseAndAboveTracks
private

Definition at line 44 of file SiPixelMonitorTrackSoA.cc.

◆ hnTracks

template<typename T >
MonitorElement* SiPixelMonitorTrackSoA< T >::hnTracks
private

Definition at line 43 of file SiPixelMonitorTrackSoA.cc.

◆ hphi

template<typename T >
MonitorElement* SiPixelMonitorTrackSoA< T >::hphi
private

Definition at line 56 of file SiPixelMonitorTrackSoA.cc.

◆ hpt

template<typename T >
MonitorElement* SiPixelMonitorTrackSoA< T >::hpt
private

Definition at line 54 of file SiPixelMonitorTrackSoA.cc.

◆ hquality

template<typename T >
MonitorElement* SiPixelMonitorTrackSoA< T >::hquality
private

Definition at line 59 of file SiPixelMonitorTrackSoA.cc.

◆ htip

template<typename T >
MonitorElement* SiPixelMonitorTrackSoA< T >::htip
private

Definition at line 58 of file SiPixelMonitorTrackSoA.cc.

◆ hz

template<typename T >
MonitorElement* SiPixelMonitorTrackSoA< T >::hz
private

Definition at line 57 of file SiPixelMonitorTrackSoA.cc.

◆ minQuality_

template<typename T >
pixelTrack::Quality SiPixelMonitorTrackSoA< T >::minQuality_
private

Definition at line 42 of file SiPixelMonitorTrackSoA.cc.

◆ tokenSoATrack_

template<typename T >
edm::EDGetTokenT<PixelTrackHeterogeneous> SiPixelMonitorTrackSoA< T >::tokenSoATrack_
private

Definition at line 39 of file SiPixelMonitorTrackSoA.cc.

◆ topFolderName_

template<typename T >
std::string SiPixelMonitorTrackSoA< T >::topFolderName_
private

Definition at line 40 of file SiPixelMonitorTrackSoA.cc.

◆ useQualityCut_

template<typename T >
bool SiPixelMonitorTrackSoA< T >::useQualityCut_
private

Definition at line 41 of file SiPixelMonitorTrackSoA.cc.