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

Adding Number of RecHits plot for SiStrip stereo modules (backport to 13_1_X) #41753

Merged
merged 2 commits into from
May 24, 2023
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions DQM/SiStripMonitorTrack/interface/SiStripMonitorTrack.h
Original file line number Diff line number Diff line change
Expand Up @@ -231,10 +231,14 @@ class SiStripMonitorTrack : public DQMEDAnalyzer {
struct SubDetMEs {
int totNClustersOnTrack = 0;
int totNClustersOffTrack = 0;
int totNClustersOnTrackMono = 0;
int totNClustersOnTrackStereo = 0;
MonitorElement* nClustersOnTrack = nullptr;
MonitorElement* nClustersTrendOnTrack = nullptr;
MonitorElement* nClustersOffTrack = nullptr;
MonitorElement* nClustersTrendOffTrack = nullptr;
MonitorElement* nClustersOnTrackMono = nullptr;
MonitorElement* nClustersOnTrackStereo = nullptr;
MonitorElement* ClusterGain = nullptr;
MonitorElement* ClusterStoNCorrOnTrack = nullptr;
MonitorElement* ClusterStoNCorrThinOnTrack = nullptr;
Expand Down
5 changes: 5 additions & 0 deletions DQM/SiStripMonitorTrack/python/SiStripMonitorTrack_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@
xmin = cms.double(-0.5),
xmax = cms.double(2999.5)
),

TH1nClustersOnStereo = cms.PSet( Nbinx = cms.int32(50),
xmin = cms.double(-0.5),
xmax = cms.double(2999.5)
),

TH1nClustersOff = cms.PSet( Nbinx = cms.int32(100),
xmin = cms.double(-0.5),
Expand Down
27 changes: 26 additions & 1 deletion DQM/SiStripMonitorTrack/src/SiStripMonitorTrack.cc
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,12 @@ void SiStripMonitorTrack::analyze(const edm::Event& e, const edm::EventSetup& iS
if (subdet_mes.totNClustersOnTrack > 0) {
fillME(subdet_mes.nClustersOnTrack, subdet_mes.totNClustersOnTrack);
}
if (subdet_mes.totNClustersOnTrackMono > 0) {
fillME(subdet_mes.nClustersOnTrackMono, subdet_mes.totNClustersOnTrackMono);
}
if (subdet_mes.totNClustersOnTrackStereo > 0) {
fillME(subdet_mes.nClustersOnTrackStereo, subdet_mes.totNClustersOnTrackStereo);
}
fillME(subdet_mes.nClustersOffTrack, subdet_mes.totNClustersOffTrack);
fillME(subdet_mes.nClustersTrendOnTrack, iLumisection, subdet_mes.totNClustersOnTrack);
fillME(subdet_mes.nClustersTrendOffTrack, iLumisection, subdet_mes.totNClustersOffTrack);
Expand All @@ -156,6 +162,13 @@ void SiStripMonitorTrack::analyze(const edm::Event& e, const edm::EventSetup& iS
if (subdet_mes.totNClustersOnTrack > 0) {
fillME(subdet_mes.nClustersOnTrack, subdet_mes.totNClustersOnTrack);
}
if (subdet_mes.totNClustersOnTrackMono > 0) {
fillME(subdet_mes.nClustersOnTrackMono, subdet_mes.totNClustersOnTrackMono);
}
if (subdet_mes.totNClustersOnTrackStereo > 0) {
fillME(subdet_mes.nClustersOnTrackStereo, subdet_mes.totNClustersOnTrackStereo);
}

fillME(subdet_mes.nClustersOffTrack, subdet_mes.totNClustersOffTrack);
}
}
Expand Down Expand Up @@ -704,6 +717,13 @@ void SiStripMonitorTrack::bookSubDetMEs(DQMStore::IBooker& ibooker, std::string&
theSubDetMEs.nClustersOnTrack->setAxisTitle(axisName);
theSubDetMEs.nClustersOnTrack->setStatOverflows(kTRUE);

// TotalNumber of Cluster OnTrack
completeName = "Summary_TotalNumberOfClusters_OnTrackStereo" + subdet_tag;
axisName = "Number of on-track stereo clusters in " + name;
theSubDetMEs.nClustersOnTrackStereo = bookME1D(ibooker, "TH1nClustersOnStereo", completeName.c_str());
theSubDetMEs.nClustersOnTrackStereo->setAxisTitle(axisName);
theSubDetMEs.nClustersOnTrackStereo->setStatOverflows(kTRUE);

// TotalNumber of Cluster OffTrack
completeName = "Summary_TotalNumberOfClusters_OffTrack" + subdet_tag;
axisName = "Number of off-track clusters in " + name;
Expand Down Expand Up @@ -1552,8 +1572,13 @@ bool SiStripMonitorTrack::clusterInfos(SiStripClusterInfo* cluster,
}

if (flag == OnTrack) {
if (MEs.iSubdet != nullptr)
if (MEs.iSubdet != nullptr) {
MEs.iSubdet->totNClustersOnTrack++;
if (StripSubdetector(detid).stereo() == 1)
MEs.iSubdet->totNClustersOnTrackStereo++;
else
MEs.iSubdet->totNClustersOnTrackMono++;
}
// layerMEs
if (MEs.iLayer != nullptr) {
if (noise > 0.0)
Expand Down