93 edm::LogInfo(
"Phase2ITMonitorRecHit") <<
">>> Construct Phase2ITMonitorRecHit ";
97 edm::LogInfo(
"Phase2ITMonitorRecHit") <<
">>> Destroy Phase2ITMonitorRecHit ";
107 std::map<std::string, unsigned int> nrechitLayerMap;
108 unsigned long int nTotrechitsinevt = 0;
110 for (
const auto& DSViter : *
rechits) {
112 unsigned int rawid(DSViter.detId());
119 nTotrechitsinevt += DSViter.size();
120 auto counterDet = nrechitLayerMap.find(
key);
121 if (nrechitLayerMap.find(
key) == nrechitLayerMap.end()) {
122 nrechitLayerMap.emplace(
key, DSViter.size());
124 counterDet->second += DSViter.size();
127 for (
const auto& rechit : DSViter) {
129 Global3DPoint globalPos = geomDetunit->surface().toGlobal(lp);
131 double gx = globalPos.
x() * 10.;
132 double gy = globalPos.
y() * 10.;
133 double gz = globalPos.
z() * 10.;
134 double gr = globalPos.
perp() * 10.;
145 layerMEs_[
key].clusterSizeX->Fill(rechit.cluster()->sizeX());
147 layerMEs_[
key].clusterSizeY->Fill(rechit.cluster()->sizeY());
158 float eta = geomDetunit->surface().toGlobal(lp).eta();
169 for (
const auto& lme : nrechitLayerMap)
171 layerMEs_[lme.first].numberRecHits->Fill(lme.second);
184 edm::LogInfo(
"Phase2ITMonitorRecHit") <<
" Booking Histograms in : " << top_folder;
205 if (theTkDigiGeomWatcher.
check(iSetup)) {
211 unsigned int detId_raw = det_u->geographicalId().rawId();
212 edm::LogInfo(
"Phase2ITMonitorRecHit") <<
"Detid:" << detId_raw <<
"\tsubdet=" << det_u->subDetector()
227 edm::LogInfo(
"Phase2ITMonitorRecHit") <<
" Booking Histograms in : " << (subdir +
"/" +
key);
266 psd0.
add<
std::string>(
"title",
"NumberRecHits;Number of RecHits;");
267 psd0.
add<
double>(
"xmin", 0.0);
268 psd0.
add<
bool>(
"switch",
true);
269 psd0.
add<
double>(
"xmax", 250000.0);
270 psd0.
add<
int>(
"NxBins", 250);
276 psd0.
add<
std::string>(
"title",
"Global_Position_RZ_IT_barrel;z [mm];r [mm]");
277 psd0.
add<
double>(
"ymax", 300.0);
278 psd0.
add<
int>(
"NxBins", 1500);
279 psd0.
add<
int>(
"NyBins", 300);
280 psd0.
add<
bool>(
"switch",
true);
281 psd0.
add<
double>(
"xmax", 3000.0);
282 psd0.
add<
double>(
"xmin", -3000.0);
283 psd0.
add<
double>(
"ymin", 0.0);
289 psd0.
add<
std::string>(
"title",
"Global_Position_XY_IT_barrel;x [mm];y [mm];");
290 psd0.
add<
double>(
"ymax", 300.0);
291 psd0.
add<
int>(
"NxBins", 600);
292 psd0.
add<
int>(
"NyBins", 600);
293 psd0.
add<
bool>(
"switch",
true);
294 psd0.
add<
double>(
"xmax", 300.0);
295 psd0.
add<
double>(
"xmin", -300.0);
296 psd0.
add<
double>(
"ymin", -300.0);
302 psd0.
add<
std::string>(
"title",
"Global_Position_RZ_IT_endcap;z [mm];r [mm]");
303 psd0.
add<
double>(
"ymax", 300.0);
304 psd0.
add<
int>(
"NxBins", 1500);
305 psd0.
add<
int>(
"NyBins", 300);
306 psd0.
add<
bool>(
"switch",
true);
307 psd0.
add<
double>(
"xmax", 3000.0);
308 psd0.
add<
double>(
"xmin", -3000.0);
309 psd0.
add<
double>(
"ymin", 0.0);
315 psd0.
add<
std::string>(
"title",
"Global_Position_XY_IT_endcap; x [mm]; y [mm]");
316 psd0.
add<
double>(
"ymax", 300.0);
317 psd0.
add<
int>(
"NxBins", 600);
318 psd0.
add<
int>(
"NyBins", 600);
319 psd0.
add<
bool>(
"switch",
true);
320 psd0.
add<
double>(
"xmax", 300.0);
321 psd0.
add<
double>(
"xmin", -300.0);
322 psd0.
add<
double>(
"ymin", -300.0);
329 psd0.
add<
std::string>(
"title",
"NumberRecHits;Number of RecHits;");
330 psd0.
add<
double>(
"xmin", 0.0);
331 psd0.
add<
bool>(
"switch",
true);
332 psd0.
add<
double>(
"xmax", 150000.0);
333 psd0.
add<
int>(
"NxBins", 150);
339 psd0.
add<
std::string>(
"title",
"Global_Position_RZ;z [mm];r [mm]");
340 psd0.
add<
double>(
"ymax", 300.0);
341 psd0.
add<
int>(
"NxBins", 1500);
342 psd0.
add<
int>(
"NyBins", 300);
343 psd0.
add<
bool>(
"switch",
false);
344 psd0.
add<
double>(
"xmax", 3000.0);
345 psd0.
add<
double>(
"xmin", -3000.0);
346 psd0.
add<
double>(
"ymin", 0.0);
352 psd0.
add<
std::string>(
"title",
"Global_Position_XY;x [mm]; y[mm]");
353 psd0.
add<
double>(
"ymax", 300.0);
354 psd0.
add<
int>(
"NxBins", 600);
355 psd0.
add<
int>(
"NyBins", 600);
356 psd0.
add<
bool>(
"switch",
false);
357 psd0.
add<
double>(
"xmax", 300.0);
358 psd0.
add<
double>(
"xmin", -300.0);
359 psd0.
add<
double>(
"ymin", -300.0);
366 psd0.
add<
double>(
"ymax", 0.0);
367 psd0.
add<
int>(
"NxBins", 500);
368 psd0.
add<
int>(
"NyBins", 500);
369 psd0.
add<
bool>(
"switch",
true);
370 psd0.
add<
double>(
"xmax", 0.0);
371 psd0.
add<
double>(
"xmin", 0.0);
372 psd0.
add<
double>(
"ymin", 0.0);
379 psd0.
add<
double>(
"xmin", -0.5);
380 psd0.
add<
bool>(
"switch",
true);
381 psd0.
add<
double>(
"xmax", 20.5);
382 psd0.
add<
int>(
"NxBins", 21);
389 psd0.
add<
double>(
"xmin", -0.5);
390 psd0.
add<
bool>(
"switch",
true);
391 psd0.
add<
double>(
"xmax", 25.5);
392 psd0.
add<
int>(
"NxBins", 26);
398 psd0.
add<
std::string>(
"title",
"RecHit_X;RecHit position X dimension;");
399 psd0.
add<
double>(
"xmin", -2.5);
400 psd0.
add<
bool>(
"switch",
true);
401 psd0.
add<
double>(
"xmax", 2.5);
402 psd0.
add<
int>(
"NxBins", 100);
408 psd0.
add<
std::string>(
"title",
"RecHit_Y;RecHit position X dimension;");
409 psd0.
add<
double>(
"xmin", -2.5);
410 psd0.
add<
bool>(
"switch",
true);
411 psd0.
add<
double>(
"xmax", 2.5);
412 psd0.
add<
int>(
"NxBins", 100);
418 psd0.
add<
std::string>(
"title",
"RecHit_X_error_Vs_eta;#eta;x error [#mum]");
419 psd0.
add<
bool>(
"switch",
true);
420 psd0.
add<
int>(
"NxBins", 82);
421 psd0.
add<
double>(
"xmax", 4.1);
422 psd0.
add<
double>(
"xmin", -4.1);
423 psd0.
add<
double>(
"ymax", 10.0);
424 psd0.
add<
double>(
"ymin", 0.);
430 psd0.
add<
std::string>(
"title",
"RecHit_Y_error_Vs_eta;#eta;y error [#mum]");
431 psd0.
add<
bool>(
"switch",
true);
432 psd0.
add<
int>(
"NxBins", 82);
433 psd0.
add<
double>(
"xmax", 4.1);
434 psd0.
add<
double>(
"xmin", -4.1);
435 psd0.
add<
double>(
"ymax", 10.0);
436 psd0.
add<
double>(
"ymin", 0.);
441 descriptions.
add(
"Phase2ITMonitorRecHit",
desc);
void dqmBeginRun(const edm::Run &iRun, const edm::EventSetup &iSetup) override
const TrackerGeometry * tkGeom_
const edm::EDGetTokenT< SiPixelRecHitCollection > tokenRecHitsIT_
MonitorElement * globalRZ_barrel_
T getParameter(std::string const &) const
MonitorElement * book2DFromPSet(const edm::ParameterSet &hpars, DQMStore::IBooker &ibooker)
Phase2ITMonitorRecHit(const edm::ParameterSet &)
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
virtual void setCurrentFolder(std::string const &fullpath)
#define DEFINE_FWK_MODULE(type)
MonitorElement * bookProfile1DFromPSet(const edm::ParameterSet &hpars, DQMStore::IBooker &ibooker)
edm::ParameterSet config_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
MonitorElement * globalPosXY
static constexpr float million
MonitorElement * globalPosRZ
const DetContainer & detUnits() const override
Returm a vector of all GeomDet.
MonitorElement * numberRecHits
std::string getITHistoId(uint32_t det_id, const TrackerTopology *tTopo)
MonitorElement * globalXY_barrel_
MonitorElement * numberRecHits_
void bookHistograms(DQMStore::IBooker &ibooker, edm::Run const &iRun, edm::EventSetup const &iSetup) override
void analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup) override
bool getData(T &iHolder) const
~Phase2ITMonitorRecHit() override
ParameterDescriptionBase * add(U const &iLabel, T const &value)
MonitorElement * book1DFromPSet(const edm::ParameterSet &hpars, DQMStore::IBooker &ibooker)
Log< level::Info, false > LogInfo
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > geomToken_
void bookLayerHistos(DQMStore::IBooker &ibooker, unsigned int det_id, std::string &subdir)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
bool check(const edm::EventSetup &iSetup)
std::map< std::string, RecHitME > layerMEs_
MonitorElement * clusterSizeX
const TrackerTopology * tTopo_
void fillITHistos(const edm::Event &iEvent)
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > topoToken_
MonitorElement * globalRZ_endcap_
MonitorElement * globalXY_endcap_
MonitorElement * localPosXY
MonitorElement * clusterSizeY