ConfiguredNewTrackingSiPattern.py 47.3 KB
Newer Older
1

2
3
4
5
6
7
8
9
10
11
12
# Blocking the include for after first inclusion
include.block ('InDetRecExample/ConfiguredNewTrackingSiPattern.py')

# ------------------------------------------------------------
#
# ----------- Setup Si Pattern for New tracking
#
# ------------------------------------------------------------

class  ConfiguredNewTrackingSiPattern:

13
14
15
16
17
18
19
20
21
   def __init__(self,
                InputCollections = None,
                ResolvedTrackCollectionKey = None,
                SiSPSeededTrackCollectionKey = None ,
                NewTrackingCuts = None,
                TrackCollectionKeys=[] ,
                TrackCollectionTruthKeys=[],
                ClusterSplitProbContainer=''):

22
23
      from InDetRecExample.InDetJobProperties import InDetFlags
      from InDetRecExample.InDetKeys          import InDetKeys
24
25

      import InDetRecExample.TrackingCommon   as TrackingCommon
26
27
28
29
30
31
32
33
34
35
      #
      # --- get ToolSvc and topSequence
      #
      from AthenaCommon.AppMgr                import ToolSvc
      from AthenaCommon.AlgSequence           import AlgSequence
      topSequence = AlgSequence()

      #
      # --- decide if use the association tool
      #
36
      if (len(InputCollections) > 0) and (NewTrackingCuts.mode() == "LowPt" or NewTrackingCuts.mode() == "VeryLowPt" or NewTrackingCuts.mode() == "LargeD0" or NewTrackingCuts.mode() == "R3LargeD0" or NewTrackingCuts.mode() == "LowPtLargeD0" or NewTrackingCuts.mode() == "BeamGas" or NewTrackingCuts.mode() == "ForwardTracks" or NewTrackingCuts.mode() == "ForwardSLHCTracks"  or NewTrackingCuts.mode() == "Disappearing" or NewTrackingCuts.mode() == "VeryForwardSLHCTracks" or NewTrackingCuts.mode() == "SLHCConversionFinding"):
37
38
39
40
41
42
43
         usePrdAssociationTool = True
      else:
         usePrdAssociationTool = False

      #
      # --- get list of already associated hits (always do this, even if no other tracking ran before)
      #
44
      asso_tool = None
45
      if usePrdAssociationTool:
46
47
         prefix     = 'InDet'
         suffix     = NewTrackingCuts.extension()
48
49
         InDetPRD_Association = TrackingCommon.getInDetTrackPRD_Association(namePrefix     = prefix,
                                                                            nameSuffix     = suffix,
50
51
                                                                            TracksName = list(InputCollections))

52
         # asso_tool = TrackingCommon.getConstPRD_AssociationTool(namePrefix     = prefix, nameSuffix = suffix)
53

54
55
         topSequence += InDetPRD_Association
         if (InDetFlags.doPrintConfigurables()):
scott snyder's avatar
scott snyder committed
56
            printfunc (InDetPRD_Association)
57
58
59
60
61
62
63

      # ------------------------------------------------------------
      #
      # ----------- SiSPSeededTrackFinder
      #
      # ------------------------------------------------------------

64
65
      doSeedMakerValidation = InDetFlags.writeSeedValNtuple()

66
      if InDetFlags.doSiSPSeededTrackFinder():
67

68
69
70
         #
         # --- Space points seeds maker, use different ones for cosmics and collisions
         #
71
72
73
         if NewTrackingCuts.mode() == "DBM":
            from SiSpacePointsSeedTool_xk.SiSpacePointsSeedTool_xkConf import InDet__SiSpacePointsSeedMaker_ATLxk as SiSpacePointsSeedMaker
         elif InDetFlags.doCosmics():
74
75
76
77
78
79
80
            from SiSpacePointsSeedTool_xk.SiSpacePointsSeedTool_xkConf import InDet__SiSpacePointsSeedMaker_Cosmic as SiSpacePointsSeedMaker
         elif InDetFlags.doHeavyIon():
            from SiSpacePointsSeedTool_xk.SiSpacePointsSeedTool_xkConf import InDet__SiSpacePointsSeedMaker_HeavyIon as SiSpacePointsSeedMaker
         elif NewTrackingCuts.mode() == "LowPt" or NewTrackingCuts.mode() == "VeryLowPt" or (NewTrackingCuts.mode() == "Pixel" and InDetFlags.doMinBias()) :
            from SiSpacePointsSeedTool_xk.SiSpacePointsSeedTool_xkConf import InDet__SiSpacePointsSeedMaker_LowMomentum as SiSpacePointsSeedMaker
         elif NewTrackingCuts.mode() == "BeamGas":
            from SiSpacePointsSeedTool_xk.SiSpacePointsSeedTool_xkConf import InDet__SiSpacePointsSeedMaker_BeamGas as SiSpacePointsSeedMaker
81
         elif NewTrackingCuts.mode() == "SLHC" or NewTrackingCuts.mode() == "ForwardSLHCTracks" or NewTrackingCuts.mode() == "VeryForwardSLHCTracks" :
82
            from SiSpacePointsSeedTool_xk.SiSpacePointsSeedTool_xkConf import InDet__SiSpacePointsSeedMaker_ITK as SiSpacePointsSeedMaker
83
84
85
86
87
88
89
90
91
92
         else:
            from SiSpacePointsSeedTool_xk.SiSpacePointsSeedTool_xkConf import InDet__SiSpacePointsSeedMaker_ATLxk as SiSpacePointsSeedMaker

         InDetSiSpacePointsSeedMaker = SiSpacePointsSeedMaker (name                   = "InDetSpSeedsMaker"+NewTrackingCuts.extension(),
                                                               pTmin                  = NewTrackingCuts.minPT(),
                                                               maxdImpact             = NewTrackingCuts.maxPrimaryImpact(),
                                                               maxZ                   = NewTrackingCuts.maxZImpact(),
                                                               minZ                   = -NewTrackingCuts.maxZImpact(),
                                                               usePixel               = NewTrackingCuts.usePixel(),
                                                               SpacePointsPixelName   = InDetKeys.PixelSpacePoints(),
93
94
                                                               # useSCT                 = NewTrackingCuts.useSCT(),
                                                               useSCT                 = (NewTrackingCuts.useSCT() and NewTrackingCuts.useSCTSeeding()),
95
                                                               SpacePointsSCTName     = InDetKeys.SCT_SpacePoints(),
96
97
                                                               # useOverlapSpCollection = NewTrackingCuts.useSCT(),
                                                               useOverlapSpCollection = (NewTrackingCuts.useSCT() and NewTrackingCuts.useSCTSeeding()),
98
99
100
                                                               SpacePointsOverlapName = InDetKeys.OverlapSpacePoints(),
                                                               radMax                 = NewTrackingCuts.radMax(),
                                                               RapidityCut            = NewTrackingCuts.maxEta())
