78 topFolderName_(iConfig.getParameter<
std::
string>(
"TopFolderName")) {}
92 if (!rhsoaHandle.isValid()) {
93 edm::LogWarning(
"SiPixelPhase1MonitorRecHitsSoA") <<
"No RecHits SoA found \n returning!" << std::endl;
96 auto const& rhsoa = *rhsoaHandle;
99 uint32_t nHits_ = soa2d->nHits();
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);
109 uint32_t
charge = soa2d->charge(
i);
113 int16_t ysign = yG >= 0 ? 1 : -1;
115 switch (
id.subdetId()) {
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);
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);
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);
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);
176 for(
int is=0;is<2;is++){
177 int sign=is==0? -1:1;
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);
191 desc.add<
std::string>(
"TopFolderName",
"SiPixelHeterogeneous/PixelRecHitsSoA");
const edm::EDGetTokenT< TrackingRecHit2DCPU > tokenSoAHitsCPU_
constexpr int32_t ceil(float num)
MonitorElement * hFsizeyD[2][3]
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
unsigned int pxbLayer(const DetId &id) const
MonitorElement * hFchargeD[2][3]
virtual void setCurrentFolder(std::string const &fullpath)
unsigned int numberOfLayers(int subdet) const
MonitorElement * hBsizeyL[4]
#define DEFINE_FWK_MODULE(type)
const TrackerGeometry * tkGeom_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void bookHistograms(DQMStore::IBooker &ibooker, edm::Run const &iRun, edm::EventSetup const &iSetup) override
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > geomToken_
MonitorElement * hBFposZP
MonitorElement * hBsizexL[4]
void analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup) override
MonitorElement * hBchargeL[4]
MonitorElement * hFsizexD[2][3]
unsigned int pxfDisk(const DetId &id) const
Abs< T >::type abs(const T &t)
MonitorElement * hBFposZR
bool getData(T &iHolder) const
unsigned int pxfSide(const DetId &id) const
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > topoToken_
MonitorElement * hBposZPL[4]
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
constexpr float short2phi(short x)
const TrackerTopology * tTopo_
const std::string topFolderName_
MonitorElement * hFposXYD[2][3]
SiPixelPhase1MonitorRecHitsSoA(const edm::ParameterSet &)
MonitorElement * hFcharge
Log< level::Warning, false > LogWarning
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
const DetIdContainer & detUnitIds() const override
Returm a vector of all GeomDetUnit DetIds.
void dqmBeginRun(const edm::Run &, const edm::EventSetup &) override
~SiPixelPhase1MonitorRecHitsSoA() override=default
MonitorElement * hBcharge