Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2025-03-08 03:06:57

0001 import FWCore.ParameterSet.Config as cms
0002 from DQMServices.Core.DQMEDHarvester import DQMEDHarvester
0003 
0004 def _addNoFlow(module):
0005     _noflowSeen = set()
0006     for eff in module.efficiency.value():
0007         tmp = eff.split(" ")
0008         if "cut" in tmp[0]:
0009             continue
0010         ind = -1
0011         if tmp[ind] == "fake" or tmp[ind] == "simpleratio":
0012             ind = -2
0013         if not tmp[ind] in _noflowSeen:
0014             module.noFlowDists.append(tmp[ind])
0015         if not tmp[ind-1] in _noflowSeen:
0016             module.noFlowDists.append(tmp[ind-1])
0017 
0018 _defaultSubdirs = ["Tracking/TrackingMCTruth/SimDoublets/general"]
0019 
0020 postProcessorSimDoublets = DQMEDHarvester("DQMGenericClient",
0021     subDirs = cms.untracked.vstring(_defaultSubdirs),
0022     efficiency = cms.vstring(
0023         "efficiency_vs_pT 'SimDoublets efficiency vs p_{T}; TP transverse momentum p_{T} [GeV]; Total fraction of SimDoublets passing all cuts' pass_numVsPt numVsPt",
0024         "efficiency_vs_eta 'SimDoublets efficiency vs #eta; TP pseudorapidity #eta; Total fraction of SimDoublets passing all cuts' pass_numVsEta numVsEta",
0025         "efficiencyTP_vs_pT 'TrackingParticle efficiency (2 or more connected SimDoublets passing cuts); TP transverse momentum p_{T} [GeV]; Efficiency for TrackingParticles' pass_numTPVsPt numTPVsPt",
0026         "efficiencyTP_vs_eta 'TrackingParticle efficiency (2 or more connected SimDoublets passing cuts); TP pseudorapidity #eta; Efficiency for TrackingParticles' pass_numTPVsEta numTPVsEta"
0027     ),
0028     resolution = cms.vstring(),
0029     cumulativeDists = cms.untracked.vstring(),
0030     noFlowDists = cms.untracked.vstring(),
0031     outputFileName = cms.untracked.string(""),
0032     makeGlobalEffienciesPlot = cms.untracked.bool(True)
0033 )
0034 
0035 _addNoFlow(postProcessorSimDoublets)