CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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,
TrackerDigiGeometryRecord
geomToken_
 
MonitorElementhBcharge
 
MonitorElementhBchargeL [4]
 
MonitorElementhBFposZP
 
MonitorElementhBFposZR
 
MonitorElementhBposXY
 
MonitorElementhBposXYL [4]
 
MonitorElementhBposZP
 
MonitorElementhBposZPL [4]
 
MonitorElementhBsizex
 
MonitorElementhBsizexL [4]
 
MonitorElementhBsizey
 
MonitorElementhBsizeyL [4]
 
MonitorElementhFcharge
 
MonitorElementhFchargeD [2][3]
 
MonitorElementhFposXY
 
MonitorElementhFposXYD [2][3]
 
MonitorElementhFposZP
 
MonitorElementhFposZPD [2][3]
 
MonitorElementhFsizex
 
MonitorElementhFsizexD [2][3]
 
MonitorElementhFsizey
 
MonitorElementhFsizeyD [2][3]
 
MonitorElementhnHits
 
const TrackerGeometrytkGeom_ = nullptr
 
const edm::EDGetTokenT
< TrackingRecHit2DCPU
tokenSoAHitsCPU_
 
const std::string topFolderName_
 
const edm::ESGetToken
< TrackerTopology,
TrackerTopologyRcd
topoToken_
 
const TrackerTopologytTopo_ = nullptr
 

Detailed Description

bookLayer

Definition at line 31 of file SiPixelPhase1MonitorRecHitsSoA.cc.

Constructor & Destructor Documentation

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

Definition at line 76 of file SiPixelPhase1MonitorRecHitsSoA.cc.

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

Member Function Documentation

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

Definition at line 92 of file SiPixelPhase1MonitorRecHitsSoA.cc.

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

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

Definition at line 149 of file SiPixelPhase1MonitorRecHitsSoA.cc.

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

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

Definition at line 84 of file SiPixelPhase1MonitorRecHitsSoA.cc.

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

84  {
85  tkGeom_ = &iSetup.getData(geomToken_);
86  tTopo_ = &iSetup.getData(topoToken_);
87 }
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > geomToken_
bool getData(T &iHolder) const
Definition: EventSetup.h:122
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > topoToken_
void SiPixelPhase1MonitorRecHitsSoA::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 193 of file SiPixelPhase1MonitorRecHitsSoA.cc.

References edm::ParameterSetDescription::add(), edm::ConfigurationDescriptions::addWithDefaultLabel(), submitPVResolutionJobs::desc, HLT_FULL_cff::InputTag, and AlCaHLTBitMon_QueryRunRegistry::string.

193  {
194  // monitorpixelRecHitsSoA
196  desc.add<edm::InputTag>("pixelHitsSrc", edm::InputTag("siPixelRecHitsPreSplitting"));
197  desc.add<std::string>("TopFolderName", "SiPixelHeterogeneous/PixelRecHitsSoA");
198  descriptions.addWithDefaultLabel(desc);
199 }
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
ParameterDescriptionBase * add(U const &iLabel, T const &value)

Member Data Documentation

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

Definition at line 41 of file SiPixelPhase1MonitorRecHitsSoA.cc.

Referenced by dqmBeginRun().

MonitorElement* SiPixelPhase1MonitorRecHitsSoA::hBcharge
private

Definition at line 52 of file SiPixelPhase1MonitorRecHitsSoA.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* SiPixelPhase1MonitorRecHitsSoA::hBchargeL[4]
private

Definition at line 57 of file SiPixelPhase1MonitorRecHitsSoA.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* SiPixelPhase1MonitorRecHitsSoA::hBFposZP
private

Definition at line 48 of file SiPixelPhase1MonitorRecHitsSoA.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* SiPixelPhase1MonitorRecHitsSoA::hBFposZR
private

Definition at line 49 of file SiPixelPhase1MonitorRecHitsSoA.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* SiPixelPhase1MonitorRecHitsSoA::hBposXY
private

