CMS 3D CMS Logo

Functions
L1TMuonDQMEfficiency_cff Namespace Reference

Functions

def generateEfficiencyStrings (ptQualCuts)
 

Function Documentation

def L1TMuonDQMEfficiency_cff.generateEfficiencyStrings (   ptQualCuts)

Definition at line 4 of file L1TMuonDQMEfficiency_cff.py.

References str.

4 def generateEfficiencyStrings(ptQualCuts):
5  numDenDir = "numerators_and_denominators/"
6  varStrings = ['pt', 'eta', 'phi', 'vtx']
7  etaStrings = ['etaMin0_etaMax0p83', 'etaMin0p83_etaMax1p24', 'etaMin1p24_etaMax2p4', 'etaMin0_etaMax2p4']
8  qualStrings = {0:'qualAll', 4:'qualOpen', 8:'qualDouble', 12:'qualSingle'}
9 
10  efficiencyStrings = []
11  for ptQualCut in ptQualCuts:
12  effDenNamePrefix = numDenDir+"effDen_"
13  effNumNamePrefix = numDenDir+"effNum_"
14  effNamePrefix = "eff_"
15  for varString in varStrings:
16  effDenNameVar = effDenNamePrefix+varString
17  effNumNameVar = effNumNamePrefix+varString+"_"+str(ptQualCut[0])
18  effNameVar = effNamePrefix+varString+"_"+str(ptQualCut[0])
19  if varString != "pt":
20  effDenNameVar += "_"+str(ptQualCut[0])
21  effDenNameEta = ''
22  effNumNameEta = ''
23  effNameEta = ''
24  if varString != "eta":
25  for etaString in etaStrings:
26  effDenName = effDenNameVar+"_"+etaString
27  effNumName = effNumNameVar+"_"+etaString+"_"+qualStrings[ptQualCut[1]]
28  effName = effNameVar+"_"+etaString+"_"+qualStrings[ptQualCut[1]]
29  efficiencyStrings.append(effName+" '"+effName+";;L1 muon efficiency' "+effNumName+" "+effDenName)
30  else:
31  effDenName = effDenNameVar
32  effNumName = effNumNameVar+"_"+qualStrings[ptQualCut[1]]
33  effName = effNameVar+"_"+qualStrings[ptQualCut[1]]
34  efficiencyStrings.append(effName+" '"+effName+";;L1 muon efficiency' "+effNumName+" "+effDenName)
35  return efficiencyStrings
36 
def generateEfficiencyStrings(ptQualCuts)
#define str(s)