diff --git a/DQMOffline/Alignment/interface/DiMuonVertexMonitor.h b/DQMOffline/Alignment/interface/DiMuonVertexMonitor.h index 70f3daa4ed9c0..567f538a80db9 100644 --- a/DQMOffline/Alignment/interface/DiMuonVertexMonitor.h +++ b/DQMOffline/Alignment/interface/DiMuonVertexMonitor.h @@ -50,8 +50,11 @@ class DiMuonVertexMonitor : public DQMEDAnalyzer { //used to select what vertices to read from configuration file const edm::EDGetTokenT vertexToken_; + const std::string motherName_; const std::string MEFolderName_; // Top-level folder name const bool useClosestVertex_; + + std::pair massLimits_; /* for the mass plot x-range */ const float maxSVdist_; // vertex quantities @@ -73,7 +76,7 @@ class DiMuonVertexMonitor : public DQMEDAnalyzer { MonitorElement *hCosPhi3D_; MonitorElement *hCosPhiInv_; MonitorElement *hCosPhiInv3D_; - MonitorElement *hTrackInvMass_; + MonitorElement *hInvMass_; MonitorElement *hCutFlow_; // impact parameters information diff --git a/DQMOffline/Alignment/python/ALCARECOTkAlDQM_cff.py b/DQMOffline/Alignment/python/ALCARECOTkAlDQM_cff.py index 51dabed8cae56..b2306a965789f 100644 --- a/DQMOffline/Alignment/python/ALCARECOTkAlDQM_cff.py +++ b/DQMOffline/Alignment/python/ALCARECOTkAlDQM_cff.py @@ -186,6 +186,7 @@ TrackPtMax = 50 ) + from Alignment.CommonAlignmentProducer.ALCARECOTkAlJpsiMuMu_cff import ALCARECOTkAlJpsiMuMuHLT #ALCARECOTkAlJpsiMuMuHLTDQM = hltMonBitSummary.clone( # directory = "AlCaReco/"+__selectionName+"/HLTSummary", @@ -195,7 +196,22 @@ #) #ALCARECOTkAlJpsiMuMuDQM = cms.Sequence( ALCARECOTkAlJpsiMuMuTrackingDQM + ALCARECOTkAlJpsiMuMuTkAlDQM + ALCARECOTkAlJpsiMuMuHLTDQM) -ALCARECOTkAlJpsiMuMuDQM = cms.Sequence( ALCARECOTkAlJpsiMuMuTrackingDQM + ALCARECOTkAlJpsiMuMuTkAlDQM ) + +ALCARECOTkAlJpsiMuMuVtxDQM = DQMOffline.Alignment.DiMuonVertexMonitor_cfi.DiMuonVertexMonitor.clone( + muonTracks = 'ALCARECO'+__selectionName, + decayMotherName = "J/#psi", + vertices = 'offlinePrimaryVertices', + FolderName = "AlCaReco/"+__selectionName, + maxSVdist = 50 +) + +ALCARECOTkAlJpsiMassBiasDQM = DQMOffline.Alignment.DiMuonMassBiasMonitor_cfi.DiMuonMassBiasMonitor.clone( + muonTracks = 'ALCARECO'+__selectionName, + FolderName = "AlCaReco/"+__selectionName, + decayMotherName = 'J/#psi', + DiMuMassConfig = dict(ymin = 2.7 ,ymax = 3.4)) + +ALCARECOTkAlJpsiMuMuDQM = cms.Sequence( ALCARECOTkAlJpsiMuMuTrackingDQM + ALCARECOTkAlJpsiMuMuTkAlDQM + ALCARECOTkAlJpsiMuMuVtxDQM + ALCARECOTkAlJpsiMassBiasDQM) ######################################################### #############--- TkAlJpsiMuMuHI ---##################### @@ -269,7 +285,22 @@ #) #ALCARECOTkAlUpsilonMuMuDQM = cms.Sequence( ALCARECOTkAlUpsilonMuMuTrackingDQM + ALCARECOTkAlUpsilonMuMuTkAlDQM + ALCARECOTkAlUpsilonMuMuHLTDQM) -ALCARECOTkAlUpsilonMuMuDQM = cms.Sequence( ALCARECOTkAlUpsilonMuMuTrackingDQM + ALCARECOTkAlUpsilonMuMuTkAlDQM ) + +ALCARECOTkAlUpsilonMuMuVtxDQM = DQMOffline.Alignment.DiMuonVertexMonitor_cfi.DiMuonVertexMonitor.clone( + muonTracks = 'ALCARECO'+__selectionName, + decayMotherName = "#Upsilon", + vertices = 'offlinePrimaryVertices', + FolderName = "AlCaReco/"+__selectionName, + maxSVdist = 50 +) + +ALCARECOTkAlUpsilonMassBiasDQM = DQMOffline.Alignment.DiMuonMassBiasMonitor_cfi.DiMuonMassBiasMonitor.clone( + muonTracks = 'ALCARECO'+__selectionName, + FolderName = "AlCaReco/"+__selectionName, + decayMotherName = '#Upsilon', + DiMuMassConfig = dict(ymin = 8.9 ,ymax = 9.9)) + +ALCARECOTkAlUpsilonMuMuDQM = cms.Sequence( ALCARECOTkAlUpsilonMuMuTrackingDQM + ALCARECOTkAlUpsilonMuMuTkAlDQM + ALCARECOTkAlUpsilonMuMuVtxDQM + ALCARECOTkAlUpsilonMassBiasDQM) ############################################################ #############--- TkAlUpsilonMuMuHI ---##################### diff --git a/DQMOffline/Alignment/python/DiMuonMassBiasHarvesting_cff.py b/DQMOffline/Alignment/python/DiMuonMassBiasHarvesting_cff.py index 9f36739a899ab..fb97b16abb971 100644 --- a/DQMOffline/Alignment/python/DiMuonMassBiasHarvesting_cff.py +++ b/DQMOffline/Alignment/python/DiMuonMassBiasHarvesting_cff.py @@ -2,9 +2,34 @@ from DQMOffline.Alignment.DiMuonMassBiasClient_cfi import DiMuonMassBiasClient as diMuonMassBiasClient +# Z-> mm __selectionName = 'TkAlDiMuonAndVertex' ALCARECOTkAlZMuMuMassBiasClient = diMuonMassBiasClient.clone( FolderName = "AlCaReco/"+__selectionName ) alcaTkAlZMuMuBiasClients = cms.Sequence(ALCARECOTkAlZMuMuMassBiasClient) + +# J/psi -> mm +__selectionName = 'TkAlJpsiMuMu' +ALCARECOTkAlJpsiMuMuMassBiasClient = diMuonMassBiasClient.clone( + FolderName = "AlCaReco/"+__selectionName, + fitBackground = True, + fit_par = dict(mean_par = [3.09, 2.7, 3.4], + width_par = [1.0, 0.0, 5.0], + sigma_par = [1.0, 0.0, 5.0]) +) + +alcaTkAlJpsiMuMuBiasClients = cms.Sequence(ALCARECOTkAlJpsiMuMuMassBiasClient) + +# Upsilon -> mm +__selectionName = 'TkAlUpsilonMuMu' +ALCARECOTkAlUpsilonMuMuMassBiasClient = diMuonMassBiasClient.clone( + FolderName = "AlCaReco/"+__selectionName, + fitBackground = True, + fit_par = dict(mean_par = [9.46, 8.9, 9.9], + width_par = [1.0, 0.0, 5.0], + sigma_par = [1.0, 0.0, 5.0]) +) + +alcaTkAlUpsilonMuMuBiasClients = cms.Sequence(ALCARECOTkAlUpsilonMuMuMassBiasClient) diff --git a/DQMOffline/Alignment/python/DiMuonVertexMonitor_cfi.py b/DQMOffline/Alignment/python/DiMuonVertexMonitor_cfi.py index 8e7d63587bf21..7c30903ae51cb 100644 --- a/DQMOffline/Alignment/python/DiMuonVertexMonitor_cfi.py +++ b/DQMOffline/Alignment/python/DiMuonVertexMonitor_cfi.py @@ -3,6 +3,7 @@ from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer DiMuonVertexMonitor = DQMEDAnalyzer('DiMuonVertexMonitor', muonTracks = cms.InputTag('ALCARECOTkAlDiMuon'), + decayMotherName = cms.string('Z'), vertices = cms.InputTag('offlinePrimaryVertices'), FolderName = cms.string('DiMuonVertexMonitor'), maxSVdist = cms.double(50)) diff --git a/DQMOffline/Alignment/src/DiMuonVertexMonitor.cc b/DQMOffline/Alignment/src/DiMuonVertexMonitor.cc index 1a3efaf73fc33..b55a78a39eadb 100644 --- a/DQMOffline/Alignment/src/DiMuonVertexMonitor.cc +++ b/DQMOffline/Alignment/src/DiMuonVertexMonitor.cc @@ -3,6 +3,8 @@ * */ +#include + #include "DQMOffline/Alignment/interface/DiMuonVertexMonitor.h" #include "DQMServices/Core/interface/DQMStore.h" #include "DataFormats/Math/interface/deltaR.h" @@ -28,43 +30,77 @@ DiMuonVertexMonitor::DiMuonVertexMonitor(const edm::ParameterSet& iConfig) : ttbESToken_(esConsumes(edm::ESInputTag("", "TransientTrackBuilder"))), tracksToken_(consumes(iConfig.getParameter("muonTracks"))), vertexToken_(consumes(iConfig.getParameter("vertices"))), + motherName_(iConfig.getParameter("decayMotherName")), MEFolderName_(iConfig.getParameter("FolderName")), useClosestVertex_(iConfig.getParameter("useClosestVertex")), - maxSVdist_(iConfig.getParameter("maxSVdist")) {} + maxSVdist_(iConfig.getParameter("maxSVdist")) { + if (motherName_.find('Z') != std::string::npos) { + massLimits_ = std::make_pair(50., 120); + } else if (motherName_.find("J/#psi") != std::string::npos) { + massLimits_ = std::make_pair(2.7, 3.4); + } else if (motherName_.find("#Upsilon") != std::string::npos) { + massLimits_ = std::make_pair(8.9, 9.9); + } else { + edm::LogError("DiMuonVertexMonitor") << " unrecognized decay mother particle: " << motherName_ + << " setting the default for the Z->mm (50.,120.)" << std::endl; + massLimits_ = std::make_pair(50., 120); + } +} void DiMuonVertexMonitor::bookHistograms(DQMStore::IBooker& iBooker, edm::Run const&, edm::EventSetup const&) { iBooker.setCurrentFolder(MEFolderName_ + "/DiMuonVertexMonitor"); - hSVProb_ = iBooker.book1D("VtxProb", ";ZV vertex probability;N(#mu#mu pairs)", 100, 0., 1.); - hSVChi2_ = - iBooker.book1D("VtxChi2", "#chi^{2} of the Z vertex; #chi^{2} of the Z vertex; N(#mu#mu pairs)", 200, 0., 200.); - hSVNormChi2_ = iBooker.book1D( - "VtxNormChi2", "#chi^{2}/ndf of the Z vertex; #chi^{2}/ndf of Z vertex; N(#mu#mu pairs)", 100, 0., 20.); - hSVDist_ = iBooker.book1D("VtxDist", ";PV-ZV xy distance [#mum];N(#mu#mu pairs)", 100, 0., 300.); - hSVDistErr_ = iBooker.book1D("VtxDistErr", ";PV-ZV xy distance error [#mum];N(#mu#mu pairs)", 100, 0., 1000.); - hSVDistSig_ = iBooker.book1D("VtxDistSig", ";PV-ZV xy distance signficance;N(#mu#mu pairs)", 100, 0., 5.); - hSVCompatibility_ = iBooker.book1D( - "VtxCompatibility", "compatibility of Z vertex; compatibility of Z vertex; N(#mu#mu pairs)", 100, 0., 100.); - - hSVDist3D_ = iBooker.book1D("VtxDist3D", ";PV-ZV 3D distance [#mum];N(#mu#mu pairs)", 100, 0., 300.); - hSVDist3DErr_ = iBooker.book1D("VtxDist3DErr", ";PV-ZV 3D distance error [#mum];N(#mu#mu pairs)", 100, 0., 1000.); - hSVDist3DSig_ = iBooker.book1D("VtxDist3DSig", ";PV-ZV 3D distance signficance;N(#mu#mu pairs)", 100, 0., 5.); - hSVCompatibility3D_ = iBooker.book1D( - "VtxCompatibility3D", "3D compatibility of Z vertex;3D compatibility of Z vertex; N(#mu#mu pairs)", 100, 0., 100.); - - hTrackInvMass_ = iBooker.book1D("TkTkInvMass", ";M(tk,tk) [GeV];N(tk tk pairs)", 70., 50., 120.); - hCosPhi_ = iBooker.book1D("CosPhi", ";cos(#phi_{xy});N(#mu#mu pairs)", 50, -1., 1.); - hCosPhi3D_ = iBooker.book1D("CosPhi3D", ";cos(#phi_{3D});N(#mu#mu pairs)", 50, -1., 1.); - hCosPhiInv_ = iBooker.book1D("CosPhiInv", ";inverted cos(#phi_{xy});N(#mu#mu pairs)", 50, -1., 1.); - hCosPhiInv3D_ = iBooker.book1D("CosPhiInv3D", ";inverted cos(#phi_{3D});N(#mu#mu pairs)", 50, -1., 1.); - - hdxy_ = iBooker.book1D("dxy", ";muon track d_{xy}(PV) [#mum];muon tracks", 150, -300, 300); - hdz_ = iBooker.book1D("dz", ";muon track d_{z}(PV) [#mum];muon tracks", 150, -300, 300); - hdxyErr_ = iBooker.book1D("dxyErr", ";muon track err_{dxy} [#mum];muon tracks", 250, 0., 500.); - hdzErr_ = iBooker.book1D("dzErr", ";muon track err_{dz} [#mum];muon tracks", 250, 0., 500.); - hIP2d_ = iBooker.book1D("IP2d", ";muon track IP_{2D} [#mum];muon tracks", 150, -300, 300); - hIP3d_ = iBooker.book1D("IP3d", ";muon track IP_{3D} [#mum];muon tracks", 150, -300, 300); - hIP2dsig_ = iBooker.book1D("IP2Dsig", ";muon track IP_{2D} significance;muon tracks", 100, 0., 5.); - hIP3dsig_ = iBooker.book1D("IP3Dsig", ";muon track IP_{3D} significance;muon tracks", 100, 0., 5.); + + // clang-format off + std::string ts = fmt::sprintf(";%s vertex probability;N(#mu#mu pairs)", motherName_); + std::string ps = "N(#mu#mu pairs)"; + hSVProb_ = iBooker.book1D("VtxProb", ts, 100, 0., 1.); + + ts = fmt::sprintf("#chi^{2} of the %s vertex; #chi^{2} of the %s vertex; %s", motherName_, motherName_, ps); + hSVChi2_ = iBooker.book1D("VtxChi2", ts, 200, 0., 200.); + + ts = fmt::sprintf("#chi^{2}/ndf of the %s vertex; #chi^{2}/ndf of %s vertex; %s", motherName_, motherName_, ps); + hSVNormChi2_ = iBooker.book1D("VtxNormChi2", ts, 100, 0., 20.); + + std::string histTit = motherName_ + " #rightarrow #mu^{+}#mu^{-}"; + ts = fmt::sprintf("%s;PV- %sV xy distance [#mum];%s", histTit, motherName_, ps); + hSVDist_ = iBooker.book1D("VtxDist", ts, 100, 0., 300.); + + ts = fmt::sprintf("%s;PV-%sV xy distance error [#mum];%s", histTit, motherName_, ps); + hSVDistErr_ = iBooker.book1D("VtxDistErr", ts, 100, 0., 1000.); + + ts = fmt::sprintf("%s;PV-%sV xy distance signficance;%s", histTit, motherName_, ps); + hSVDistSig_ = iBooker.book1D("VtxDistSig", ts, 100, 0., 5.); + + ts = fmt::sprintf("compatibility of %s vertex; compatibility of %s vertex; %s", motherName_, motherName_, ps); + hSVCompatibility_ = iBooker.book1D("VtxCompatibility", ts, 100, 0., 100.); + + ts = fmt::sprintf("%s;PV-%sV 3D distance [#mum];%s", histTit, motherName_, ps); + hSVDist3D_ = iBooker.book1D("VtxDist3D", ts, 100, 0., 300.); + + ts = fmt::sprintf("%s;PV-%sV 3D distance error [#mum];%s", histTit, motherName_, ps); + hSVDist3DErr_ = iBooker.book1D("VtxDist3DErr", ts, 100, 0., 1000.); + + ts = fmt::sprintf("%s;PV-%sV 3D distance signficance;%s", histTit, motherName_, ps); + hSVDist3DSig_ = iBooker.book1D("VtxDist3DSig", ts, 100, 0., 5.); + + ts = fmt::sprintf("3D compatibility of %s vertex;3D compatibility of %s vertex; %s", motherName_, motherName_, ps); + hSVCompatibility3D_ = iBooker.book1D("VtxCompatibility3D", ts, 100, 0., 100.); + + hInvMass_ = iBooker.book1D("InvMass", fmt::sprintf("%s;M(#mu,#mu) [GeV];%s", histTit, ps), 70., massLimits_.first, massLimits_.second); + hCosPhi_ = iBooker.book1D("CosPhi", fmt::sprintf("%s;cos(#phi_{xy});%s", histTit, ps), 50, -1., 1.); + hCosPhi3D_ = iBooker.book1D("CosPhi3D", fmt::sprintf("%s;cos(#phi_{3D});%s", histTit, ps), 50, -1., 1.); + hCosPhiInv_ = iBooker.book1D("CosPhiInv", fmt::sprintf("%s;inverted cos(#phi_{xy});%s", histTit, ps), 50, -1., 1.); + hCosPhiInv3D_ = iBooker.book1D("CosPhiInv3D", fmt::sprintf("%s;inverted cos(#phi_{3D});%s", histTit, ps), 50, -1., 1.); + + hdxy_ = iBooker.book1D("dxy", fmt::sprintf("%s;muon track d_{xy}(PV) [#mum];muon tracks", histTit), 150, -300, 300); + hdz_ = iBooker.book1D("dz", fmt::sprintf("%s;muon track d_{z}(PV) [#mum];muon tracks", histTit), 150, -300, 300); + hdxyErr_ = iBooker.book1D("dxyErr", fmt::sprintf("%s;muon track err_{dxy} [#mum];muon tracks", histTit), 250, 0., 500.); + hdzErr_ = iBooker.book1D("dzErr", fmt::sprintf("%s;muon track err_{dz} [#mum];muon tracks", histTit), 250, 0., 500.); + hIP2d_ = iBooker.book1D("IP2d", fmt::sprintf("%s;muon track IP_{2D} [#mum];muon tracks", histTit), 150, -300, 300); + hIP3d_ = iBooker.book1D("IP3d", fmt::sprintf("%s;muon track IP_{3D} [#mum];muon tracks", histTit), 150, -300, 300); + hIP2dsig_ = iBooker.book1D("IP2Dsig", fmt::sprintf("%s;muon track IP_{2D} significance;muon tracks", histTit), 100, 0., 5.); + hIP3dsig_ = iBooker.book1D("IP3Dsig", fmt::sprintf("%s;muon track IP_{3D} significance;muon tracks", histTit), 100, 0., 5.); + // clang-format on } void DiMuonVertexMonitor::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) { @@ -100,7 +136,7 @@ void DiMuonVertexMonitor::analyze(const edm::Event& iEvent, const edm::EventSetu const auto& Zp4 = p4_tplus + p4_tminus; float track_invMass = Zp4.M(); - hTrackInvMass_->Fill(track_invMass); + hInvMass_->Fill(track_invMass); // creat the pair of TLorentVectors used to make the plos std::pair tktk_p4 = std::make_pair(p4_tplus, p4_tminus); @@ -256,6 +292,7 @@ void DiMuonVertexMonitor::fillDescriptions(edm::ConfigurationDescriptions& descr desc.add("muonTracks", edm::InputTag("ALCARECOTkAlDiMuon")); desc.add("vertices", edm::InputTag("offlinePrimaryVertices")); desc.add("FolderName", "DiMuonVertexMonitor"); + desc.add("decayMotherName", "Z"); desc.add("useClosestVertex", true); desc.add("maxSVdist", 50.); descriptions.addWithDefaultLabel(desc); diff --git a/DQMOffline/Alignment/test/DiMuonVertex_HARVESTING.py b/DQMOffline/Alignment/test/DiMuonTkAlDQMHarvester_cfg.py similarity index 76% rename from DQMOffline/Alignment/test/DiMuonVertex_HARVESTING.py rename to DQMOffline/Alignment/test/DiMuonTkAlDQMHarvester_cfg.py index 5ef58f4e10de4..74fec13c942d5 100644 --- a/DQMOffline/Alignment/test/DiMuonVertex_HARVESTING.py +++ b/DQMOffline/Alignment/test/DiMuonTkAlDQMHarvester_cfg.py @@ -22,6 +22,11 @@ VarParsing.VarParsing.multiplicity.singleton, VarParsing.VarParsing.varType.string, "conditions") +options.register('resonance', + 'Z', + VarParsing.VarParsing.multiplicity.singleton, + VarParsing.VarParsing.varType.string, + "resonance type") options.parseArguments() # import of standard configurations @@ -43,7 +48,7 @@ # Input source process.source = cms.Source("DQMRootSource", - fileNames = cms.untracked.vstring('file:step3_inDQM.root') + fileNames = cms.untracked.vstring('file:step3_inDQM_'+options.resonance+'.root') ) process.options = cms.untracked.PSet( @@ -93,16 +98,34 @@ process.dqmsave_step = cms.Path(process.DQMSaver) +if (options.resonance == 'Z'): + print('',30*"#",'\n # will harvest Z file \n',30*"#") + _folderName = cms.string('AlCaReco/TkAlDiMuonAndVertex') + _doBkgFit = cms.bool(False) + _fitPar = cms.PSet(mean_par = cms.vdouble(90.,60.,120.), + width_par = cms.vdouble(5.0,0.0,120.0), + sigma_par = cms.vdouble(5.0,0.0,120.0)) +elif (options.resonance == 'Jpsi'): + print('',30*"#",'\n # will harvest J/psi file \n',30*"#") + _folderName = cms.string('AlCaReco/TkAlJpsiMuMu') + _doBkgFit = cms.bool(True) + _fitPar = cms.PSet(mean_par = cms.vdouble(3.09, 2.7, 3.4), + width_par = cms.vdouble(1.0, 0.0, 5.0), + sigma_par = cms.vdouble(1.0, 0.0, 5.0)) +elif (options.resonance == 'Upsilon'): + print('',30*"#",'\n # will harvest Upsilon file \n',30*"#") + _folderName = cms.string('AlCaReco/TkAlUpsilonMuMu') + _doBkgFit = cms.bool(True) + _fitPar = cms.PSet(mean_par = cms.vdouble(9.46, 8.9, 9.9), + width_par = cms.vdouble(1.0, 0.0, 5.0), + sigma_par = cms.vdouble(1.0, 0.0, 5.0)) + # the module to harvest process.DiMuonMassBiasClient = cms.EDProducer("DiMuonMassBiasClient", - FolderName = cms.string('AlCaReco/TkAlDiMuonAndVertex'), - fitBackground = cms.bool(False), + FolderName = _folderName, + fitBackground = _doBkgFit, debugMode = cms.bool(True), - fit_par = cms.PSet( - mean_par = cms.vdouble(90.,60.,120.), - width_par = cms.vdouble(5.0,0.0,120.0), - sigma_par = cms.vdouble(5.0,0.0,120.0) - ), + fit_par = _fitPar, MEtoHarvest = cms.vstring( 'DiMuMassVsMuMuPhi', 'DiMuMassVsMuMuEta', diff --git a/DQMOffline/Alignment/test/DiMuonVertexValidator_cfg.py b/DQMOffline/Alignment/test/DiMuonTkAlDQMValidator_cfg.py similarity index 67% rename from DQMOffline/Alignment/test/DiMuonVertexValidator_cfg.py rename to DQMOffline/Alignment/test/DiMuonTkAlDQMValidator_cfg.py index 4e9f7543b5ab1..fcc31b76bf7f8 100644 --- a/DQMOffline/Alignment/test/DiMuonVertexValidator_cfg.py +++ b/DQMOffline/Alignment/test/DiMuonTkAlDQMValidator_cfg.py @@ -17,6 +17,11 @@ VarParsing.VarParsing.multiplicity.singleton, VarParsing.VarParsing.varType.string, "conditions") +options.register('resonance', + 'Z', + VarParsing.VarParsing.multiplicity.singleton, + VarParsing.VarParsing.varType.string, + "resonance type") options.parseArguments() # import of standard configurations @@ -38,9 +43,30 @@ output = cms.optional.untracked.allowed(cms.int32,cms.PSet) ) +process.load("DQMOffline.Configuration.AlCaRecoDQM_cff") + +if (options.resonance == 'Z'): + # Z + print('',30*"#",'\n # will process Z->mm data\n',30*"#") + readFiles = ['/store/relval/CMSSW_12_4_0/RelValZMM_14/ALCARECO/TkAlDiMuonAndVertex-124X_mcRun3_2022_realistic_v5-v1/2580000/f869e2f4-8884-4b4e-af8b-720938ab7fc5.root'] + process.seqALCARECOTkAlDQM = cms.Sequence(process.ALCARECOTkAlDiMuonAndVertexVtxDQM + process.ALCARECOTkAlDiMuonMassBiasDQM) +elif (options.resonance == 'Jpsi'): + # J/psi + print('',30*"#",'\n # will process Jpsi->mm data\n',30*"#") + readFiles = ['/store/relval/CMSSW_12_4_6/RelValEtaBToJpsiJpsi_14TeV/ALCARECO/TkAlJpsiMuMu-124X_mcRun3_2022_realistic_v10-v4/10000/47a900a0-2646-4909-9105-00aa9905210e.root'] + process.seqALCARECOTkAlDQM = cms.Sequence(process.ALCARECOTkAlJpsiMuMuVtxDQM + process.ALCARECOTkAlJpsiMassBiasDQM) +elif (options.resonance == 'Upsilon'): + # upsilon + print('',30*"#",'\n # will process Upsilon->mm data\n',30*"#") + readFiles = ['/store/relval/CMSSW_12_4_6/RelValUpsilon1SToMuMu_14/ALCARECO/TkAlUpsilonMuMu-124X_mcRun3_2022_realistic_v10-v4/10000/ee6e1532-933a-4ed2-a64b-b70a8c8a3953.root'] + process.seqALCARECOTkAlDQM = cms.Sequence(process.ALCARECOTkAlUpsilonMuMuVtxDQM + process.ALCARECOTkAlUpsilonMassBiasDQM) +else: + print('unrecongnized %s resonance',options.resonance) + exit(1) + # Input source process.source = cms.Source("PoolSource", - fileNames = cms.untracked.vstring('/store/relval/CMSSW_12_4_0/RelValZMM_14/ALCARECO/TkAlDiMuonAndVertex-124X_mcRun3_2022_realistic_v5-v1/2580000/f869e2f4-8884-4b4e-af8b-720938ab7fc5.root'), + fileNames = cms.untracked.vstring(readFiles), secondaryFileNames = cms.untracked.vstring() ) @@ -79,7 +105,7 @@ dataTier = cms.untracked.string('DQMIO'), filterName = cms.untracked.string('') ), - fileName = cms.untracked.string('file:step3_inDQM.root'), + fileName = cms.untracked.string('file:step3_inDQM_'+options.resonance+'.root'), outputCommands = process.DQMEventContent.outputCommands, splitLevel = cms.untracked.int32(0) ) @@ -87,11 +113,7 @@ from Configuration.AlCa.GlobalTag import GlobalTag process.GlobalTag = GlobalTag(process.GlobalTag, options.globalTag, '') -process.load("DQMOffline.Configuration.AlCaRecoDQM_cff") - -process.seqALCARECOTkAlDiMuonAndVertex = cms.Sequence(process.ALCARECOTkAlDiMuonAndVertexVtxDQM + process.ALCARECOTkAlDiMuonMassBiasDQM) - -process.dqmoffline_step = cms.EndPath(process.seqALCARECOTkAlDiMuonAndVertex) +process.dqmoffline_step = cms.EndPath(process.seqALCARECOTkAlDQM) process.DQMoutput_step = cms.EndPath(process.DQMoutput) process.schedule = cms.Schedule(process.dqmoffline_step,process.DQMoutput_step) diff --git a/DQMOffline/Alignment/test/testDiMuonVertexMonitor.sh b/DQMOffline/Alignment/test/testDiMuonVertexMonitor.sh index 3ed3084c40b8c..08790cf92d9c1 100755 --- a/DQMOffline/Alignment/test/testDiMuonVertexMonitor.sh +++ b/DQMOffline/Alignment/test/testDiMuonVertexMonitor.sh @@ -7,5 +7,17 @@ if [ "${SCRAM_TEST_NAME}" != "" ] ; then cd ${SCRAM_TEST_NAME} fi -cmsRun ${LOCAL_TEST_DIR}/DiMuonVertexValidator_cfg.py || die "Failure using DiMuonVertexValidator_cfg.py" $? -cmsRun ${LOCAL_TEST_DIR}/DiMuonVertex_HARVESTING.py || die "Failure using DiMuonVertex_HARVESTING.py" $? +echo -e " Tesing on Z->mm \n\n" + +cmsRun ${LOCAL_TEST_DIR}/DiMuonTkAlDQMValidator_cfg.py resonance=Z || die "Failure using DiMuonTkAlDQMValidator_cfg.py resonance=Z" $? +cmsRun ${LOCAL_TEST_DIR}/DiMuonTkAlDQMHarvester_cfg.py resonance=Z || die "Failure using DiMuonTkAlDQMHarvester_cfg.py resonance=Z" $? + +echo -e " Testing on J/psi -> mm \n\n" + +cmsRun ${LOCAL_TEST_DIR}/DiMuonTkAlDQMValidator_cfg.py resonance=Jpsi || die "Failure using DiMuonTkAlDQMValidator_cfg.py resonance=Jpsi" $? +cmsRun ${LOCAL_TEST_DIR}/DiMuonTkAlDQMHarvester_cfg.py resonance=Jpsi || die "Failure using DiMuonTkAlDQMHarvester_cfg.py resonance=Jpsi" $? + +echo -e " Testing on Upsilon -> mm \n\n" + +cmsRun ${LOCAL_TEST_DIR}/DiMuonTkAlDQMValidator_cfg.py resonance=Upsilon || die "Failure using DiMuonTkAlDQMValidator_cfg.py resonance=Upsilon" $? +cmsRun ${LOCAL_TEST_DIR}/DiMuonTkAlDQMHarvester_cfg.py resonance=Upsilon || die "Failure using DiMuonTkAlDQMHarvester_cfg.py resonance=Upsilon" $? diff --git a/DQMOffline/Configuration/python/DQMOffline_SecondStep_cff.py b/DQMOffline/Configuration/python/DQMOffline_SecondStep_cff.py index 7543f494c671c..68a2611628bbe 100644 --- a/DQMOffline/Configuration/python/DQMOffline_SecondStep_cff.py +++ b/DQMOffline/Configuration/python/DQMOffline_SecondStep_cff.py @@ -205,7 +205,9 @@ rpcTier0Client * cscOfflineCollisionsClients * muonQualityTests * - alcaTkAlZMuMuBiasClients + alcaTkAlZMuMuBiasClients * + alcaTkAlJpsiMuMuBiasClients * + alcaTkAlUpsilonMuMuBiasClients ) _run3_GEM_DQMHarvestMuon = DQMHarvestMuon.copy()