83 config_.getParameter<
edm::
InputTag>(
"InnerPixelClusterSource"))),
86 edm::LogInfo(
"Phase2ITMonitorCluster") <<
">>> Construct Phase2ITMonitorCluster ";
90 edm::LogInfo(
"Phase2ITMonitorCluster") <<
">>> Destroy Phase2ITMonitorCluster ";
106 if (!itPixelClusterHandle.isValid()) {
107 edm::LogWarning(
"Phase2ITMonitorCluster") <<
"No SiPixelCluster Collection found in the event. Skipping!";
112 std::map<std::string, unsigned int> nClsmap;
113 unsigned int nclusGlobal = 0;
114 for (
const auto& DSVItr : *itPixelClusterHandle) {
115 uint32_t rawid(DSVItr.detId());
123 nclusGlobal += DSVItr.size();
126 auto counterDet = nClsmap.find(folderkey);
127 if (counterDet == nClsmap.end()) {
128 nClsmap.emplace(folderkey, DSVItr.size());
130 counterDet->second += DSVItr.size();
131 for (
const auto& clusterItr : DSVItr) {
133 Local3DPoint localPosCluster = geomDetUnit->topology().localPosition(mpCluster);
134 Global3DPoint globalPosCluster = geomDetUnit->surface().toGlobal(localPosCluster);
135 double gx = globalPosCluster.
x() * 10.;
136 double gy = globalPosCluster.
y() * 10.;
137 double gz = globalPosCluster.
z() * 10.;
138 double gr = globalPosCluster.
perp() * 10.;
148 auto local_mesIT =
layerMEs_.find(folderkey);
162 for (
const auto& it : nClsmap) {
165 layerMEs_[it.first].nClusters->Fill(it.second);
201 if (theTkDigiGeomWatcher.
check(iSetup)) {
207 unsigned int detId_raw = det_u->geographicalId().rawId();
208 edm::LogInfo(
"Phase2ITMonitorRecHit") <<
"Detid:" << detId_raw <<
"\tsubdet=" << det_u->subDetector()
263 psd0.
add<
std::string>(
"title",
"NumberClusters;Number of Clusters;");
264 psd0.
add<
double>(
"xmin", 0.0);
265 psd0.
add<
bool>(
"switch",
true);
266 psd0.
add<
double>(
"xmax", 300000.0);
267 psd0.
add<
int>(
"NxBins", 150);
273 psd0.
add<
std::string>(
"title",
"Global_Position_RZ_IT_barrel;z [mm];r [mm]");
274 psd0.
add<
double>(
"ymax", 300.0);
275 psd0.
add<
int>(
"NxBins", 1500);
276 psd0.
add<
int>(
"NyBins", 300);
277 psd0.
add<
bool>(
"switch",
true);
278 psd0.
add<
double>(
"xmax", 3000.0);
279 psd0.
add<
double>(
"xmin", -3000.0);
280 psd0.
add<
double>(
"ymin", 0.0);
286 psd0.
add<
std::string>(
"title",
"Global_Position_XY_IT_barrel;x [mm];y [mm];");
287 psd0.
add<
double>(
"ymax", 300.0);
288 psd0.
add<
int>(
"NxBins", 600);
289 psd0.
add<
int>(
"NyBins", 600);
290 psd0.
add<
bool>(
"switch",
true);
291 psd0.
add<
double>(
"xmax", 300.0);
292 psd0.
add<
double>(
"xmin", -300.0);
293 psd0.
add<
double>(
"ymin", -300.0);
299 psd0.
add<
std::string>(
"title",
"Global_Position_RZ_IT_endcap;z [mm];r [mm]");
300 psd0.
add<
double>(
"ymax", 300.0);
301 psd0.
add<
int>(
"NxBins", 1500);
302 psd0.
add<
int>(
"NyBins", 300);
303 psd0.
add<
bool>(
"switch",
true);
304 psd0.
add<
double>(
"xmax", 3000.0);
305 psd0.
add<
double>(
"xmin", -3000.0);
306 psd0.
add<
double>(
"ymin", 0.0);
312 psd0.
add<
std::string>(
"title",
"Global_Position_XY_IT_endcap; x [mm]; y [mm]");
313 psd0.
add<
double>(
"ymax", 300.0);
314 psd0.
add<
int>(
"NxBins", 600);
315 psd0.
add<
int>(
"NyBins", 600);
316 psd0.
add<
bool>(
"switch",
true);
317 psd0.
add<
double>(
"xmax", 300.0);
318 psd0.
add<
double>(
"xmin", -300.0);
319 psd0.
add<
double>(
"ymin", -300.0);
327 psd0.
add<
std::string>(
"title",
"NumberOfClutsers;Number of Clusters;");
328 psd0.
add<
double>(
"xmin", 0.0);
329 psd0.
add<
bool>(
"switch",
true);
330 psd0.
add<
double>(
"xmax", 20000.0);
331 psd0.
add<
int>(
"NxBins", 150);
338 psd0.
add<
double>(
"xmin", 0.);
339 psd0.
add<
bool>(
"switch",
true);
340 psd0.
add<
double>(
"xmax", 100000.);
341 psd0.
add<
int>(
"NxBins", 100);
348 psd0.
add<
double>(
"xmin", -0.5);
349 psd0.
add<
double>(
"xmax", 30.5);
350 psd0.
add<
int>(
"NxBins", 31);
351 psd0.
add<
bool>(
"switch",
true);
358 psd0.
add<
double>(
"xmin", -0.5);
359 psd0.
add<
bool>(
"switch",
true);
360 psd0.
add<
double>(
"xmax", 30.5);
361 psd0.
add<
int>(
"NxBins", 31);
368 psd0.
add<
double>(
"xmin", -0.5);
369 psd0.
add<
bool>(
"switch",
true);
370 psd0.
add<
double>(
"xmax", 30.5);
371 psd0.
add<
int>(
"NxBins", 31);
378 psd0.
add<
double>(
"ymax", 0.0);
379 psd0.
add<
int>(
"NxBins", 500);
380 psd0.
add<
int>(
"NyBins", 500);
381 psd0.
add<
bool>(
"switch",
true);
382 psd0.
add<
double>(
"xmax", 0.0);
383 psd0.
add<
double>(
"xmin", 0.0);
384 psd0.
add<
double>(
"ymin", 0.0);
390 psd0.
add<
std::string>(
"title",
"GlobalClusterPositionXY_perlayer;x [mm];y [mm];");
391 psd0.
add<
double>(
"ymax", 300.0);
392 psd0.
add<
int>(
"NxBins", 600);
393 psd0.
add<
int>(
"NyBins", 600);
394 psd0.
add<
bool>(
"switch",
false);
395 psd0.
add<
double>(
"xmax", 300.0);
396 psd0.
add<
double>(
"xmin", -300.0);
397 psd0.
add<
double>(
"ymin", -300.0);
403 descriptions.
add(
"Phase2ITMonitorCluster",
desc);
void bookHistograms(DQMStore::IBooker &ibooker, edm::Run const &iRun, edm::EventSetup const &iSetup) override
T getParameter(std::string const &) const
Phase2ITMonitorCluster(const edm::ParameterSet &)
MonitorElement * book2DFromPSet(const edm::ParameterSet &hpars, DQMStore::IBooker &ibooker)
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > geomToken_
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
const TrackerTopology * tTopo_
virtual void setCurrentFolder(std::string const &fullpath)
MonitorElement * globalRZ_endcap_
MonitorElement * XYGlobalPositionMapPixel
const DetContainer & detUnits() const override
Returm a vector of all GeomDet.
std::string getITHistoId(uint32_t det_id, const TrackerTopology *tTopo)
MonitorElement * nClusters
MonitorElement * ClusterSizeX
MonitorElement * XYLocalPositionMapPixel
edm::ParameterSet config_
MonitorElement * ClusterCharge
MonitorElement * globalXY_barrel_
#define DEFINE_FWK_MODULE(type)
void dqmBeginRun(const edm::Run &iRun, const edm::EventSetup &iSetup) override
ParameterDescriptionBase * add(U const &iLabel, T const &value)
MonitorElement * book1DFromPSet(const edm::ParameterSet &hpars, DQMStore::IBooker &ibooker)
MonitorElement * globalXY_endcap_
const TrackerGeomDet * idToDet(DetId) const override
std::map< std::string, ClusterMEs > layerMEs_
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > topoToken_
Log< level::Info, false > LogInfo
edm::EDGetTokenT< edmNew::DetSetVector< SiPixelCluster > > itPixelClusterToken_
MonitorElement * globalRZ_barrel_
const TrackerGeometry * tkGeom_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
bool check(const edm::EventSetup &iSetup)
void analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup) override
void bookLayerHistos(DQMStore::IBooker &ibooker, uint32_t det_it, std::string &subdir)
Pixel cluster – collection of neighboring pixels above threshold.
MonitorElement * numberClusters_
Log< level::Warning, false > LogWarning
MonitorElement * ClusterSizeY
MonitorElement * ClusterSize
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
~Phase2ITMonitorCluster() override