CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Attributes
SiPixelPhase1MonitorRecHitsSoA Class Reference

bookLayer More...

#include <SiPixelPhase1MonitorRecHitsSoA.cc>

Inheritance diagram for SiPixelPhase1MonitorRecHitsSoA:

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
 
void dqmBeginRun (const edm::Run &, const edm::EventSetup &) override
 
 SiPixelPhase1MonitorRecHitsSoA (const edm::ParameterSet &)
 
 ~SiPixelPhase1MonitorRecHitsSoA () override=default
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Private Attributes

const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecordgeomToken_
 
MonitorElementhBcharge
 
MonitorElementhBchargeL [4]
 
MonitorElementhBFposZP
 
MonitorElementhBFposZR
 
MonitorElementhBposXY
 
MonitorElementhBposZP
 
MonitorElementhBposZPL [4]
 
MonitorElementhBsizex
 
MonitorElementhBsizexL [4]
 
MonitorElementhBsizey
 
MonitorElementhBsizeyL [4]
 
MonitorElementhFcharge
 
MonitorElementhFchargeD [2][12]
 
MonitorElementhFposXY
 
MonitorElementhFposXYD [2][12]
 
MonitorElementhFposZP
 
MonitorElementhFsizex
 
MonitorElementhFsizexD [2][12]
 
MonitorElementhFsizey
 
MonitorElementhFsizeyD [2][12]
 
MonitorElementhnHits
 
const TrackerGeometrytkGeom_ = nullptr
 
const edm::EDGetTokenT< TrackingRecHit2DCPUtokenSoAHitsCPU_
 
const std::string topFolderName_
 
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcdtopoToken_
 
const TrackerTopologytTopo_ = nullptr
 

Detailed Description

bookLayer

Definition at line 31 of file SiPixelPhase1MonitorRecHitsSoA.cc.

Constructor & Destructor Documentation

◆ SiPixelPhase1MonitorRecHitsSoA()

SiPixelPhase1MonitorRecHitsSoA::SiPixelPhase1MonitorRecHitsSoA ( const edm::ParameterSet iConfig)
explicit

Definition at line 74 of file SiPixelPhase1MonitorRecHitsSoA.cc.

75  : geomToken_(esConsumes<TrackerGeometry, TrackerDigiGeometryRecord, edm::Transition::BeginRun>()),
76  topoToken_(esConsumes<TrackerTopology, TrackerTopologyRcd, edm::Transition::BeginRun>()),
77  tokenSoAHitsCPU_(consumes<TrackingRecHit2DCPU>(iConfig.getParameter<edm::InputTag>("pixelHitsSrc"))),
78  topFolderName_(iConfig.getParameter<std::string>("TopFolderName")) {}
const edm::EDGetTokenT< TrackingRecHit2DCPU > tokenSoAHitsCPU_
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > geomToken_
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > topoToken_

◆ ~SiPixelPhase1MonitorRecHitsSoA()

SiPixelPhase1MonitorRecHitsSoA::~SiPixelPhase1MonitorRecHitsSoA ( )
overridedefault

Member Function Documentation

◆ analyze()

void SiPixelPhase1MonitorRecHitsSoA::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
override

Definition at line 90 of file SiPixelPhase1MonitorRecHitsSoA.cc.

References funct::abs(), reco::ceil(), ALCARECOTkAlJpsiMuMu_cff::charge, TrackerGeometry::detUnitIds(), dqm::impl::MonitorElement::Fill(), hBcharge, hBchargeL, hBFposZP, hBFposZR, hBposXY, hBposZP, hBposZPL, hBsizex, hBsizexL, hBsizey, hBsizeyL, hFcharge, hFchargeD, hFposXY, hFposXYD, hFposZP, hFsizex, hFsizexD, hFsizey, hFsizeyD, hnHits, mps_fire::i, iEvent, PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, TrackerTopology::pxbLayer(), TrackerTopology::pxfDisk(), TrackerTopology::pxfSide(), short2phi(), RecoTauValidation_cfi::sizeX, RecoTauValidation_cfi::sizeY, tkGeom_, tokenSoAHitsCPU_, and tTopo_.

