CMS 3D CMS Logo

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

#include <SiPixelMonitorTrackSoAAlpaka.cc>

Inheritance diagram for SiPixelMonitorTrackSoAAlpaka< T >:
DQMEDAnalyzer edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >

Public Types

using PixelTrackHeterogeneous = TracksHost< T >
 
- Public Types inherited from DQMEDAnalyzer
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 

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
 
 SiPixelMonitorTrackSoAAlpaka (const edm::ParameterSet &)
 
 ~SiPixelMonitorTrackSoAAlpaka () override=default
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &event, edm::EventSetup const &setup) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
void endLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static void globalEndJob (DQMEDAnalyzerGlobalCache const *)
 
static void globalEndLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup, LuminosityBlockContext const *context)
 
static void globalEndRunProduce (edm::Run &run, edm::EventSetup const &setup, RunContext const *context)
 
static std::unique_ptr< DQMEDAnalyzerGlobalCacheinitializeGlobalCache (edm::ParameterSet const &)
 

Private Attributes

MonitorElementhchi2
 
MonitorElementhChi2VsEta
 
MonitorElementhChi2VsPhi
 
MonitorElementhCurvature
 
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_
 

Additional Inherited Members

- Protected Member Functions inherited from DQMEDAnalyzer
uint64_t meId () const
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 
unsigned int streamId_
 

Detailed Description

template<typename T>
class SiPixelMonitorTrackSoAAlpaka< T >

Definition at line 29 of file SiPixelMonitorTrackSoAAlpaka.cc.

Member Typedef Documentation

◆ PixelTrackHeterogeneous

Definition at line 31 of file SiPixelMonitorTrackSoAAlpaka.cc.

Constructor & Destructor Documentation

◆ SiPixelMonitorTrackSoAAlpaka()

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

Definition at line 68 of file SiPixelMonitorTrackSoAAlpaka.cc.

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

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

◆ ~SiPixelMonitorTrackSoAAlpaka()

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

Member Function Documentation

◆ analyze()

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

Reimplemented from DQMEDAnalyzer.

Definition at line 79 of file SiPixelMonitorTrackSoAAlpaka.cc.

References ALCARECOTkAlJpsiMuMu_cff::charge, reco::charge(), 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, quality, qcdUeDQM_cfi::tip, and reco::zip().

79  {
80  const auto& tsoaHandle = iEvent.getHandle(tokenSoATrack_);
81  if (!tsoaHandle.isValid()) {
82  edm::LogWarning("SiPixelMonitorTrackSoAAlpaka") << "No Track SoA found \n returning!" << std::endl;
83  return;
84  }
85 
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 = tsoa.view().detIndices().size(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 
111  float chi2 = tsoa.view()[it].chi2();
112  float phi = tsoa.view()[it].state()(0); //TODO: put these numbers in enum
113  float zip = tsoa.view()[it].state()(4);
114  float eta = tsoa.view()[it].eta();
115  float tip = tsoa.view()[it].state()(1);
116  auto charge = reco::charge(tsoa.view(), it);
117 
118  hchi2->Fill(chi2);
119  hChi2VsPhi->Fill(phi, chi2);
120  hChi2VsEta->Fill(eta, chi2);
121  hnHits->Fill(nHits);
127  hpt->Fill(pt);
128  hCurvature->Fill(charge / pt);
129  heta->Fill(eta);
130  hphi->Fill(phi);
131  hz->Fill(zip);
132  htip->Fill(tip);
133  nLooseAndAboveTracks++;
134  }
136  hnLooseAndAboveTracks->Fill(nLooseAndAboveTracks);
137 }
ALPAKA_FN_HOST_ACC ALPAKA_FN_INLINE constexpr float zip(ConstView const &tracks, int32_t i)
Definition: TracksSoA.h:90
ALPAKA_FN_HOST_ACC ALPAKA_FN_INLINE constexpr float charge(ConstView const &tracks, int32_t i)
Definition: TracksSoA.h:73
void Fill(long long x)
string quality
int iEvent
Definition: GenABIO.cc:224
edm::EDGetTokenT< PixelTrackHeterogeneous > tokenSoATrack_
maxTracks
Definition: DMR_cfg.py:158
Log< level::Warning, false > LogWarning
TupleMultiplicity< TrackerTraits > const *__restrict__ uint32_t nHits

◆ bookHistograms()

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

Implements DQMEDAnalyzer.

Definition at line 143 of file SiPixelMonitorTrackSoAAlpaka.cc.

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

