CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions | Variables
makeLayoutFileForGui Namespace Reference

Functions

def defaults
 
def eleRej
 
def layDefaults
 
def muRej
 
def sCone
 
def sizeSumpt
 

Variables

dictionary datasetNames = {'RealData' : 'QCD Jets', 'RealMuonsData' : 'muons from Z', 'RealElectronsData' : 'electrons from Z'}
 
list defaultPlots
 
list elerejplots
 
tuple layout = open('shift_pftau_T0_layout.py','w')
 
list layoutDefaultPlots
 
list layoutscone
 
list layoutSizeSumpt
 
string layoutString = 'def pftaulayout(i, p, *rows): i["RecoTauV/Layouts/" + p] = DQMItem(layout=rows)\n\n%s'
 LAYOUTS. More...
 
list muonrejplots = ['RecoTauV/hpsPFTauProducerRealMuonsData_hpsPFTauDiscriminationByLooseMuonRejection/LooseMuonRejectionEff%s', 'RecoTauV/hpsPFTauProducerRealMuonsData_hpsPFTauDiscriminationByMediumMuonRejection/MediumMuonRejectionEff%s', 'RecoTauV/hpsPFTauProducerRealMuonsData_hpsPFTauDiscriminationByTightMuonRejection/TightMuonRejectionEff%s']
 
string outputFileString = 'def shiftpftaulayout(i, p, *rows): i["00 Shift/Tau/" + p] = DQMItem(layout=rows)\n\n%s'
 
tuple stdFill = Template('shiftpftaulayout(\n\tdqmitems,\n\t"$locpath",\n\t$rows\n\t)')
 
tuple stripDiscName = lambdax:(x.split('/')[-1])
 
tuple sumVar = dict( zip(string.letters,[elem for elem in ['signalPFCands','isolationPFChargedHadrCands','isolationPFGammaCands','isolationPFNeutrHadrCands'] ]) )
 
list toAdd = [ defaults('SingleMu/00%s - Fake rate from muons vs %s' % item,'RealMuonsData',item[1]) for item in variables.items() ]
 
dictionary variables = {'a':'pt','b':'pileup','c':'eta','d':'phi'}
 

Function Documentation

def makeLayoutFileForGui.defaults (   locpath,
  dataType,
  var 
)

Definition at line 35 of file makeLayoutFileForGui.py.

References join(), and stripDiscName.

35 
36 def defaults(locpath,dataType,var):
37  rows = [[{ 'path': plot % (dataType,var), 'description': '%s fake rate from %s' % (stripDiscName(plot), datasetNames[dataType]),'draw': {'drawopts': "e"}} for plot in row] for row in defaultPlots]
38  strow = ',\n\t'.join([row.__repr__() for row in rows])
39  return stdFill.substitute(locpath=locpath,rows=strow)
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
def makeLayoutFileForGui.eleRej (   locpath,
  var 
)

Definition at line 44 of file makeLayoutFileForGui.py.

References join(), and stripDiscName.

44 
45 def eleRej(locpath,var):
46  rows = [[{ 'path': plot % var, 'description': '%s fake rate' % (stripDiscName(plot)),'draw': {'drawopts': "e"}} for plot in row] for row in elerejplots]
47  strow = ',\n\t'.join([row.__repr__() for row in rows])
48  return stdFill.substitute(locpath=locpath,rows=strow)
49 
50 #
51 #SingleMu
#
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
def makeLayoutFileForGui.layDefaults (   locpath,
  dataType,
  var 
)

Definition at line 110 of file makeLayoutFileForGui.py.

References join(), stripDiscName, and archive.zip.