90  {
91  const auto& rhsoaHandle = iEvent.getHandle(tokenSoAHitsCPU_);
92  if (!rhsoaHandle.isValid()) {
93  edm::LogWarning("SiPixelPhase1MonitorRecHitsSoA") << "No RecHits SoA found \n returning!" << std::endl;
94  return;
95  }
96  auto const& rhsoa = *rhsoaHandle;
97  const TrackingRecHit2DSOAView* soa2d = rhsoa.view();
98 
99  uint32_t nHits_ = soa2d->nHits();
100  hnHits->Fill(nHits_);
101  auto detIds = tkGeom_->detUnitIds();
102  for (uint32_t i = 0; i < nHits_; i++) {
103  DetId id = detIds[soa2d->detectorIndex(i)];
104  float xG = soa2d->xGlobal(i);
105  float yG = soa2d->yGlobal(i);
106  float zG = soa2d->zGlobal(i);
107  float rG = soa2d->rGlobal(i);
108  float fphi = short2phi(soa2d->iphi(i));
109  uint32_t charge = soa2d->charge(i);
110  int16_t sizeX = std::ceil(float(std::abs(soa2d->clusterSizeX(i)) / 8.));
111  int16_t sizeY = std::ceil(float(std::abs(soa2d->clusterSizeY(i)) / 8.));
112  hBFposZP->Fill(zG, fphi);
113  int16_t ysign = yG >= 0 ? 1 : -1;
114  hBFposZR->Fill(zG, rG * ysign);
115  switch (id.subdetId()) {
117  hBposXY->Fill(xG, yG);
118  hBposZP->Fill(zG, fphi);
119  hBcharge->Fill(charge);
120  hBsizex->Fill(sizeX);
121  hBsizey->Fill(sizeY);
122  hBposZPL[tTopo_->pxbLayer(id) - 1]->Fill(zG, fphi);
123  hBchargeL[tTopo_->pxbLayer(id) - 1]->Fill(charge);
124  hBsizexL[tTopo_->pxbLayer(id) - 1]->Fill(sizeX);
125  hBsizeyL[tTopo_->pxbLayer(id) - 1]->Fill(sizeY);
126  break;
128  hFposXY->Fill(xG, yG);
129  hFposZP->Fill(zG, fphi);
130  hFcharge->Fill(charge);
131  hFsizex->Fill(sizeX);
132  hFsizey->Fill(sizeY);
133  hFposXYD[tTopo_->pxfSide(id) - 1][tTopo_->pxfDisk(id) - 1]->Fill(xG, yG);
134  hFchargeD[tTopo_->pxfSide(id) - 1][tTopo_->pxfDisk(id) - 1]->Fill(charge);
135  hFsizexD[tTopo_->pxfSide(id) - 1][tTopo_->pxfDisk(id) - 1]->Fill(sizeX);
136  hFsizeyD[tTopo_->pxfSide(id) - 1][tTopo_->pxfDisk(id) - 1]->Fill(sizeY);
137  break;
138  }
139  }
140 }
const edm::EDGetTokenT< TrackingRecHit2DCPU > tokenSoAHitsCPU_
constexpr int32_t ceil(float num)
unsigned int pxbLayer(const DetId &id) const
void Fill(long long x)
int iEvent
Definition: GenABIO.cc:224
unsigned int pxfDisk(const DetId &id) const
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
Definition: DetId.h:17
unsigned int pxfSide(const DetId &id) const
constexpr float short2phi(short x)
Definition: approx_atan2.h:285
Log< level::Warning, false > LogWarning
const DetIdContainer & detUnitIds() const override
Returm a vector of all GeomDetUnit DetIds.

◆ bookHistograms()

void SiPixelPhase1MonitorRecHitsSoA::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  iRun,
edm::EventSetup const &  iSetup 
)
override

Definition at line 145 of file SiPixelPhase1MonitorRecHitsSoA.cc.

References dqm::implementation::IBooker::book1D(), dqm::implementation::IBooker::book2D(), dqm::implementation::NavigatorBase::cd(), hBcharge, hBchargeL, hBFposZP, hBFposZR, hBposXY, hBposZP, hBposZPL, hBsizex, hBsizexL, hBsizey, hBsizeyL, hFcharge, hFchargeD, hFposXY, hFposXYD, hFposZP, hFsizex, hFsizexD, hFsizey, hFsizeyD, hnHits, l1ctLayer2EG_cff::id, TrackerGeometry::numberOfLayers(), PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, dqm::implementation::NavigatorBase::setCurrentFolder(), Validation_hcalonly_cfi::sign, tkGeom_, and topFolderName_.