145  {
146  iBook.cd();
147  iBook.setCurrentFolder(topFolderName_);
148 
149  // clang-format off
150 std::string toRep = "Number of tracks";
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);
153 
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);
156 hnHitsVsPhi = iBook.bookProfile("nHitsPerTrackVsPhi", fmt::format("{} vs track #phi;Track #phi;{}",toRep,toRep), 30, -M_PI, M_PI,0., 15.);
157 hnHitsVsEta = iBook.bookProfile("nHitsPerTrackVsEta", fmt::format("{} vs track #eta;Track #eta;{}",toRep,toRep), 30, -3., 3., 0., 15.);
158 
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);
161 hnLayersVsPhi = iBook.bookProfile("nLayersPerTrackVsPhi", fmt::format("{} vs track #phi;Track #phi;{}",toRep,toRep), 30, -M_PI, M_PI,0., 15.);
162 hnLayersVsEta = iBook.bookProfile("nLayersPerTrackVsEta", fmt::format("{} vs track #eta;Track #eta;{}",toRep,toRep), 30, -3., 3., 0., 15.);
163 
164 toRep = "Track (quality #geq loose) #chi^{2}/ndof";
165 hchi2 = iBook.book1D("nChi2ndof", fmt::format(";{};#tracks",toRep), 40, 0., 20.);
166 hChi2VsPhi = iBook.bookProfile("nChi2ndofVsPhi", fmt::format("{} vs track #phi;Track #phi;{}",toRep,toRep), 30, -M_PI, M_PI, 0., 20.);
167 hChi2VsEta = iBook.bookProfile("nChi2ndofVsEta", fmt::format("{} vs track #eta;Track #eta;{}",toRep,toRep), 30, -3., 3., 0., 20.);
168  // clang-format on
169 
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);
177  uint i = 1;
178  for (const auto& q : pixelTrack::qualityName) {
179  hquality->setBinLabel(i, q.data(), 1);
180  i++;
181  }
182 }
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

◆ fillDescriptions()

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

Definition at line 185 of file SiPixelMonitorTrackSoAAlpaka.cc.

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

185  {
186  // monitorpixelTrackSoA
188  desc.add<edm::InputTag>("pixelTrackSrc", edm::InputTag("pixelTracksAlpaka"));
189  desc.add<std::string>("topFolderName", "SiPixelHeterogeneous/PixelTrackAlpaka");
190  desc.add<bool>("useQualityCut", true);
191  desc.add<std::string>("minQuality", "loose");
192  descriptions.addWithDefaultLabel(desc);
193 }
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)

Member Data Documentation

◆ hchi2

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

Definition at line 51 of file SiPixelMonitorTrackSoAAlpaka.cc.

◆ hChi2VsEta

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

Definition at line 53 of file SiPixelMonitorTrackSoAAlpaka.cc.

◆ hChi2VsPhi

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

Definition at line 52 of file SiPixelMonitorTrackSoAAlpaka.cc.

◆ hCurvature

template<typename T >
MonitorElement* SiPixelMonitorTrackSoAAlpaka< T >::hCurvature
private

Definition at line 55 of file SiPixelMonitorTrackSoAAlpaka.cc.

◆ heta

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

Definition at line 56 of file SiPixelMonitorTrackSoAAlpaka.cc.

◆ hnHits

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

Definition at line 45 of file SiPixelMonitorTrackSoAAlpaka.cc.

◆ hnHitsVsEta

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

Definition at line 47 of file SiPixelMonitorTrackSoAAlpaka.cc.

◆ hnHitsVsPhi

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

Definition at line 46 of file SiPixelMonitorTrackSoAAlpaka.cc.

◆ hnLayers

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

Definition at line 48 of file SiPixelMonitorTrackSoAAlpaka.cc.

◆ hnLayersVsEta

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

Definition at line 50 of file SiPixelMonitorTrackSoAAlpaka.cc.

◆ hnLayersVsPhi

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

Definition at line 49 of file SiPixelMonitorTrackSoAAlpaka.cc.

◆ hnLooseAndAboveTracks

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

Definition at line 44 of file SiPixelMonitorTrackSoAAlpaka.cc.

◆ hnTracks

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

Definition at line 43 of file SiPixelMonitorTrackSoAAlpaka.cc.

◆ hphi

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

Definition at line 57 of file SiPixelMonitorTrackSoAAlpaka.cc.

◆ hpt

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

Definition at line 54 of file SiPixelMonitorTrackSoAAlpaka.cc.

◆ hquality

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

Definition at line 60 of file SiPixelMonitorTrackSoAAlpaka.cc.

◆ htip

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

Definition at line 59 of file SiPixelMonitorTrackSoAAlpaka.cc.

◆ hz

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

Definition at line 58 of file SiPixelMonitorTrackSoAAlpaka.cc.

◆ minQuality_

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

Definition at line 42 of file SiPixelMonitorTrackSoAAlpaka.cc.

◆ tokenSoATrack_

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

Definition at line 39 of file SiPixelMonitorTrackSoAAlpaka.cc.

◆ topFolderName_

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

Definition at line 40 of file SiPixelMonitorTrackSoAAlpaka.cc.

◆ useQualityCut_

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

Definition at line 41 of file SiPixelMonitorTrackSoAAlpaka.cc.