101
102
103
104
105
106
107
108
109
110
111

         if doSeedMakerValidation:

           InDetSiSpacePointsSeedMaker.WriteNtuple = True

           from AthenaCommon.AppMgr import ServiceMgr
           if not hasattr(ServiceMgr, 'THistSvc'):
             from GaudiSvc.GaudiSvcConf import THistSvc
             ServiceMgr += THistSvc()

           ServiceMgr.THistSvc.Output  = ["valNtuples DATAFILE='SeedMakerValidation.root' OPT='RECREATE'"]
112
113
114
115
            
         if NewTrackingCuts.mode() == "Offline" or InDetFlags.doHeavyIon() or  NewTrackingCuts.mode() == "ForwardTracks":
            InDetSiSpacePointsSeedMaker.maxdImpactPPS = NewTrackingCuts.maxdImpactPPSSeeds()
            InDetSiSpacePointsSeedMaker.maxdImpactSSS = NewTrackingCuts.maxdImpactSSSSeeds()
116
            
117
118
119
120
121
            if not InDetFlags.doHeavyIon():
               InDetSiSpacePointsSeedMaker.maxSeedsForSpacePointStrips = NewTrackingCuts.MaxSeedsPerSP_Strips()
               InDetSiSpacePointsSeedMaker.maxSeedsForSpacePointPixels = NewTrackingCuts.MaxSeedsPerSP_Pixels()
               InDetSiSpacePointsSeedMaker.alwaysKeepConfirmedStripSeeds = NewTrackingCuts.KeepAllConfirmedStripSeeds()
               InDetSiSpacePointsSeedMaker.alwaysKeepConfirmedPixelSeeds = NewTrackingCuts.KeepAllConfirmedPixelSeeds()
122
123
124
125
               InDetSiSpacePointsSeedMaker.mindRadius  = 10. 
               # limit size of space-point vector, uses auto-grow mechanism 
               # to avoid exceeding bounds (should rarely happen) 
               InDetSiSpacePointsSeedMaker.maxSizeSP  = 200 
126
127
128
               InDetSiSpacePointsSeedMaker.dImpactCutSlopeUnconfirmedSSS  = 1.25 
               InDetSiSpacePointsSeedMaker.dImpactCutSlopeUnconfirmedPPP  = 2.0 

129

130
         if NewTrackingCuts.mode() == "R3LargeD0":
131
            InDetSiSpacePointsSeedMaker.optimisePhiBinning = False
132
133
            InDetSiSpacePointsSeedMaker.usePixel = False
            InDetSiSpacePointsSeedMaker.etaMax = NewTrackingCuts.maxEta() 
134
135
            InDetSiSpacePointsSeedMaker.maxSeedsForSpacePointStrips = NewTrackingCuts.MaxSeedsPerSP_Strips()
            InDetSiSpacePointsSeedMaker.alwaysKeepConfirmedStripSeeds = NewTrackingCuts.KeepAllConfirmedStripSeeds()
136
137
            InDetSiSpacePointsSeedMaker.maxdRadius = 150
            InDetSiSpacePointsSeedMaker.seedScoreBonusConfirmationSeed = -2000  #let's be generous
138

139
140
         if usePrdAssociationTool:
            # not all classes have that property !!!
141
142
            InDetSiSpacePointsSeedMaker.PRDtoTrackMap      = prefix+'PRDtoTrackMap'+suffix \
                                                                if usePrdAssociationTool else ''
143
144
145
146
147
         if not InDetFlags.doCosmics():
            InDetSiSpacePointsSeedMaker.maxRadius1         = 0.75*NewTrackingCuts.radMax()
            InDetSiSpacePointsSeedMaker.maxRadius2         = NewTrackingCuts.radMax()
            InDetSiSpacePointsSeedMaker.maxRadius3         = NewTrackingCuts.radMax()
         if NewTrackingCuts.mode() == "LowPt" or NewTrackingCuts.mode() == "VeryLowPt" or (NewTrackingCuts.mode() == "Pixel" and InDetFlags.doMinBias()):
148
149
150
151
            try :
               InDetSiSpacePointsSeedMaker.pTmax              = NewTrackingCuts.maxPT()
            except:
               pass 
152
            InDetSiSpacePointsSeedMaker.mindRadius         = 4.0
153
         if NewTrackingCuts.mode() == "SLHC" or NewTrackingCuts.mode() == "SLHCConversionFinding":
154
155
156
157
158
159
            InDetSiSpacePointsSeedMaker.minRadius1         = 0
            InDetSiSpacePointsSeedMaker.minRadius2         = 0
            InDetSiSpacePointsSeedMaker.minRadius3         = 0
            InDetSiSpacePointsSeedMaker.maxRadius1         =1000.*Units.mm
            InDetSiSpacePointsSeedMaker.maxRadius2         =1000.*Units.mm
            InDetSiSpacePointsSeedMaker.maxRadius3         =1000.*Units.mm
160
         if NewTrackingCuts.mode() == "ForwardTracks" or NewTrackingCuts.mode() == "ForwardSLHCTracks" or NewTrackingCuts.mode() == "VeryForwardSLHCTracks":
161
162
163
            InDetSiSpacePointsSeedMaker.checkEta           = True
            InDetSiSpacePointsSeedMaker.etaMin             = NewTrackingCuts.minEta()
            InDetSiSpacePointsSeedMaker.etaMax             = NewTrackingCuts.maxEta()
164
            InDetSiSpacePointsSeedMaker.RapidityCut        = NewTrackingCuts.maxEta()
165
166
167
         if NewTrackingCuts.mode() == "DBM":
            InDetSiSpacePointsSeedMaker.etaMin             = NewTrackingCuts.minEta()
            InDetSiSpacePointsSeedMaker.etaMax             = NewTrackingCuts.maxEta()
168
            InDetSiSpacePointsSeedMaker.useDBM = True
169

170
171
172
173
                    
         #InDetSiSpacePointsSeedMaker.OutputLevel = VERBOSE
         ToolSvc += InDetSiSpacePointsSeedMaker
         if (InDetFlags.doPrintConfigurables()):
scott snyder's avatar
scott snyder committed
174
            printfunc (InDetSiSpacePointsSeedMaker)
