83 config_.getParameter<
edm::
InputTag>(
"InnerPixelClusterSource"))),
86 edm::LogInfo(
"Phase2ITMonitorCluster") <<
">>> Construct Phase2ITMonitorCluster ";
90 edm::LogInfo(
"Phase2ITMonitorCluster") <<
">>> Destroy Phase2ITMonitorCluster ";
106 std::map<std::string, unsigned int> nClsmap;
107 unsigned int nclusGlobal = 0;
108 for (
const auto& DSVItr : *itPixelClusterHandle) {
109 uint32_t rawid(DSVItr.detId());
117 nclusGlobal += DSVItr.size();
120 auto counterDet = nClsmap.find(folderkey);
121 if (counterDet == nClsmap.end()) {
122 nClsmap.emplace(folderkey, DSVItr.size());
124 counterDet->second += DSVItr.size();
125 for (
const auto& clusterItr : DSVItr) {
127 Local3DPoint localPosCluster = geomDetUnit->topology().localPosition(mpCluster);
128 Global3DPoint globalPosCluster = geomDetUnit->surface().toGlobal(localPosCluster);
129 double gx = globalPosCluster.
x() * 10.;
130 double gy = globalPosCluster.
y() * 10.;
131 double gz = globalPosCluster.
z() * 10.;
132 double gr = globalPosCluster.
perp() * 10.;
142 auto local_mesIT =
layerMEs_.find(folderkey);
156 for (
const auto& it : nClsmap) {
159 layerMEs_[it.first].nClusters->Fill(it.second);
195 if (theTkDigiGeomWatcher.
check(iSetup)) {
201 unsigned int detId_raw = det_u->geographicalId().rawId();
202 edm::LogInfo(
"Phase2ITMonitorRecHit") <<
"Detid:" << detId_raw <<
"\tsubdet=" << det_u->subDetector()
257 psd0.
add<
std::string>(
"title",
"NumberClusters;Number of Clusters;");
258 psd0.
add<
double>(
"xmin", 0.0);
259 psd0.
add<
bool>(
"switch",
true);
260 psd0.
add<
double>(
"xmax", 300000.0);
261 psd0.
add<
int>(
"NxBins", 150);
267 psd0.
add<
std::string>(
"title",
"Global_Position_RZ_IT_barrel;z [mm];r [mm]");
268 psd0.
add<
double>(
"ymax", 300.0);
269 psd0.
add<
int>(
"NxBins", 1500);
270 psd0.
add<
int>(
"NyBins", 300);
271 psd0.
add<
bool>(
"switch",
true);
272 psd0.
add<
double>(
"xmax", 3000.0);
273 psd0.
add<
double>(
"xmin", -3000.0);
274 psd0.
add<
double>(
"ymin", 0.0);
280 psd0.
add<
std::string>(
"title",
"Global_Position_XY_IT_barrel;x [mm];y [mm];");
281 psd0.
add<
double>(
"ymax", 300.0);
282 psd0.
add<
int>(
"NxBins", 600);
283 psd0.
add<
int>(
"NyBins", 600);
284 psd0.
add<
bool>(
"switch",
true);
285 psd0.
add<
double>(
"xmax", 300.0);
286 psd0.
add<
double>(
"xmin", -300.0);
287 psd0.
add<
double>(
"ymin", -300.0);
293 psd0.
add<
std::string>(
"title",
"Global_Position_RZ_IT_endcap;z [mm];r [mm]");
294 psd0.
add<
double>(
"ymax", 300.0);
295 psd0.
add<
int>(
"NxBins", 1500);
296 psd0.
add<
int>(
"NyBins", 300);
297 psd0.
add<
bool>(
"switch",
true);
298 psd0.
add<
double>(
"xmax", 3000.0);
299 psd0.
add<
double>(
"xmin", -3000.0);
300 psd0.
add<
double>(
"ymin", 0.0);
306 psd0.
add<
std::string>(
"title",
"Global_Position_XY_IT_endcap; x [mm]; y [mm]");
307 psd0.
add<
double>(
"ymax", 300.0);
308 psd0.
add<
int>(
"NxBins", 600);
309 psd0.
add<
int>(
"NyBins", 600);
310 psd0.
add<
bool>(
"switch",
true);
311 psd0.
add<
double>(
"xmax", 300.0);
312 psd0.
add<
double>(
"xmin", -300.0);
313 psd0.
add<
double>(
"ymin", -300.0);
321 psd0.
add<
std::string>(
"title",
"NumberOfClutsers;Number of Clusters;");
322 psd0.
add<
double>(
"xmin", 0.0);
323 psd0.
add<
bool>(
"switch",
true);
324 psd0.
add<
double>(
"xmax", 20000.0);
325 psd0.
add<
int>(
"NxBins", 150);
332 psd0.
add<
double>(
"xmin", 0.);
333 psd0.
add<
bool>(
"switch",
true);
334 psd0.
add<
double>(
"xmax", 100000.);
335 psd0.
add<
int>(
"NxBins", 100);
342 psd0.
add<
double>(
"xmin", -0.5);
343 psd0.
add<
double>(
"xmax", 30.5);
344 psd0.
add<
int>(
"NxBins", 31);
345 psd0.
add<
bool>(
"switch",
true);
352 psd0.
add<
double>(
"xmin", -0.5);
353 psd0.
add<
bool>(
"switch",
true);
354 psd0.
add<
double>(
"xmax", 30.5);
355 psd0.
add<
int>(
"NxBins", 31);
362 psd0.
add<
double>(
"xmin", -0.5);
363 psd0.
add<
bool>(
"switch",
true);
364 psd0.
add<
double>(
"xmax", 30.5);
365 psd0.
add<
int>(
"NxBins", 31);
372 psd0.
add<
double>(
"ymax", 0.0);
373 psd0.
add<
int>(
"NxBins", 500);
374 psd0.
add<
int>(
"NyBins", 500);
375 psd0.
add<
bool>(
"switch",
true);
376 psd0.
add<
double>(
"xmax", 0.0);
377 psd0.
add<
double>(
"xmin", 0.0);
378 psd0.
add<
double>(
"ymin", 0.0);
384 psd0.
add<
std::string>(
"title",
"GlobalClusterPositionXY_perlayer;x [mm];y [mm];");
385 psd0.
add<
double>(
"ymax", 300.0);
386 psd0.
add<
int>(
"NxBins", 600);
387 psd0.
add<
int>(
"NyBins", 600);
388 psd0.
add<
bool>(
"switch",
false);
389 psd0.
add<
double>(
"xmax", 300.0);
390 psd0.
add<
double>(
"xmin", -300.0);
391 psd0.
add<
double>(
"ymin", -300.0);
397 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_
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)
bool getData(T &iHolder) const
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_
MonitorElement * ClusterSizeY
MonitorElement * ClusterSize
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
~Phase2ITMonitorCluster() override