Skip to content

Commit

Permalink
Merge pull request #33693 from dmeuser/TkDQM_2Dmaps_ImpactParamter
Browse files Browse the repository at this point in the history
2D Maps of Impact Parameters for TkDQM
  • Loading branch information
cmsbuild authored May 12, 2021
2 parents f83238d + bc72091 commit ece6f8e
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 2 deletions.
76 changes: 75 additions & 1 deletion DQMOffline/RecoB/plugins/PrimaryVertexMonitor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,14 @@ PrimaryVertexMonitor::PrimaryVertexMonitor(const edm::ParameterSet& pSet)
dzVsPhi_pt1(nullptr),
dxyVsEta_pt1(nullptr),
dzVsEta_pt1(nullptr),
dxyVsEtaVsPhi_pt1(nullptr),
dzVsEtaVsPhi_pt1(nullptr),
dxyVsPhi_pt10(nullptr),
dzVsPhi_pt10(nullptr),
dxyVsEta_pt10(nullptr),
dzVsEta_pt10(nullptr) {
dzVsEta_pt10(nullptr),
dxyVsEtaVsPhi_pt10(nullptr),
dzVsEtaVsPhi_pt10(nullptr) {
// dqmStore_ = edm::Service<DQMStore>().operator->();

vertexInputTag_ = pSet.getParameter<InputTag>("vertexLabel");
Expand Down Expand Up @@ -177,10 +181,12 @@ void PrimaryVertexMonitor::bookHistograms(DQMStore::IBooker& iBooker, edm::Run c
double DzMax = conf_.getParameter<double>("DzMax");

int PhiBin = conf_.getParameter<int>("PhiBin");
int PhiBin2D = conf_.getParameter<int>("PhiBin2D");
double PhiMin = conf_.getParameter<double>("PhiMin");
double PhiMax = conf_.getParameter<double>("PhiMax");

int EtaBin = conf_.getParameter<int>("EtaBin");
int EtaBin2D = conf_.getParameter<int>("EtaBin2D");
double EtaMin = conf_.getParameter<double>("EtaMin");
double EtaMax = conf_.getParameter<double>("EtaMax");

Expand Down Expand Up @@ -250,6 +256,38 @@ void PrimaryVertexMonitor::bookHistograms(DQMStore::IBooker& iBooker, edm::Run c
dzVsEta_pt1->setAxisTitle("PV track (p_{T} > 1 GeV) #eta", 1);
dzVsEta_pt1->setAxisTitle("PV track (p_{T} > 1 GeV) d_{z} (#mum)", 2);

dxyVsEtaVsPhi_pt1 = iBooker.bookProfile2D("dxyVsEtaVsPhi_pt1",
"PV tracks (p_{T} > 1 GeV) d_{xy} (#mum) VS track #eta VS track #phi",
EtaBin2D,
EtaMin,
EtaMax,
PhiBin2D,
PhiMin,
PhiMax,
DxyBin,
DxyMin,
DxyMax,
"");
dxyVsEtaVsPhi_pt1->setAxisTitle("PV track (p_{T} > 1 GeV) #eta", 1);
dxyVsEtaVsPhi_pt1->setAxisTitle("PV track (p_{T} > 1 GeV) #phi", 2);
dxyVsEtaVsPhi_pt1->setAxisTitle("PV track (p_{T} > 1 GeV) d_{xy} (#mum)", 3);

dzVsEtaVsPhi_pt1 = iBooker.bookProfile2D("dzVsEtaVsPhi_pt1",
"PV tracks (p_{T} > 1 GeV) d_{z} (#mum) VS track #eta VS track #phi",
EtaBin2D,
EtaMin,
EtaMax,
PhiBin2D,
PhiMin,
PhiMax,
DzBin,
DzMin,
DzMax,
"");
dzVsEtaVsPhi_pt1->setAxisTitle("PV track (p_{T} > 1 GeV) #eta", 1);
dzVsEtaVsPhi_pt1->setAxisTitle("PV track (p_{T} > 1 GeV) #phi", 2);
dzVsEtaVsPhi_pt1->setAxisTitle("PV track (p_{T} > 1 GeV) d_{z} (#mum)", 3);

dxyVsPhi_pt10 = iBooker.bookProfile("dxyVsPhi_pt10",
"PV tracks (p_{T} > 10 GeV) d_{xy} (#mum) VS track #phi",
PhiBin,
Expand Down Expand Up @@ -297,6 +335,38 @@ void PrimaryVertexMonitor::bookHistograms(DQMStore::IBooker& iBooker, edm::Run c
"");
dzVsEta_pt10->setAxisTitle("PV track (p_{T} > 10 GeV) #eta", 1);
dzVsEta_pt10->setAxisTitle("PV track (p_{T} > 10 GeV) d_{z} (#mum)", 2);

dxyVsEtaVsPhi_pt10 = iBooker.bookProfile2D("dxyVsEtaVsPhi_pt10",
"PV tracks (p_{T} > 10 GeV) d_{xy} (#mum) VS track #eta VS track #phi",
EtaBin2D,
EtaMin,
EtaMax,
PhiBin2D,
PhiMin,
PhiMax,
DxyBin,
DxyMin,
DxyMax,
"");
dxyVsEtaVsPhi_pt10->setAxisTitle("PV track (p_{T} > 10 GeV) #eta", 1);
dxyVsEtaVsPhi_pt10->setAxisTitle("PV track (p_{T} > 10 GeV) #phi", 2);
dxyVsEtaVsPhi_pt10->setAxisTitle("PV track (p_{T} > 10 GeV) d_{xy} (#mum)", 3);

dzVsEtaVsPhi_pt10 = iBooker.bookProfile2D("dzVsEtaVsPhi_pt10",
"PV tracks (p_{T} > 10 GeV) d_{z} (#mum) VS track #eta VS track #phi",
EtaBin2D,
EtaMin,
EtaMax,
PhiBin2D,
PhiMin,
PhiMax,
DzBin,
DzMin,
DzMax,
"");
dzVsEtaVsPhi_pt10->setAxisTitle("PV track (p_{T} > 10 GeV) #eta", 1);
dzVsEtaVsPhi_pt10->setAxisTitle("PV track (p_{T} > 10 GeV) #phi", 2);
dzVsEtaVsPhi_pt10->setAxisTitle("PV track (p_{T} > 10 GeV) d_{z} (#mum)", 3);
}

PrimaryVertexMonitor::~PrimaryVertexMonitor() {}
Expand Down Expand Up @@ -435,13 +505,17 @@ void PrimaryVertexMonitor::pvTracksPlots(const Vertex& v) {
dzVsPhi_pt1->Fill(phi, Dz);
dxyVsEta_pt1->Fill(eta, Dxy);
dzVsEta_pt1->Fill(eta, Dz);
dxyVsEtaVsPhi_pt1->Fill(eta, phi, Dxy);
dzVsEtaVsPhi_pt1->Fill(eta, phi, Dz);

if (pt < 10.)
continue;
dxyVsPhi_pt10->Fill(phi, Dxy);
dzVsPhi_pt10->Fill(phi, Dz);
dxyVsEta_pt10->Fill(eta, Dxy);
dzVsEta_pt10->Fill(eta, Dz);
dxyVsEtaVsPhi_pt10->Fill(eta, phi, Dxy);
dzVsEtaVsPhi_pt10->Fill(eta, phi, Dz);
}
ntracks->Fill(float(nTracks));
sumpt->Fill(sumPT);
Expand Down
2 changes: 2 additions & 0 deletions DQMOffline/RecoB/plugins/PrimaryVertexMonitor.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,10 @@ class PrimaryVertexMonitor : public DQMEDAnalyzer {
MonitorElement *dxy, *dxy2, *dz, *dxyErr, *dzErr;
MonitorElement *dxyVsPhi_pt1, *dzVsPhi_pt1;
MonitorElement *dxyVsEta_pt1, *dzVsEta_pt1;
MonitorElement *dxyVsEtaVsPhi_pt1, *dzVsEtaVsPhi_pt1;
MonitorElement *dxyVsPhi_pt10, *dzVsPhi_pt10;
MonitorElement *dxyVsEta_pt10, *dzVsEta_pt10;
MonitorElement *dxyVsEtaVsPhi_pt10, *dzVsEtaVsPhi_pt10;
};

#endif
4 changes: 3 additions & 1 deletion DQMOffline/RecoB/python/PrimaryVertexMonitor_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@
DzMax = cms.double(2000.0),
DzMin = cms.double(-2000.0),
PhiBin = cms.int32(32),
PhiBin2D = cms.int32(12),
PhiMax = cms.double(3.141592654),
PhiMin = cms.double(-3.141592654),
EtaBin = cms.int32(26),
EtaBin2D = cms.int32(8),
EtaMax = cms.double(2.5),
EtaMin = cms.double(-2.5)
)
Expand All @@ -32,5 +34,5 @@
from Configuration.Eras.Modifier_phase1Pixel_cff import phase1Pixel
from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker
phase1Pixel.toModify(pvMonitor, EtaBin=31, EtaMin=-3.0, EtaMax=3.0)
phase2_tracker.toModify(pvMonitor, EtaBin=41, EtaMin=-4.0, EtaMax=4.0)
phase2_tracker.toModify(pvMonitor, EtaBin=41, EtaBin2D=9, EtaMin=-4.0, EtaMax=4.0)

0 comments on commit ece6f8e

Please sign in to comment.