111 def layDefaults(locpath,dataType,var):
112  framerows = [[[{ 'path': plot % (dataType,var), 'description': '%s fake rate from %s' % (stripDiscName(plot), datasetNames[dataType]),'draw': {'drawopts': "e"}} for plot in row] for row in frame] for frame in layoutDefaultPlots]
113  strows = [',\n\t'.join([row.__repr__() for row in rows]) for rows in framerows]
114  ret = [stdFill.substitute(locpath=locpath % postfix, rows=strow) for postfix,strow in zip(string.letters,strows)]
115  return '\n'.join(ret)
tuple zip
Definition: archive.py:476
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
def makeLayoutFileForGui.muRej (   locpath,
  var 
)

Definition at line 40 of file makeLayoutFileForGui.py.

References stripDiscName.

40 
41 def muRej(locpath,var):
42  rows = [{ 'path': plot % var, 'description': '%s fake rate' % (stripDiscName(plot)),'draw': {'drawopts': "e"}} for plot in muonrejplots]
43  return stdFill.substitute(locpath=locpath,rows=rows.__repr__())
def makeLayoutFileForGui.sCone (   locpath,
  dataType,
  var 
)

Definition at line 116 of file makeLayoutFileForGui.py.

References join(), and stripDiscName.

117 def sCone(locpath,dataType,var):
118  rows = [[{ 'path': plot % (dataType,var), 'description': '%s fake rate from %s' % (stripDiscName(plot), datasetNames[dataType]),'draw': {'drawopts': "e"}} for plot in row] for row in layoutscone]
119  strow = ',\n\t'.join([row.__repr__() for row in rows])
120  return stdFill.substitute(locpath=locpath,rows=strow)
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
def makeLayoutFileForGui.sizeSumpt (   locpath,
  dataType,
  var 
)

Definition at line 121 of file makeLayoutFileForGui.py.

References join().

122 def sizeSumpt(locpath,dataType,var):
123  typ = lambda x: x.split('_')[-2]
124  if typ == 'SumPt':
125  typ += ' distribution'
126  rows = [[{ 'path': plot % (dataType,var), 'description': '%s faking taus %s of %s' % (datasetNames[dataType],typ(plot), var),'draw': {'drawopts': "e"}} for plot in row] for row in layoutSizeSumpt]
127  strow = ',\n\t'.join([row.__repr__() for row in rows])
128  return stdFill.substitute(locpath=locpath,rows=strow)
static std::string join(char **cmd)
Definition: RemoteFile.cc:18

Variable Documentation

dictionary makeLayoutFileForGui.datasetNames = {'RealData' : 'QCD Jets', 'RealMuonsData' : 'muons from Z', 'RealElectronsData' : 'electrons from Z'}

Definition at line 30 of file makeLayoutFileForGui.py.

Referenced by GeneralHLTOffline.analyze(), OccupancyPlotter.analyze(), OccupancyPlotter.beginRun(), FourVectorHLTOnline.beginRun(), TrigResRateMon.beginRun(), FourVectorHLTOffline.beginRun(), GeneralHLTOffline.bookHistograms(), FourVectorHLTClient.endRun(), and TrigResRateMon.normalizeHLTMatrix().

list makeLayoutFileForGui.defaultPlots
Initial value:
1 = [
2  ['RecoTauV/hpsPFTauProducer%s_hpsPFTauDiscriminationByDecayModeFinding/DecayModeFindingEff%s',
3  'RecoTauV/hpsPFTauProducer%s_hpsPFTauDiscriminationByLooseChargedIsolation/LooseChargedIsolationEff%s',
4  'RecoTauV/hpsPFTauProducer%s_hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr/LooseCombinedIsolationDBSumPtCorrEff%s'],
5  ['RecoTauV/hpsPFTauProducer%s_hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr/MediumCombinedIsolationDBSumPtCorrEff%s',
6  'RecoTauV/hpsPFTauProducer%s_hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr/TightCombinedIsolationDBSumPtCorrEff%s',
7  'RecoTauV/hpsPFTauProducer%s_hpsPFTauDiscriminationByVLooseCombinedIsolationDBSumPtCorr/VLooseCombinedIsolationDBSumPtCorrEff%s'],
8  ]

Definition at line 10 of file makeLayoutFileForGui.py.

