102 edm::LogInfo(
"Phase2OTMonitorRecHit") <<
">>> Construct Phase2OTMonitorRecHit ";
111 edm::LogInfo(
"Phase2OTMonitorRecHit") <<
">>> Destroy Phase2OTMonitorRecHit ";
129 std::map<std::string, unsigned int> nrechitLayerMapP;
130 std::map<std::string, unsigned int> nrechitLayerMapS;
131 unsigned long int nTotrechitsinevt = 0;
134 for (DSViter =
rechits->begin(); DSViter !=
rechits->end(); ++DSViter) {
136 unsigned int rawid(DSViter->detId());
145 nTotrechitsinevt += DSViter->size();
147 if (nrechitLayerMapP.find(key) == nrechitLayerMapP.end()) {
148 nrechitLayerMapP.insert(std::make_pair(key, DSViter->size()));
150 nrechitLayerMapP[
key] += DSViter->size();
153 if (nrechitLayerMapS.find(key) == nrechitLayerMapS.end()) {
154 nrechitLayerMapS.insert(std::make_pair(key, DSViter->size()));
156 nrechitLayerMapS[
key] += DSViter->size();
161 for (rechitIt = DSViter->
begin(); rechitIt != DSViter->
end(); ++rechitIt) {
163 Global3DPoint globalPos = geomDetunit->surface().toGlobal(lp);
165 double gx = globalPos.
x() * 10.;
166 double gy = globalPos.
y() * 10.;
167 double gz = globalPos.
z() * 10.;
168 double gr = globalPos.
perp() * 10.;
191 for (
auto& lme : nrechitLayerMapP) {
192 layerMEs_[lme.first].numberRecHits_P->Fill(lme.second);
194 for (
auto& lme : nrechitLayerMapS) {
195 layerMEs_[lme.first].numberRecHits_S->Fill(lme.second);
208 edm::LogInfo(
"Phase2OTMonitorRecHit") <<
" Booking Histograms in : " << top_folder;
224 if (theTkDigiGeomWatcher.
check(iSetup)) {
230 unsigned int detId_raw = det_u->geographicalId().rawId();
245 edm::LogInfo(
"Phase2OTMonitorRecHit") <<
" Booking Histograms in : " <<
key;
270 layerMEs_.insert(std::make_pair(key, local_histos));
283 psd0.
add<
double>(
"xmin", 0.0);
284 psd0.
add<
bool>(
"switch",
true);
285 psd0.
add<
double>(
"xmax", 000.0);
286 psd0.
add<
int>(
"NxBins", 150);
292 psd0.
add<
std::string>(
"title",
"Global_RecHitPosition_XY_P;x [mm];y [mm];");
293 psd0.
add<
int>(
"NxBins", 1250);
294 psd0.
add<
double>(
"xmin", -1250.0);
295 psd0.
add<
double>(
"xmax", 1250.0);
296 psd0.
add<
int>(
"NyBins", 1250);
297 psd0.
add<
double>(
"ymin", -1250.0);
298 psd0.
add<
double>(
"ymax", 1250.0);
299 psd0.
add<
bool>(
"switch",
true);
305 psd0.
add<
std::string>(
"title",
"Global_RecHitPosition_XY_S;x [mm];y [mm];");
306 psd0.
add<
int>(
"NxBins", 1250);
307 psd0.
add<
double>(
"xmin", -1250.0);
308 psd0.
add<
double>(
"xmax", 1250.0);
309 psd0.
add<
int>(
"NyBins", 1250);
310 psd0.
add<
double>(
"ymin", -1250.0);
311 psd0.
add<
double>(
"ymax", 1250.0);
312 psd0.
add<
bool>(
"switch",
true);
319 psd0.
add<
std::string>(
"title",
"Global_RecHitPosition_RZ_P;z [mm];r [mm]");
320 psd0.
add<
int>(
"NxBins", 1500);
321 psd0.
add<
double>(
"xmin", -3000.0);
322 psd0.
add<
double>(
"xmax", 3000.0);
323 psd0.
add<
int>(
"NyBins", 1250);
324 psd0.
add<
double>(
"ymin", 0.0);
325 psd0.
add<
double>(
"ymax", 1250.0);
326 psd0.
add<
bool>(
"switch",
true);
332 psd0.
add<
std::string>(
"title",
"Global_RecHitPosition_RZ_S;z [mm];r [mm]");
334 psd0.
add<
int>(
"NxBins", 1500);
335 psd0.
add<
double>(
"xmin", -3000.0);
336 psd0.
add<
double>(
"xmax", 3000.0);
337 psd0.
add<
int>(
"NyBins", 1250);
338 psd0.
add<
double>(
"ymin", 0.0);
339 psd0.
add<
double>(
"ymax", 1250.0);
340 psd0.
add<
bool>(
"switch",
true);
347 psd0.
add<
std::string>(
"title",
";Number of clusters per event(macro pixel sensor);");
348 psd0.
add<
double>(
"xmin", 0.0);
349 psd0.
add<
double>(
"xmax", 28000.0);
350 psd0.
add<
int>(
"NxBins", 150);
351 psd0.
add<
bool>(
"switch",
true);
358 psd0.
add<
std::string>(
"title",
";Number of clusters per event(strip sensor);");
359 psd0.
add<
double>(
"xmin", 0.0);
360 psd0.
add<
double>(
"xmax", 28000.0);
361 psd0.
add<
int>(
"NxBins", 150);
362 psd0.
add<
bool>(
"switch",
true);
369 psd0.
add<
std::string>(
"title",
";cluster size(macro pixel sensor);");
370 psd0.
add<
double>(
"xmin", -0.5);
371 psd0.
add<
double>(
"xmax", 30.5);
372 psd0.
add<
int>(
"NxBins", 31);
373 psd0.
add<
bool>(
"switch",
true);
380 psd0.
add<
double>(
"xmin", -0.5);
381 psd0.
add<
double>(
"xmax", 30.5);
382 psd0.
add<
int>(
"NxBins", 31);
383 psd0.
add<
bool>(
"switch",
true);
389 psd0.
add<
std::string>(
"title",
"GlobalRecHitPositionXY_perlayer_P;x[mm];y[mm];");
390 psd0.
add<
int>(
"NxBins", 1250);
391 psd0.
add<
double>(
"xmin", -1250.0);
392 psd0.
add<
double>(
"xmax", 1250.0);
393 psd0.
add<
int>(
"NyBins", 1250);
394 psd0.
add<
double>(
"ymin", -1250.0);
395 psd0.
add<
double>(
"ymax", 1250.0);
396 psd0.
add<
bool>(
"switch",
true);
402 psd0.
add<
std::string>(
"title",
"GlobalRecHitPositionXY_perlayer_S;x[mm];y[mm];");
403 psd0.
add<
int>(
"NxBins", 1250);
404 psd0.
add<
double>(
"xmin", -1250.0);
405 psd0.
add<
double>(
"xmax", 1250.0);
406 psd0.
add<
int>(
"NyBins", 1250);
407 psd0.
add<
double>(
"ymin", -1250.0);
408 psd0.
add<
double>(
"ymax", 1250.0);
409 psd0.
add<
bool>(
"switch",
true);
416 psd0.
add<
int>(
"NxBins", 50);
417 psd0.
add<
double>(
"xmin", -10.0);
418 psd0.
add<
double>(
"xmax", 10.0);
419 psd0.
add<
int>(
"NyBins", 50);
420 psd0.
add<
double>(
"ymin", -10.0);
421 psd0.
add<
double>(
"ymax", 10.0);
422 psd0.
add<
bool>(
"switch",
true);
429 psd0.
add<
int>(
"NxBins", 50);
430 psd0.
add<
double>(
"xmin", -10.0);
431 psd0.
add<
double>(
"xmax", 10.0);
432 psd0.
add<
int>(
"NyBins", 50);
433 psd0.
add<
double>(
"ymin", -10.0);
434 psd0.
add<
double>(
"ymax", 10.0);
435 psd0.
add<
bool>(
"switch",
true);
439 desc.
add<
bool>(
"Verbosity",
false);
441 descriptions.
add(
"Phase2OTMonitorRecHit", desc);
const edm::EDGetTokenT< Phase2TrackerRecHit1DCollectionNew > tokenRecHitsOT_
~Phase2OTMonitorRecHit() override
MonitorElement * book2DFromPSet(const edm::ParameterSet &hpars, DQMStore::IBooker &ibooker)
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
const TrackerTopology * tTopo_
std::map< std::string, RecHitME > layerMEs_
MonitorElement * numberRecHits_
virtual void setCurrentFolder(std::string const &fullpath)
MonitorElement * localPosXY_S
#define DEFINE_FWK_MODULE(type)
MonitorElement * clusterSize_S
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > geomToken_
data_type const * const_iterator
const DetContainer & detUnits() const override
Returm a vector of all GeomDet.
MonitorElement * globalRZ_S_
const TrackerGeometry * tkGeom_
bool getData(T &iHolder) const
Handle< PROD > getHandle(EDGetTokenT< PROD > token) const
Phase2OTMonitorRecHit(const edm::ParameterSet &)
std::string getOTHistoId(uint32_t det_id, const TrackerTopology *tTopo)
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > topoToken_
void bookLayerHistos(DQMStore::IBooker &ibooker, unsigned int det_id, std::string &subdir)
tuple key
prepare the HTCondor submission files and eventually submit them
MonitorElement * globalXY_S_
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
MonitorElement * localPosXY_P
ModuleType getDetectorType(DetId) const
MonitorElement * globalRZ_P_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
MonitorElement * book1DFromPSet(const edm::ParameterSet &hpars, DQMStore::IBooker &ibooker)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void dqmBeginRun(const edm::Run &iRun, const edm::EventSetup &iSetup) override
Log< level::Info, false > LogInfo
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
MonitorElement * globalPosXY_S
T getParameter(std::string const &) const
void add(std::string const &label, ParameterSetDescription const &psetDescription)
bool check(const edm::EventSetup &iSetup)
MonitorElement * globalXY_P_
edm::ParameterSet config_
MonitorElement * globalPosXY_P
MonitorElement * numberRecHits_S
MonitorElement * numberRecHits_P
MonitorElement * clusterSize_P