ATLAS Offline Software
Loading...
Searching...
No Matches
LArSCvsRawChannelConfig.py
Go to the documentation of this file.
1# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2
3
4from AthenaConfiguration.ComponentFactory import CompFactory
5from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
6from LArByteStream.LArRawDataReadingConfig import LArRawDataReadingCfg
7from LArByteStream.LArRawSCDataReadingConfig import LArRawSCDataReadingCfg
8from AthenaConfiguration.MainServicesConfig import MainServicesCfg
9from LArCabling.LArCablingConfig import LArOnOffIdMappingCfg, LArOnOffIdMappingSCCfg
10
11
13 acc=ComponentAccumulator()
14 from LArBadChannelTool.LArBadChannelConfig import LArBadChannelCfg
15 acc.merge(LArBadChannelCfg(flags))
16 acc.merge(LArBadChannelCfg(flags,isSC=True))
17
18 acc.merge(LArOnOffIdMappingCfg(flags))
19 acc.merge(LArOnOffIdMappingSCCfg(flags))
20 acc.merge(LArRawSCDataReadingCfg(flags))
21
22 from CaloRec.CaloBCIDAvgAlgConfig import CaloBCIDAvgAlgCfg
23 acc.merge(CaloBCIDAvgAlgCfg(flags))
24
25 if flags.Input.isMC is False and not flags.Common.isOnline:
26 from LumiBlockComps.LuminosityCondAlgConfig import LuminosityCondAlgCfg
27 acc.merge(LuminosityCondAlgCfg(flags))
28 from LumiBlockComps.LBDurationCondAlgConfig import LBDurationCondAlgCfg
29 acc.merge(LBDurationCondAlgCfg(flags))
30
31 from AthenaMonitoring.AthMonitorCfgHelper import AthMonitorCfgHelper
32 helper = AthMonitorCfgHelper(flags,'LArSuperCellMonAlgCfg')
33 acc.merge(LArSCvsRawChannelMonConfigCore(helper, flags))
34
35 return acc
36
37
38def LArSCvsRawChannelMonConfigCore(helper, flags, algname="LArSCvsRawChannelMon"):
39
40
41 alg= helper.addAlgorithm(CompFactory.LArSCvsRawChannelMonAlg,algname)
42
43
44 GroupName="LArSCvsRawGroup"
45 alg.MonGroupName = GroupName
46 alg.SCEnergyCut=90
47 alg.ProblemsToMask=["deadReadout","deadPhys"]
48 cellMonGroup = helper.addGroup(alg,GroupName,'/LAr/LArSuperCellMon_RC')
49
50 for pName in alg.PartitionNames:
51 cellMonGroup.defineHistogram(f"SCEne_{pName},eneSum_{pName};h_SCEne_vs_RawChannelEne_{pName}",
52 title=f'Super Cell energy vs sum of RawChannel energies ({pName}) ;SC [MeV]; Sum [MeV]',
53 type='TH2F', path="",
54 xbins = 100, xmin=0,xmax=50000,
55 ybins = 100, ymin=0,ymax=50000)
56
57 return helper.result()
58
59if __name__=="__main__":
60
61 from AthenaConfiguration.AllConfigFlags import initConfigFlags
62 flags=initConfigFlags()
63 from AthenaCommon.Logging import log
64 from AthenaCommon.Constants import DEBUG
65 log.setLevel(DEBUG)
66 from AthenaConfiguration.TestDefaults import defaultGeometryTags
67 #from AthenaConfiguration.TestDefaults import defaultTestFiles
68 flags.LAr.doAlign=False
69 flags.Input.Files = ["data24_13p6TeV.00481893.physics_Main.daq.RAW._lb1058._SFO-17._0002.data",]
70 flags.GeoModel.AtlasVersion=defaultGeometryTags.RUN3
71 flags.Output.HISTFileName = 'LArSuperCellvsRC.root'
72 flags.Exec.FPE=-1
73 flags.fillFromArgs()
74 flags.lock()
75
76 acc = MainServicesCfg( flags )
77 acc.merge(LArRawDataReadingCfg(flags))
78
79 acc.merge(LArSCvsRawChannelMonAlgCfg(flags))
80 acc.getService("AvalancheSchedulerSvc").ShowDataDependencies=True
81 alg=acc.getEventAlgo("LArSCvsRawChannelMon")
82 alg.EnableLumi=False
83 alg.TrigDecisionTool=""
84 alg.WarnOffenders=True
85 acc.run()
LArSCvsRawChannelMonConfigCore(helper, flags, algname="LArSCvsRawChannelMon")