175
176
177
178
            
         #
         # --- Z-coordinates primary vertices finder (only for collisions)
         #
179
         if InDetFlags.useZvertexTool() and NewTrackingCuts.mode() != "DBM":
180
181
182
183
184
185
186
187
188
189
190
191
192
193
            from SiZvertexTool_xk.SiZvertexTool_xkConf import InDet__SiZvertexMaker_xk
            InDetZvertexMaker = InDet__SiZvertexMaker_xk(name          = 'InDetZvertexMaker'+NewTrackingCuts.extension(),
                                                         Zmax          = NewTrackingCuts.maxZImpact(),
                                                         Zmin          = -NewTrackingCuts.maxZImpact(),
                                                         minRatio      = 0.17) # not default
            InDetZvertexMaker.SeedMakerTool = InDetSiSpacePointsSeedMaker

            if InDetFlags.doHeavyIon():
               InDetZvertexMaker.HistSize = 2000
               ###InDetZvertexMaker.minContent = 200 
               InDetZvertexMaker.minContent = 30
               
            ToolSvc += InDetZvertexMaker
            if (InDetFlags.doPrintConfigurables()):
scott snyder's avatar
scott snyder committed
194
               printfunc (InDetZvertexMaker)
195
196
197
198
199
200
201
202
203
204
205
206
207

         else:
            InDetZvertexMaker = None

         #
         # --- SCT and Pixel detector elements road builder
         #
         from SiDetElementsRoadTool_xk.SiDetElementsRoadTool_xkConf import InDet__SiDetElementsRoadMaker_xk
         InDetSiDetElementsRoadMaker = InDet__SiDetElementsRoadMaker_xk(name               = 'InDetSiRoadMaker'+NewTrackingCuts.extension(),
                                                                        PropagatorTool     = InDetPatternPropagator,
                                                                        usePixel           = NewTrackingCuts.usePixel(),
                                                                        PixManagerLocation = InDetKeys.PixelManager(),
                                                                        useSCT             = NewTrackingCuts.useSCT(), 
208
                                                                        SCTManagerLocation = InDetKeys.SCT_Manager(),         
209
210
                                                                        RoadWidth          = NewTrackingCuts.RoadWidth())
         if (InDetFlags.doPrintConfigurables()):
scott snyder's avatar
scott snyder committed
211
            printfunc (     InDetSiDetElementsRoadMaker)
212
         # Condition algorithm for InDet__SiDetElementsRoadMaker_xk
213
214
215
216
217
218
219
220
221
222
223
         if DetFlags.haveRIO.pixel_on():
             # Condition algorithm for SiCombinatorialTrackFinder_xk
            from AthenaCommon.AlgSequence import AthSequencer
            condSeq = AthSequencer("AthCondSeq")
            if not hasattr(condSeq, "InDetSiDetElementBoundaryLinksPixelCondAlg"):
                from SiCombinatorialTrackFinderTool_xk.SiCombinatorialTrackFinderTool_xkConf import InDet__SiDetElementBoundaryLinksCondAlg_xk
                condSeq += InDet__SiDetElementBoundaryLinksCondAlg_xk(name = "InDetSiDetElementBoundaryLinksPixelCondAlg",
                                                                      ReadKey = "PixelDetectorElementCollection",
                                                                      WriteKey = "PixelDetElementBoundaryLinks_xk",
                                                                      UsePixelDetectorManager = True)

224
225
226
227
228
         if NewTrackingCuts.useSCT():
            from AthenaCommon.AlgSequence import AthSequencer
            condSeq = AthSequencer("AthCondSeq")
            if not hasattr(condSeq, "InDet__SiDetElementsRoadCondAlg_xk"):
               from SiDetElementsRoadTool_xk.SiDetElementsRoadTool_xkConf import InDet__SiDetElementsRoadCondAlg_xk
229
               condSeq += InDet__SiDetElementsRoadCondAlg_xk(name = "InDet__SiDetElementsRoadCondAlg_xk")
230

231
232
233
234
235
236
237
            if not hasattr(condSeq, "InDetSiDetElementBoundaryLinksSCTCondAlg"):
               from SiCombinatorialTrackFinderTool_xk.SiCombinatorialTrackFinderTool_xkConf import InDet__SiDetElementBoundaryLinksCondAlg_xk
               condSeq += InDet__SiDetElementBoundaryLinksCondAlg_xk(name = "InDetSiDetElementBoundaryLinksSCTCondAlg",
                                                                     ReadKey = "SCT_DetectorElementCollection",
                                                                     WriteKey = "SCT_DetElementBoundaryLinks_xk")


238
         #
239
         # --- Local track finding using sdCaloSeededSSSpace point seed
240
         #
241
242
243
         # @TODO ensure that PRD association map is used if usePrdAssociationTool is set
         is_dbm = InDetFlags.doDBMstandalone() or NewTrackingCuts.extension()=='DBM'
         rot_creator_digital = TrackingCommon.getInDetRotCreatorDigital() if not is_dbm else TrackingCommon.getInDetRotCreatorDBM()
244
         boundary_check_tool = TrackingCommon.getInDetBoundaryCheckTool()
245
246
247
248
         from SiCombinatorialTrackFinderTool_xk.SiCombinatorialTrackFinderTool_xkConf import InDet__SiCombinatorialTrackFinder_xk
         track_finder = InDet__SiCombinatorialTrackFinder_xk(name                  = 'InDetSiComTrackFinder'+NewTrackingCuts.extension(),
                                                             PropagatorTool        = InDetPatternPropagator,
                                                             UpdatorTool           = InDetPatternUpdator,
249
                                                             BoundaryCheckTool     = boundary_check_tool,
250
251
252
253
254
                                                             RIOonTrackTool        = rot_creator_digital,
                                                             usePixel              = DetFlags.haveRIO.pixel_on(),
                                                             useSCT                = DetFlags.haveRIO.SCT_on() if not is_dbm else False,
                                                             PixelClusterContainer = InDetKeys.PixelClusters(),
                                                             SCT_ClusterContainer  = InDetKeys.SCT_Clusters())
255
256
         if NewTrackingCuts.mode() == "Offline": 
             track_finder.writeHolesFromPattern = InDetFlags.useHolesFromPattern()
257
258
259
260
261
262
263
264
265
266
         if is_dbm :
            track_finder.MagneticFieldMode     = "NoField"
            track_finder.TrackQualityCut       = 9.3

         if (DetFlags.haveRIO.SCT_on()):
            track_finder.SctSummaryTool = InDetSCT_ConditionsSummaryTool
         else:
            track_finder.SctSummaryTool = None

         ToolSvc += track_finder
