3 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
4 from AthenaConfiguration.ComponentFactory
import CompFactory
10 from CaloRec.CaloRecoConfig
import CaloRecoCfg
12 from CaloRec.CaloTowerMakerConfig
import CaloTowerMakerCfg
14 inputTowers = towerMaker.TowerContainerName
16 extractCGC = CompFactory.ExtractCaloGeoConstants(
"ExtractCaloGeoConstants", InputTowerKey=inputTowers, HistStream=
"CALOGEOEXTRACTSTREAM")
17 acc.addEventAlgo(extractCGC)
19 acc.addService(CompFactory.THistSvc(Output=[
"CALOGEOEXTRACTSTREAM DATAFILE='cluster.geo.XXX.root' OPT='RECREATE'"]))
24 if __name__ ==
"__main__":
26 This macro will generate a new root weight file with histograms "h3_w", "h3_eta", "h3_phi", and "h3_R"
27 that are stored in "/cvmfs/atlas.cern.ch/repo/sw/database/GroupData/HIJetCorrection/cluster.geo....root" files.
28 It's based on the code from https://gitlab.cern.ch/atlas-physics/hi/jets/HICaloGeo/
29 To have correct weights, one needs to assure:
30 1) have consistent input file, conditions, and geometry
31 2) have only 1 event processed
34 $ asetup Athena,master,latest,here
36 $ python -m HIEventUtils.HICaloGeoExtract
37 3) the new file is "cluster.geo.XXX.root"; rename it however is appropriate
39 In the root weight file, there are also histograms "h3_eta_phi_response", "h3_eta_phi_offset",
40 and "h1_run_index". These are produced elsewhere.
43 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
44 from AthenaConfiguration.TestDefaults
import defaultTestFiles, defaultGeometryTags
53 flags.Input.Files = [defaultTestFiles.d +
"/RecJobTransformTests/data22_hi/RAWFiles/data22_hi.00440101.physics_MinBias.daq.RAW/data22_hi.00440101.physics_MinBias.daq.RAW._lb0214._SFO-11._0001.data"]
54 flags.IOVDb.GlobalTag =
"CONDBR2-BLKPA-2022-09"
55 flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN3
59 flags.Exec.MaxEvents=1
60 flags.Concurrency.NumThreads=1
61 flags.Trigger.triggerConfig =
"DB"
62 flags.Reco.EnableHI =
True
65 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
70 acc.printConfig(withDetails=
True, summariseProps=
True)
74 sys.exit(acc.run().isFailure())