6 if __name__==
'__main__':
11 from AthenaCommon
import Logging
12 log = Logging.logging.getLogger(
'GetCaloLCWPerformanc' )
15 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
17 from CaloLocalHadCalib.LCWConfigFlags
import addLCWFlags
20 parser = flags.getArgumentParser()
22 parser.add_argument(
'--doLocalCalib', default=
False, help=
"Run LCW during reclustering",action=
"store_true")
23 parser.add_argument(
'--doCalibHitMoments', default=
False, help=
"Run calib moments during reclustering",action=
"store_true")
24 parser.add_argument(
'--doCellWeight', default=
False, help=
"Run cell weighting during reclustering",action=
"store_true")
26 parser.add_argument(
'--noiseLumi', default=60*0.1724*50/25, help=
"Lumi used for noise computation (mu*0.1724*50/bunch_spacing)",type=float)
28 args = flags.fillFromArgs(parser=parser)
30 if help
in args
and args.help
is not None and args.help:
34 for _, value
in args._get_kwargs():
43 flags.Exec.OutputLevel=DEBUG
46 flags.Calo.TopoCluster.doTopoClusterLocalCalib = args.doLocalCalib
47 flags.Calo.TopoCluster.doCellWeightCalib = args.doCellWeight
48 flags.Calo.TopoCluster.doCalibHitMoments = args.doCalibHitMoments
50 flags.Digitization.HighGainEMECIW =
False
51 flags.Calo.Noise.fixedLumiForNoise = args.noiseLumi
52 flags.Calo.Noise.useCaloNoiseLumi=
False
56 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
57 from AthenaPoolCnvSvc.PoolReadConfig
import PoolReadCfg
62 from CaloRec.CaloTopoClusterConfig
import CaloTopoClusterCfg
65 topoAlg = cfg.getEventAlgo(
"CaloCalTopoClustersMaker")
66 topoAlg.ClusterCorrectionTools.__getitem__(
"TopoCalibMoments").MatchDmType = 1
67 topoAlg.ClusterCorrectionTools.__getitem__(
"TopoCalibMoments").MomentsNames += [
"ENG_CALIB_OUT_L"]
68 topoAlg.ClusterCorrectionTools.__getitem__(
"TopoCalibMoments").CalibrationHitContainerNames = [
"LArCalibrationHitInactive",
"LArCalibrationHitActive",
"TileCalibHitActiveCell",
"TileCalibHitInactiveCell"]
69 topoAlg.ClusterCorrectionTools.__getitem__(
"TopoCalibMoments").DMCalibrationHitContainerNames = [
"LArCalibrationHitDeadMaterial_DEAD",
"LArCalibrationHitInactive_DEAD",
"LArCalibrationHitActive_DEAD",
"TileCalibHitDeadMaterial"]
72 from CaloRec.CaloTopoClusterConfig
import addSnapshot
73 addSnapshot(topoAlg,
"OOCPi0Calib",
"CaloOOCTopoCluster")
74 addSnapshot(topoAlg,
"LocalCalib",
"CaloWTopoCluster")
76 from CaloLocalHadCalib.CaloLCWPerformanceConfig
import GetLCWPerfCfg
80 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
81 myItemList = [
'EventInfo#*',
"McEventCollection#TruthEvent",
82 'xAOD::CaloClusterContainer#CaloCalTopoClusters',
83 'xAOD::CaloClusterAuxContainer#CaloCalTopoClustersAux.']
86 disableEventTag=
True, takeItemsFromInput=
False))
89 from CaloLocalHadCalib.CaloLCWPerformanceConfig
import blockFolder
90 blockFolder(cfg,
"/CALO/Ofl/HadCalibration2/CaloEMFrac")
91 blockFolder(cfg,
"/CALO/Ofl/HadCalibration2/H1ClusterCellWeights")
92 blockFolder(cfg,
"/CALO/Ofl/HadCalibration2/CaloOutOfCluster")
93 blockFolder(cfg,
"/CALO/Ofl/HadCalibration2/CaloOutOfClusterPi0")
94 blockFolder(cfg,
"/CALO/Ofl/HadCalibration2/CaloDMCorr2")
99 clFolders=( (
"/CALO/HadCalibration2/CaloEMFrac<tag>CaloEMFrac2-R3S-2021-02-00-00-FTFP-BERT-DT25-EPOS-A3-OFC25-MU60</tag>",
"myclwooc.db",
"CaloLocalHadCoeff"),
100 (
"/CALO/HadCalibration2/H1ClusterCellWeights<tag>CaloH1CellWeights2-R3S-2021-02-00-00-FTFP-BERT-DT25-EPOS-A3-OFC25-MU60</tag>",
"myclwooc.db",
"CaloLocalHadCoeff"),
101 (
"/CALO/HadCalibration2/CaloOutOfCluster<tag>CaloHadOOCCorr2-R3S-2021-02-00-00-FTFP-BERT-DT25-EPOS-A3-OFC25-MU60</tag>",
"myclwooc.db",
"CaloLocalHadCoeff"),
102 (
"/CALO/HadCalibration2/CaloOutOfClusterPi0<tag>CaloHadOOCCorrPi02-R3S-2021-02-00-00-FTFP-BERT-DT25-EPOS-A3-OFC25-MU60</tag>",
"myclwooc.db",
"CaloLocalHadCoeff"),
103 (
"/CALO/HadCalibration2/CaloDMCorr2<tag>CaloHadDMCorr2-R3S-2021-02-00-00-FTFP-BERT-DT25-EPOS-A3-OFC25-MU60</tag>",
"myDm.db",
"CaloLocalHadCoeff") )
104 from IOVDbSvc.IOVDbSvcConfig
import addFolderList
108 cfg.getService(
"StoreGateSvc").Dump=
True
109 cfg.getService(
"MessageSvc").defaultLimit=999999