Definition at line 50 of file SiPixelPhase1MonitorRecHitsSoA.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* SiPixelPhase1MonitorRecHitsSoA::hBposXYL[4]
private

Definition at line 55 of file SiPixelPhase1MonitorRecHitsSoA.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* SiPixelPhase1MonitorRecHitsSoA::hBposZP
private

Definition at line 51 of file SiPixelPhase1MonitorRecHitsSoA.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* SiPixelPhase1MonitorRecHitsSoA::hBposZPL[4]
private

Definition at line 56 of file SiPixelPhase1MonitorRecHitsSoA.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* SiPixelPhase1MonitorRecHitsSoA::hBsizex
private

Definition at line 53 of file SiPixelPhase1MonitorRecHitsSoA.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* SiPixelPhase1MonitorRecHitsSoA::hBsizexL[4]
private

Definition at line 58 of file SiPixelPhase1MonitorRecHitsSoA.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* SiPixelPhase1MonitorRecHitsSoA::hBsizey
private

Definition at line 54 of file SiPixelPhase1MonitorRecHitsSoA.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* SiPixelPhase1MonitorRecHitsSoA::hBsizeyL[4]
private

Definition at line 59 of file SiPixelPhase1MonitorRecHitsSoA.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* SiPixelPhase1MonitorRecHitsSoA::hFcharge
private

Definition at line 62 of file SiPixelPhase1MonitorRecHitsSoA.cc.

Referenced by analyze(), and bookHistograms().

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

Definition at line 67 of file SiPixelPhase1MonitorRecHitsSoA.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* SiPixelPhase1MonitorRecHitsSoA::hFposXY
private

Definition at line 60 of file SiPixelPhase1MonitorRecHitsSoA.cc.

Referenced by analyze(), and bookHistograms().

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

Definition at line 65 of file SiPixelPhase1MonitorRecHitsSoA.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* SiPixelPhase1MonitorRecHitsSoA::hFposZP
private

Definition at line 61 of file SiPixelPhase1MonitorRecHitsSoA.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* SiPixelPhase1MonitorRecHitsSoA::hFposZPD[2][3]
private

Definition at line 66 of file SiPixelPhase1MonitorRecHitsSoA.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* SiPixelPhase1MonitorRecHitsSoA::hFsizex
private

Definition at line 63 of file SiPixelPhase1MonitorRecHitsSoA.cc.

Referenced by analyze(), and bookHistograms().

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

Definition at line 68 of file SiPixelPhase1MonitorRecHitsSoA.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* SiPixelPhase1MonitorRecHitsSoA::hFsizey
private

Definition at line 64 of file SiPixelPhase1MonitorRecHitsSoA.cc.

Referenced by analyze(), and bookHistograms().

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

Definition at line 69 of file SiPixelPhase1MonitorRecHitsSoA.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* SiPixelPhase1MonitorRecHitsSoA::hnHits
private

Definition at line 47 of file SiPixelPhase1MonitorRecHitsSoA.cc.

Referenced by analyze(), and bookHistograms().

const TrackerGeometry* SiPixelPhase1MonitorRecHitsSoA::tkGeom_ = nullptr
private

Definition at line 45 of file SiPixelPhase1MonitorRecHitsSoA.cc.

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

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

Definition at line 43 of file SiPixelPhase1MonitorRecHitsSoA.cc.

Referenced by analyze().

const std::string SiPixelPhase1MonitorRecHitsSoA::topFolderName_
private

Definition at line 44 of file SiPixelPhase1MonitorRecHitsSoA.cc.

Referenced by bookHistograms().

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

Definition at line 42 of file SiPixelPhase1MonitorRecHitsSoA.cc.

Referenced by dqmBeginRun().

const TrackerTopology* SiPixelPhase1MonitorRecHitsSoA::tTopo_ = nullptr
private

Definition at line 46 of file SiPixelPhase1MonitorRecHitsSoA.cc.

Referenced by analyze(), and dqmBeginRun().