267

268
         useBremMode = NewTrackingCuts.mode() == "Offline" or NewTrackingCuts.mode() == "SLHC" or NewTrackingCuts.mode() == "DBM"
269
270
         from SiTrackMakerTool_xk.SiTrackMakerTool_xkConf import InDet__SiTrackMaker_xk as SiTrackMaker
         InDetSiTrackMaker = SiTrackMaker(name                      = 'InDetSiTrackMaker'+NewTrackingCuts.extension(),
271
272
                                          useSCT                    = NewTrackingCuts.useSCT(),
                                          usePixel                  = NewTrackingCuts.usePixel(),
273
                                          RoadTool                  = InDetSiDetElementsRoadMaker,
274
                                          CombinatorialTrackFinder  = track_finder,
275
276
                                          pTmin                     = NewTrackingCuts.minPT(),
                                          pTminBrem                 = NewTrackingCuts.minPTBrem(),
277
                                          pTminSSS                  = InDetFlags.pT_SSScut(),
278
279
280
281
282
283
284
285
286
                                          nClustersMin              = NewTrackingCuts.minClusters(),
                                          nHolesMax                 = NewTrackingCuts.nHolesMax(),
                                          nHolesGapMax              = NewTrackingCuts.nHolesGapMax(),
                                          SeedsFilterLevel          = NewTrackingCuts.seedFilterLevel(),
                                          Xi2max                    = NewTrackingCuts.Xi2max(),
                                          Xi2maxNoAdd               = NewTrackingCuts.Xi2maxNoAdd(),
                                          nWeightedClustersMin      = NewTrackingCuts.nWeightedClustersMin(),
                                          CosmicTrack               = InDetFlags.doCosmics(),
                                          Xi2maxMultiTracks         = NewTrackingCuts.Xi2max(), # was 3.
287
                                          useSSSseedsFilter         = InDetFlags.doSSSfilter(),
288
289
290
                                          doMultiTracksProd         = True,
                                          useBremModel              = InDetFlags.doBremRecovery() and useBremMode, # only for NewTracking the brem is debugged !!!
                                          doCaloSeededBrem          = InDetFlags.doCaloSeededBrem(),
291
                                          doHadCaloSeedSSS          = InDetFlags.doHadCaloSeededSSS(),
292
293
294
                                          phiWidth                  = NewTrackingCuts.phiWidthBrem(),
                                          etaWidth                  = NewTrackingCuts.etaWidthBrem(),
                                          InputClusterContainerName = InDetKeys.CaloClusterROIContainer(), # "InDetCaloClusterROIs" 
295
                                          InputHadClusterContainerName = InDetKeys.HadCaloClusterROIContainer(), # "InDetCaloClusterROIs" 
296
                                          UseAssociationTool        = usePrdAssociationTool)
297
298
299
300

         if NewTrackingCuts.mode() == "SLHC" or NewTrackingCuts.mode() == "ForwardSLHCTracks" or NewTrackingCuts.mode() == "VeryForwardSLHCTracks" :
            InDetSiTrackMaker.ITKGeometry = True

301
302
303
         if NewTrackingCuts.mode() == "DBM":
            InDetSiTrackMaker.MagneticFieldMode = "NoField"
            InDetSiTrackMaker.useBremModel = False
304
305
306
307
            InDetSiTrackMaker.doMultiTracksProd = False
            InDetSiTrackMaker.TrackPatternRecoInfo = 'SiSPSeededFinder'			
            InDetSiTrackMaker.pTminSSS = -1
            InDetSiTrackMaker.CosmicTrack = False
308
            InDetSiTrackMaker.useSSSseedsFilter = False
309
310
            InDetSiTrackMaker.doCaloSeededBrem = False
            InDetSiTrackMaker.doHadCaloSeedSSS = False
311

312
         elif InDetFlags.doCosmics():
313
314
315
316
317
           InDetSiTrackMaker.TrackPatternRecoInfo = 'SiSpacePointsSeedMaker_Cosmic'
	   
         elif InDetFlags.doHeavyIon():
           InDetSiTrackMaker.TrackPatternRecoInfo = 'SiSpacePointsSeedMaker_HeavyIon'
         
318
         elif NewTrackingCuts.mode() == "LowPt":
319
320
321
322
323
324
325
326
327
328
329
330
331
           InDetSiTrackMaker.TrackPatternRecoInfo = 'SiSpacePointsSeedMaker_LowMomentum'

         elif NewTrackingCuts.mode() == "VeryLowPt" or (NewTrackingCuts.mode() == "Pixel" and InDetFlags.doMinBias()):
           InDetSiTrackMaker.TrackPatternRecoInfo = 'SiSpacePointsSeedMaker_VeryLowMomentum'           

         elif NewTrackingCuts.mode() == "BeamGas":
           InDetSiTrackMaker.TrackPatternRecoInfo = 'SiSpacePointsSeedMaker_BeamGas'
 
         elif NewTrackingCuts.mode() == "ForwardTracks":
           InDetSiTrackMaker.TrackPatternRecoInfo = 'SiSpacePointsSeedMaker_ForwardTracks'

         elif NewTrackingCuts.mode() == "ForwardSLHCTracks":
           InDetSiTrackMaker.TrackPatternRecoInfo = 'SiSpacePointsSeedMaker_ForwardSLHCTracks'
332
333

         elif NewTrackingCuts.mode() == "VeryForwardSLHCTracks": 
334
335
           InDetSiTrackMaker.TrackPatternRecoInfo = 'SiSpacePointsSeedMaker_VeryForwardSLHCTracks' 

336
337
338
         elif NewTrackingCuts.mode() == "SLHCConversionFinding":
           InDetSiTrackMaker.TrackPatternRecoInfo = 'SiSpacePointsSeedMaker_SLHCConversionTracks'

339
         elif NewTrackingCuts.mode() == "LargeD0" or NewTrackingCuts.mode() == "R3LargeD0" or NewTrackingCuts.mode() == "LowPtLargeD0":
340
           InDetSiTrackMaker.TrackPatternRecoInfo = 'SiSpacePointsSeedMaker_LargeD0'
341
        
342
343
344
         else:
           InDetSiTrackMaker.TrackPatternRecoInfo = 'SiSPSeededFinder'
					  
