ATLAS Offline Software
LArShapeDumperConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
2 
3 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4 from AthenaConfiguration.ComponentFactory import CompFactory
5 
6 def LArShapeDumperCfg(flags):
7 
8  result=ComponentAccumulator()
9 
10 
11  from LArGeoAlgsNV.LArGMConfig import LArGMCfg
12  result.merge(LArGMCfg(flags))
13  from TileGeoModel.TileGMConfig import TileGMCfg
14  result.merge(TileGMCfg(flags))
15 
16  #Setup cabling
17  from LArCabling.LArCablingConfig import LArOnOffIdMappingCfg
18  result.merge(LArOnOffIdMappingCfg(flags))
19 
20  from LArByteStream.LArRawDataReadingConfig import LArRawDataReadingCfg
21  result.merge(LArRawDataReadingCfg(flags))
22 
23  from LArROD.LArRawChannelBuilderAlgConfig import LArRawChannelBuilderAlgCfg
24  result.merge(LArRawChannelBuilderAlgCfg(flags))
25  result.getEventAlgo("LArRawChannelBuilder").TimingContainerKey="LArOFIterResult"
26 
27  from LArCellRec.LArTimeVetoAlgConfig import LArTimeVetoAlgCfg
28  result.merge(LArTimeVetoAlgCfg(flags))
29 
30  from LumiBlockComps.BunchCrossingCondAlgConfig import BunchCrossingCondAlgCfg
31  result.merge(BunchCrossingCondAlgCfg(flags))
32 
33  from CaloTools.CaloNoiseCondAlgConfig import CaloNoiseCondAlgCfg
34  result.merge(CaloNoiseCondAlgCfg(flags,"totalNoise"))
35 
36  from LArROD.LArFebErrorSummaryMakerConfig import LArFebErrorSummaryMakerCfg
37  result.merge(LArFebErrorSummaryMakerCfg(flags))
38  result.getEventAlgo("LArFebErrorSummaryMaker").CheckAllFEB=False
39 
40  from IOVDbSvc.IOVDbSvcConfig import addFolders
41  result.merge(addFolders(flags,
42  '/LAR/ElecCalibOfl/Shape/RTM/5samples3bins17phases<tag>LARElecCalibOflShapeRTM5samples3bins17phases-RUN2-UPD3-00</tag><key>LArShape17phases</key>',
43  'LAR_OFL'))
44 
45  result.getService("PoolSvc").ReadCatalog += ["apcfile:poolcond/PoolCat_comcond_castor.xml"]
46 
47  if flags.LArShapeDump.doTrigger:
48 
49  from TrigT1ResultByteStream.TrigT1ResultByteStreamConfig import L1TriggerByteStreamDecoderCfg
50  result.merge(L1TriggerByteStreamDecoderCfg(flags))
51 
52  from LArCafJobs.LArSCDumperSkeleton import L1CaloMenuCfg
53  result.merge(L1CaloMenuCfg(flags))
54 
55  from TrigDecisionTool.TrigDecisionToolConfig import TrigDecisionToolCfg
56  result.merge(TrigDecisionToolCfg(flags))
57 
58 
59  result.merge(addFolders(flags,'/LAR/ElecCalibOfl/AutoCorrs/AutoCorr<tag>LARElecCalibOflAutoCorrsAutoCorr-RUN2-UPD3-00</tag>','LAR_OFL'))
60  result.getService("IOVDbSvc").overrideTags+=['<prefix>/LAR/ElecCalibOfl/Shape/RTM/5samples1phase</prefix><tag>LARElecCalibOflShapeRTM5samples1phase-RUN2-UPD1-04</tag>']
61  # for splashes: FIXME later
62  result.getService("IOVDbSvc").overrideTags+=['<prefix>/LAR/ElecCalibOfl/OFC/PhysWave/RTM/4samples3bins17phases</prefix><tag>LARElecCalibOflOFCPhysWaveRTM4samples3bins17phases-RUN2-UPD3-00</tag>']
63  result.getService("IOVDbSvc").overrideTags+=['<prefix>/LAR/ElecCalibOfl/Shape/RTM/4samples3bins17phases</prefix><tag>LARElecCalibOflShapeRTM4samples3bins17phases-RUN2-UPD3-00</tag>']
64 
65 
66  print("Dumping flags: ")
67  flags.dump()
68  dumperAlg=CompFactory.LArShapeDumper("LArShapeDumper")
69  dumperAlg.CaloType = flags.LArShapeDump.caloType
70  dumperAlg.Prescale = flags.LArShapeDump.prescale
71  dumperAlg.NoiseSignifCut = flags.LArShapeDump.noiseSignifCut
72  dumperAlg.DoTrigger = flags.LArShapeDump.doTrigger
73  dumperAlg.DoStream = flags.LArShapeDump.doStream
74  dumperAlg.DoOFCIter = flags.LArShapeDump.doOFCIter
75  dumperAlg.DumpChannelInfos = flags.LArShapeDump.dumpChannelInfos
76  dumperAlg.DumpDisconnected = False
77  dumperAlg.DigitsKey = flags.LArShapeDump.digitsKey
78  dumperAlg.ProblemsToMask=['deadReadout', 'deadPhys','almostDead', 'short',
79  'highNoiseHG','highNoiseMG','highNoiseLG']
80  dumperAlg.LArShapeDumperTool=CompFactory.LArShapeDumperTool(DoShape=True)
81  dumperAlg.FileName=flags.LArShapeDump.outputNtup
82  dumperAlg.TriggerNames = flags.LArShapeDump.triggerNames
83  dumperAlg.TrigDecisionTool = result.getPublicTool('TrigDecisionTool')
84  from LArConfiguration.LArConfigFlags import RawChannelSource
85  if flags.LAr.RawChannelSource == RawChannelSource.Calculated:
86  dumperAlg.ChannelsKey = "LArRawChannels_FromDigits"
87 
88  result.addEventAlgo(dumperAlg)
89 
90  if (flags.LArShapeDump.HECNoiseNtup!=""):
91  hns=CompFactory.LArHECNoise()
92  hns.TrigDecisionTool = result.getPublicTool('TrigDecisionTool')
93  result.addEventAlgo(hns)
94  result.addService(CompFactory.THistSvc(Output=["HEC DATAFILE='"+flags.LArShapeDump.HECNoiseNtup+"' OPT='RECREATE'",]))
95 
96  return result
97 
98 
99 if __name__=="__main__":
100 
101  from AthenaConfiguration.AllConfigFlags import initConfigFlags
103 
104  from LArShapeDumperFlags import addShapeDumpFlags
105  addShapeDumpFlags(flags)
106 
107  from AthenaConfiguration.TestDefaults import defaultTestFiles
108  flags.Input.Files=defaultTestFiles.RAW_RUN2
109  flags.LAr.ROD.forceIter=True
110 
111  flags.lock()
112 
113  from AthenaConfiguration.MainServicesConfig import MainServicesCfg
114 
115  cfg=MainServicesCfg(flags)
116  cfg.merge(LArShapeDumperCfg(flags))
117 
118  cfg.run(10)
LArShapeDumperFlags.addShapeDumpFlags
def addShapeDumpFlags(flags)
Definition: LArShapeDumperFlags.py:5
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
LArSCDumperSkeleton.L1CaloMenuCfg
def L1CaloMenuCfg(flags)
Definition: LArSCDumperSkeleton.py:11
python.LArRawChannelBuilderAlgConfig.LArRawChannelBuilderAlgCfg
def LArRawChannelBuilderAlgCfg(flags, **kwargs)
Definition: LArRawChannelBuilderAlgConfig.py:9
python.BunchCrossingCondAlgConfig.BunchCrossingCondAlgCfg
def BunchCrossingCondAlgCfg(flags)
Definition: BunchCrossingCondAlgConfig.py:8
python.LArFebErrorSummaryMakerConfig.LArFebErrorSummaryMakerCfg
def LArFebErrorSummaryMakerCfg(flags)
Definition: LArFebErrorSummaryMakerConfig.py:7
python.CaloNoiseCondAlgConfig.CaloNoiseCondAlgCfg
def CaloNoiseCondAlgCfg(flags, noisetype="totalNoise")
Definition: CaloNoiseCondAlgConfig.py:11
python.MainServicesConfig.MainServicesCfg
def MainServicesCfg(flags, LoopMgr='AthenaEventLoopMgr')
Definition: MainServicesConfig.py:256
LArTimeVetoAlgConfig.LArTimeVetoAlgCfg
def LArTimeVetoAlgCfg(flags)
Definition: LArTimeVetoAlgConfig.py:7
python.IOVDbSvcConfig.addFolders
def addFolders(flags, folderStrings, detDb=None, className=None, extensible=False, tag=None, db=None, modifiers='')
Definition: IOVDbSvcConfig.py:72
LArCablingConfig.LArOnOffIdMappingCfg
def LArOnOffIdMappingCfg(configFlags)
Definition: LArCablingConfig.py:62
LArGMConfig.LArGMCfg
def LArGMCfg(flags)
Definition: LArGMConfig.py:8
LArShapeDumperConfig.LArShapeDumperCfg
def LArShapeDumperCfg(flags)
Definition: LArShapeDumperConfig.py:6
python.LArRawDataReadingConfig.LArRawDataReadingCfg
def LArRawDataReadingCfg(configFlags, **kwargs)
Definition: LArRawDataReadingConfig.py:10
python.TriggerInterface.TrigDecisionToolCfg
def TrigDecisionToolCfg(flags)
Definition: TriggerInterface.py:14
python.AllConfigFlags.initConfigFlags
def initConfigFlags()
Definition: AllConfigFlags.py:19
Muon::print
std::string print(const MuPatSegment &)
Definition: MuonTrackSteering.cxx:28
TrigT1ResultByteStreamConfig.L1TriggerByteStreamDecoderCfg
def L1TriggerByteStreamDecoderCfg(flags, returnEDM=False)
Definition: TrigT1ResultByteStreamConfig.py:133
TileGMConfig.TileGMCfg
def TileGMCfg(flags)
Definition: TileGMConfig.py:7