147  {
148  iBook.cd();
149  iBook.setCurrentFolder(topFolderName_);
150 
151  // clang-format off
152  //Global
153  hnHits = iBook.book1D("nHits", "RecHits per event;RecHits;#events", 200, 0, 5000);
154  hBFposZP = iBook.book2D("recHitsGlobalPosZP", "RecHits position Global;Z;#phi", 1000, -60, 60, 200,-3.2,3.2);
155  hBFposZR = iBook.book2D("recHitsGlobalPosZR", "RecHits position Global;Z;R", 1000, -60, 60, 200,-20,20);
156  //Barrel
157  hBposXY = iBook.book2D("recHitsBarrelPosXY", "RecHits position Barrel;X;Y", 200, -20, 20, 200,-20,20);
158  hBposZP = iBook.book2D("recHitsBarrelPosZP", "RecHits position Barrel;Z;#phi", 300, -30, 30, 200,-3.2,3.2);
159  hBcharge = iBook.book1D("recHitsBarrelCharge", "RecHits Charge Barrel;Charge;#events", 250, 0, 100000);
160  hBsizex = iBook.book1D("recHitsBarrelSizex", "RecHits SizeX Barrel;SizeX;#events", 50, 0, 50);
161  hBsizey = iBook.book1D("recHitsBarrelSizey", "RecHits SizeY Barrel;SizeY;#events", 50, 0, 50);
162  //Barrel Layer
163  for(unsigned int il=0;il<tkGeom_->numberOfLayers(PixelSubdetector::PixelBarrel);il++){
164  hBposZPL[il] = iBook.book2D(Form("recHitsBLay%dPosZP",il+1), Form("RecHits position Barrel Layer%d;Z;#phi",il+1), 300, -30, 30, 200,-3.2,3.2);
165  hBchargeL[il] = iBook.book1D(Form("recHitsBLay%dCharge",il+1), Form("RecHits Charge Barrel Layer%d;Charge;#events",il+1), 250, 0, 100000);
166  hBsizexL[il] = iBook.book1D(Form("recHitsBLay%dSizex",il+1), Form("RecHits SizeX Barrel Layer%d;SizeX;#events",il+1), 50, 0, 50);
167  hBsizeyL[il] = iBook.book1D(Form("recHitsBLay%dSizey",il+1), Form("RecHits SizeY Barrel Layer%d;SizeY;#events",il+1), 50, 0, 50);
168  }
169  //Endcaps
170  hFposXY = iBook.book2D("recHitsEndcapsPosXY", "RecHits position Endcaps;X;Y", 200, -20, 20, 200,-20, 20);
171  hFposZP = iBook.book2D("recHitsEndcapsPosZP", "RecHits position Endcaps;Z;#phi", 600, -60, 60, 200,-3.2,3.2);
172  hFcharge = iBook.book1D("recHitsEndcapsCharge", "RecHits Charge Endcaps;Charge;#events", 250, 0, 100000);
173  hFsizex = iBook.book1D("recHitsEndcapsSizex", "RecHits SizeX Endcaps;SizeX;#events", 50, 0, 50);
174  hFsizey = iBook.book1D("recHitsEndcapsSizey", "RecHits SizeY Endcaps;SizeY;#events", 50, 0, 50);
175  //Endcaps Disk
176  for(int is=0;is<2;is++){
177  int sign=is==0? -1:1;
178  for(unsigned int id=0;id<tkGeom_->numberOfLayers(PixelSubdetector::PixelEndcap);id++){
179  hFposXYD[is][id] = iBook.book2D(Form("recHitsFDisk%+dPosXY",id*sign+sign), Form("RecHits position Endcaps Disk%+d;X;Y",id*sign+sign), 200, -20, 20, 200,-20,20);
180  hFchargeD[is][id] = iBook.book1D(Form("recHitsFDisk%+dCharge",id*sign+sign), Form("RecHits Charge Endcaps Disk%+d;Charge;#events",id*sign+sign), 250, 0, 100000);
181  hFsizexD[is][id] = iBook.book1D(Form("recHitsFDisk%+dSizex",id*sign+sign), Form("RecHits SizeX Endcaps Disk%+d;SizeX;#events",id*sign+sign), 50, 0, 50);
182  hFsizeyD[is][id] = iBook.book1D(Form("recHitsFDisk%+dSizey",id*sign+sign), Form("RecHits SizeY Endcaps Disk%+d;SizeY;#events",id*sign+sign), 50, 0, 50);
183  }
184  }
185 }
unsigned int numberOfLayers(int subdet) const

