178def getCellWeightTool(flags, finder="Cone", mainparam=0.4, input="Topo", onlyCellWeight=False):
179 """
180 Returns a fully configured H1-style cell weighting calibration tool. This tool only uses cell weights!
181 Parameters/type:
182 finder/str : name of jet finder
183 input/str : input objects triggers calibration weights
184 mainparam/float: size parameter for jet
185 """
186 result = ComponentAccumulator()
187 (key,folder,tag) = H1Calibration.getCalibDBParams(flags,finder,mainparam,input, onlyCellWeight, flags.Input.isMC)
188 from IOVDbSvc.IOVDbSvcConfig import addFolders
189 result.merge(addFolders(flags,folder,'CALO_OFL' if flags.Input.isMC else 'CALO',className = 'CaloRec::ToolConstants',
190 tag=tag if H1Calibration.overrideFolder(flags) else None))
191
192
193 toolName = finder + editParm(mainparam) + input
194 cellcalibtool = CompFactory.H1WeightToolCSC12Generic("H1Weight"+toolName,
195 DBHandleKey = key)
196 result.setPrivateTools(cellcalibtool)
197 return result