Skip to content

Commit 7d36b67

Browse files
authored
Merge pull request #47592 from dsidirop1/CMSSW_15_0_0_pre3_TOP_DQM_dxy
Muon dxy 1D Histograms added to all Electron and Muon directories, extended range for PvMult plots for GEN-SIM-RECO AND MINIAOD directories at DQM/Physics
2 parents 3c82c29 + 9c53f57 commit 7d36b67

8 files changed

+108
-8
lines changed

DQM/Physics/src/SingleTopTChannelLeptonDQM.cc

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ namespace SingleTopTChannelLepton {
187187

188188
// --- [STANDARD] --- //
189189
// number of selected primary vertices
190-
hists_["pvMult_"] = ibooker.book1D("PvMult", "N_{good pvs}", 50, 0., 50.);
190+
hists_["pvMult_"] = ibooker.book1D("PvMult", "N_{good pvs}", 50, 0., 100.);
191191
// pt of the leading muon
192192
hists_["muonPt_"] = ibooker.book1D("MuonPt", "pt(#mu TightId, TightIso)", 40, 0., 200.);
193193
// muon multiplicity before std isolation
@@ -260,10 +260,13 @@ namespace SingleTopTChannelLepton {
260260
hists_["muonDelZ_"] = ibooker.book1D("MuonDelZ", "d_{z}(#mu)", 50, -25., 25.);
261261
// dxy for muons (to suppress cosmics)
262262
hists_["muonDelXY_"] = ibooker.book2D("MuonDelXY", "d_{xy}(#mu)", 50, -0.1, 0.1, 50, -0.1, 0.1);
263+
// dxy distribution for muons
264+
hists_["muonDxy_"] = ibooker.book1D("MuonDxy", "d_{xy}(#mu)", 100, -0.05, 0.05);
263265

264266
// set axes titles for dxy for muons
265267
hists_["muonDelXY_"]->setAxisTitle("x [cm]", 1);
266268
hists_["muonDelXY_"]->setAxisTitle("y [cm]", 2);
269+
hists_["muonDxy_"]->setAxisTitle("d_{xy} [cm]", 1);
267270

268271
if (verbosity_ == VERBOSE)
269272
return;
@@ -447,6 +450,12 @@ namespace SingleTopTChannelLepton {
447450
fill("muonDelZ_", muon->innerTrack()->vz()); // CB using inner track!
448451
fill("muonDelXY_", muon->innerTrack()->vx(), muon->innerTrack()->vy());
449452

453+
// d_xy distribution
454+
if (muon->muonBestTrack().isNonnull()) {
455+
double dxy = muon->muonBestTrack()->dxy(Pvertex.position());
456+
fill("muonDxy_", dxy);
457+
}
458+
450459
// apply preselection
451460
if ((!muonSelect_ || (*muonSelect_)(*muon))) {
452461
mMult++;

DQM/Physics/src/SingleTopTChannelLeptonDQM_miniAOD.cc

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ namespace SingleTopTChannelLepton_miniAOD {
176176
// instantaneous luminosity
177177
//hists_["InstLumi_"] = ibooker.book1D("InstLumi", "Inst. Lumi.", 100, 0., 1.e3);
178178
// number of selected primary vertices
179-
hists_["pvMult_"] = ibooker.book1D("PvMult", "N_{good pvs}", 50, 0., 50.);
179+
hists_["pvMult_"] = ibooker.book1D("PvMult", "N_{good pvs}", 50, 0., 100.);
180180
// pt of the leading muon
181181
hists_["muonPt_"] = ibooker.book1D("MuonPt", "pt(#mu TightId, TightIso)", 40, 0., 200.);
182182
// muon multiplicity before std isolation
@@ -274,10 +274,16 @@ namespace SingleTopTChannelLepton_miniAOD {
274274
hists_["muonDelZ_"] = ibooker.book1D("MuonDelZ", "d_{z}(#mu)", 50, -25., 25.);
275275
// dxy for muons (to suppress cosmics)
276276
hists_["muonDelXY_"] = ibooker.book2D("MuonDelXY", "d_{xy}(#mu)", 50, -0.1, 0.1, 50, -0.1, 0.1);
277+
// dxy distribution for muons
278+
hists_["muonDxy_"] = ibooker.book1D("MuonDxy", "d_{xy}(#mu)", 100, -0.05, 0.05);
279+
// muon _dxy error
280+
hists_["muonDxyError_"] = ibooker.book1D("MuonDxyError", "d_{xy} Error (#mu)", 100, 0., 0.05);
277281

278282
// set axes titles for dxy for muons
279283
hists_["muonDelXY_"]->setAxisTitle("x [cm]", 1);
280284
hists_["muonDelXY_"]->setAxisTitle("y [cm]", 2);
285+
hists_["muonDxy_"]->setAxisTitle("d_{xy} [cm]", 1);
286+
hists_["muonDxyError_"]->setAxisTitle("d_{xy} error [cm]", 1);
281287

282288
if (verbosity_ == VERBOSE)
283289
return;
@@ -509,6 +515,15 @@ namespace SingleTopTChannelLepton_miniAOD {
509515
fill("muonDelZ_", muon->innerTrack()->vz()); // CB using inner track!
510516
fill("muonDelXY_", muon->innerTrack()->vx(), muon->innerTrack()->vy());
511517

518+
// d_xy distribution
519+
if (muon->muonBestTrack().isNonnull()) {
520+
double dxy = muon->dB(pat::Muon::PV2D);
521+
fill("muonDxy_", dxy);
522+
523+
double dxyError = muon->edB(pat::Muon::PV2D);
524+
fill("muonDxyError_", dxyError);
525+
}
526+
512527
// apply preselection loose muon
513528
if (!muonSelect_ || (*muonSelect_)(*muon)) {
514529
//loose muon count

DQM/Physics/src/TopSingleLeptonDQM.cc

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include "DataFormats/JetReco/interface/PFJet.h"
66
#include "DataFormats/Math/interface/deltaR.h"
77
#include "JetMETCorrections/Objects/interface/JetCorrectionsRecord.h"
8+
#include "DataFormats/VertexReco/interface/Vertex.h"
89
#include <iostream>
910
#include <memory>
1011

@@ -187,7 +188,7 @@ namespace TopSingleLepton {
187188
// instantaneous luminosity
188189
// hists_["InstLumi_"] = ibooker.book1D("InstLumi", "Inst. Lumi.", 100, 0., 1.e3);
189190
// number of selected primary vertices
190-
hists_["pvMult_"] = ibooker.book1D("PvMult", "N_{good pvs}", 50, 0., 50.);
191+
hists_["pvMult_"] = ibooker.book1D("PvMult", "N_{good pvs}", 50, 0., 100.);
191192
// pt of the leading muon
192193
hists_["muonPt_"] = ibooker.book1D("MuonPt", "pt(#mu TightId, TightIso)", 40, 0., 200.);
193194
// muon multiplicity after tight Id
@@ -271,10 +272,13 @@ namespace TopSingleLepton {
271272
hists_["muonDelZ_"] = ibooker.book1D("MuonDelZ", "d_{z}(#mu)", 50, -25., 25.);
272273
// dxy for muons (to suppress cosmics)
273274
hists_["muonDelXY_"] = ibooker.book2D("MuonDelXY", "d_{xy}(#mu)", 50, -0.1, 0.1, 50, -0.1, 0.1);
275+
// dxy distribution for muons
276+
hists_["muonDxy_"] = ibooker.book1D("MuonDxy", "d_{xy}(#mu)", 100, -0.05, 0.05);
274277

275278
// set axes titles for dxy for muons
276279
hists_["muonDelXY_"]->setAxisTitle("x [cm]", 1);
277280
hists_["muonDelXY_"]->setAxisTitle("y [cm]", 2);
281+
hists_["muonDxy_"]->setAxisTitle("d_{xy} [cm]", 1);
278282

279283
if (verbosity_ == VERBOSE)
280284
return;
@@ -459,6 +463,12 @@ namespace TopSingleLepton {
459463
fill("muonDelZ_", muon->innerTrack()->vz()); // CB using inner track!
460464
fill("muonDelXY_", muon->innerTrack()->vx(), muon->innerTrack()->vy());
461465

466+
// d_xy distribution
467+
if (muon->muonBestTrack().isNonnull()) {
468+
double dxy = muon->muonBestTrack()->dxy(Pvertex.position());
469+
fill("muonDxy_", dxy);
470+
}
471+
462472
// apply preselection
463473
if ((!muonSelect_ || (*muonSelect_)(*muon))) {
464474
mMult++;

DQM/Physics/src/TopSingleLeptonDQM_miniAOD.cc

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ namespace TopSingleLepton_miniAOD {
177177
// instantaneous luminosity
178178
//hists_["InstLumi_"] = ibooker.book1D("InstLumi", "Inst. Lumi.", 100, 0., 1.e3);
179179
// number of selected primary vertices
180-
hists_["pvMult_"] = ibooker.book1D("PvMult", "N_{good pvs}", 50, 0., 50.);
180+
hists_["pvMult_"] = ibooker.book1D("PvMult", "N_{good pvs}", 50, 0., 100.);
181181
// pt of the leading muon
182182
hists_["muonPt_"] = ibooker.book1D("MuonPt", "pt(#mu TightId, TightIso)", 40, 0., 200.);
183183
// muon multiplicity before std isolation
@@ -264,10 +264,16 @@ namespace TopSingleLepton_miniAOD {
264264
hists_["muonDelZ_"] = ibooker.book1D("MuonDelZ", "d_{z}(#mu)", 50, -25., 25.);
265265
// dxy for muons (to suppress cosmics)
266266
hists_["muonDelXY_"] = ibooker.book2D("MuonDelXY", "d_{xy}(#mu)", 50, -0.1, 0.1, 50, -0.1, 0.1);
267+
// dxy distribution for muons
268+
hists_["muonDxy_"] = ibooker.book1D("MuonDxy", "d_{xy}(#mu)", 100, -0.05, 0.05);
269+
// muon _dxy error
270+
hists_["muonDxyError_"] = ibooker.book1D("MuonDxyError", "d_{xy} Error (#mu)", 100, 0., 0.05);
267271

268272
// set axes titles for dxy for muons
269273
hists_["muonDelXY_"]->setAxisTitle("x [cm]", 1);
270274
hists_["muonDelXY_"]->setAxisTitle("y [cm]", 2);
275+
hists_["muonDxy_"]->setAxisTitle("d_{xy} [cm]", 1);
276+
hists_["muonDxyError_"]->setAxisTitle("d_{xy} error [cm]", 1);
271277

272278
if (verbosity_ == VERBOSE)
273279
return;
@@ -492,6 +498,15 @@ namespace TopSingleLepton_miniAOD {
492498
fill("muonDelZ_", muon->innerTrack()->vz()); // CB using inner track!
493499
fill("muonDelXY_", muon->innerTrack()->vx(), muon->innerTrack()->vy());
494500

501+
// d_xy distribution
502+
if (muon->muonBestTrack().isNonnull()) {
503+
double dxy = muon->dB(pat::Muon::PV2D);
504+
fill("muonDxy_", dxy);
505+
506+
double dxyError = muon->edB(pat::Muon::PV2D);
507+
fill("muonDxyError_", dxyError);
508+
}
509+
495510
// apply preselection loose muon
496511
if (!muonSelect_ || (*muonSelect_)(*muon)) {
497512
//loose muon count

DQM/Physics/test/topDQM_harvesting_cfg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
process.dqmSaver.saveByRun = cms.untracked.int32( -1)
3737
process.dqmSaver.saveAtJobEnd = cms.untracked.bool(True)
3838
process.dqmSaver.forceRunNumber = cms.untracked.int32( 1)
39-
process.dqmSaver.workflow = cms.untracked.string('/TopVal/CMSSW_14_2_0_pre4/RECO') ## adapt apropriately
39+
process.dqmSaver.workflow = cms.untracked.string('/TopVal/CMSSW_15_0_0_pre1/RECO') ## adapt apropriately
4040

4141

4242
## path definitions
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
import FWCore.ParameterSet.Config as cms
2+
3+
process = cms.Process('HARVESTING')
4+
5+
# import of standard configurations
6+
process.load('Configuration.StandardSequences.Harvesting_cff')
7+
process.load('Configuration.StandardSequences.EDMtoMEAtRunEnd_cff')
8+
process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
9+
10+
## global tag
11+
process.GlobalTag.globaltag = 'MCRUN2_74_V9'
12+
##process.GlobalTag.globaltag = 'GR_R_38X_V13::All'
13+
#process.GlobalTag.globaltag = 'GR10_P_V10::All'
14+
#process.GlobalTag.globaltag = 'GR_R_52_V7::All'
15+
16+
## input file (adapt input file name correspondingly)
17+
process.source = cms.Source("PoolSource",
18+
fileNames = cms.untracked.vstring("file:topDQM_production_MINIAOD.root"),
19+
processingMode = cms.untracked.string('RunsAndLumis')
20+
)
21+
22+
## number of events
23+
process.maxEvents = cms.untracked.PSet(
24+
input = cms.untracked.int32(-1)
25+
)
26+
27+
## output options
28+
process.options = cms.untracked.PSet(
29+
Rethrow = cms.untracked.vstring('ProductNotFound'),
30+
fileMode = cms.untracked.string('FULLMERGE')
31+
)
32+
33+
## DQMStore and output configuration
34+
process.EDMtoMEConverter.convertOnEndLumi = True
35+
process.EDMtoMEConverter.convertOnEndRun = True
36+
process.dqmSaver.saveByRun = cms.untracked.int32( -1)
37+
process.dqmSaver.saveAtJobEnd = cms.untracked.bool(True)
38+
process.dqmSaver.forceRunNumber = cms.untracked.int32( 1)
39+
process.dqmSaver.workflow = cms.untracked.string('/TopVal/CMSSW_15_0_0_pre1/MINIAODSIM') ## adapt apropriately
40+
41+
42+
## path definitions
43+
process.edmtome = cms.Path(
44+
process.EDMtoME
45+
)
46+
process.dqmsave = cms.Path(
47+
process.DQMSaver
48+
)
49+
50+
## schedule definition
51+
process.schedule = cms.Schedule(process.edmtome,process.dqmsave)

DQM/Physics/test/topDQM_production_cfg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
process.source = cms.Source("PoolSource", fileNames = cms.untracked.vstring())
1818
process.source.skipEvents = cms.untracked.uint32(0)
1919

20-
process.source.fileNames = ['root://cmsxrootd.fnal.gov//store/relval/CMSSW_14_2_0_pre3/RelValTTbar_14TeV/GEN-SIM-RECO/PU_140X_mcRun3_2024_realistic_v26_STD_2024_PU-v1/2590000/3c568c90-b6ff-43be-9b24-8b4e9d862185.root']
20+
process.source.fileNames = ['root://cms-xrd-global.cern.ch//store/relval/CMSSW_15_0_0_pre1/RelValTTbar_14TeV/GEN-SIM-RECO/PU_142X_mcRun3_2025_realistic_v1_STD_2025_PU-v1/2590000/05925bd0-d592-435e-87c1-fd8f4bdbc726.root']
2121

2222
## number of events
2323
process.maxEvents = cms.untracked.PSet(

DQM/Physics/test/topDQM_production_miniAOD.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
process.source = cms.Source("PoolSource", fileNames = cms.untracked.vstring())
1717
process.source.skipEvents = cms.untracked.uint32(0)
18-
process.source.fileNames = ['/store/relval/CMSSW_14_2_0_pre3/RelValTTbar_14TeV/MINIAODSIM/PU_140X_mcRun3_2024_realistic_v26_STD_2024_PU-v1/2590000/a102b4b1-a67d-4b75-ae76-438f4dde5deb.root']
18+
process.source.fileNames = ['root://cms-xrd-global.cern.ch//store/relval/CMSSW_15_0_0_pre1/RelValTTbar_14TeV/MINIAODSIM/PU_142X_mcRun3_2025_realistic_v1_STD_2025_PU-v1/2590000/9fca2393-d957-4166-8ac6-74aa08c54bcb.root']
1919

2020
## number of events
2121
process.maxEvents = cms.untracked.PSet(
@@ -30,7 +30,7 @@
3030

3131
## output
3232
process.output = cms.OutputModule("PoolOutputModule",
33-
fileName = cms.untracked.string('topDQM_production.root'),
33+
fileName = cms.untracked.string('topDQM_production_MINIAOD.root'),
3434
outputCommands = cms.untracked.vstring(
3535
'drop *_*_*_*',
3636
'keep *_*_*_TOPDQM',

0 commit comments

Comments
 (0)