Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TkDQM: Add standalone monitoring modules for OT Rechits and new resolution plots for ITRechits #33482

Merged
merged 5 commits into from Apr 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 3 additions & 7 deletions DQM/SiTrackerPhase2/plugins/Phase2ITMonitorCluster.cc
Expand Up @@ -92,19 +92,16 @@ Phase2ITMonitorCluster::~Phase2ITMonitorCluster() {
//
// -- DQM Begin Run
void Phase2ITMonitorCluster::dqmBeginRun(const edm::Run& iRun, const edm::EventSetup& iSetup) {
edm::ESHandle<TrackerGeometry> geomHandle = iSetup.getHandle(geomToken_);
tkGeom_ = &(*geomHandle);
edm::ESHandle<TrackerTopology> tTopoHandle = iSetup.getHandle(topoToken_);
tTopo_ = tTopoHandle.product();
tkGeom_ = &iSetup.getData(geomToken_);
tTopo_ = &iSetup.getData(topoToken_);
}

//
// -- Analyze
//
void Phase2ITMonitorCluster::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) {
// Getting the clusters
edm::Handle<edmNew::DetSetVector<SiPixelCluster>> itPixelClusterHandle;
iEvent.getByToken(itPixelClusterToken_, itPixelClusterHandle);
const auto& itPixelClusterHandle = iEvent.getHandle(itPixelClusterToken_);
// Number of clusters
std::map<std::string, unsigned int> nClsmap;
unsigned int nclusGlobal = 0;
Expand Down Expand Up @@ -196,7 +193,6 @@ void Phase2ITMonitorCluster::bookHistograms(DQMStore::IBooker& ibooker,
//Now book layer wise histos
edm::ESWatcher<TrackerDigiGeometryRecord> theTkDigiGeomWatcher;
if (theTkDigiGeomWatcher.check(iSetup)) {
edm::ESHandle<TrackerGeometry> geomHandle = iSetup.getHandle(geomToken_);
for (auto const& det_u : tkGeom_->detUnits()) {
//Always check TrackerNumberingBuilder before changing this part
if (!(det_u->subDetector() == GeomDetEnumerators::SubDetector::P2PXB ||
Expand Down
10 changes: 3 additions & 7 deletions DQM/SiTrackerPhase2/plugins/Phase2ITMonitorRecHit.cc
Expand Up @@ -101,8 +101,7 @@ void Phase2ITMonitorRecHit::analyze(const edm::Event& iEvent, const edm::EventSe

void Phase2ITMonitorRecHit::fillITHistos(const edm::Event& iEvent) {
// Get the RecHits
edm::Handle<SiPixelRecHitCollection> rechits;
iEvent.getByToken(tokenRecHitsIT_, rechits);
const auto& rechits = iEvent.getHandle(tokenRecHitsIT_);
if (!rechits.isValid())
return;
std::map<std::string, unsigned int> nrechitLayerMap;
Expand Down Expand Up @@ -173,10 +172,8 @@ void Phase2ITMonitorRecHit::fillITHistos(const edm::Event& iEvent) {
}

void Phase2ITMonitorRecHit::dqmBeginRun(const edm::Run& iRun, const edm::EventSetup& iSetup) {
edm::ESHandle<TrackerGeometry> geomHandle = iSetup.getHandle(geomToken_);
tkGeom_ = &(*geomHandle);
edm::ESHandle<TrackerTopology> tTopoHandle = iSetup.getHandle(topoToken_);
tTopo_ = tTopoHandle.product();
tkGeom_ = &iSetup.getData(geomToken_);
tTopo_ = &iSetup.getData(topoToken_);
}

void Phase2ITMonitorRecHit::bookHistograms(DQMStore::IBooker& ibooker,
Expand Down Expand Up @@ -206,7 +203,6 @@ void Phase2ITMonitorRecHit::bookHistograms(DQMStore::IBooker& ibooker,
//Now book layer wise histos
edm::ESWatcher<TrackerDigiGeometryRecord> theTkDigiGeomWatcher;
if (theTkDigiGeomWatcher.check(iSetup)) {
edm::ESHandle<TrackerGeometry> geomHandle = iSetup.getHandle(geomToken_);
for (auto const& det_u : tkGeom_->detUnits()) {
//Always check TrackerNumberingBuilder before changing this part
if (!(det_u->subDetector() == GeomDetEnumerators::SubDetector::P2PXB ||
Expand Down
11 changes: 3 additions & 8 deletions DQM/SiTrackerPhase2/plugins/Phase2OTMonitorCluster.cc
Expand Up @@ -96,19 +96,15 @@ Phase2OTMonitorCluster::~Phase2OTMonitorCluster() {
//
// -- DQM Begin Run
void Phase2OTMonitorCluster::dqmBeginRun(const edm::Run& iRun, const edm::EventSetup& iSetup) {
edm::ESHandle<TrackerGeometry> geomHandle = iSetup.getHandle(geomToken_);
tkGeom_ = &(*geomHandle);
edm::ESHandle<TrackerTopology> tTopoHandle = iSetup.getHandle(topoToken_);
tTopo_ = tTopoHandle.product();
tkGeom_ = &iSetup.getData(geomToken_);
tTopo_ = &iSetup.getData(topoToken_);
}
//
// -- Analyze
//
void Phase2OTMonitorCluster::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) {
// Getting the clusters
edm::Handle<Phase2TrackerCluster1DCollectionNew> clusterHandle;
iEvent.getByToken(clustersToken_, clusterHandle);

const auto& clusterHandle = iEvent.getHandle(clustersToken_);
// Number of clusters
std::map<std::string, unsigned int> nClustersCounter_P; //map of detidkey vs #cls
std::map<std::string, unsigned int> nClustersCounter_S; //map of detidkey vs #cls
Expand Down Expand Up @@ -211,7 +207,6 @@ void Phase2OTMonitorCluster::bookHistograms(DQMStore::IBooker& ibooker,
//Now book layer wise histos
edm::ESWatcher<TrackerDigiGeometryRecord> theTkDigiGeomWatcher;
if (theTkDigiGeomWatcher.check(iSetup)) {
edm::ESHandle<TrackerGeometry> geomHandle = iSetup.getHandle(geomToken_);
for (auto const& det_u : tkGeom_->detUnits()) {
//Always check TrackerNumberingBuilder before changing this part
//continue if Pixel
Expand Down