ATLAS Offline Software
LArSCvsRawChannelConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2 
3 
4 from AthenaConfiguration.ComponentFactory import CompFactory
5 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
6 from LArByteStream.LArRawDataReadingConfig import LArRawDataReadingCfg
7 from LArByteStream.LArRawSCDataReadingConfig import LArRawSCDataReadingCfg
8 from AthenaConfiguration.MainServicesConfig import MainServicesCfg
9 from LArCabling.LArCablingConfig import LArOnOffIdMappingCfg, LArOnOffIdMappingSCCfg
10 
11 
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 
38 def 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 
59 if __name__=="__main__":
60 
61  from AthenaConfiguration.AllConfigFlags import 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()
python.LuminosityCondAlgConfig.LuminosityCondAlgCfg
def LuminosityCondAlgCfg(flags, useOnlineLumi=None, suffix=None)
Definition: LuminosityCondAlgConfig.py:17
LArCablingConfig.LArOnOffIdMappingSCCfg
def LArOnOffIdMappingSCCfg(configFlags)
Definition: LArCablingConfig.py:65
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.CaloBCIDAvgAlgConfig.CaloBCIDAvgAlgCfg
def CaloBCIDAvgAlgCfg(flags, **kwargs)
Definition: CaloBCIDAvgAlgConfig.py:11
python.LArRawDataReadingConfig.LArRawDataReadingCfg
def LArRawDataReadingCfg(flags, **kwargs)
Definition: LArRawDataReadingConfig.py:11
python.LArBadChannelConfig.LArBadChannelCfg
def LArBadChannelCfg(configFlags, tag=None, isSC=False)
Definition: LArBadChannelConfig.py:8
python.LArRawSCDataReadingConfig.LArRawSCDataReadingCfg
def LArRawSCDataReadingCfg(configFlags, **kwargs)
Definition: LArRawSCDataReadingConfig.py:8
python.MainServicesConfig.MainServicesCfg
def MainServicesCfg(flags, LoopMgr='AthenaEventLoopMgr')
Definition: MainServicesConfig.py:260
LArSCvsRawChannelConfig.LArSCvsRawChannelMonConfigCore
def LArSCvsRawChannelMonConfigCore(helper, flags, algname="LArSCvsRawChannelMon")
Definition: LArSCvsRawChannelConfig.py:38
Constants
some useful constants -------------------------------------------------—
python.LBDurationCondAlgConfig.LBDurationCondAlgCfg
def LBDurationCondAlgCfg(flags)
Definition: LBDurationCondAlgConfig.py:15
LArSCvsRawChannelConfig.LArSCvsRawChannelMonAlgCfg
def LArSCvsRawChannelMonAlgCfg(flags)
Definition: LArSCvsRawChannelConfig.py:12
LArCablingConfig.LArOnOffIdMappingCfg
def LArOnOffIdMappingCfg(configFlags)
Definition: LArCablingConfig.py:62
python.AllConfigFlags.initConfigFlags
def initConfigFlags()
Definition: AllConfigFlags.py:19