7 from AthenaMonitoring.AthMonitorCfgHelper
import AthMonitorCfgHelper
8 helper = AthMonitorCfgHelper(flags,
'LArClusterCellMonAlgCfg')
10 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
14 from LArGeoAlgsNV.LArGMConfig
import LArGMCfg
16 from TileGeoModel.TileGMConfig
import TileGMCfg
19 from DetDescrCnvSvc.DetDescrCnvSvcConfig
import DetDescrCnvSvcCfg
22 from LArCellRec.LArCollisionTimeConfig
import LArCollisionTimeCfg
26 from AthenaConfiguration.ComponentFactory
import CompFactory
27 lArCellMonAlg=CompFactory.LArClusterCellMonAlg
29 algname=
'LArClusterCellMonAlg'
30 from AthenaConfiguration.Enums
import BeamType
31 if flags.Beam.Type
is BeamType.Cosmics:
32 algname=algname+
'Cosmics'
35 flags.Beam.Type
is BeamType.Cosmics,
36 flags.Input.TriggerStream,
37 flags.Input.isMC, flags.Common.isOnline,
39 algo.useTrigger = flags.DQ.useTrigger
42 algo.rndmTriggerNames =
"L1_RD0, L1_RD0_FILLED, L1_RD0_EMPTY, L1_RD1, L1_RD1_NOISE, L1_RD1_HIST, L1_RD1_BGRP4, L1_RD1_BGRP5"
43 algo.caloTriggerNames =
"L1_EM[0-9]+, L1_HA[0-9]+, L1_J[0-9]+.*, L1_JB[0-9]+, L1_JF[0-9]+, L1_TE[0-9]+, L1_JE[0-9]+, L1_XE[0-9]+, L1_2EM[0-9]+, L1_2FJ[0-9]+, L1_2J[0-9]+,L1_3J[0-9]+.*,L1_4J[0-9]+.*,L1_5J[0-9]+,L1_6J[0-9]+,L1_FJ[0-9]+.*"
44 algo.minBiasTriggerNames =
"L1_RD0_FILLED, L1_MBTS_1, L1_MBTS_2, L1_MBTS_1_1"
45 algo.metTriggerNames =
"EF_xe[0-9]+.*"
46 algo.miscTriggerNames =
""
48 from AthenaMonitoring.AtlasReadyFilterConfig
import AtlasReadyFilterCfg
51 if not flags.Input.isMC:
52 from AthenaMonitoring.BadLBFilterToolConfig
import LArBadLBFilterToolCfg
55 cfg.merge(helper.result())
60 def LArClusterCellMonConfigCore(helper, algclass, flags, isCosmics=False, TriggerStream='CosmicCalo', isMC=False, isOnline=False, algname='LArClusterCellMonAlg'):
63 LArClusterCellMonAlg = helper.addAlgorithm(algclass, algname)
65 if not isCosmics
and not isMC:
66 LArClusterCellMonAlg.useReadyFilterTool=
True
68 LArClusterCellMonAlg.useReadyFilterTool=
False
71 LArClusterCellMonAlg.useBadLBTool=
False
73 LArClusterCellMonAlg.useBadLBTool=
True
75 if isCosmics
or TriggerStream!=
'physics_CosmicCalo':
76 LArClusterCellMonAlg.useBeamBackgroundRemoval =
False
77 LArClusterCellMonAlg.useLArCollisionFilterTool =
False
79 LArClusterCellMonAlg.useBeamBackgroundRemoval =
True
80 LArClusterCellMonAlg.useLArCollisionFilterTool =
True
83 LArClusterCellMonAlg.useLArNoisyAlg =
False
85 LArClusterCellMonAlg.useLArNoisyAlg =
True
87 GroupName=
"LArClusterCell"
88 LArClusterCellMonAlg.MonGroupName = GroupName
90 LArClusterCellMonAlg.EnableLumi =
True
95 binlabels=[
"TotalEvents",
"ATLAS Ready",
"with Good LAr LB",
"with No LAr Collision",
"with No Beam Background",
"with No Trigger Filter",
"with No LArError"]
98 LArClusterCellMonAlg.rndmTriggerNames =
"L1_RD0, L1_RD0_FILLED, L1_RD0_EMPTY, L1_RD1, L1_RD1_NOISE, L1_RD1_HIST, L1_RD1_BGRP4, L1_RD1_BGRP5"
99 LArClusterCellMonAlg.caloTriggerNames =
"L1_EM[0-9]+, L1_HA[0-9]+, L1_J[0-9]+.*, L1_JB[0-9]+, L1_JF[0-9]+, L1_TE[0-9]+, L1_JE[0-9]+, L1_XE[0-9]+, L1_2EM[0-9]+, L1_2FJ[0-9]+, L1_2J[0-9]+,L1_3J[0-9]+.*,L1_4J[0-9]+.*,L1_5J[0-9]+,L1_6J[0-9]+,L1_FJ[0-9]+.*"
100 LArClusterCellMonAlg.minBiasTriggerNames =
"L1_RD0_FILLED, L1_MBTS_1, L1_MBTS_2, L1_MBTS_1_1"
101 LArClusterCellMonAlg.metTriggerNames =
"EF_xe[0-9]+.*"
102 LArClusterCellMonAlg.miscTriggerNames =
""
107 cellMonGroup = helper.addGroup(
108 LArClusterCellMonAlg,
110 '/CaloMonitoring/LArClusterCellMon/'
117 summ_hist_path=
'Summary/'
119 from CaloMonitoring.CaloMonAlgBase
import CaloBaseHistConfig
122 cellMonGroup.defineHistogram(
'trigType;nEvtsByTrigger',
123 title=
'Total Events: bin 0, RNDM Trigger: 1, Calo Trigger: 2, MinBias Trigger: 3, MET Trigger: 4, Misc Trigger: 5, Events Accepted 6 ',
124 type=
'TH1I', path=summ_hist_path,
125 xbins=lArCellBinningScheme.larCellSummary[
"xbins"][0], xmin=lArCellBinningScheme.larCellSummary[
"xbins"][1], xmax=lArCellBinningScheme.larCellSummary[
"xbins"][2],
126 xlabels=lArCellBinningScheme.larCellSummary[
"xlabels"])
129 cellMonGroup.defineHistogram(
'eventCounter',
130 title=
'Events events passed Trigger and Background removal for each threshold (for normalisation)',
131 type=
'TH1I', path=summ_hist_path,
135 cellMonGroup.defineHistogram(
'cellhash',
136 title=
'Total number of cells contributing to clusters, per online-hash',
137 type=
'TH1I', path=summ_hist_path,
138 xbins=195072,xmin=-0.5,xmax=195072.5
143 for part
in LArClusterCellMonAlg.LayerNames:
144 cellMonGroup.defineHistogram(
'celleta_'+part+
',cellphi_'+part+
';NClusteredCells_'+part,
145 title=
"Total number of cells contributing to clusters in (#eta,#phi) for "+part+
";cell #eta;cell #phi",
146 weight=
'NClusteredCells_'+part,
147 type=
'TH2I', path=
"ClusterCell/",
148 xbins = lArCellBinningScheme.etaRange[part],
149 ybins = lArCellBinningScheme.phiRange[part]
155 return LArClusterCellMonAlg
158 if __name__==
'__main__':
161 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
163 from AthenaConfiguration.TestDefaults
import defaultTestFiles
164 flags.Input.Files = defaultTestFiles.RAW_RUN3
165 flags.Output.HISTFileName =
'LArClusterCellMonOutput.root'
166 flags.DQ.enableLumiAccess =
True
167 flags.DQ.useTrigger =
True
168 flags.DQ.Environment =
'tier0'
169 from AthenaConfiguration.Enums
import LHCPeriod
170 flags.GeoModel.Run=LHCPeriod.Run3
171 flags.Concurrency.NumThreads=1
177 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
180 from TrigConfigSvc.TrigConfigSvcCfg
import L1ConfigSvcCfg, HLTConfigSvcCfg, L1PrescaleCondAlgCfg, HLTPrescaleCondAlgCfg
181 from TrigT1ResultByteStream.TrigT1ResultByteStreamConfig
import L1TriggerByteStreamDecoderCfg
189 from TrigConfigSvc.TrigConfigSvcCfg
import BunchGroupCondAlgCfg
192 from AthenaConfiguration.ComponentFactory
import CompFactory
193 tdm = CompFactory.getComp(
'TrigDec::TrigDecisionMakerMT')()
196 cfg.addEventAlgo( tdm,
'AthAlgSeq' )
201 from CaloRec.CaloRecoConfig
import CaloRecoCfg