4 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
5 from AthenaConfiguration.ComponentFactory
import CompFactory
9 kwargs.setdefault(
"EventInfoKey",
"EventInfo")
10 kwargs.setdefault(
"CaloClusterContainerKey",
"HIClusters")
11 kwargs.setdefault(
"HIEventShapeKey",
"CaloSums")
12 kwargs.setdefault(
"HistStream",
"CLUSTERGEOFILLERSTREAM")
13 kwargs.setdefault(
"minFCalET", 0.0)
14 kwargs.setdefault(
"maxFCalET", 5.4)
15 hiClusterGeoFiller = CompFactory.HIClusterGeo_HistoFiller(
"HIClusterGeo_HistoFiller", **kwargs)
16 acc.addEventAlgo(hiClusterGeoFiller)
19 thistSvc = CompFactory.THistSvc(Output=[
"CLUSTERGEOFILLERSTREAM DATAFILE='HIClusterGeo_HistoFiller.root' OPT='RECREATE'"])
20 acc.addService(thistSvc)
25 if __name__ ==
"__main__":
27 This macro will generate a new root file. There will be one histogram per lumiblock in the input files.
28 There will be no histograms for lumiblocks that are not present in the input files.
31 $ asetup Athena,main,latest,here
33 $ python -m HIClusterGeoWeights.HIClusterGeoFiller
34 2.B) alternatively, specify the input file:
35 $ python -m HIClusterGeoWeights.HIClusterGeoFiller --filesInput=some.input.file.AOD.root
36 2.C) alternatively, submit the job to grid:
38 $ pathena --trf "python -m HIClusterGeoWeights.HIClusterGeoFiller --filesInput=%IN" --inDS some.input.dataset --outDS user.$USER.some.output.dataset --extOutFile=HIClusterGeo_HistoFiller.root
39 3) the new file is "HIClusterGeo_HistoFiller.root"
40 The output file shall be fed to "makeHIResponse" macro. There shall be one file per each run. Thus, it might be
41 necessary to merge several "HIClusterGeo_HistoFiller.root" files with "hadd".
43 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
48 from os
import listdir, path
49 direc =
"../storage/data18_hi.00367165.physics_PC.merge.AOD.f1030_m2048"
53 flags.Input.Files = [
"%s/%s" % (direc, x)
for x
in listdir(direc)
if x[x.rfind(
".") + 1:]
in [
"root",
"1",
"2"]]
55 flags.Exec.MaxEvents=-1
56 flags.Exec.SkipEvents=0
57 flags.Concurrency.NumThreads=1
65 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
69 from AthenaPoolCnvSvc.PoolReadConfig
import PoolReadCfg
75 acc.printConfig(withDetails=
True, summariseProps=
True)
79 sys.exit(acc.run().isFailure())