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)
133 std::vector<Ph2DigiCluster> digiClusters;
135 int col = di->column();
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);
236 if (nRows * nColumns == 0)
243 std::vector<Ph2DigiCluster> digiClusters;
245 int col = di->column();
247 const DetId detId(rawid);
258 if (di->overThreshold())
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();
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;
462 HistoName <<
"TotalNumberOfDigisPerLayer";
474 HistoName <<
"NumberOfHitDetectorsPerLayer";
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"),
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"),
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"),
715 int nclus = digi_clusters.size();
718 for (
auto& iclus : digi_clusters) {
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > geomToken_
T getParameter(std::string const &) 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())
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.
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
MonitorElement * PositionOfDigisP
unsigned int tidWheel(const DetId &id) const
MonitorElement * NumberOfClustersPerDet
virtual int nrows() const =0
~Phase2TrackerMonitorDigi() override
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)
constexpr Detector det() const
get the detector field from this detid
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)
std::map< std::string, DigiMEs > layerMEs
constexpr std::array< uint8_t, layerIndexSize< TrackerTraits > > layer
unsigned int nHitDetsPerLayer
int getITPixelLayerNumber(const DetId &id) 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
int getOTLayerNumber(const DetId &id) const
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_
Abs< T >::type abs(const T &t)
MonitorElement * XYOccupancyMap
unsigned int nDigiPerLayer
#define DEFINE_FWK_MODULE(type)
void dqmBeginRun(const edm::Run &iRun, const edm::EventSetup &iSetup) override
MonitorElement * DigiOccupancyS
MonitorElement * ClusterPositionP
const TrackerGeomDet * idToDet(DetId) const override
iterator end()
Return the off-the-end iterator.
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Log< level::Info, false > LogInfo
const TrackerGeometry * tkGeom_
MonitorElement * XYPositionMap
edm::ParameterSet config_
const Plane & surface() const
The nominal surface of the GeomDet.
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Phase2TrackerMonitorDigi(const edm::ParameterSet &)
MonitorElement * ChargeOfDigisVsWidth
bool check(const edm::EventSetup &iSetup)
void analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup) override
void fillDigiClusters(DigiMEs &mes, std::vector< Ph2DigiCluster > &digi_clusters)
MonitorElement * NumberOfHitDetectorsPerLayer
std::vector< AlignmentParameters * > Parameters
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)
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
MonitorElement * RZPositionMap
std::string getHistoId(uint32_t det_id, bool flag)
MonitorElement * FractionOfOvTBits
unsigned int tidRing(const DetId &id) const
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_
uint16_t *__restrict__ uint16_t const *__restrict__ adc