ATLAS Offline Software
CaloRetrieversConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2 
3 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4 from AthenaConfiguration.ComponentFactory import CompFactory
5 from AthenaConfiguration.Enums import Format
6 
7 
8 def CaloRetrieversCfg(flags, **kwargs):
9  result = ComponentAccumulator()
10  from LArRecUtils.LArADC2MeVCondAlgConfig import LArADC2MeVCondAlgCfg
11  result.merge(LArADC2MeVCondAlgCfg (flags))
12 
13  if flags.Input.Format is Format.BS:
14  tileDigitsContainer = "TileDigitsCnt"
15 
16  if flags.Tile.doOpt2:
17  tileRawChannelContainer = 'TileRawChannelOpt2'
18  elif flags.Tile.doOptATLAS:
19  tileRawChannelContainer = 'TileRawChannelFixed'
20  elif flags.Tile.doFitCOOL:
21  tileRawChannelContainer = 'TileRawChannelFitCool'
22  elif flags.Tile.doFit:
23  tileRawChannelContainer = 'TileRawChannelFit'
24  else:
25  tileRawChannelContainer = 'TileRawChannelCnt'
26 
27  else:
28  if "TileDigitsCnt" in flags.Input.Collections:
29  tileDigitsContainer = "TileDigitsCnt"
30  elif "TileDigitsFlt" in flags.Input.Collections:
31  tileDigitsContainer = "TileDigitsFlt"
32 
33  if "TileRawChannelOpt2" in flags.Input.Collections:
34  tileRawChannelContainer = 'TileRawChannelOpt2'
35  elif "TileRawChannelFitCool" in flags.Input.Collections:
36  tileRawChannelContainer = 'TileRawChannelFitCool'
37  elif "TileRawChannelFit" in flags.Input.Collections:
38  tileRawChannelContainer = 'TileRawChannelFit'
39  elif "TileRawChannelCnt" in flags.Input.Collections:
40  tileRawChannelContainer = 'TileRawChannelCnt'
41 
42  from CaloJiveXML.CaloJiveXMLConf import JiveXML__LArDigitRetriever
43  theLArDigitRetriever = JiveXML__LArDigitRetriever(name="LArDigitRetriever")
44  theLArDigitRetriever.DoLArDigit = False
45  theLArDigitRetriever.DoHECDigit = False
46  theLArDigitRetriever.DoFCalDigit = False
47 
48  if (theLArDigitRetriever.DoLArDigit or theLArDigitRetriever.DoHECDigit or theLArDigitRetriever.DoFCalDigit):
49  result.addPublicTool(
50  CompFactory.JiveXML.LArDigitRetriever(
51  name="LArDigitRetriever",
52  DoLArDigit=False,
53  DoHECDigit=False,
54  DoFCalDigit=False,
55  )
56  )
57 
58  else:
59  result.addPublicTool(
60  CompFactory.JiveXML.CaloFCalRetriever(
61  name="CaloFCalRetriever",
62  DoFCalCellDetails=False,
63  DoBadFCal=False,
64  )
65  )
66 
67  result.addPublicTool(
68  CompFactory.JiveXML.CaloLArRetriever(
69  name="CaloLArRetriever",
70  DoLArCellDetails=False,
71  DoBadLAr=False,
72  LArlCellThreshold = 500 if flags.OnlineEventDisplays.BeamSplashMode else 50,
73  )
74  )
75 
76  result.addPublicTool(
77  CompFactory.JiveXML.CaloHECRetriever(
78  name="CaloHECRetriever",
79  DoHECCellDetails=False,
80  DoBadHEC=False,
81  HEClCellThreshold = 500 if flags.OnlineEventDisplays.BeamSplashMode else 50,
82  )
83  )
84 
85  result.addPublicTool(
86  CompFactory.JiveXML.CaloClusterRetriever(name = "CaloClusterRetriever",**kwargs
87  )
88  )
89 
90  result.addPublicTool(
91  CompFactory.JiveXML.CaloTileRetriever(
92  name = "CaloTileRetriever",
93  TileDigitsContainer = tileDigitsContainer,
94  TileRawChannelContainer = tileRawChannelContainer,
95  DoTileCellDetails = False,
96  DoTileDigit = False,
97  DoBadTile = False,
98  )
99  )
100 
101  result.addPublicTool(
102  CompFactory.JiveXML.CaloMBTSRetriever(
103  name = "CaloMBTSRetriever",
104  TileDigitsContainer= tileDigitsContainer,
105  TileRawChannelContainer = tileRawChannelContainer,
106  DoMBTSDigits = False,
107  )
108  )
109 
110  return result
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
CaloRetrieversConfig.CaloRetrieversCfg
def CaloRetrieversCfg(flags, **kwargs)
Definition: CaloRetrieversConfig.py:8