◆ dqmBeginRun()

void SiPixelPhase1MonitorRecHitsSoA::dqmBeginRun ( const edm::Run iRun,
const edm::EventSetup iSetup 
)
override

Definition at line 82 of file SiPixelPhase1MonitorRecHitsSoA.cc.

References geomToken_, edm::EventSetup::getData(), tkGeom_, topoToken_, and tTopo_.

82  {
83  tkGeom_ = &iSetup.getData(geomToken_);
84  tTopo_ = &iSetup.getData(topoToken_);
85 }
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > geomToken_
bool getData(T &iHolder) const
Definition: EventSetup.h:122
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > topoToken_

◆ fillDescriptions()

void SiPixelPhase1MonitorRecHitsSoA::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 187 of file SiPixelPhase1MonitorRecHitsSoA.cc.

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

187  {
188  // monitorpixelRecHitsSoA
190  desc.add<edm::InputTag>("pixelHitsSrc", edm::InputTag("siPixelRecHitsPreSplittingSoA"));
191  desc.add<std::string>("TopFolderName", "SiPixelHeterogeneous/PixelRecHitsSoA");
192  descriptions.addWithDefaultLabel(desc);
193 }
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)

Member Data Documentation

◆ geomToken_

const edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> SiPixelPhase1MonitorRecHitsSoA::geomToken_
private

Definition at line 41 of file SiPixelPhase1MonitorRecHitsSoA.cc.

Referenced by dqmBeginRun().

◆ hBcharge

MonitorElement* SiPixelPhase1MonitorRecHitsSoA::hBcharge
private

Definition at line 52 of file SiPixelPhase1MonitorRecHitsSoA.cc.

Referenced by analyze(), and bookHistograms().

◆ hBchargeL

MonitorElement* SiPixelPhase1MonitorRecHitsSoA::hBchargeL[4]
private

Definition at line 56 of file SiPixelPhase1MonitorRecHitsSoA.cc.

Referenced by analyze(), and bookHistograms().

◆ hBFposZP

MonitorElement* SiPixelPhase1MonitorRecHitsSoA::hBFposZP
private

Definition at line 48 of file SiPixelPhase1MonitorRecHitsSoA.cc.

Referenced by analyze(), and bookHistograms().

◆ hBFposZR

MonitorElement* SiPixelPhase1MonitorRecHitsSoA::hBFposZR
private

Definition at line 49 of file SiPixelPhase1MonitorRecHitsSoA.cc.

Referenced by analyze(), and bookHistograms().

◆ hBposXY

MonitorElement* SiPixelPhase1MonitorRecHitsSoA::hBposXY
private

Definition at line 50 of file SiPixelPhase1MonitorRecHitsSoA.cc.

Referenced by analyze(), and bookHistograms().

◆ hBposZP

MonitorElement* SiPixelPhase1MonitorRecHitsSoA::hBposZP
private

Definition at line 51 of file SiPixelPhase1MonitorRecHitsSoA.cc.

Referenced by analyze(), and bookHistograms().

◆ hBposZPL

MonitorElement* SiPixelPhase1MonitorRecHitsSoA::hBposZPL[4]
private

Definition at line 55 of file SiPixelPhase1MonitorRecHitsSoA.cc.

Referenced by analyze(), and bookHistograms().

◆ hBsizex

MonitorElement* SiPixelPhase1MonitorRecHitsSoA::hBsizex
private

Definition at line 53 of file SiPixelPhase1MonitorRecHitsSoA.cc.

Referenced by analyze(), and bookHistograms().

◆ hBsizexL

MonitorElement* SiPixelPhase1MonitorRecHitsSoA::hBsizexL[4]
private

Definition at line 57 of file SiPixelPhase1MonitorRecHitsSoA.cc.

Referenced by analyze(), and bookHistograms().

◆ hBsizey

MonitorElement* SiPixelPhase1MonitorRecHitsSoA::hBsizey
private

Definition at line 54 of file SiPixelPhase1MonitorRecHitsSoA.cc.

Referenced by analyze(), and bookHistograms().

