50 pixelFlag_(config_.getParameter<bool>(
"PixelPlotFillingFlag")),
51 clsFlag_(config_.getParameter<bool>(
"StandAloneClusteriserFlag")),
52 geomType_(config_.getParameter<std::
string>(
"GeometryType")),
53 otDigiSrc_(config_.getParameter<edm::
InputTag>(
"OuterTrackerDigiSource")),
54 itPixelDigiSrc_(config_.getParameter<edm::
InputTag>(
"InnerPixelDigiSource")),
56 itPixelDigiToken_(consumes<edm::DetSetVector<
PixelDigi>>(itPixelDigiSrc_)),
59 edm::LogInfo(
"Phase2TrackerMonitorDigi") <<
">>> Construct Phase2TrackerMonitorDigi ";
68 edm::LogInfo(
"Phase2TrackerMonitorDigi") <<
">>> Destroy Phase2TrackerMonitorDigi ";
87 if (theTkDigiGeomWatcher.check(iSetup)) {
99 unsigned int rawid = DSViter->id;
100 edm::LogInfo(
"Phase2TrackerMonitorDigi") <<
" Det Id = " << rawid;
106 const DetId detId(rawid);
109 std::map<std::string, DigiMEs>::iterator pos =
layerMEs.find(key);
123 if (nRows * nColumns == 0)
126 DigiMEs& local_mes = pos->second;
133 std::vector<Ph2DigiCluster> digiClusters;
135 int col = di->column();
147 edm::LogInfo(
"Phase2TrackerMonitorDigi") <<
" column " << col <<
" row " << row <<
std::dec << std::endl;
155 if (row_last == -1 ||
abs(row - row_last) != 1 || col != col_last) {
161 digiClusters.push_back(dClus);
163 int pos = digiClusters.back().position + row + 1;
164 int width = digiClusters.back().width + 1;
167 digiClusters.back().position = pos;
168 digiClusters.back().width += 1;
170 edm::LogInfo(
"Phase2TrackerMonitorDigi") <<
" row " << row <<
" col " << col <<
" row_last " << row_last
171 <<
" col_last " << col_last <<
" width " << digiClusters.back().width;
181 float occupancy = 1.0;
182 if (nRows * nColumns > 0)
183 occupancy = nDigi * 1.0 / (nRows * nColumns);
200 DigiMEs& local_mes = ilayer.second;
214 unsigned int rawid = DSViter->id;
216 edm::LogInfo(
"Phase2TrackerMonitorDigi") <<
" Det Id = " << rawid;
221 std::map<std::string, DigiMEs>::iterator pos =
layerMEs.find(key);
224 DigiMEs& local_mes = pos->second;
236 if (nRows * nColumns == 0)
243 std::vector<Ph2DigiCluster> digiClusters;
245 int col = di->column();
247 const DetId detId(rawid);
258 if (di->overThreshold())
260 edm::LogInfo(
"Phase2TrackerMonitorDigi") <<
" column " << col <<
" row " << row <<
std::dec << std::endl;
267 if (row_last == -1 ||
abs(row - row_last) != 1 || col != col_last) {
273 digiClusters.push_back(dClus);
275 int pos = digiClusters.back().position + row + 1;
276 int width = digiClusters.back().width + 1;
279 digiClusters.back().position = pos;
280 digiClusters.back().width += 1;
284 edm::LogInfo(
"Phase2TrackerMonitorDigi") <<
" row " << row <<
" col " << col <<
" row_last " << row_last
285 <<
" col_last " << col_last <<
" width " << digiClusters.back().width;
298 float occupancy = 1.0;
299 if (nRows * nColumns > 0)
300 occupancy = nDigi * 1.0 / (nRows * nColumns);
324 DigiMEs& local_mes = ilayer.second;
342 if (theTkDigiGeomWatcher.check(iSetup)) {
344 unsigned int detId_raw = det_u->geographicalId().rawId();
350 folder_name << top_folder <<
"/"
368 if (Parameters.
getParameter<
bool>(
"switch") && ParametersOcc.getParameter<
bool>(
"switch"))
377 ParametersOcc.getParameter<
double>(
"xmin"),
378 ParametersOcc.getParameter<
double>(
"xmax"));
395 if (Parameters.
getParameter<
bool>(
"switch") && ParametersOcc.getParameter<
bool>(
"switch"))
404 ParametersOcc.getParameter<
double>(
"xmin"),
405 ParametersOcc.getParameter<
double>(
"xmax"));
422 std::map<std::string, DigiMEs>::iterator pos =
layerMEs.find(key);
429 bool isPStypeModForTEDD_1 =
431 bool isPStypeModForTEDD_2 =
435 (
pixelFlag_ || (layer < 4 || (layer > 6 && (isPStypeModForTEDD_1 || isPStypeModForTEDD_2)))) ?
true :
false;
439 edm::LogInfo(
"Phase2TrackerMonitorDigi") <<
" Booking Histograms in : " <<
key;
450 HistoName <<
"NumberOfDigisPerDet";
462 HistoName <<
"TotalNumberOfDigisPerLayer";
474 HistoName <<
"NumberOfHitDetectorsPerLayer";
488 HistoName <<
"ChargeXYMap";
503 HistoName <<
"ChargeOfDigis";
517 HistoName <<
"ChargeOfDigisVsWidth";
535 HistoName <<
"DigiOccupancyS";
546 HistoName <<
"DigiOccupancyVsEtaS";
547 if (Parameters.
getParameter<
bool>(
"switch") && EtaParameters.getParameter<
bool>(
"switch"))
550 EtaParameters.getParameter<int32_t>(
"Nbins"),
551 EtaParameters.getParameter<
double>(
"xmin"),
552 EtaParameters.getParameter<
double>(
"xmax"),
561 HistoName <<
"PositionOfDigisS";
578 HistoName <<
"ClusterPositionS";
593 if (isPStypeModForTEDD_1 || isPStypeModForTEDD_2) {
595 HistoName <<
"FractionOfOverThresholdDigis";
600 HistoName <<
"FractionOfOverThresholdDigisVaEta";
601 if (Parameters.
getParameter<
bool>(
"switch") && EtaParameters.getParameter<
bool>(
"switch"))
604 EtaParameters.getParameter<int32_t>(
"Nbins"),
605 EtaParameters.getParameter<
double>(
"xmin"),
606 EtaParameters.getParameter<
double>(
"xmax"),
619 HistoName <<
"DigiOccupancyP";
630 HistoName <<
"DigiOccupancyVsEtaP";
631 if (Parameters.
getParameter<
bool>(
"switch") && EtaParameters.getParameter<
bool>(
"switch"))
634 EtaParameters.getParameter<int32_t>(
"Nbins"),
635 EtaParameters.getParameter<
double>(
"xmin"),
636 EtaParameters.getParameter<
double>(
"xmax"),
645 HistoName <<
"PositionOfDigisP";
661 HistoName <<
"ClusterPositionP";
680 HistoName <<
"NumberOfClustersPerDet";
692 HistoName <<
"ClusterWidth";
703 layerMEs.insert(std::make_pair(key, local_mes));
715 int nclus = digi_clusters.size();
718 for (
auto& iclus : digi_clusters) {
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > geomToken_
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
MonitorElement * EtaOccupancyProfP
MonitorElement * bookProfile2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, double lowZ, double highZ, char const *option="s", FUNC onbooking=NOOP())
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
unsigned int tidRing(const DetId &id) const
MonitorElement * RZOccupancyMap
virtual LocalPoint localPosition(const MeasurementPoint &) const =0
virtual void setCurrentFolder(std::string const &fullpath)
virtual int ncolumns() const =0
virtual const Topology & topology() const
#define DEFINE_FWK_MODULE(type)
MonitorElement * PositionOfDigisP
MonitorElement * NumberOfClustersPerDet
virtual int nrows() const =0
~Phase2TrackerMonitorDigi() override
unsigned int tidWheel(const DetId &id) const
MonitorElement * NumberOfDigisPerDet
const DetContainer & detUnits() const override
Returm a vector of all GeomDet.
MonitorElement * EtaOccupancyProfS
std::string getITHistoId(uint32_t det_id, const TrackerTopology *tTopo)
const Plane & surface() const
The nominal surface of the GeomDet.
const edm::EDGetTokenT< edm::DetSetVector< PixelDigi > > itPixelDigiToken_
void fillOTDigiHistos(const edm::Handle< edm::DetSetVector< Phase2TrackerDigi >> handle)
MonitorElement * ChargeXYMap
void fillITPixelDigiHistos(const edm::Handle< edm::DetSetVector< PixelDigi >> handle)
constexpr std::array< uint8_t, layerIndexSize > layer
std::map< std::string, DigiMEs > layerMEs
bool getData(T &iHolder) const
unsigned int nHitDetsPerLayer
Handle< PROD > getHandle(EDGetTokenT< PROD > token) const
MonitorElement * PositionOfDigisS
Measurement2DPoint MeasurementPoint
Measurement points are two-dimensional by default.
MonitorElement * FractionOfOvTBitsVsEta
std::string getOTHistoId(uint32_t det_id, const TrackerTopology *tTopo)
MonitorElement * ClusterPositionS
vector< ParameterSet > Parameters
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int, double lowY, double highY, char const *option="s", FUNC onbooking=NOOP())
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > topoToken_
tuple key
prepare the HTCondor submission files and eventually submit them
Abs< T >::type abs(const T &t)
MonitorElement * XYOccupancyMap
unsigned int nDigiPerLayer
void dqmBeginRun(const edm::Run &iRun, const edm::EventSetup &iSetup) override
MonitorElement * DigiOccupancyS
MonitorElement * ClusterPositionP
int getITPixelLayerNumber(const DetId &id) const
const TrackerGeomDet * idToDet(DetId) const override
iterator end()
Return the off-the-end iterator.
Log< level::Info, false > LogInfo
const TrackerGeometry * tkGeom_
MonitorElement * XYPositionMap
edm::ParameterSet config_
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
T getParameter(std::string const &) const
Phase2TrackerMonitorDigi(const edm::ParameterSet &)
MonitorElement * ChargeOfDigisVsWidth
void analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup) override
void fillDigiClusters(DigiMEs &mes, std::vector< Ph2DigiCluster > &digi_clusters)
MonitorElement * NumberOfHitDetectorsPerLayer
MonitorElement * TotalNumberOfDigisPerLayer
MonitorElement * ClusterWidth
void bookHistograms(DQMStore::IBooker &ibooker, edm::Run const &iRun, edm::EventSetup const &iSetup) override
const TrackerTopology * tTopo_
void bookLayerHistos(DQMStore::IBooker &ibooker, unsigned int det_id)
MonitorElement * RZPositionMap
std::string getHistoId(uint32_t det_id, bool flag)
MonitorElement * FractionOfOvTBits
MonitorElement * ChargeOfDigis
iterator begin()
Return an iterator to the first DetSet.
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
collection_type::const_iterator const_iterator
collection_type::const_iterator const_iterator
MonitorElement * DigiOccupancyP
const edm::EDGetTokenT< edm::DetSetVector< Phase2TrackerDigi > > otDigiToken_
int getOTLayerNumber(const DetId &id) const
uint16_t *__restrict__ uint16_t const *__restrict__ adc
constexpr Detector det() const
get the detector field from this detid