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 calibSeq = ""
120 forceCalibSeq = False
121
122 if len(calibspecs) > 2:
123 forceCalibSeq = True
124 calibSeq = calibspecs[2]
125
126 elif context == "T0":
127 forceCalibSeq = True
128 calibSeq = "JetArea_Residual_EtaJES"
129 if jetcollection == "AntiKt10UFOCSSKSoftDropBeta100Zcut10":
130 calibSeq = "EtaJES_JMS"
131
132
135 if context == "AnalysisLatest":
136 if jetdef._cflags.GeoModel.Run == LHCPeriod.Run2:
137 cfg = calibdic["Run2"][jetcollection]
138 elif jetdef._cflags.GeoModel.Run == LHCPeriod.Run3:
139 cfg = calibdic["Run3"][jetcollection]
140 elif jetdef._cflags.GeoModel.Run >= LHCPeriod.Run4:
141 cfg = calibdic["HLLHC"][jetcollection]
142 else:
143 cfg = calibdic[context][jetcollection]
144
145 return cfg, calibSeq, forceCalibSeq