◆ hBsizeyL

MonitorElement* SiPixelPhase1MonitorRecHitsSoA::hBsizeyL[4]
private

Definition at line 58 of file SiPixelPhase1MonitorRecHitsSoA.cc.

Referenced by analyze(), and bookHistograms().

◆ hFcharge

MonitorElement* SiPixelPhase1MonitorRecHitsSoA::hFcharge
private

Definition at line 61 of file SiPixelPhase1MonitorRecHitsSoA.cc.

Referenced by analyze(), and bookHistograms().

◆ hFchargeD

MonitorElement* SiPixelPhase1MonitorRecHitsSoA::hFchargeD[2][12]
private

Definition at line 65 of file SiPixelPhase1MonitorRecHitsSoA.cc.

Referenced by analyze(), and bookHistograms().

◆ hFposXY

MonitorElement* SiPixelPhase1MonitorRecHitsSoA::hFposXY
private

Definition at line 59 of file SiPixelPhase1MonitorRecHitsSoA.cc.

Referenced by analyze(), and bookHistograms().

◆ hFposXYD

MonitorElement* SiPixelPhase1MonitorRecHitsSoA::hFposXYD[2][12]
private

Definition at line 64 of file SiPixelPhase1MonitorRecHitsSoA.cc.

Referenced by analyze(), and bookHistograms().

◆ hFposZP

MonitorElement* SiPixelPhase1MonitorRecHitsSoA::hFposZP
private

Definition at line 60 of file SiPixelPhase1MonitorRecHitsSoA.cc.

Referenced by analyze(), and bookHistograms().

◆ hFsizex

MonitorElement* SiPixelPhase1MonitorRecHitsSoA::hFsizex
private

Definition at line 62 of file SiPixelPhase1MonitorRecHitsSoA.cc.

Referenced by analyze(), and bookHistograms().

◆ hFsizexD

MonitorElement* SiPixelPhase1MonitorRecHitsSoA::hFsizexD[2][12]
private

Definition at line 66 of file SiPixelPhase1MonitorRecHitsSoA.cc.

Referenced by analyze(), and bookHistograms().

◆ hFsizey

MonitorElement* SiPixelPhase1MonitorRecHitsSoA::hFsizey
private

Definition at line 63 of file SiPixelPhase1MonitorRecHitsSoA.cc.

Referenced by analyze(), and bookHistograms().

◆ hFsizeyD

MonitorElement* SiPixelPhase1MonitorRecHitsSoA::hFsizeyD[2][12]
private

Definition at line 67 of file SiPixelPhase1MonitorRecHitsSoA.cc.

Referenced by analyze(), and bookHistograms().

◆ hnHits

MonitorElement* SiPixelPhase1MonitorRecHitsSoA::hnHits
private

Definition at line 47 of file SiPixelPhase1MonitorRecHitsSoA.cc.

Referenced by analyze(), and bookHistograms().

◆ tkGeom_

const TrackerGeometry* SiPixelPhase1MonitorRecHitsSoA::tkGeom_ = nullptr
private

Definition at line 45 of file SiPixelPhase1MonitorRecHitsSoA.cc.

Referenced by analyze(), bookHistograms(), and dqmBeginRun().

◆ tokenSoAHitsCPU_

const edm::EDGetTokenT<TrackingRecHit2DCPU> SiPixelPhase1MonitorRecHitsSoA::tokenSoAHitsCPU_
private

Definition at line 43 of file SiPixelPhase1MonitorRecHitsSoA.cc.

Referenced by analyze().

◆ topFolderName_

const std::string SiPixelPhase1MonitorRecHitsSoA::topFolderName_
private

Definition at line 44 of file SiPixelPhase1MonitorRecHitsSoA.cc.

Referenced by bookHistograms().

◆ topoToken_

const edm::ESGetToken<TrackerTopology, TrackerTopologyRcd> SiPixelPhase1MonitorRecHitsSoA::topoToken_
private

Definition at line 42 of file SiPixelPhase1MonitorRecHitsSoA.cc.

Referenced by dqmBeginRun().

◆ tTopo_

const TrackerTopology* SiPixelPhase1MonitorRecHitsSoA::tTopo_ = nullptr
private

Definition at line 46 of file SiPixelPhase1MonitorRecHitsSoA.cc.

Referenced by analyze(), and dqmBeginRun().