345
346
347
348
349
350
351
         if InDetFlags.doStoreTrackSeeds():
              from SeedToTrackConversionTool.SeedToTrackConversionToolConf import InDet__SeedToTrackConversionTool
              InDet_SeedToTrackConversion = InDet__SeedToTrackConversionTool(name = "InDet_SeedToTrackConversion",
                                                                             OutputName = InDetKeys.SiSPSeedSegments()+NewTrackingCuts.extension())
              InDetSiTrackMaker.SeedToTrackConversion = InDet_SeedToTrackConversion
              InDetSiTrackMaker.SeedSegmentsWrite = True

352
353
354
         #InDetSiTrackMaker.OutputLevel = VERBOSE				  
         ToolSvc += InDetSiTrackMaker
         if (InDetFlags.doPrintConfigurables()):
scott snyder's avatar
scott snyder committed
355
            printfunc (InDetSiTrackMaker)
356
357
         #
         # set output track collection name
358
        #
359
360
361
362
363
364
365
366
367
         self.__SiTrackCollection = SiSPSeededTrackCollectionKey
         #
         # --- Setup Track finder using space points seeds
         #

         from SiSPSeededTrackFinder.SiSPSeededTrackFinderConf import InDet__SiSPSeededTrackFinder

         if NewTrackingCuts.mode() == "ForwardSLHCTracks" or NewTrackingCuts.mode() == "ForwardTracks":

368
369
370
          InDetSiSPSeededTrackFinder = InDet__SiSPSeededTrackFinder(name             = 'InDetSiSpTrackFinder'+NewTrackingCuts.extension(),
                                                                    TrackTool        = InDetSiTrackMaker,
                                                                    PRDtoTrackMap    = prefix+'PRDtoTrackMap'+suffix \
371
                                                                                       if usePrdAssociationTool else '',
372
373
374
375
376
377
378
                                                                    TrackSummaryTool = TrackingCommon.getInDetTrackSummaryToolNoHoleSearch(),
                                                                    TracksLocation   = self.__SiTrackCollection,
                                                                    SeedsTool        = InDetSiSpacePointsSeedMaker,
                                                                    useZvertexTool   = InDetFlags.useZvertexTool(),
                                                                    ZvertexTool      = InDetZvertexMaker,
                                                                    useNewStrategy   = False,
                                                                    useMBTSTimeDiff  = InDetFlags.useMBTSTimeDiff(),
379
                                                                    useZBoundFinding = False)
380
381
          if InDetFlags.doHeavyIon() :
           InDetSiSPSeededTrackFinder.FreeClustersCut = 2 #Heavy Ion optimization from Igor
382
383
         
         else:
384
385
386
          InDetSiSPSeededTrackFinder = InDet__SiSPSeededTrackFinder(name             = 'InDetSiSpTrackFinder'+NewTrackingCuts.extension(),
                                                                    TrackTool        = InDetSiTrackMaker,
                                                                    PRDtoTrackMap    = prefix+'PRDtoTrackMap'+suffix \
387
                                                                                       if usePrdAssociationTool else '',
388
389
390
391
392
393
394
                                                                    TrackSummaryTool = TrackingCommon.getInDetTrackSummaryToolNoHoleSearch(),
                                                                    TracksLocation   = self.__SiTrackCollection,
                                                                    SeedsTool        = InDetSiSpacePointsSeedMaker,
                                                                    useZvertexTool   = InDetFlags.useZvertexTool() and NewTrackingCuts.mode() != "DBM",
                                                                    ZvertexTool      = InDetZvertexMaker,
                                                                    useNewStrategy   = InDetFlags.useNewSiSPSeededTF() and NewTrackingCuts.mode() != "DBM",
                                                                    useMBTSTimeDiff  = InDetFlags.useMBTSTimeDiff(),
395
                                                                    useZBoundFinding = NewTrackingCuts.doZBoundary() and NewTrackingCuts.mode() != "DBM")   
396

397
398
          if InDetFlags.doHeavyIon() :
           InDetSiSPSeededTrackFinder.FreeClustersCut = 2 #Heavy Ion optimization from Igor
399
400
          if NewTrackingCuts.mode() == "Offline": 
             InDetSiSPSeededTrackFinder.writeHolesFromPattern = InDetFlags.useHolesFromPattern()
401

402
         #InDetSiSPSeededTrackFinder.OutputLevel =VERBOSE 
403
404
         topSequence += InDetSiSPSeededTrackFinder
         if (InDetFlags.doPrintConfigurables()):
scott snyder's avatar
scott snyder committed
405
            printfunc (InDetSiSPSeededTrackFinder)
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433

         if not InDetFlags.doSGDeletion():
            if InDetFlags.doTruth():
               #
               # set up the truth info for this container
               #
               include ("InDetRecExample/ConfiguredInDetTrackTruth.py")
               InDetTracksTruth = ConfiguredInDetTrackTruth(self.__SiTrackCollection,
                                                            self.__SiTrackCollection+"DetailedTruth",
                                                            self.__SiTrackCollection+"TruthCollection")
               #
               # add final output for statistics
               #
               TrackCollectionKeys      += [ InDetTracksTruth.Tracks() ]
               TrackCollectionTruthKeys += [ InDetTracksTruth.TracksTruth() ]
            else:
               TrackCollectionKeys      += [ self.__SiTrackCollection ]
               
      # ------------------------------------------------------------
      #
      # ---------- Ambiguity solving
      #
      # ------------------------------------------------------------

      if InDetFlags.doAmbiSolving():
         #
         # --- load InnerDetector TrackSelectionTool
         #
434
435
436
437
         
         prob1 = InDetFlags.pixelClusterSplitProb1()
         prob2 = InDetFlags.pixelClusterSplitProb2()
         nhitsToAllowSplitting = 9
438
439
         use_parameterization = False and not NewTrackingCuts.mode() == "DBM"

440
441
         from AtlasGeoModel.CommonGMJobProperties import CommonGeometryFlags
         if CommonGeometryFlags.Run() == 1:
442
443
444
            prob1 = InDetFlags.pixelClusterSplitProb1_run1()
            prob2 = InDetFlags.pixelClusterSplitProb2_run1() 
            nhitsToAllowSplitting = 8
445

446
447
         drift_circle_cut_tool = TrackingCommon.getInDetTRTDriftCircleCutForPatternReco() if use_parameterization else ''

448
         if InDetFlags.doTIDE_Ambi() and not (NewTrackingCuts.mode() == "ForwardSLHCTracks" or NewTrackingCuts.mode() == "ForwardTracks" or NewTrackingCuts.mode() == "DBM"):