list makeLayoutFileForGui.elerejplots
Initial value:
1 = [
2  ['RecoTauV/hpsPFTauProducerRealElectronsData_hpsPFTauDiscriminationByLooseElectronRejection/LooseElectronRejectionEff%s',
3  'RecoTauV/hpsPFTauProducerRealElectronsData_hpsPFTauDiscriminationByMVAElectronRejection/MVAElectronRejectionEff%s',],
4  ['RecoTauV/hpsPFTauProducerRealElectronsData_hpsPFTauDiscriminationByMediumElectronRejection/MediumElectronRejectionEff%s',
5  'RecoTauV/hpsPFTauProducerRealElectronsData_hpsPFTauDiscriminationByTightElectronRejection/TightElectronRejectionEff%s']
6  ]

Definition at line 21 of file makeLayoutFileForGui.py.

tuple makeLayoutFileForGui.layout = open('shift_pftau_T0_layout.py','w')

Definition at line 67 of file makeLayoutFileForGui.py.

Referenced by FWCompactVerticalLayout.Layout().

list makeLayoutFileForGui.layoutDefaultPlots
Initial value:
1 = [
2  [
3  ['RecoTauV/hpsPFTauProducer%s_Matched/PFJetMatchingEff%s',
4  'RecoTauV/hpsPFTauProducer%s_hpsPFTauDiscriminationByDecayModeFinding/DecayModeFindingEff%s'],
5  ['RecoTauV/hpsPFTauProducer%s_hpsPFTauDiscriminationByLooseChargedIsolation/LooseChargedIsolationEff%s',
6  'RecoTauV/hpsPFTauProducer%s_hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr/LooseCombinedIsolationDBSumPtCorrEff%s'],
7  ],
8  [
9  ['RecoTauV/hpsPFTauProducer%s_hpsPFTauDiscriminationByLooseIsolation/LooseIsolationEff%s',
10  'RecoTauV/hpsPFTauProducer%s_hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr/MediumCombinedIsolationDBSumPtCorrEff%s'],
11  ['RecoTauV/hpsPFTauProducer%s_hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr/TightCombinedIsolationDBSumPtCorrEff%s',
12  'RecoTauV/hpsPFTauProducer%s_hpsPFTauDiscriminationByVLooseCombinedIsolationDBSumPtCorr/VLooseCombinedIsolationDBSumPtCorrEff%s'],
13  ]
14  ]

Definition at line 77 of file makeLayoutFileForGui.py.

list makeLayoutFileForGui.layoutscone
Initial value:
1 = [
2  ['RecoTauV/shrinkingConePFTauProducerLeadingPion%s_shrinkingConePFTauDiscriminationByECALIsolationUsingLeadingPion/ECALIsolationUsingLeadingPionEff%s',
3  'RecoTauV/shrinkingConePFTauProducerLeadingPion%s_shrinkingConePFTauDiscriminationByLeadingPionPtCut/LeadingPionPtCutEff%s'],
4  ['RecoTauV/shrinkingConePFTauProducerLeadingPion%s_shrinkingConePFTauDiscriminationByLeadingTrackFinding/LeadingTrackFindingEff%s',
5  'RecoTauV/shrinkingConePFTauProducerLeadingPion%s_shrinkingConePFTauDiscriminationByTrackIsolationUsingLeadingPion/TrackIsolationUsingLeadingPionEff%s']
6  ]

Definition at line 92 of file makeLayoutFileForGui.py.

