ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Calorimeter
CaloLocalHadCalib
python
CaloGetLC_CL_W_OOC_Config.py
Go to the documentation of this file.
1
# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2
3
from
AthenaConfiguration.ComponentAccumulator
import
ComponentAccumulator
4
from
AthenaConfiguration.ComponentFactory
import
CompFactory
5
6
def
GetLC_CL_W_OOC_Cfg
(flags):
7
8
cfg=ComponentAccumulator()
9
10
cfg.addEventAlgo( CompFactory.CaloReadLCClassificationFile(
"ReadLCClassification"
,
11
LCClassificationFileName = flags.LCW.inRootCL, ClassificationKey=
"EMFracClassify"
))
12
13
cfg.addEventAlgo( CompFactory.CaloReadLCWeightsFile(
"ReadLCWeights"
,
14
LCWeightFileName = flags.LCW.inRootW, CorrectionKey=
"H1ClusterCellWeights"
))
15
16
cfg.addEventAlgo( CompFactory.CaloReadLCOutOfClusterFile(
"ReadLCOutOfCluster"
,
17
LCOutOfClusterFileName = flags.LCW.inRootOOC, CorrectionKey=
"OOCCorrection"
))
18
19
cfg.addEventAlgo( CompFactory.CaloReadLCOutOfClusterFile(
"ReadLCOutOfClusterPi0"
,
20
LCOutOfClusterFileName = flags.LCW.inRootOOCPI0, CorrectionKey=
"OOCPi0Correction"
))
21
22
23
# Output pool+sqlite
24
from
RegistrationServices.OutputConditionsAlgConfig
import
OutputConditionsAlgCfg
25
cfg.merge(OutputConditionsAlgCfg(flags,
26
outputFile=flags.LCW.outDirCLWOOC+
"/"
+flags.LCW.outFileNameCLWOOC,
27
ObjectList=[
"CaloLocalHadCoeff#EMFracClassify#/CALO/HadCalibration2/CaloEMFrac"
,
28
"CaloLocalHadCoeff#H1ClusterCellWeights#/CALO/HadCalibration2/H1ClusterCellWeights"
,
29
"CaloLocalHadCoeff#OOCCorrection#/CALO/HadCalibration2/CaloOutOfCluster"
,
30
"CaloLocalHadCoeff#OOCPi0Correction#/CALO/HadCalibration2/CaloOutOfClusterPi0"
31
],
32
IOVTagList=[flags.LCW.outTagCL, flags.LCW.outTagW, flags.LCW.outTagOOC, flags.LCW.outTagOOCPI0],
33
WriteIOV =
True
,
34
Run1 = 0,
35
Run2 = 0x7FFFFFFF
36
))
37
38
return
cfg
39
40
41
if
__name__==
"__main__"
:
42
from
AthenaConfiguration.AllConfigFlags
import
initConfigFlags
43
flags = initConfigFlags()
44
from
CaloLocalHadCalib.LCWConfigFlags
import
addLCWFlags
45
addLCWFlags(flags)
46
47
48
flags.fillFromArgs()
49
50
# inputless job
51
flags.Input.Files=[]
52
53
# for debugging
54
from
AthenaCommon.Constants
import
DEBUG
55
flags.Exec.OutputLevel=DEBUG
56
57
# choose input file
58
flags.LCW.inRootCL =
"/afs/cern.ch/user/m/menke/public/LCWeights_2016/user.menke.mc16.piplusminuszero.LCW.Run2_mu30_dt25.v3.classify.root"
59
flags.LCW.inRootW =
"/afs/cern.ch/user/m/menke/public/LCWeights_2016/user.menke.mc16.piplusminus.LCW.Run2_mu30_dt25.v3.inv_weights.root"
60
flags.LCW.inRootOOC =
"/afs/cern.ch/user/m/menke/public/LCWeights_2016/user.menke.mc16.piplusminus.LCW.Run2_mu30_dt25.v3_EXT2.root"
61
flags.LCW.inRootOOCPI0 =
"/afs/cern.ch/user/m/menke/public/LCWeights_2016/user.menke.mc16.pizero.LCW.Run2_mu30_dt25.v3_EXT2.root"
62
63
# output sqlite
64
flags.IOVDb.DatabaseInstance=
""
65
flags.IOVDb.DBConnection =
"sqlite://;schema=myclwooc.db;dbname=OFLP200"
66
67
flags.lock()
68
69
from
AthenaConfiguration.MainServicesConfig
import
MainServicesCfg
70
cfg = MainServicesCfg(flags)
71
from
IOVDbSvc.IOVDbSvcConfig
import
IOVDbSvcCfg
72
cfg.merge(IOVDbSvcCfg(flags))
73
74
cfg.merge(
GetLC_CL_W_OOC_Cfg
(flags))
75
76
cfg.getService(
"AthenaPoolCnvSvc"
).PoolAttributes += [
"STREAM_MEMBER_WISE = '0'"
]
77
78
# for debugging purposes:
79
cfg.getService(
"StoreGateSvc"
).Dump=
True
80
cfg.getService(
"MessageSvc"
).defaultLimit=999999
81
82
cfg.run(1)
Constants
CaloGetLC_CL_W_OOC_Config.GetLC_CL_W_OOC_Cfg
GetLC_CL_W_OOC_Cfg(flags)
Definition
CaloGetLC_CL_W_OOC_Config.py:6
Generated on
for ATLAS Offline Software by
1.17.0