449
450
451
452
           from InDetAmbiTrackSelectionTool.InDetAmbiTrackSelectionToolConf import InDet__InDetDenseEnvAmbiTrackSelectionTool as AmbiTrackSelectionTool
         else:
           from InDetAmbiTrackSelectionTool.InDetAmbiTrackSelectionToolConf import InDet__InDetAmbiTrackSelectionTool as AmbiTrackSelectionTool
         InDetAmbiTrackSelectionTool = AmbiTrackSelectionTool(name                = 'InDetAmbiTrackSelectionTool'+NewTrackingCuts.extension(),
453
                                                              DriftCircleCutTool  = drift_circle_cut_tool,
454
                                                              AssociationTool     = TrackingCommon.getInDetPRDtoTrackMapToolGangedPixels(),
455
456
457
458
459
                                                              minHits             = NewTrackingCuts.minClusters(),
                                                              minNotShared        = NewTrackingCuts.minSiNotShared(),
                                                              maxShared           = NewTrackingCuts.maxShared(),
                                                              minTRTHits          = 0, # used for Si only tracking !!!
                                                              sharedProbCut       = 0.10,
460
                                                              UseParameterization = use_parameterization,
461
                                                              Cosmics             = InDetFlags.doCosmics(),
462
                                                              doPixelSplitting    = InDetFlags.doPixelClusterSplitting() and NewTrackingCuts.mode != "DBM")
463
         if InDetFlags.doTIDE_Ambi() and not (NewTrackingCuts.mode() == "ForwardSLHCTracks" or NewTrackingCuts.mode() == "ForwardTracks" or NewTrackingCuts.mode() == "DBM"):
464
465
466
           InDetAmbiTrackSelectionTool.sharedProbCut             = prob1
           InDetAmbiTrackSelectionTool.sharedProbCut2            = prob2
           InDetAmbiTrackSelectionTool.minSiHitsToAllowSplitting = nhitsToAllowSplitting
467
468
           InDetAmbiTrackSelectionTool.minUniqueSCTHits          = 4
           InDetAmbiTrackSelectionTool.minTrackChi2ForSharedHits = 3
469
470
           InDetAmbiTrackSelectionTool.InputHadClusterContainerName = InDetKeys.HadCaloClusterROIContainer()+"Bjet"
           InDetAmbiTrackSelectionTool.doHadCaloSeed             = InDetFlags.doCaloSeededAmbi()   #Do special cuts in region of interest
471
           InDetAmbiTrackSelectionTool.minPtSplit                = InDetFlags.pixelClusterSplitMinPt()       #Only allow split clusters on track withe pt greater than this MeV
472
473
           InDetAmbiTrackSelectionTool.maxSharedModulesInROI     = 3     #Maximum number of shared modules for tracks in ROI
           InDetAmbiTrackSelectionTool.minNotSharedInROI         = 2     #Minimum number of unique modules for tracks in ROI
474
475
476
           InDetAmbiTrackSelectionTool.minSiHitsToAllowSplittingInROI = 8  #Minimum number of Si hits to allow splittings for tracks in ROI
           InDetAmbiTrackSelectionTool.phiWidth                  = 0.05     #Split cluster ROI size
           InDetAmbiTrackSelectionTool.etaWidth                  = 0.05     #Split cluster ROI size
477
           InDetAmbiTrackSelectionTool.InputEmClusterContainerName = InDetKeys.CaloClusterROIContainer()
478
           InDetAmbiTrackSelectionTool.minPtBjetROI              = 10000
479
           InDetAmbiTrackSelectionTool.doEmCaloSeed              = InDetFlags.doCaloSeededAmbi()   #Only split in cluster in region of interest
480
481
482
483
484
           InDetAmbiTrackSelectionTool.minPtConv                 = 10000   #Only allow split clusters on track withe pt greater than this MeV
           InDetAmbiTrackSelectionTool.phiWidthEM                = 0.05     #Split cluster ROI size
           InDetAmbiTrackSelectionTool.etaWidthEM                = 0.05     #Split cluster ROI size


485
486
487
488
489
490
491
492
493
494
495
         if NewTrackingCuts.mode() == "DBM":
           InDetAmbiTrackSelectionTool.Cosmics = False
           InDetAmbiTrackSelectionTool.UseParameterization   = False
           InDetAmbiTrackSelectionTool.doPixelSplitting      = False
           InDetAmbiTrackSelectionTool.maxShared             = 1000
           InDetAmbiTrackSelectionTool.maxTracksPerSharedPRD = 2
           InDetAmbiTrackSelectionTool.minHits               = 0
           InDetAmbiTrackSelectionTool.minNotShared          = 0
           InDetAmbiTrackSelectionTool.minScoreShareTracks   = 0.0
           InDetAmbiTrackSelectionTool.minTRTHits            = 0
           InDetAmbiTrackSelectionTool.sharedProbCut         = 0.1
496
497
498
499
500
501
        
         # if NewTrackingCuts.mode() == "ForwardTracks":
         #    InDetAmbiTrackSelectionTool.OutputLevel = VERBOSE

         ToolSvc += InDetAmbiTrackSelectionTool
         if (InDetFlags.doPrintConfigurables()):
scott snyder's avatar
scott snyder committed
502
            printfunc (InDetAmbiTrackSelectionTool)
503
504
505
         #
         # --- set up different Scoring Tool for collisions and cosmics
         #
506
         if InDetFlags.doCosmics() and NewTrackingCuts.mode() != "DBM":
507
            InDetAmbiScoringTool = TrackingCommon.getInDetCosmicsScoringTool(NewTrackingCuts)
508
509
         elif(NewTrackingCuts.mode() == "R3LargeD0" and InDetFlags.nnCutLargeD0Threshold > 0):
            # Set up NN config
510
            InDetAmbiScoringTool = TrackingCommon.getInDetNNScoringToolSi(NewTrackingCuts)
511
         else:
512
            InDetAmbiScoringTool = TrackingCommon.getInDetAmbiScoringToolSi(NewTrackingCuts)
513
  
514
515
516
517
         #
         # --- load Ambiguity Processor
         #
         useBremMode = NewTrackingCuts.mode() == "Offline" or NewTrackingCuts.mode() == "SLHC"
518

519
520
521
         # @TODO is the cluster split probability container needed here ?
         ambi_track_summary_tool = TrackingCommon.getInDetTrackSummaryTool(namePrefix                 = 'InDetAmbiguityProcessorSplitProb',
                                                                           nameSuffix                 = NewTrackingCuts.extension(),
522
                                                                           ClusterSplitProbabilityName= 'InDetAmbiguityProcessorSplitProb'+NewTrackingCuts.extension())
