91def getJetCalibToolSettings(jetdef, modspec):
92
93 calibspecs = modspec.split(':')
94 context = calibspecs[0]
95
96
99
100
101
102
103 jetcollection = jetdef.basename
104
105 if "_noElectrons" in jetcollection:
106 jetcollection = jetcollection.replace("_noElectrons","")
107 if "_noMuons" in jetcollection:
108 jetcollection = jetcollection.replace("_noMuons","")
109 if "_noLeptons" in jetcollection :
110 jetcollection = jetcollection.replace("_noLeptons","")
111 if "_tauSeedEleRM" in jetcollection :
112 jetcollection = jetcollection.replace("_tauSeedEleRM","")
113
114
117
118
119 calibSeqOverride = None
120
121 if len(calibspecs) > 2:
122 calibSeqOverride = calibspecs[2]
123
124 elif context == "T0":
125 calibSeqOverride = "JetArea_Residual_EtaJES"
126 if jetcollection == "AntiKt10UFOCSSKSoftDropBeta100Zcut10":
127 calibSeqOverride = "EtaJES_JMS"
128
129
132 if context == "AnalysisLatest":
133 if jetdef._cflags.GeoModel.Run == LHCPeriod.Run2:
134 cfg = calibdic["Run2"][jetcollection]
135 elif jetdef._cflags.GeoModel.Run == LHCPeriod.Run3:
136 cfg = calibdic["Run3"][jetcollection]
137 elif jetdef._cflags.GeoModel.Run >= LHCPeriod.Run4:
138 cfg = calibdic["HLLHC"][jetcollection]
139 else:
140 cfg = calibdic[context][jetcollection]
141
142 return cfg, calibSeqOverride