list makeLayoutFileForGui.layoutSizeSumpt
Initial value:
1 = [
2  ['RecoTauV/hpsPFTauProducer%s_hpsPFTauDiscriminationByDecayModeFinding/hpsPFTauDiscriminationByDecayModeFinding_Size_%s',
3  'RecoTauV/hpsPFTauProducer%s_hpsPFTauDiscriminationByLooseChargedIsolation/hpsPFTauDiscriminationByLooseChargedIsolation_Size_%s',
4  'RecoTauV/hpsPFTauProducer%s_hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr/hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr_Size_%s'],
5  ['RecoTauV/hpsPFTauProducer%s_hpsPFTauDiscriminationByDecayModeFinding/hpsPFTauDiscriminationByDecayModeFinding_SumPt_%s',
6  'RecoTauV/hpsPFTauProducer%s_hpsPFTauDiscriminationByLooseChargedIsolation/hpsPFTauDiscriminationByLooseChargedIsolation_SumPt_%s',
7  'RecoTauV/hpsPFTauProducer%s_hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr/hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr_SumPt_%s'],
8  ]

Definition at line 99 of file makeLayoutFileForGui.py.

string makeLayoutFileForGui.layoutString = 'def pftaulayout(i, p, *rows): i["RecoTauV/Layouts/" + p] = DQMItem(layout=rows)\n\n%s'

LAYOUTS.

Definition at line 74 of file makeLayoutFileForGui.py.

list makeLayoutFileForGui.muonrejplots = ['RecoTauV/hpsPFTauProducerRealMuonsData_hpsPFTauDiscriminationByLooseMuonRejection/LooseMuonRejectionEff%s', 'RecoTauV/hpsPFTauProducerRealMuonsData_hpsPFTauDiscriminationByMediumMuonRejection/MediumMuonRejectionEff%s', 'RecoTauV/hpsPFTauProducerRealMuonsData_hpsPFTauDiscriminationByTightMuonRejection/TightMuonRejectionEff%s']

Definition at line 19 of file makeLayoutFileForGui.py.

string makeLayoutFileForGui.outputFileString = 'def shiftpftaulayout(i, p, *rows): i["00 Shift/Tau/" + p] = DQMItem(layout=rows)\n\n%s'

Definition at line 32 of file makeLayoutFileForGui.py.

tuple makeLayoutFileForGui.stdFill = Template('shiftpftaulayout(\n\tdqmitems,\n\t"$locpath",\n\t$rows\n\t)')

Definition at line 33 of file makeLayoutFileForGui.py.

tuple makeLayoutFileForGui.stripDiscName = lambdax:(x.split('/')[-1])

Definition at line 8 of file makeLayoutFileForGui.py.

Referenced by defaults(), eleRej(), layDefaults(), muRej(), and sCone().

tuple makeLayoutFileForGui.sumVar = dict( zip(string.letters,[elem for elem in ['signalPFCands','isolationPFChargedHadrCands','isolationPFGammaCands','isolationPFNeutrHadrCands'] ]) )

Definition at line 130 of file makeLayoutFileForGui.py.

list makeLayoutFileForGui.toAdd = [ defaults('SingleMu/00%s - Fake rate from muons vs %s' % item,'RealMuonsData',item[1]) for item in variables.items() ]

Definition at line 52 of file makeLayoutFileForGui.py.

Referenced by L1GtPsbSetupConfigOnlineProd.addDefaultPsb(), L1GtPsbSetupConfigOnlineProd.addPsbFromDb(), HcalPulseContainmentManager.correction(), fwlite::MultiChainEvent.MultiChainEvent(), RecoTauPiZeroProducer.produce(), and FWGeometryTableManager.recalculateVisibilityVolumeRec().

dictionary makeLayoutFileForGui.variables = {'a':'pt','b':'pileup','c':'eta','d':'phi'}

Definition at line 28 of file makeLayoutFileForGui.py.

Referenced by tnp::BaseTreeFiller.addBranches_(), TagProbeFitter.addCategory(), TagProbeFitter.addVariable(), GenericMVAJetTagComputer.discriminator(), EmbeddingKineReweightProducer.EmbeddingKineReweightProducer(), NtpProducer< C >.NtpProducer(), PhysicsTools::MVAComputer.setup(), GenericMVAJetTagComputer.taggingVariables(), and TagProbeFitTreeAnalyzer.TagProbeFitTreeAnalyzer().