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
14 from LArBadChannelTool.LArBadChannelConfig
import LArBadChannelCfg
22 from CaloRec.CaloBCIDAvgAlgConfig
import CaloBCIDAvgAlgCfg
25 if flags.Input.isMC
is False and not flags.Common.isOnline:
26 from LumiBlockComps.LuminosityCondAlgConfig
import LuminosityCondAlgCfg
28 from LumiBlockComps.LBDurationCondAlgConfig
import LBDurationCondAlgCfg
31 from AthenaMonitoring.AthMonitorCfgHelper
import AthMonitorCfgHelper
32 helper = AthMonitorCfgHelper(flags,
'LArSuperCellMonAlgCfg')
41 alg= helper.addAlgorithm(CompFactory.LArSCvsRawChannelMonAlg,algname)
44 GroupName=
"LArSCvsRawGroup"
45 alg.MonGroupName = GroupName
47 alg.ProblemsToMask=[
"deadReadout",
"deadPhys"]
48 cellMonGroup = helper.addGroup(alg,GroupName,
'LArSCvsRawChannelMon')
51 partGroup = helper.addArray([alg.LayerNames], alg,
'LArSCvsRawChannelMon', topPath=
'LArSCvsRawChannelMon/PerLayer')
53 from LArMonitoring.GlobalVariables
import lArDQGlobals
56 for pName
in alg.PartitionNames:
57 cellMonGroup.defineHistogram(f
"scEne_{pName},eneSum_{pName};h_SCEne_vs_RawChannelEne_{pName}",
58 title=f
'Super Cell energy vs sum of RawChannel energies ({pName}) ;SC [MeV]; Sum [MeV]',
60 xbins = 100, xmin=0,xmax=50000,
61 ybins = 100, ymin=0,ymax=50000)
65 for lName
in alg.LayerNames:
77 print(lName,
"part", Part,
"side", Side,
"sampling", Sampling)
78 partxbins=lArDQGlobals.SuperCell_Variables[
"etaRange"][Part][Side][Sampling]
79 partybins=lArDQGlobals.SuperCell_Variables[
"phiRange"][Part][Side][Sampling]
82 partGroup.defineHistogram(
'part_eta,part_phi,part_eneFrac; Coverage_SCEne_div_cellEne_coverage_test',
83 title=
'SC energy / sum of cell energy',
90 partGroup.defineHistogram(
"part_scEne,part_eneSum;h_SCEne_vs_RawChannelEne",
91 title=f
'Super Cell energy vs sum of RawChannel energies ({lName}) ;SC [MeV]; Sum [MeV]',
93 xbins = 100, xmin=0,xmax=50000,
94 ybins = 100, ymin=0,ymax=50000,
102 return helper.result()
104 if __name__==
"__main__":
106 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
108 from AthenaCommon.Logging
import log
111 from AthenaConfiguration.TestDefaults
import defaultGeometryTags
113 flags.LAr.doAlign=
False
114 flags.Input.Files = [
"data24_13p6TeV.00481893.physics_Main.daq.RAW._lb1058._SFO-17._0002.data",]
115 flags.GeoModel.AtlasVersion=defaultGeometryTags.RUN3
116 flags.Output.HISTFileName =
'LArSuperCellvsRC.root'
125 acc.getService(
"AvalancheSchedulerSvc").ShowDataDependencies=
True
126 alg=acc.getEventAlgo(
"LArSCvsRawChannelMon")
128 alg.TrigDecisionTool=
""
129 alg.WarnOffenders=
True