3 from D3PDMakerCoreComps.D3PDObject
import D3PDObject
4 from CaloIdentifier
import SUBCALO
5 from AthenaConfiguration.ComponentFactory
import CompFactory
7 D3PD = CompFactory.D3PD
11 prefix_to_det[
"cc_sel_"] = [SUBCALO.LAREM,SUBCALO.LARHEC,SUBCALO.LARFCAL,SUBCALO.TILE]
12 prefix_to_det[
"cc_em_"] = [SUBCALO.LAREM]
13 prefix_to_det[
"cc_hec_"] = [SUBCALO.LARHEC]
14 prefix_to_det[
"cc_fcal_"] = [SUBCALO.LARFCAL]
15 prefix_to_det[
"cc_tile_"] = [SUBCALO.TILE]
20 if sgkey
is None: sgkey =
'AllCalo'
21 if label
is None: label = prefix
23 if prefix
in prefix_to_det.keys():
30 TypeName =
'CaloCellContainer',
35 from D3PDMakerConfig.D3PDMakerFlags
import D3PDMakerFlags
39 ObjectName = object_name,
41 D3PDMakerFlags.SaveObjectMetadata)
48 if prefix
in prefix_to_det.keys():
50 subCalo = prefix_to_det[prefix]
52 if sgkey ==
"cc_sel_":
57 from .CaloCellFilterAlgConfig
import CaloCellFilterAlgCfg
58 filter =
CaloCellFilterAlgCfg( flags, CaloNums=subCalo, OutputCellsName=sgkey, CellSigmaCut=cellSigmaCut )
60 acc.addEventAlgo (filter)
65 from CaloTools.CaloNoiseCondAlgConfig
import CaloNoiseCondAlgCfg
66 acc.merge (CaloNoiseCondAlgCfg (flags, noisetype=
'totalNoise'))
71 from CaloBadChannelTool.CaloBadChanToolConfig
import CaloBadChanToolCfg
72 c.BadChannelTool = acc.popToolsAndMerge (CaloBadChanToolCfg (flags))
77 from LArGeoAlgsNV.LArGMConfig
import LArGMCfg
78 acc.merge (LArGMCfg (flags))
84 cellD3PDObject = D3PDObject (makeCellD3PDObject, prefix, object_name)
86 if prefix
in prefix_to_det.keys() :
88 cellD3PDObject.defineHook ( hookForCaloCellFilterAlg )
90 cellD3PDObject.defineHook ( hookForCaloGM )
92 cellD3PDObject.defineBlock (0,
'Kinematics',
94 WriteE =
True, WriteM =
False)
97 cellD3PDObject.defineBlock (1,
'Detail1',
103 SaveBadCellStatus=
False,
105 SavePositionInfo=
False,
109 detail2 = cellD3PDObject.defineBlock (2,
'Detail2',
111 SaveCellQuality=
False,
115 SaveBadCellStatus=
True,
117 SavePositionInfo=
True,
119 detail2.defineHook ( hookForCaloBadChanTool )
121 cellD3PDObject.defineHook ( hookForCaloNoiseCondAlg )
122 noiseType =
"totalNoise"
124 cellD3PDObject.defineBlock (3,
'Detail3',
126 SaveCellQuality=
False,
130 SaveBadCellStatus=
False,
132 SavePositionInfo=
False,
134 CaloNoise = noiseType
138 cellD3PDObject.defineBlock (99,
'RawPosition',
141 return cellD3PDObject
144 level of details: 0: only kinematics
145 1: time, quality, gain, cell_id
146 2: xyz position, bad channel status, offline id.
167 cellD3PDObject = D3PDObject (makeCellD3PDObject, prefix, object_name)
169 if prefix
in prefix_to_det.keys() :
171 cellD3PDObject.defineHook ( hookForCaloCellFilterAlg )
173 cellD3PDObject.defineBlock (0,
'Kinematics',
175 WriteE =
True, WriteM =
False, WritePt =
False)
178 cellD3PDObject.defineHook ( hookForCaloNoiseCondAlg )
179 noiseType =
"totalNoise"
181 cellD3PDObject.defineBlock (1,
'Detail1',
183 SaveCellQuality=
True,
184 SaveBadCellStatus=
True,
188 CaloNoise = noiseType
191 return cellD3PDObject