90 edm::LogInfo(
"Phase2OTMonitorCluster") <<
">>> Construct Phase2OTMonitorCluster ";
94 edm::LogInfo(
"Phase2OTMonitorCluster") <<
">>> Destroy Phase2OTMonitorCluster ";
109 std::map<std::string, unsigned int> nClustersCounter_P;
110 std::map<std::string, unsigned int> nClustersCounter_S;
111 unsigned int nclus = 0;
112 for (
const auto& DSVItr : *clusterHandle) {
114 uint32_t rawid(DSVItr.detId());
126 auto counterDet = nClustersCounter_P.find(folderkey);
127 if (counterDet == nClustersCounter_P.end())
128 nClustersCounter_P.emplace(folderkey, DSVItr.size());
130 counterDet->second += DSVItr.size();
132 auto counterDet = nClustersCounter_S.find(folderkey);
133 if (counterDet == nClustersCounter_S.end())
134 nClustersCounter_S.emplace(folderkey, DSVItr.size());
136 counterDet->second += DSVItr.size();
138 nclus += DSVItr.size();
140 for (
const auto& clusterItr : DSVItr) {
142 Local3DPoint localPosCluster = geomDetUnit->topology().localPosition(mpCluster);
143 Global3DPoint globalPosCluster = geomDetUnit->surface().toGlobal(localPosCluster);
144 double gx = globalPosCluster.
x() * 10.;
145 double gy = globalPosCluster.
y() * 10.;
146 double gz = globalPosCluster.
z() * 10.;
147 double gr = globalPosCluster.
perp() * 10.;
148 auto layerMEit =
layerMEs_.find(folderkey);
171 for (
const auto& it : nClustersCounter_P) {
174 if (
layerMEs_[it.first].nClusters_P !=
nullptr)
175 layerMEs_[it.first].nClusters_P->Fill(it.second);
177 for (
const auto& it : nClustersCounter_S) {
180 if (
layerMEs_[it.first].nClusters_S !=
nullptr)
181 layerMEs_[it.first].nClusters_S->Fill(it.second);
195 edm::LogInfo(
"Phase2OTMonitorCluster") <<
" Booking Histograms in: " << top_folder;
209 if (theTkDigiGeomWatcher.
check(iSetup)) {
216 unsigned int detId_raw = det_u->geographicalId().rawId();
217 edm::LogInfo(
"Phase2ITMonitorRecHit") <<
"Detid:" << detId_raw <<
"\tsubdet=" << det_u->subDetector()
271 psd0.
add<
double>(
"xmin", 0.0);
272 psd0.
add<
bool>(
"switch",
true);
273 psd0.
add<
double>(
"xmax", 350000.0);
274 psd0.
add<
int>(
"NxBins", 150);
280 psd0.
add<
std::string>(
"title",
"Global_ClusterPosition_XY_P;x [mm];y [mm];");
281 psd0.
add<
int>(
"NxBins", 1250);
282 psd0.
add<
double>(
"xmin", -1250.0);
283 psd0.
add<
double>(
"xmax", 1250.0);
284 psd0.
add<
int>(
"NyBins", 1250);
285 psd0.
add<
double>(
"ymin", -1250.0);
286 psd0.
add<
double>(
"ymax", 1250.0);
287 psd0.
add<
bool>(
"switch",
true);
293 psd0.
add<
std::string>(
"title",
"Global_ClusterPosition_XY_S;x [mm];y [mm];");
294 psd0.
add<
int>(
"NxBins", 1250);
295 psd0.
add<
double>(
"xmin", -1250.0);
296 psd0.
add<
double>(
"xmax", 1250.0);
297 psd0.
add<
int>(
"NyBins", 1250);
298 psd0.
add<
double>(
"ymin", -1250.0);
299 psd0.
add<
double>(
"ymax", 1250.0);
300 psd0.
add<
bool>(
"switch",
true);
307 psd0.
add<
std::string>(
"title",
"Global_ClusterPosition_RZ_P;z [mm];r [mm]");
308 psd0.
add<
int>(
"NxBins", 1500);
309 psd0.
add<
double>(
"xmin", -3000.0);
310 psd0.
add<
double>(
"xmax", 3000.0);
311 psd0.
add<
int>(
"NyBins", 1250);
312 psd0.
add<
double>(
"ymin", 0.0);
313 psd0.
add<
double>(
"ymax", 1250.0);
314 psd0.
add<
bool>(
"switch",
true);
320 psd0.
add<
std::string>(
"title",
"Global_ClusterPosition_RZ_S;z [mm];r [mm]");
321 psd0.
add<
int>(
"NxBins", 1500);
322 psd0.
add<
double>(
"xmin", -3000.0);
323 psd0.
add<
double>(
"xmax", 3000.0);
324 psd0.
add<
int>(
"NyBins", 1250);
325 psd0.
add<
double>(
"ymin", 0.0);
326 psd0.
add<
double>(
"ymax", 1250.0);
327 psd0.
add<
bool>(
"switch",
true);
334 psd0.
add<
std::string>(
"title",
";Number of clusters per event(macro pixel sensor);");
335 psd0.
add<
double>(
"xmin", 0.0);
336 psd0.
add<
double>(
"xmax", 28000.0);
337 psd0.
add<
int>(
"NxBins", 150);
338 psd0.
add<
bool>(
"switch",
true);
344 psd0.
add<
std::string>(
"title",
";Number of clusters per event(strip sensor);");
345 psd0.
add<
double>(
"xmin", 0.0);
346 psd0.
add<
double>(
"xmax", 28000.0);
347 psd0.
add<
int>(
"NxBins", 150);
348 psd0.
add<
bool>(
"switch",
true);
354 psd0.
add<
std::string>(
"title",
";cluster size(macro pixel sensor);");
355 psd0.
add<
double>(
"xmin", -0.5);
356 psd0.
add<
double>(
"xmax", 30.5);
357 psd0.
add<
int>(
"NxBins", 31);
358 psd0.
add<
bool>(
"switch",
true);
365 psd0.
add<
double>(
"xmin", -0.5);
366 psd0.
add<
double>(
"xmax", 30.5);
367 psd0.
add<
int>(
"NxBins", 31);
368 psd0.
add<
bool>(
"switch",
true);
374 psd0.
add<
std::string>(
"title",
"GlobalClusterPositionXY_perlayer_P;x [mm];y [mm];");
375 psd0.
add<
int>(
"NxBins", 1250);
376 psd0.
add<
double>(
"xmin", -1250.0);
377 psd0.
add<
double>(
"xmax", 1250.0);
378 psd0.
add<
int>(
"NyBins", 1250);
379 psd0.
add<
double>(
"ymin", -1250.0);
380 psd0.
add<
double>(
"ymax", 1250.0);
381 psd0.
add<
bool>(
"switch",
false);
387 psd0.
add<
std::string>(
"title",
"GlobalClusterPositionXY_perlayer_S;x [mm];y [mm];");
388 psd0.
add<
int>(
"NxBins", 1250);
389 psd0.
add<
double>(
"xmin", -1250.0);
390 psd0.
add<
double>(
"xmax", 1250.0);
391 psd0.
add<
int>(
"NyBins", 1250);
392 psd0.
add<
double>(
"ymin", -1250.0);
393 psd0.
add<
double>(
"ymax", 1250.0);
394 psd0.
add<
bool>(
"switch",
false);
401 psd0.
add<
int>(
"NxBins", 50);
402 psd0.
add<
double>(
"xmin", -10.0);
403 psd0.
add<
double>(
"xmax", 10.0);
404 psd0.
add<
int>(
"NyBins", 50);
405 psd0.
add<
double>(
"ymin", -10.0);
406 psd0.
add<
double>(
"ymax", 10.0);
407 psd0.
add<
bool>(
"switch",
true);
414 psd0.
add<
int>(
"NxBins", 50);
415 psd0.
add<
double>(
"xmin", -10.0);
416 psd0.
add<
double>(
"xmax", 10.0);
417 psd0.
add<
int>(
"NyBins", 50);
418 psd0.
add<
double>(
"ymin", -10.0);
419 psd0.
add<
double>(
"ymax", 10.0);
420 psd0.
add<
bool>(
"switch",
true);
426 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)
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_
#define DEFINE_FWK_MODULE(type)
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
MonitorElement * XYLocalPositionMap_S
bool getData(T &iHolder) const
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