3 from D3PDMakerCoreComps.flagTestLOD
import flagTestLOD
4 from D3PDMakerCoreComps.D3PDObject
import make_SGDataVector_D3PDObject
5 from D3PDMakerCoreComps.IndexAssociation
import IndexAssociation
6 from TrackD3PDMaker.PerigeeAssociation
import PerigeeAssociation
7 from D3PDMakerConfig.D3PDMakerFlags
import D3PDMakerFlags
8 from AthenaConfiguration.ComponentFactory
import CompFactory
10 D3PD = CompFactory.D3PD
15 _sgkey='TrackParticleCandidate',
16 _object_name='TrackD3PDObject',
19 vertexSGKey='VxPrimaryCandidate',
20 flags = D3PDMakerFlags.Track):
22 object = make_SGDataVector_D3PDObject (
23 'xAOD::TrackParticleContainer',
27 default_allowMissing =
True,
28 default_label = _label,
29 allow_args = [
'storeTrackMomentum',
30 'trackParametersAtGlobalPerigeeLevelOfDetails',
31 'trackParametersAtPrimaryVertexLevelOfDetails',
32 'trackParametersAtBeamSpotLevelOfDetails',
33 'storeDiagonalCovarianceAsErrors',
34 'storeTrackFitQuality',
35 'storeTrackPredictionAtBLayer',
37 'storeVertexAssociation',
42 PerigeeAssoc = PerigeeAssociation\
46 fillMomName =
'storeTrackMomentum',
47 levelName =
'trackParametersAtGlobalPerigeeLevelOfDetails')
49 perigeeBLPrediction = \
50 PerigeeAssoc.defineBlock (
flagTestLOD(
'storeTrackPredictionAtBLayer', flags),
53 def _pixelLayerToolHook (c, flags, acc, *args, **kw):
54 from InDetConfig.InDetTestPixelLayerConfig
import InDetTestPixelLayerToolInnerCfg
55 c.InDetTestPixelLayerTool = acc.popToolsAndMerge (InDetTestPixelLayerToolInnerCfg (flags))
57 perigeeBLPrediction.defineHook (_pixelLayerToolHook)
64 levelName =
'trackParametersAtPrimaryVertexLevelOfDetails')
66 from TrackToVertex.TrackToVertexConfig
import InDetTrackToVertexCfg
67 c.Associator.TrackToVertexTool = acc.popToolsAndMerge (InDetTrackToVertexCfg (flags))
69 PerigeeAtPVAssoc.defineHook (_trackToVertexHook)
76 levelName =
'trackParametersAtBeamSpotLevelOfDetails')
77 PerigeeAtBSAssoc.defineHook (_trackToVertexHook)
79 object.defineBlock(
flagTestLOD(
'storeTrackFitQuality', flags),
93 PixelInfoPlus = 1 << 6
97 ExpectBLayer = 1 << 10
104 [IDHits,
'nBLHits',
'numberOfInnermostPixelLayerHits'],
105 [IDHits + HitSum,
'nPixHits',
'numberOfPixelHits' ],
106 [IDHits + HitSum,
'nSCTHits',
'numberOfSCTHits' ],
107 [IDHits + HitSum,
'nTRTHits',
'numberOfTRTHits' ],
108 [IDHits,
'nTRTHighTHits',
'numberOfTRTHighThresholdHits'],
109 [IDHits,
'nTRTXenonHits',
'numberOfTRTXenonHits'],
112 [IDHoles + HoleSum,
'nPixHoles',
'numberOfPixelHoles' ],
113 [IDHoles + HoleSum,
'nSCTHoles',
'numberOfSCTHoles' ],
114 [IDHoles + HoleSum,
'nTRTHoles',
'numberOfTRTHoles' ],
115 [IDHoles,
'nPixelDeadSensors',
'numberOfPixelDeadSensors' ],
116 [IDHoles,
'nSCTDeadSensors',
'numberOfSCTDeadSensors' ],
119 [IDSharedHits,
'nBLSharedHits',
'numberOfInnermostPixelLayerSharedHits'],
120 [IDSharedHits,
'nPixSharedHits',
'numberOfPixelSharedHits'],
121 [IDSharedHits,
'nSCTSharedHits',
'numberOfSCTSharedHits'],
122 [IDSharedHits,
'nBLayerSplitHits',
'numberOfInnermostPixelLayerSplitHits'],
123 [IDSharedHits,
'nPixSplitHits',
'numberOfPixelSplitHits'],
126 [IDOutliers,
'nBLayerOutliers',
'numberOfInnermostPixelLayerOutliers' ],
127 [IDOutliers,
'nPixelOutliers',
'numberOfPixelOutliers' ],
128 [IDOutliers,
'nSCTOutliers',
'numberOfSCTOutliers' ],
129 [IDOutliers,
'nTRTOutliers',
'numberOfTRTOutliers'],
130 [IDOutliers,
'nTRTHighTOutliers',
'numberOfTRTHighThresholdOutliers'],
133 [PixelInfoPlus,
'nContribPixelLayers',
'numberOfContribPixelLayers' ],
134 [PixelInfoPlus,
'nGangedPixels',
'numberOfGangedPixels' ],
135 [PixelInfoPlus,
'nGangedFlaggedFakes',
'numberOfGangedFlaggedFakes' ],
136 [PixelInfoPlus,
'nPixelSpoiltHits',
'numberOfPixelSpoiltHits' ],
139 [SCTInfoPlus,
'nSCTDoubleHoles',
'numberOfSCTDoubleHoles' ],
140 [SCTInfoPlus,
'nSCTSpoiltHits',
'numberOfSCTSpoiltHits' ],
143 [TRTInfoPlus,
'nTRTDeadStraws',
'numberOfTRTDeadStraws' ],
144 [TRTInfoPlus,
'nTRTTubeHits',
'numberOfTRTTubeHits' ],
145 [TRTInfoPlus,
'nTRTSharedHits',
'numberOfTRTSharedHits' ],
146 [TRTInfoPlus,
'nTRTHTHitsTotal',
'numberOfTRTHighThresholdHitsTotal' ],
149 [InfoPlus,
'nOutliersOnTrack',
'numberOfOutliersOnTrack'],
150 [InfoPlus,
'standardDeviationOfChi2OS',],
153 [ExpectBLayer,
'expectInnermostPixelLayerHit'],
156 [MuonHits + HitSum,
'numberOfPrecisionLayers'],
157 [MuonHits + HitSum,
'numberOfPrecisionHoleLayers'],
158 [MuonHits + HitSum,
'numberOfPhiLayers'],
159 [MuonHits + HitSum,
'numberOfPhiHoleLayers'],
160 [MuonHits + HitSum,
'numberOfTriggerEtaLayers'],
161 [MuonHits + HitSum,
'numberOfTriggerEtaHoleLayers'],
185 if FullInfo: mask = ~0
186 if IDHits: mask |= cls.IDHits
187 if IDHoles: mask |= cls.IDHoles
188 if IDSharedHits: mask |= cls.IDSharedHits
189 if IDOutliers: mask |= cls.IDOutliers
190 if PixelInfoPlus: mask |= cls.PixelInfoPlus
191 if SCTInfoPlus: mask |= cls.SCTInfoPlus
192 if TRTInfoPlus: mask |= cls.TRTInfoPlus
193 if InfoPlus: mask |= cls.InfoPlus
194 if ExpectBLayer: mask |= cls.ExpectBLayer
195 if MuonHits: mask |= cls.MuonHits
196 if DBMHits: mask |= cls.DBMHits
197 if HitSum: mask |= cls.HitSum
198 if HoleSum: mask |= cls.HoleSum
200 for v
in cls.varsTable:
201 if (v[0] & mask) != 0:
203 enum = v[2]
if len(v) >= 3
else var
204 ret.append (var +
' = ' + enum)
206 if ElectronPID
or FullInfo:
207 ret.append (
'eProbabilityComb')
208 ret.append (
'eProbabilityHT')
210 if PixeldEdx
or FullInfo:
211 ret.append (
'pixeldEdx')
212 ret.append (
'numberOfUsedHitsdEdx')
213 ret.append (
'numberOfIBLOverflowsdEdx')
217 sumvarlist = SumVars.varlist (
218 FullInfo = flags.storeTrackSummaryFlags.FullInfo,
219 IDHits = flags.storeTrackSummaryFlags.IDHits,
220 IDHoles = flags.storeTrackSummaryFlags.IDHoles,
221 IDSharedHits = flags.storeTrackSummaryFlags.IDSharedHits,
222 IDOutliers = flags.storeTrackSummaryFlags.IDOutliers,
223 PixelInfoPlus = flags.storeTrackSummaryFlags.PixelInfoPlus,
224 SCTInfoPlus = flags.storeTrackSummaryFlags.SCTInfoPlus,
225 TRTInfoPlus = flags.storeTrackSummaryFlags.TRTInfoPlus,
226 InfoPlus = flags.storeTrackSummaryFlags.InfoPlus,
227 ExpectBLayer = flags.storeTrackSummaryFlags.ExpectBLayer,
228 MuonHits = flags.storeTrackSummaryFlags.MuonHits,
229 DBMHits = flags.storeTrackSummaryFlags.DBMHits,
230 HitSum = flags.storeTrackSummaryFlags.HitSum,
231 HoleSum = flags.storeTrackSummaryFlags.HoleSum,
232 ElectronPID = flags.storeTrackSummaryFlags.ElectronPID,
233 PixeldEdx = flags.storeTrackSummaryFlags.PixeldEdx,
236 object.defineBlock (
flagTestLOD(
'storeTrackSummary', flags),
237 _prefix +
'TrackSummary',
243 object.defineBlock (
flagTestLOD(
'storeTrackInfo', flags),
244 _prefix +
'TrackInfo',
246 Vars = [
'trackFitter',
247 'particleHypothesis',
255 prefix = vertexPrefix,
256 VxSGKey = vertexSGKey,
257 level =
flagTestLOD(
'storeVertexAssociation', flags))