90 edm::LogInfo(
"Phase2OTMonitorCluster") <<
">>> Construct Phase2OTMonitorCluster ";
94 edm::LogInfo(
"Phase2OTMonitorCluster") <<
">>> Destroy Phase2OTMonitorCluster ";
109 if (!clusterHandle.isValid()) {
110 edm::LogWarning(
"Phase2OTMonitorCluster") <<
"No Phase2TrackerCluster1D Collection found in the event. Skipping!";
115 std::map<std::string, unsigned int> nClustersCounter_P;
116 std::map<std::string, unsigned int> nClustersCounter_S;
117 unsigned int nclus = 0;
118 for (
const auto& DSVItr : *clusterHandle) {
120 uint32_t rawid(DSVItr.detId());
132 auto counterDet = nClustersCounter_P.find(folderkey);
133 if (counterDet == nClustersCounter_P.end())
134 nClustersCounter_P.emplace(folderkey, DSVItr.size());
136 counterDet->second += DSVItr.size();
138 auto counterDet = nClustersCounter_S.find(folderkey);
139 if (counterDet == nClustersCounter_S.end())
140 nClustersCounter_S.emplace(folderkey, DSVItr.size());
142 counterDet->second += DSVItr.size();
144 nclus += DSVItr.size();
146 for (
const auto& clusterItr : DSVItr) {
148 Local3DPoint localPosCluster = geomDetUnit->topology().localPosition(mpCluster);
149 Global3DPoint globalPosCluster = geomDetUnit->surface().toGlobal(localPosCluster);
150 double gx = globalPosCluster.
x() * 10.;
151 double gy = globalPosCluster.
y() * 10.;
152 double gz = globalPosCluster.
z() * 10.;
153 double gr = globalPosCluster.
perp() * 10.;
154 auto layerMEit =
layerMEs_.find(folderkey);
177 for (
const auto&
it : nClustersCounter_P) {
183 for (
const auto&
it : nClustersCounter_S) {
201 edm::LogInfo(
"Phase2OTMonitorCluster") <<
" Booking Histograms in: " << top_folder;
215 if (theTkDigiGeomWatcher.
check(iSetup)) {
222 unsigned int detId_raw = det_u->geographicalId().rawId();
223 edm::LogInfo(
"Phase2ITMonitorRecHit") <<
"Detid:" << detId_raw <<
"\tsubdet=" << det_u->subDetector()
277 psd0.
add<
double>(
"xmin", 0.0);
278 psd0.
add<
bool>(
"switch",
true);
279 psd0.
add<
double>(
"xmax", 350000.0);
280 psd0.
add<
int>(
"NxBins", 150);
286 psd0.
add<
std::string>(
"title",
"Global_ClusterPosition_XY_P;x [mm];y [mm];");
287 psd0.
add<
int>(
"NxBins", 1250);
288 psd0.
add<
double>(
"xmin", -1250.0);
289 psd0.
add<
double>(
"xmax", 1250.0);
290 psd0.
add<
int>(
"NyBins", 1250);
291 psd0.
add<
double>(
"ymin", -1250.0);
292 psd0.
add<
double>(
"ymax", 1250.0);
293 psd0.
add<
bool>(
"switch",
true);
299 psd0.
add<
std::string>(
"title",
"Global_ClusterPosition_XY_S;x [mm];y [mm];");
300 psd0.
add<
int>(
"NxBins", 1250);
301 psd0.
add<
double>(
"xmin", -1250.0);
302 psd0.
add<
double>(
"xmax", 1250.0);
303 psd0.
add<
int>(
"NyBins", 1250);
304 psd0.
add<
double>(
"ymin", -1250.0);
305 psd0.
add<
double>(
"ymax", 1250.0);
306 psd0.
add<
bool>(
"switch",
true);
313 psd0.
add<
std::string>(
"title",
"Global_ClusterPosition_RZ_P;z [mm];r [mm]");
314 psd0.
add<
int>(
"NxBins", 1500);
315 psd0.
add<
double>(
"xmin", -3000.0);
316 psd0.
add<
double>(
"xmax", 3000.0);
317 psd0.
add<
int>(
"NyBins", 1250);
318 psd0.
add<
double>(
"ymin", 0.0);
319 psd0.
add<
double>(
"ymax", 1250.0);
320 psd0.
add<
bool>(
"switch",
true);
326 psd0.
add<
std::string>(
"title",
"Global_ClusterPosition_RZ_S;z [mm];r [mm]");
327 psd0.
add<
int>(
"NxBins", 1500);
328 psd0.
add<
double>(
"xmin", -3000.0);
329 psd0.
add<
double>(
"xmax", 3000.0);
330 psd0.
add<
int>(
"NyBins", 1250);
331 psd0.
add<
double>(
"ymin", 0.0);
332 psd0.
add<
double>(
"ymax", 1250.0);
333 psd0.
add<
bool>(
"switch",
true);
340 psd0.
add<
std::string>(
"title",
";Number of clusters per event(macro pixel sensor);");
341 psd0.
add<
double>(
"xmin", 0.0);
342 psd0.
add<
double>(
"xmax", 28000.0);
343 psd0.
add<
int>(
"NxBins", 150);
344 psd0.
add<
bool>(
"switch",
true);
350 psd0.
add<
std::string>(
"title",
";Number of clusters per event(strip sensor);");
351 psd0.
add<
double>(
"xmin", 0.0);
352 psd0.
add<
double>(
"xmax", 28000.0);
353 psd0.
add<
int>(
"NxBins", 150);
354 psd0.
add<
bool>(
"switch",
true);
360 psd0.
add<
std::string>(
"title",
";cluster size(macro pixel sensor);");
361 psd0.
add<
double>(
"xmin", -0.5);
362 psd0.
add<
double>(
"xmax", 30.5);
363 psd0.
add<
int>(
"NxBins", 31);
364 psd0.
add<
bool>(
"switch",
true);
371 psd0.
add<
double>(
"xmin", -0.5);
372 psd0.
add<
double>(
"xmax", 30.5);
373 psd0.
add<
int>(
"NxBins", 31);
374 psd0.
add<
bool>(
"switch",
true);
380 psd0.
add<
std::string>(
"title",
"GlobalClusterPositionXY_perlayer_P;x [mm];y [mm];");
381 psd0.
add<
int>(
"NxBins", 1250);
382 psd0.
add<
double>(
"xmin", -1250.0);
383 psd0.
add<
double>(
"xmax", 1250.0);
384 psd0.
add<
int>(
"NyBins", 1250);
385 psd0.
add<
double>(
"ymin", -1250.0);
386 psd0.
add<
double>(
"ymax", 1250.0);
387 psd0.
add<
bool>(
"switch",
false);
393 psd0.
add<
std::string>(
"title",
"GlobalClusterPositionXY_perlayer_S;x [mm];y [mm];");
394 psd0.
add<
int>(
"NxBins", 1250);
395 psd0.
add<
double>(
"xmin", -1250.0);
396 psd0.
add<
double>(
"xmax", 1250.0);
397 psd0.
add<
int>(
"NyBins", 1250);
398 psd0.
add<
double>(
"ymin", -1250.0);
399 psd0.
add<
double>(
"ymax", 1250.0);
400 psd0.
add<
bool>(
"switch",
false);
407 psd0.
add<
int>(
"NxBins", 50);
408 psd0.
add<
double>(
"xmin", -10.0);
409 psd0.
add<
double>(
"xmax", 10.0);
410 psd0.
add<
int>(
"NyBins", 50);
411 psd0.
add<
double>(
"ymin", -10.0);
412 psd0.
add<
double>(
"ymax", 10.0);
413 psd0.
add<
bool>(
"switch",
true);
420 psd0.
add<
int>(
"NxBins", 50);
421 psd0.
add<
double>(
"xmin", -10.0);
422 psd0.
add<
double>(
"xmax", 10.0);
423 psd0.
add<
int>(
"NyBins", 50);
424 psd0.
add<
double>(
"ymin", -10.0);
425 psd0.
add<
double>(
"ymax", 10.0);
426 psd0.
add<
bool>(
"switch",
true);
432 descriptions.
add(
"Phase2OTMonitorCluster",
desc);
const TrackerTopology * tTopo_
T getParameter(std::string const &) const
MonitorElement * ClusterSize_S
MonitorElement * book2DFromPSet(const edm::ParameterSet &hpars, DQMStore::IBooker &ibooker)
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
void analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup) override
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
edm::EDGetTokenT< Phase2TrackerCluster1DCollectionNew > clustersToken_
virtual void setCurrentFolder(std::string const &fullpath)
MonitorElement * globalXY_S_
MonitorElement * ClusterSize_P
const DetContainer & detUnits() const override
Returm a vector of all GeomDet.
std::map< std::string, ClusterMEs > layerMEs_
void bookHistograms(DQMStore::IBooker &ibooker, edm::Run const &iRun, edm::EventSetup const &iSetup) override
std::string getITHistoId(uint32_t det_id, const TrackerTopology *tTopo)
MonitorElement * globalRZ_S_
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > topoToken_
MonitorElement * globalXY_P_
std::string getOTHistoId(uint32_t det_id, const TrackerTopology *tTopo)
const TrackerGeometry * tkGeom_
ModuleType getDetectorType(DetId) const
MonitorElement * globalRZ_P_
MonitorElement * XYGlobalPositionMap_P
#define DEFINE_FWK_MODULE(type)
MonitorElement * XYLocalPositionMap_S
ParameterDescriptionBase * add(U const &iLabel, T const &value)
MonitorElement * book1DFromPSet(const edm::ParameterSet &hpars, DQMStore::IBooker &ibooker)
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > geomToken_
void fillOTHistos(const edm::Event &iEvent)
Log< level::Info, false > LogInfo
edm::ParameterSet config_
~Phase2OTMonitorCluster() override
Phase2OTMonitorCluster(const edm::ParameterSet &)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
bool check(const edm::EventSetup &iSetup)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
MonitorElement * nClusters_S
void bookLayerHistos(DQMStore::IBooker &ibooker, uint32_t det_it, std::string &subdir)
MonitorElement * XYLocalPositionMap_P
MonitorElement * XYGlobalPositionMap_S
void dqmBeginRun(const edm::Run &iRun, const edm::EventSetup &iSetup) override
Log< level::Warning, false > LogWarning
MonitorElement * numberClusters_
MonitorElement * nClusters_P