3 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
4 from AthenaPython.PyAthenaComps
import Alg, StatusCode
11 f=ROOT.TFile.Open(filename)
12 layers=[
"EMBPA",
"EMBPC",
"EMB1A",
"EMB1C",
"EMB2A",
"EMB2C",
"EMB3A",
"EMB3C",
13 "HEC0A",
"HEC0C",
"HEC1A",
"HEC1C",
"HEC2A",
"HEC2C",
"HEC3A",
"HEC3C",
14 "EMECPA",
"EMECPC",
"EMEC1A",
"EMEC1C",
"EMEC2A",
"EMEC2C",
"EMEC3A",
"EMEC3C",
15 "FCAL1A",
"FCAL1C",
"FCAL2A",
"FCAL2C",
"FCAL3A",
"FCAL3C"]
19 histpath=
"run_%i/CaloMonitoring/LArCellMon_NoTrigSel/2d_Occupancy/CellOccupancyVsEtaPhi_%s_noEth_rndm_CSCveto"%(runnumber,layer)
21 print (
"Checking Histogram",hist)
22 print (
"\tBinning x:",hist.GetNbinsX(),
"y:",hist.GetNbinsY())
23 for x
in range (hist.GetNbinsX()):
24 for y
in range (hist.GetNbinsY()):
25 n=hist.GetBinContent(x,y)
27 print (
"ERROR multiple hits in ",layer,x,y,n)
31 print (
"WARNING no hit in ", layer,x,y,n)
33 print (
"\tNumber of bins not corresponding to any cell:",nNoHit)
34 print (
"\tNumber of bins corresponding to multiple cells:",nMultipleHits)
40 ctx = self.getContext()
41 mgr = self.condStore[
'CaloDetDescrManager'].find (ctx.eventID())
42 ccc = ROOT.CaloCellContainer()
43 for i
in range (mgr.element_size()):
44 elem = mgr.get_element (ROOT.IdentifierHash (i))
45 cc=ROOT.CaloCell(elem,10000,0,0,0)
47 ROOT.SetOwnership (cc,
False)
49 ccc.updateCaloIterators()
50 self.msg.
info(
"Recorded CaloCellContainer %i",ccc.size())
51 self.evtStore.record (ccc,
'AllCalo')
53 return StatusCode.Success
60 from LArGeoAlgsNV.LArGMConfig
import LArGMCfg
61 from TileGeoModel.TileGMConfig
import TileGMCfg
65 from LArCabling.LArCablingConfig
import LArOnOffIdMappingCfg
68 result.addEventAlgo (CreateDataAlg (
'CreateDataAlg'),sequenceName=
"AthAlgSeq")
69 from CaloMonitoring.LArCellMonAlg
import LArCellMonConfig
72 alg=result.getEventAlgo(
"LArCellMonAlg")
73 alg.useReadyFilterTool=
False
74 alg.useBadLBTool=
False
75 alg.useLArCollisionFilterTool=
False
76 alg.useLArNoisyAlg=
False
77 alg.useBeamBackgroundRemoval=
False
81 if __name__ ==
"__main__":
82 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
83 from AthenaConfiguration.TestDefaults
import defaultConditionsTags, defaultGeometryTags, defaultTestFiles
85 flags.Input.Files = defaultTestFiles.RAW_RUN3
86 flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN3
87 flags.IOVDb.GlobalTag = defaultConditionsTags.RUN3_DATA
88 flags.Output.HISTFileName =
'LArCellMonOutput.root'
89 flags.DQ.useTrigger =
False
92 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
95 from TrigConfigSvc.TrigConfigSvcCfg
import L1ConfigSvcCfg, HLTConfigSvcCfg, L1PrescaleCondAlgCfg, HLTPrescaleCondAlgCfg
96 from TrigT1ResultByteStream.TrigT1ResultByteStreamConfig
import L1TriggerByteStreamDecoderCfg
104 from TrigConfigSvc.TrigConfigSvcCfg
import BunchGroupCondAlgCfg
106 acc.merge (testCfg (flags))
109 if (sc.isFailure()): sys.exit(1)