523
         if InDetFlags.doTIDE_Ambi() and not (NewTrackingCuts.mode() == "ForwardSLHCTracks" or NewTrackingCuts.mode() == "ForwardTracks" or NewTrackingCuts.mode() == "DBM"):
524
525
526
527
528
529
530
531
532
533
534
           # DenseEnvironmentsAmbiguityScoreProcessorTool
           from TrkAmbiguityProcessor.TrkAmbiguityProcessorConf import Trk__DenseEnvironmentsAmbiguityScoreProcessorTool as ScoreProcessorTool
           InDetAmbiguityScoreProcessor = ScoreProcessorTool(name               = 'InDetAmbiguityScoreProcessor'+NewTrackingCuts.extension(),
                                                             ScoringTool        = InDetAmbiScoringTool,
                                                             SplitProbTool      = NnPixelClusterSplitProbTool if InDetFlags.doPixelClusterSplitting() and 'NnPixelClusterSplitProbTool' in globals() else None,
                                                             AssociationTool    = TrackingCommon.getInDetPRDtoTrackMapToolGangedPixels(),
                                                             AssociationToolNotGanged  = TrackingCommon.getPRDtoTrackMapTool(),
                                                             AssociationMapName = 'PRDToTrackMap'+NewTrackingCuts.extension(),
                                                             InputClusterSplitProbabilityName = ClusterSplitProbContainer,
                                                             OutputClusterSplitProbabilityName = 'SplitProb'+NewTrackingCuts.extension())
           
535
            # DenseEnvironmentsAmbiguityProcessorTool
536
           from TrkAmbiguityProcessor.TrkAmbiguityProcessorConf import Trk__DenseEnvironmentsAmbiguityProcessorTool as ProcessorTool
537
           use_low_pt_fitter =  True if NewTrackingCuts.mode() == "LowPt" or NewTrackingCuts.mode() == "VeryLowPt" or (NewTrackingCuts.mode() == "Pixel" and InDetFlags.doMinBias()) else False
538
539
540

           from AthenaCommon import CfgGetter
           from InDetRecExample.TrackingCommon import setDefaults
541
542
543
           fitter_args = setDefaults({},
                                     nameSuffix                   = 'Ambi'+NewTrackingCuts.extension(),
                                     SplitClusterMapExtension     = NewTrackingCuts.extension(),
544
                                     ClusterSplitProbabilityName  = 'InDetAmbiguityProcessorSplitProb'+NewTrackingCuts.extension())
545
546
547
548
549
550
           if InDetFlags.holeSearchInGX2Fit():
               fitter_args = setDefaults(fitter_args,
               DoHoleSearch                 = True,
               BoundaryCheckTool            = TrackingCommon.getInDetBoundaryCheckTool())
               

551
552
           fitter_list=[     CfgGetter.getPublicToolClone('InDetTrackFitter'+'Ambi'+NewTrackingCuts.extension(), 'InDetTrackFitter',**fitter_args)    if not use_low_pt_fitter \
                             else CfgGetter.getPublicToolClone('InDetTrackFitterLowPt'+NewTrackingCuts.extension(), 'InDetTrackFitterLowPt',**fitter_args)]
553

554
555
           if InDetFlags.doRefitInvalidCov() :
              from AthenaCommon import CfgGetter
556
557
558
559
560
561
562
              if len(NewTrackingCuts.extension()) > 0 :
                 fitter_args = setDefaults({}, SplitClusterMapExtension = NewTrackingCuts.extension() )
                 fitter_list.append(CfgGetter.getPublicToolClone('KalmanFitter'         +NewTrackingCuts.extension(),'KalmanFitter',         **fitter_args))
                 fitter_list.append(CfgGetter.getPublicToolClone('ReferenceKalmanFitter'+NewTrackingCuts.extension(),'ReferenceKalmanFitter',**fitter_args))
              else :
                 fitter_list.append(CfgGetter.getPublicTool('KalmanFitter'))
                 fitter_list.append(CfgGetter.getPublicTool('ReferenceKalmanFitter'))
563
564

           InDetAmbiguityProcessor = ProcessorTool(name               = 'InDetAmbiguityProcessor'+NewTrackingCuts.extension(),
565
566
567
                                                   Fitter             = fitter_list ,
                                                   AssociationTool    = TrackingCommon.getInDetPRDtoTrackMapToolGangedPixels(),
                                                   AssociationMapName = 'PRDToTrackMap'+NewTrackingCuts.extension(),
568
                                                   TrackSummaryTool   = ambi_track_summary_tool,
569
570
                                                   ScoringTool        = InDetAmbiScoringTool,
                                                   SelectionTool      = InDetAmbiTrackSelectionTool,
571
572
                                                   InputClusterSplitProbabilityName = 'SplitProb'+NewTrackingCuts.extension(),
                                                   OutputClusterSplitProbabilityName = 'InDetAmbiguityProcessorSplitProb'+NewTrackingCuts.extension(),
573
574
575
576
                                                   SuppressHoleSearch = False,
                                                   tryBremFit         = InDetFlags.doBremRecovery() and useBremMode and NewTrackingCuts.mode() != "DBM",
                                                   caloSeededBrem     = InDetFlags.doCaloSeededBrem() and NewTrackingCuts.mode() != "DBM",
                                                   pTminBrem          = NewTrackingCuts.minPTBrem(),
577
578
                                                   RefitPrds          = True,
                                                   KeepHolesFromBeforeRefit = InDetFlags.useHolesFromPattern())
579

580
         else:
581
           from AthenaCommon import CfgGetter
582
           from TrkAmbiguityProcessor.TrkAmbiguityProcessorConf import Trk__SimpleAmbiguityProcessorTool as ProcessorTool
583
           InDetAmbiguityProcessor = ProcessorTool(name               = 'InDetAmbiguityProcessor'+NewTrackingCuts.extension(),
584
                                                 Fitter             = CfgGetter.getPublicTool('InDetTrackFitter'),
585
                                                 AssociationTool    = TrackingCommon.getInDetPRDtoTrackMapToolGangedPixels(),
586
                                                 TrackSummaryTool   = ambi_track_summary_tool,
587
588
                                                 ScoringTool        = InDetAmbiScoringTool,
                                                 SelectionTool      = InDetAmbiTrackSelectionTool,
589
590
                                                 InputClusterSplitProbabilityName = ClusterSplitProbContainer,
                                                 OutputClusterSplitProbabilityName = 'InDetAmbiguityProcessorSplitProb'+NewTrackingCuts.extension(),
591
                                                 SuppressHoleSearch = False,
592
593
                                                 tryBremFit         = InDetFlags.doBremRecovery() and useBremMode and NewTrackingCuts.mode() != "DBM",
                                                 caloSeededBrem     = InDetFlags.doCaloSeededBrem() and NewTrackingCuts.mode() != "DBM",
594
                                                 pTminBrem          = NewTrackingCuts.minPTBrem(),
595
                                                 RefitPrds          = True)
