6 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
7 from AthenaConfiguration.ComponentFactory
import CompFactory
10 "Block use of specified conditions DB folder so data can be read from elsewhere"
11 iovdbsvc=ca.getService(
"IOVDbSvc")
13 for i
in range(0,len(iovdbsvc.Folders)):
14 if (iovdbsvc.Folders[i].
find(folder)>=0):
15 del iovdbsvc.Folders[i]
17 condInputLoader=ca.getCondAlgo(
"CondInputLoader")
18 for i
in range(0, len(condInputLoader.Load)):
19 if (folder
in condInputLoader.Load[i][-1] ):
20 del condInputLoader.Load[i]
27 lcPerf = CompFactory.GetLCSinglePionsPerf(
"LocalHadPerformance")
30 lcPerf.ClusterBasicCollName =
"CaloTopoClusters"
33 lcPerf.ClusterCollectionNames = [
"CaloTopoClusters",
"CaloWTopoCluster",
"CaloOOCTopoCluster",
"CaloCalTopoClusters"]
35 lcPerf.CalibrationHitContainerNames= [
"LArCalibrationHitInactive",
"LArCalibrationHitActive",
"TileCalibHitActiveCell",
"TileCalibHitInactiveCell"]
36 lcPerf.DMCalibrationHitContainerNames= [
"LArCalibrationHitDeadMaterial_DEAD",
"LArCalibrationHitInactive_DEAD",
"LArCalibrationHitActive_DEAD",
"TileCalibHitDeadMaterial"]
39 lcPerf.DistanceCut = 1.5
40 lcPerf.doEngRecOverTruth =
True
41 lcPerf.doEngTag =
True
42 lcPerf.doEngRecSpect =
True
43 lcPerf.doEngNoiseClus =
True
44 lcPerf.doClusMoments =
True
45 lcPerf.doRecoEfficiency =
True
52 lcPerf.logenermin = 2.0
53 lcPerf.logenermax = 6.4
54 lcPerf.nlogenerbin = 22
55 lcPerf.useGoodClus =
False
56 lcPerf.usePionClustersOnly =
False
57 lcPerf.useRecoEfficiency =
False
59 lcPerf.OutputFileName = flags.LCW.outFileNamePerf
61 cfg.addEventAlgo(lcPerf)
66 if __name__==
"__main__":
67 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
69 from CaloLocalHadCalib.LCWConfigFlags
import addLCWFlags
74 flags.Input.Files = [
"/home/pavol/mc16_13TeV/ESD.29275544._000648.pool.root.1"]
75 flags.Output.ESDFileName=
"esdOut.pool.root"
76 from AthenaConfiguration.Enums
import LHCPeriod
77 flags.GeoModel.Run = LHCPeriod.Run1
78 from AthenaConfiguration.TestDefaults
import defaultGeometryTags
79 flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN1_2010
86 flags.Exec.OutputLevel=DEBUG
89 flags.Calo.TopoCluster.doTopoClusterLocalCalib =
True
90 flags.Calo.TopoCluster.doCellWeightCalib =
False
91 flags.Calo.TopoCluster.doCalibHitMoments =
True
93 flags.Digitization.HighGainEMECIW =
False
94 flags.Calo.Noise.fixedLumiForNoise=60*0.1724*50/25
95 flags.Calo.Noise.useCaloNoiseLumi=
False
99 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
100 from AthenaPoolCnvSvc.PoolReadConfig
import PoolReadCfg
105 from CaloRec.CaloTopoClusterConfig
import CaloTopoClusterCfg
108 topoAlg = cfg.getEventAlgo(
"CaloCalTopoClustersMaker")
109 topoAlg.ClusterCorrectionTools.__getitem__(
"TopoCalibMoments").MatchDmType = 1
110 topoAlg.ClusterCorrectionTools.__getitem__(
"TopoCalibMoments").MomentsNames += [
"ENG_CALIB_OUT_L"]
111 topoAlg.ClusterCorrectionTools.__getitem__(
"TopoCalibMoments").CalibrationHitContainerNames = [
"LArCalibrationHitInactive",
"LArCalibrationHitActive",
"TileCalibHitActiveCell",
"TileCalibHitInactiveCell"]
112 topoAlg.ClusterCorrectionTools.__getitem__(
"TopoCalibMoments").DMCalibrationHitContainerNames = [
"LArCalibrationHitDeadMaterial_DEAD",
"LArCalibrationHitInactive_DEAD",
"LArCalibrationHitActive_DEAD",
"TileCalibHitDeadMaterial"]
115 from CaloRec.CaloTopoClusterConfig
import addSnapshot
116 addSnapshot(topoAlg,
"OOCPi0Calib",
"CaloOOCTopoCluster")
117 addSnapshot(topoAlg,
"LocalCalib",
"CaloWTopoCluster")
122 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
123 myItemList = [
'EventInfo#*',
"McEventCollection#TruthEvent",
124 'xAOD::CaloClusterContainer#CaloCalTopoClusters',
125 'xAOD::CaloClusterAuxContainer#CaloCalTopoClustersAux.']
128 disableEventTag=
True, takeItemsFromInput=
False))
131 blockFolder(cfg,
"/CALO/Ofl/HadCalibration2/CaloEMFrac")
132 blockFolder(cfg,
"/CALO/Ofl/HadCalibration2/H1ClusterCellWeights")
133 blockFolder(cfg,
"/CALO/Ofl/HadCalibration2/CaloOutOfCluster")
134 blockFolder(cfg,
"/CALO/Ofl/HadCalibration2/CaloOutOfClusterPi0")
135 blockFolder(cfg,
"/CALO/Ofl/HadCalibration2/CaloDMCorr2")
140 clFolders=( (
"/CALO/HadCalibration2/CaloEMFrac<tag>CaloEMFrac2-R3S-2021-02-00-00-FTFP-BERT-DT25-EPOS-A3-OFC25-MU60</tag>",
"myclwooc.db",
"CaloLocalHadCoeff"),
141 (
"/CALO/HadCalibration2/H1ClusterCellWeights<tag>CaloH1CellWeights2-R3S-2021-02-00-00-FTFP-BERT-DT25-EPOS-A3-OFC25-MU60</tag>",
"myclwooc.db",
"CaloLocalHadCoeff"),
142 (
"/CALO/HadCalibration2/CaloOutOfCluster<tag>CaloHadOOCCorr2-R3S-2021-02-00-00-FTFP-BERT-DT25-EPOS-A3-OFC25-MU60</tag>",
"myclwooc.db",
"CaloLocalHadCoeff"),
143 (
"/CALO/HadCalibration2/CaloOutOfClusterPi0<tag>CaloHadOOCCorrPi02-R3S-2021-02-00-00-FTFP-BERT-DT25-EPOS-A3-OFC25-MU60</tag>",
"myclwooc.db",
"CaloLocalHadCoeff"),
144 (
"/CALO/HadCalibration2/CaloDMCorr2<tag>CaloHadDMCorr2-R3S-2021-02-00-00-FTFP-BERT-DT25-EPOS-A3-OFC25-MU60</tag>",
"myDm.db",
"CaloLocalHadCoeff") )
145 from IOVDbSvc.IOVDbSvcConfig
import addFolderList
149 cfg.getService(
"StoreGateSvc").Dump=
True
150 cfg.getService(
"MessageSvc").defaultLimit=999999