596
           InDetAmbiguityScoreProcessor = None
597

598
599
         if InDetFlags.doTIDE_Ambi() and not (NewTrackingCuts.mode() == "ForwardSLHCTracks" or NewTrackingCuts.mode() == "ForwardTracks" or NewTrackingCuts.mode() == "DBM") and 'NnPixelClusterSplitProbTool' in globals() :
           if InDetAmbiguityScoreProcessor is not None :
600
601
602
              InDetAmbiguityScoreProcessor.sharedProbCut             = prob1
              InDetAmbiguityScoreProcessor.sharedProbCut2            = prob2
              if NewTrackingCuts.extension() == "":
603
                 InDetAmbiguityScoreProcessor.SplitClusterMap_old  = ""
604
              InDetAmbiguityScoreProcessor.SplitClusterMap_new  = InDetKeys.SplitClusterAmbiguityMap()+NewTrackingCuts.extension()
605

606
         if NewTrackingCuts.mode() == "Pixel" or NewTrackingCuts.mode() == "DBM":
607
608
            InDetAmbiguityProcessor.SuppressHoleSearch = True
         if NewTrackingCuts.mode() == "LowPt" or NewTrackingCuts.mode() == "VeryLowPt" or (NewTrackingCuts.mode() == "Pixel" and InDetFlags.doMinBias()):
609
610
611
            if InDetAmbiguityProcessor.getName().find('Dense') :
               pass
            else :
612
613
               from AthenaCommon import CfgGetter
               InDetAmbiguityProcessor.Fitter = CfgGetter.getPublicTool('InDetTrackFitterLowPt')
614
615
616
617
618
619
620
621
             
         if InDetFlags.materialInteractions():
            InDetAmbiguityProcessor.MatEffects = InDetFlags.materialInteractionsType()
         else:
            InDetAmbiguityProcessor.MatEffects = 0

         # if NewTrackingCuts.mode() == "ForwardTracks":
         #    InDetAmbiguityProcessor.OutputLevel = VERBOSE
622
         
623
624
         ToolSvc += InDetAmbiguityProcessor
         if (InDetFlags.doPrintConfigurables()):
scott snyder's avatar
scott snyder committed
625
            printfunc (InDetAmbiguityProcessor)
626
627

         # add InDetAmbiguityScoreProcessor
628
         if InDetAmbiguityScoreProcessor is not None :
629
630
            ToolSvc += InDetAmbiguityScoreProcessor

631
632
633
634
635
         #
         # --- set input and output collection
         #
         InputTrackCollection     = self.__SiTrackCollection
         self.__SiTrackCollection = ResolvedTrackCollectionKey
636
637
638
639
640
641
642
643
644
645
646
647
648

         #
         # --- configure Ambiguity (score) solver
         #
         from TrkAmbiguitySolver.TrkAmbiguitySolverConf import Trk__TrkAmbiguityScore
         # from RecExConfig.hideInput import hideInput
         # hideInput ('TrackCollection', self.__SiTrackCollection)
         InDetAmbiguityScore = Trk__TrkAmbiguityScore(name               = 'InDetAmbiguityScore'+NewTrackingCuts.extension(),
                                                        TrackInput         = [ InputTrackCollection ],
                                                        TrackOutput        = 'ScoredMap'+'InDetAmbiguityScore'+NewTrackingCuts.extension(),
                                                        AmbiguityScoreProcessor =  InDetAmbiguityScoreProcessor ) ## TODO: check the case when it is None object
         topSequence += InDetAmbiguityScore
         if (InDetFlags.doPrintConfigurables()):
scott snyder's avatar
scott snyder committed
649
            printfunc (InDetAmbiguityScore)
650
651


652
653
654
655
         #
         # --- configure Ambiguity solver
         #
         from TrkAmbiguitySolver.TrkAmbiguitySolverConf import Trk__TrkAmbiguitySolver
656
657
         from RecExConfig.hideInput import hideInput
         hideInput ('TrackCollection', self.__SiTrackCollection)
658
         InDetAmbiguitySolver = Trk__TrkAmbiguitySolver(name               = 'InDetAmbiguitySolver'+NewTrackingCuts.extension(),
659
                                                        TrackInput         = 'ScoredMap'+'InDetAmbiguityScore'+NewTrackingCuts.extension(),
660
661
662
663
                                                        TrackOutput        = self.__SiTrackCollection,
                                                        AmbiguityProcessor = InDetAmbiguityProcessor)
         topSequence += InDetAmbiguitySolver
         if (InDetFlags.doPrintConfigurables()):
scott snyder's avatar
scott snyder committed
664
            printfunc (InDetAmbiguitySolver)
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687

         #
         # --- Delete Silicon Sp-Seeded tracks
         #
         from InDetRecExample.ConfiguredInDetSGDeletion import InDetSGDeletionAlg
         InDetSGDeletionAlg(key = SiSPSeededTrackCollectionKey)

         if ( ( NewTrackingCuts.mode() in ["Pixel", "SCT"] ) or not InDetFlags.doSGDeletion()):
            if InDetFlags.doTruth():
               #
               # set up the truth info for this container
               #
               include ("InDetRecExample/ConfiguredInDetTrackTruth.py")
               InDetTracksTruth = ConfiguredInDetTrackTruth(self.__SiTrackCollection,
                                                            self.__SiTrackCollection+"DetailedTruth",
                                                            self.__SiTrackCollection+"TruthCollection")
               #
               # add final output for statistics
               #
               TrackCollectionKeys      += [ InDetTracksTruth.Tracks() ]
               TrackCollectionTruthKeys += [ InDetTracksTruth.TracksTruth() ]
            else:
               TrackCollectionKeys      += [ self.__SiTrackCollection ]
688
      
689
   def SiTrackCollection ( self ):
690
691
692
693
694
695
696
      try:
         return self.__SiTrackCollection
      except AttributeError:
         raise AttributeError("ConfiguredNewTrackingSiPattern: "\
                  " Neither InDetFlags.doSiSPSeededTrackFinder nor InDetFlags.doAmbiSolving"\
                  " are True, meaning the __SiTrackCollection data member has not been declared.")
               
697