3 from __future__
import print_function
6 from AthenaConfiguration.Enums
import BeamType, FlagEnum
7 from TrkConfig.TrkConfigFlags
import PrimaryPassConfig
10 LeadTracks =
'LeadTracks'
19 from AthenaConfiguration.AthConfigFlags
import AthConfigFlags
20 icf = AthConfigFlags()
22 icf.addFlag(
"extension",
"" )
24 icf.addFlag(
"usePrdAssociationTool",
False)
25 icf.addFlag(
"isLowPt",
False)
26 icf.addFlag(
"useTIDE_Ambi",
lambda pcf: pcf.Tracking.doTIDE_Ambi)
27 icf.addFlag(
"useTRTExtension",
lambda pcf: pcf.Tracking.doTRTExtension)
28 icf.addFlag(
"storeSeparateContainer",
False)
29 icf.addFlag(
"doAmbiguityProcessorTrackFit",
True)
32 icf.addFlag(
"minPT",
lambda pcf: (pcf.BField.configuredSolenoidFieldScale *
33 (0.4 * Units.GeV
if pcf.Tracking.doLowMu
else
35 icf.addFlag(
"maxPT", 1000.0 * Units.TeV)
36 icf.addFlag(
"minEta", -1)
37 icf.addFlag(
"maxEta", 2.7)
41 icf.addFlag(
"minClusters",
lambda pcf:
42 3
if (pcf.Detector.EnablePixel
and not pcf.Detector.EnableSCT)
else
43 6
if (pcf.Detector.EnableSCT
and not pcf.Detector.EnablePixel)
else
44 7
if pcf.Tracking.doLowMu
else
47 icf.addFlag(
"minSiNotShared", 6)
49 icf.addFlag(
"maxShared", 1)
50 icf.addFlag(
"minPixel", 0)
51 icf.addFlag(
"maxHoles",
lambda pcf: 3
if pcf.Tracking.doLowMu
else 2)
52 icf.addFlag(
"maxPixelHoles",
lambda pcf: 2
if pcf.Tracking.doLowMu
else 1)
53 icf.addFlag(
"maxSctHoles", 2)
54 icf.addFlag(
"maxDoubleHoles", 1)
56 icf.addFlag(
"maxPrimaryImpact",
lambda pcf:
57 10.0 * Units.mm
if (pcf.Tracking.doBLS
or pcf.Tracking.doLowMu)
else
59 icf.addFlag(
"maxEMImpact", 50.0 * Units.mm)
60 icf.addFlag(
"maxZImpact",
lambda pcf:
61 320.0 * Units.mm
if pcf.Tracking.doLowMu
else
65 icf.addFlag(
"minTRTonTrk", 9)
66 icf.addFlag(
"minTRTPrecFrac", 0.3)
71 icf.addFlag(
"radMax", 600.0 * Units.mm)
72 icf.addFlag(
"roadWidth",
lambda pcf: 20.
if pcf.Tracking.doLowMu
else 12.)
73 icf.addFlag(
"nHolesMax",
lambda pcf: 3
if pcf.Tracking.doLowMu
else 2)
74 icf.addFlag(
"nHolesGapMax",
lambda pcf: 3
if pcf.Tracking.doLowMu
else 2)
75 icf.addFlag(
"Xi2max",
lambda pcf: 15.
if pcf.Tracking.doLowMu
else 9.)
76 icf.addFlag(
"Xi2maxNoAdd",
lambda pcf: 35.
if pcf.Tracking.doLowMu
else 25.)
77 icf.addFlag(
"nWeightedClustersMin", 6)
80 icf.addFlag(
"useSeedFilter",
True)
81 icf.addFlag(
"maxTracksPerSharedPRD", 0)
82 icf.addFlag(
"maxdImpactPPSSeeds",
lambda pcf: 1.7
if pcf.Tracking.doLowMu
else 2.)
83 icf.addFlag(
"maxdImpactSSSSeeds",
lambda pcf:
84 1000. * Units.mm
if pcf.Tracking.doLowMu
else
85 10. * Units.mm
if pcf.Tracking.doBLS
else
87 icf.addFlag(
"maxSeedsPerSP_Pixels",
lambda pcf: 5
if pcf.Tracking.doLowMu
else 1)
88 icf.addFlag(
"maxSeedsPerSP_Strips", 5)
89 icf.addFlag(
"keepAllConfirmedPixelSeeds",
lambda pcf:
not pcf.Tracking.doLowMu)
90 icf.addFlag(
"keepAllConfirmedStripSeeds",
False)
93 icf.addFlag(
"doBremRecoverySi",
lambda pcf: pcf.Tracking.doBremRecovery)
94 icf.addFlag(
"minPTBrem",
lambda pcf: (
95 1. * Units.GeV * pcf.BField.configuredSolenoidFieldScale))
98 icf.addFlag(
"doZBoundary",
lambda pcf:
99 not (pcf.Beam.Type
is BeamType.Cosmics
or pcf.Tracking.doLowMu))
101 icf.addFlag(
"usePixel" ,
lambda pcf : pcf.Detector.EnablePixel )
102 icf.addFlag(
"useTRT" ,
lambda pcf : pcf.Detector.EnableTRT )
103 icf.addFlag(
"useSCT" ,
lambda pcf : pcf.Detector.EnableSCT )
104 icf.addFlag(
"usePixelSeeding" ,
lambda pcf : pcf.Detector.EnablePixel )
105 icf.addFlag(
"useSCTSeeding" ,
lambda pcf : pcf.Detector.EnableSCT )
108 icf.addFlag(
"RunPixelPID",
True)
109 icf.addFlag(
"RunTRTPID",
True)
114 icf.addFlag(
"storeTrackSeeds",
False)
115 icf.addFlag(
"storeSiSPSeededTracks",
False)
124 from AthenaConfiguration.AthConfigFlags
import AthConfigFlags
125 icf = AthConfigFlags()
127 icf.addFlag(
"extension",
"" )
129 icf.addFlag(
"useITkPixel" ,
lambda pcf : pcf.Detector.EnableITkPixel )
130 icf.addFlag(
"useITkStrip" ,
lambda pcf : pcf.Detector.EnableITkStrip )
131 icf.addFlag(
"useITkPixelSeeding" ,
True )
132 icf.addFlag(
"useITkStripSeeding" ,
True )
134 icf.addFlag(
"usePrdAssociationTool" ,
False)
135 icf.addFlag(
"storeSeparateContainer" ,
False)
136 icf.addFlag(
"doZBoundary" ,
True)
137 icf.addFlag(
"doAmbiguityProcessorTrackFit",
True)
140 icf.addFlag(
"etaBins" , [-1.0, 2.0, 2.6, 9999.0])
141 icf.addFlag(
"maxEta" , 4.0)
142 icf.addFlag(
"minPT" ,
lambda pcf :
143 [0.2 * Units.GeV * pcf.BField.configuredSolenoidFieldScale]
144 if pcf.Tracking.doLowMu
else
145 [0.9 * Units.GeV * pcf.BField.configuredSolenoidFieldScale,
146 0.4 * Units.GeV * pcf.BField.configuredSolenoidFieldScale,
147 0.4 * Units.GeV * pcf.BField.configuredSolenoidFieldScale])
149 icf.addFlag(
"minPTSeed" ,
lambda pcf : (
150 pcf.BField.configuredSolenoidFieldScale *
151 (0.2 * Units.GeV
if pcf.Tracking.doLowMu
152 else 0.9 * Units.GeV)))
153 icf.addFlag(
"maxPrimaryImpactSeed" , 2.0 * Units.mm)
154 icf.addFlag(
"maxZImpactSeed" , 200.0 * Units.mm)
155 icf.addFlag(
"useSeedFilter" ,
True)
158 icf.addFlag(
"minClusters" ,
lambda pcf :
159 [6, 5, 4]
if pcf.Tracking.doLowMu
else [9, 8, 7])
160 icf.addFlag(
"minSiNotShared" ,
lambda pcf :
161 [6, 5, 4]
if pcf.Tracking.doLowMu
else [7, 6, 5])
162 icf.addFlag(
"maxShared" , [2])
163 icf.addFlag(
"minPixel" , [1])
164 icf.addFlag(
"maxHoles" , [2])
165 icf.addFlag(
"maxPixelHoles" , [2])
166 icf.addFlag(
"maxSctHoles" , [2])
167 icf.addFlag(
"maxDoubleHoles" , [1])
168 icf.addFlag(
"maxPrimaryImpact" , [2.0 * Units.mm, 2.0 * Units.mm, 10.0 * Units.mm])
169 icf.addFlag(
"maxEMImpact" , [50.0 * Units.mm])
170 icf.addFlag(
"maxZImpact" , [200.0 * Units.mm])
173 icf.addFlag(
"roadWidth" , 20.)
174 icf.addFlag(
"nHolesMax" , icf.maxHoles)
175 icf.addFlag(
"nHolesGapMax" , icf.maxHoles)
177 icf.addFlag(
"Xi2max" , [9.0])
178 icf.addFlag(
"Xi2maxNoAdd" , [25.0])
179 icf.addFlag(
"nWeightedClustersMin" , [6])
182 icf.addFlag(
"maxdImpactSSSSeeds" , [20.0 * Units.mm])
183 icf.addFlag(
"radMax" , 1100. * Units.mm)
186 icf.addFlag(
"doBremRecoverySi",
lambda pcf: pcf.Tracking.doBremRecovery)
187 icf.addFlag(
"minPTBrem",
lambda pcf: (
188 [1. * Units.GeV * pcf.BField.configuredSolenoidFieldScale]))
191 icf.addFlag(
"doCaloSeededBremSi",
lambda pcf: pcf.Tracking.doCaloSeededBrem)
192 icf.addFlag(
"doCaloSeededAmbiSi",
lambda pcf: pcf.Tracking.doCaloSeededAmbi)
196 icf.addFlag(
"doAthenaCluster",
True)
197 icf.addFlag(
"doAthenaSpacePoint",
True)
198 icf.addFlag(
"doAthenaSeed",
True)
199 icf.addFlag(
"doAthenaTrack",
True)
200 icf.addFlag(
"doAthenaAmbiguityResolution",
True)
202 icf.addFlag(
"doActsCluster",
False)
203 icf.addFlag(
"doActsSpacePoint",
False)
204 icf.addFlag(
"doActsSeed",
False)
205 icf.addFlag(
"doActsTrack",
False)
206 icf.addFlag(
"doActsAmbiguityResolution",
False)
208 icf.addFlag(
"doAthenaToActsCluster",
False)
209 icf.addFlag(
"doAthenaToActsSpacePoint",
False)
210 icf.addFlag(
"doAthenaToActsTrack",
False)
212 icf.addFlag(
"doActsToAthenaCluster",
False)
213 icf.addFlag(
"doActsToAthenaSpacePoint",
False)
214 icf.addFlag(
"doActsToAthenaSeed",
False)
215 icf.addFlag(
"doActsToAthenaTrack",
False)
216 icf.addFlag(
"doActsToAthenaResolvedTrack",
False)
219 icf.addFlag(
"doGNNTrack",
False)
222 icf.addFlag(
"doFPGASpacePoint",
False)
223 icf.addFlag(
"doFPGATrack",
False)
228 icf.addFlag(
"storeTrackSeeds",
False)
229 icf.addFlag(
"storeSiSPSeededTracks",
False)
232 icf.addFlag(
"isSecondaryPass",
False)
240 icf.extension =
"HeavyIon"
241 icf.maxPrimaryImpact = [2.0 * Units.mm]
242 icf.minPT =
lambda pcf : (
243 [0.4 *Units.GeV * pcf.BField.configuredSolenoidFieldScale])
244 icf.minPTSeed =
lambda pcf : (
245 0.4 * Units.GeV * pcf.BField.configuredSolenoidFieldScale)
246 icf.minClusters = [6]
247 icf.minSiNotShared = [6]
249 icf.Xi2maxNoAdd = [9.]
250 icf.maxPixelHoles = [1]
251 icf.maxSctHoles = [1]
252 icf.maxDoubleHoles = [0]
253 icf.doBremRecoverySi =
False
261 icf.minPT =
lambda pcf : (
262 [1.0 * Units.GeV * pcf.BField.configuredSolenoidFieldScale,
263 0.4 * Units.GeV * pcf.BField.configuredSolenoidFieldScale,
264 0.4 * Units.GeV * pcf.BField.configuredSolenoidFieldScale])
265 icf.maxZImpact = [150.0 * Units.mm]
268 icf.nHolesGapMax = [1]
269 icf.minPTSeed =
lambda pcf: (
270 1.0 * Units.GeV * pcf.BField.configuredSolenoidFieldScale)
271 icf.maxZImpactSeed = 150.0 * Units.mm
272 icf.useITkStripSeeding =
False
281 icf.addFlag(
"doHitDV" ,
False)
282 icf.addFlag(
"doDisappearingTrk" ,
False)
283 icf.addFlag(
"useTrigTrackFollowing",
False)
284 icf.addFlag(
"useTrigRoadPredictor",
False)
285 icf.addFlag(
"useTracklets",
False)
286 icf.useSeedFilter =
False
287 icf.minPT =
lambda pcf : (
288 [0.9 * Units.GeV * pcf.BField.configuredSolenoidFieldScale,
289 0.4 * Units.GeV * pcf.BField.configuredSolenoidFieldScale,
290 0.4 * Units.GeV * pcf.BField.configuredSolenoidFieldScale])
291 icf.minPTSeed =
lambda pcf : (
292 0.9 * Units.GeV * pcf.BField.configuredSolenoidFieldScale)
298 icf.addFlag(
"doHitDV" ,
False)
299 icf.addFlag(
"doDisappearingTrk" ,
False)
300 icf.addFlag(
"useTrigTrackFollowing",
False)
301 icf.addFlag(
"useTrigRoadPredictor",
False)
302 icf.addFlag(
"useTracklets",
False)
303 icf.useSeedFilter =
False
304 icf.minPT =
lambda pcf : (
305 [1.0 * Units.GeV * pcf.BField.configuredSolenoidFieldScale])
307 icf.maxPrimaryImpact = [400.0 * Units.mm]
308 icf.maxPrimaryImpactSeed = 400.0 * Units.mm
309 icf.maxdImpactSSSSeeds = [400.0 * Units.mm]
319 icf.extension =
"LargeD0"
320 icf.usePrdAssociationTool =
True
321 icf.storeSeparateContainer =
lambda pcf : pcf.Tracking.storeSeparateLargeD0Container
323 icf.minPT =
lambda pcf : (
324 [1000 * Units.MeV * pcf.BField.configuredSolenoidFieldScale])
326 icf.etaBins = [-1.0, 4.0]
327 icf.maxPrimaryImpact = [300 * Units.mm]
328 icf.maxZImpact = [500 * Units.mm]
329 icf.minClusters = [8]
330 icf.minSiNotShared = [6]
334 icf.maxPixelHoles = [1]
335 icf.maxSctHoles = [1]
336 icf.maxDoubleHoles = [0]
338 icf.maxZImpactSeed = 500.0 * Units.mm
339 icf.maxPrimaryImpactSeed = 300.0 * Units.mm
340 icf.minPTSeed =
lambda pcf : (
341 1000 * Units.MeV * pcf.BField.configuredSolenoidFieldScale)
343 icf.radMax = 1100. * Units.mm
344 icf.nHolesMax = icf.maxHoles
345 icf.nHolesGapMax = icf.maxHoles
349 icf.useITkPixelSeeding =
False
350 icf.maxdImpactSSSSeeds = [300.0 * Units.mm]
352 icf.doBremRecoverySi =
False
355 icf.Xi2maxNoAdd = [25.0]
356 icf.nWeightedClustersMin = [6]
364 icf.useITkPixelSeeding =
False
365 icf.useITkStripSeeding =
True
368 icf.etaBins = [-1.0, 2.4]
369 icf.minPT =
lambda pcf : (
370 [5.0 * Units.GeV * pcf.BField.configuredSolenoidFieldScale])
371 icf.minPTSeed =
lambda pcf : (
372 5.0 * Units.GeV * pcf.BField.configuredSolenoidFieldScale)
373 icf.nWeightedClustersMin = [8]
374 icf.maxPrimaryImpact = [150 * Units.mm]
375 icf.maxPrimaryImpactSeed = 150. * Units.mm
376 icf.maxdImpactSSSSeeds = [150.0 * Units.mm]
377 icf.maxZImpact = [200 * Units.mm]
378 icf.maxZImpactSeed = 200. * Units.mm
379 icf.radMax = 400. * Units.mm
387 icf.extension =
"LowPt"
388 icf.minPT =
lambda pcf : (
389 [0.4 * Units.GeV * pcf.BField.configuredSolenoidFieldScale])
390 icf.minPTSeed =
lambda pcf : (
391 0.4 * Units.GeV * pcf.BField.configuredSolenoidFieldScale)
392 icf.doBremRecoverySi =
False
399 icf.extension =
"HighPileup"
400 icf.minPT =
lambda pcf : (
401 0.900 * Units.GeV * pcf.BField.configuredSolenoidFieldScale)
403 icf.maxPixelHoles = 0
404 icf.doBremRecoverySi =
False
411 icf.extension =
"MinBias"
412 icf.minPT =
lambda pcf: (
413 0.1 * Units.GeV * pcf.BField.configuredSolenoidFieldScale)
414 icf.maxPrimaryImpact = 10. * Units.mm
415 icf.maxZImpact = 250. * Units.mm
417 icf.maxdImpactSSSSeeds = 20.0 * Units.mm
419 icf.doBremRecoverySi =
False
420 icf.maxSeedsPerSP_Pixels = 5
421 icf.keepAllConfirmedPixelSeeds =
False
428 icf.extension =
"UPC"
430 icf.minPTBrem =
lambda pcf: (
431 0.75 * Units.GeV * pcf.BField.configuredSolenoidFieldScale)
433 icf.doBremRecoverySi =
lambda pcf: pcf.Tracking.doBremRecovery
439 icf.extension =
"HIP"
446 icf.extension =
"LowPtRoI"
447 icf.usePrdAssociationTool =
True
448 icf.storeSeparateContainer =
True
449 icf.maxPT =
lambda pcf: (
450 0.850 * Units.GeV * pcf.BField.configuredSolenoidFieldScale)
451 icf.minPT =
lambda pcf: (
452 0.050 * Units.GeV * pcf.BField.configuredSolenoidFieldScale)
454 icf.minSiNotShared = 4
458 icf.maxPixelHoles = 1
460 icf.maxDoubleHoles = 1
461 icf.radMax = 600. * Units.mm
462 icf.nHolesMax = icf.maxHoles
463 icf.nHolesGapMax = icf.maxHoles
464 icf.doBremRecoverySi =
False
466 icf.addFlag(
"z0WindowRoI", 30.0)
467 icf.addFlag(
"doRandomSpot",
False)
468 icf.addFlag(
"RoIStrategy", RoIStrategy.LeadTracks)
469 icf.addFlag(
"inputLowPtRoIfile",
"")
477 icf.extension =
"R3LargeD0"
478 icf.usePrdAssociationTool =
True
479 icf.usePixelSeeding =
False
480 icf.storeSeparateContainer =
lambda pcf : pcf.Tracking.storeSeparateLargeD0Container
481 icf.maxPT =
lambda pcf : (
482 1.0 * Units.TeV * pcf.BField.configuredSolenoidFieldScale)
483 icf.minPT =
lambda pcf : (
484 1.0 * Units.GeV * pcf.BField.configuredSolenoidFieldScale)
486 icf.maxPrimaryImpact = 300.0 * Units.mm
487 icf.maxEMImpact = 300 * Units.mm
488 icf.maxZImpact = 500 * Units.mm
490 icf.minSiNotShared = 6
494 icf.maxPixelHoles = 1
496 icf.maxDoubleHoles = 0
497 icf.radMax = 600. * Units.mm
498 icf.nHolesMax = icf.maxHoles
500 icf.maxTracksPerSharedPRD = 2
502 icf.Xi2maxNoAdd = 25.0
504 icf.nWeightedClustersMin = 8
505 icf.maxdImpactSSSSeeds = 300.0
506 icf.doZBoundary =
True
507 icf.keepAllConfirmedStripSeeds =
True
508 icf.maxSeedsPerSP_Strips = 1
509 icf.doBremRecoverySi =
False
511 icf.RunPixelPID =
False
512 icf.RunTRTPID =
False
519 icf.extension =
"LowPtLargeD0"
520 icf.usePrdAssociationTool =
True
521 icf.storeSeparateContainer =
lambda pcf : pcf.Tracking.storeSeparateLargeD0Container
522 icf.maxPT =
lambda pcf: (
523 1.0 * Units.TeV * pcf.BField.configuredSolenoidFieldScale)
524 icf.minPT =
lambda pcf: (
525 100 * Units.MeV * pcf.BField.configuredSolenoidFieldScale)
527 icf.maxPrimaryImpact = 300.0 * Units.mm
528 icf.maxZImpact = 1500.0 * Units.mm
530 icf.minSiNotShared = 5
534 icf.maxPixelHoles = 1
536 icf.maxDoubleHoles = 1
537 icf.radMax = 600. * Units.mm
538 icf.nHolesMax = icf.maxHoles
539 icf.nHolesGapMax = icf.maxHoles
540 icf.maxTracksPerSharedPRD = 2
541 icf.doBremRecoverySi =
False
543 icf.RunPixelPID =
False
544 icf.RunTRTPID =
False
551 icf.extension =
"LowPt"
552 icf.usePrdAssociationTool =
True
554 icf.maxPT =
lambda pcf: (
555 pcf.BField.configuredSolenoidFieldScale *
556 (1e6
if pcf.Tracking.doMinBias
else
557 pcf.Tracking.MainPass.minPT + 0.3) * Units.GeV)
558 icf.minPT =
lambda pcf: (
559 0.05 * Units.GeV * pcf.BField.configuredSolenoidFieldScale)
561 icf.minSiNotShared = 4
565 icf.maxPixelHoles = 1
567 icf.maxDoubleHoles = 1
568 icf.radMax = 600. * Units.mm
569 icf.nHolesMax = icf.maxHoles
570 icf.nHolesGapMax = icf.maxHoles
571 icf.maxPrimaryImpact =
lambda pcf: (
572 100. * Units.mm
if pcf.Tracking.doMinBias
else 10. * Units.mm)
573 icf.doBremRecoverySi =
False
580 icf.extension =
"Conversion"
581 icf.usePrdAssociationTool =
True
583 icf.etaBins = [-1.0,4.0]
584 icf.minPT =
lambda pcf: (
585 [0.9 * Units.GeV * pcf.BField.configuredSolenoidFieldScale])
586 icf.maxPrimaryImpact = [10.0 * Units.mm]
587 icf.maxZImpact = [150.0 * Units.mm]
588 icf.minClusters = [6]
589 icf.minSiNotShared = [6]
593 icf.maxPixelHoles = [1]
594 icf.maxSctHoles = [2]
595 icf.maxDoubleHoles = [1]
597 icf.nHolesMax = icf.maxHoles
598 icf.nHolesGapMax = icf.maxHoles
599 icf.nWeightedClustersMin = [6]
600 icf.maxdImpactSSSSeeds = [20.0 * Units.mm]
601 icf.radMax = 1100. * Units.mm
602 icf.doZBoundary =
False
605 icf.Xi2maxNoAdd = [25.0]
606 icf.doBremRecoverySi =
True
613 icf.extension =
"VeryLowPt"
614 icf.usePrdAssociationTool =
True
616 icf.useTRTExtension =
False
617 icf.maxPT =
lambda pcf : (
618 pcf.BField.configuredSolenoidFieldScale *
619 (1e6
if pcf.Tracking.doMinBias
else
620 pcf.Tracking.MainPass.minPT + 0.3) * Units.GeV)
621 icf.minPT =
lambda pcf : (
622 0.050 * Units.GeV * pcf.BField.configuredSolenoidFieldScale)
624 icf.minSiNotShared = 3
628 icf.maxPixelHoles = 1
630 icf.maxDoubleHoles = 0
633 icf.radMax = 600. * Units.mm
634 icf.doBremRecoverySi =
False
641 icf.extension =
"Forward"
642 icf.usePrdAssociationTool =
True
643 icf.useTIDE_Ambi =
False
644 icf.useTRTExtension =
False
645 icf.storeSeparateContainer =
True
648 icf.minPT =
lambda pcf: (
649 2 * Units.GeV * pcf.BField.configuredSolenoidFieldScale)
651 icf.minSiNotShared = 3
655 icf.maxPixelHoles = 1
657 icf.maxDoubleHoles = 0
658 icf.nHolesMax = icf.maxHoles
659 icf.nHolesGapMax = icf.maxHoles
660 icf.radMax = 600. * Units.mm
662 icf.doBremRecoverySi =
False
663 icf.doZBoundary =
False
665 icf.RunPixelPID =
False
666 icf.RunTRTPID =
False
673 icf.extension =
"BeamGas"
674 icf.usePrdAssociationTool =
True
675 icf.minPT =
lambda pcf: (
676 0.5 * Units.GeV * pcf.BField.configuredSolenoidFieldScale)
677 icf.maxPrimaryImpact = 300. * Units.mm
678 icf.maxZImpact = 2000. * Units.mm
681 icf.maxPixelHoles = 3
683 icf.maxDoubleHoles = 1
686 icf.doBremRecoverySi =
False
693 icf.extension =
"VtxLumi"
694 icf.minPT =
lambda pcf: (
695 0.9 * Units.GeV * pcf.BField.configuredSolenoidFieldScale)
697 icf.maxPixelHoles = 1
698 icf.radMax = 600. * Units.mm
702 icf.doBremRecoverySi =
False
709 icf.extension =
"VtxLumiHeavyIon"
710 icf.minPT =
lambda pcf: (
711 0.4 * Units.GeV * pcf.BField.configuredSolenoidFieldScale)
712 icf.maxPrimaryImpact = 10. * Units.mm
713 icf.maxZImpact = 250.0 * Units.mm
715 icf.maxPixelHoles = 1
716 icf.radMax = 600. * Units.mm
719 icf.maxdImpactSSSSeeds = 20.
721 icf.keepAllConfirmedPixelSeeds =
False
722 icf.maxSeedsPerSP_Pixels = 5
724 icf.doBremRecoverySi =
False
731 icf.extension =
"VtxBeamSpot"
732 icf.minPT =
lambda pcf: (
733 0.9 * Units.GeV * pcf.BField.configuredSolenoidFieldScale)
735 icf.maxPixelHoles = 0
736 icf.radMax = 320. * Units.mm
740 icf.doBremRecoverySi =
False
747 icf.extension =
"Cosmics"
748 icf.minPT =
lambda pcf: (
749 0.5 * Units.GeV * pcf.BField.configuredSolenoidFieldScale)
750 icf.maxPrimaryImpact = 1000. * Units.mm
751 icf.maxZImpact = 10000. * Units.mm
753 icf.minSiNotShared = 4
755 icf.maxPixelHoles = 3
757 icf.maxDoubleHoles = 1
761 icf.Xi2maxNoAdd = 100.
762 icf.nWeightedClustersMin = 8
765 icf.maxdImpactSSSSeeds = 20. * Units.mm
766 icf.doBremRecoverySi =
False
767 icf.doZBoundary =
False
768 icf.maxSeedsPerSP_Pixels = 5
769 icf.keepAllConfirmedPixelSeeds =
False
776 icf.extension =
"HeavyIon"
777 icf.maxPrimaryImpact = 10. * Units.mm
778 icf.maxZImpact = 200. * Units.mm
780 icf.minSiNotShared = 7
786 icf.Xi2maxNoAdd = 10.
788 icf.minPT =
lambda pcf: (
789 0.5 * Units.GeV * pcf.BField.configuredSolenoidFieldScale)
791 icf.maxdImpactSSSSeeds = 20. * Units.mm
792 icf.maxdImpactPPSSeeds = 1.7
795 icf.maxPixelHoles = 1
797 icf.maxDoubleHoles = 0
799 icf.Xi2maxNoAdd = 25.
800 icf.radMax = 600. * Units.mm
803 icf.doBremRecoverySi =
False
804 icf.doZBoundary =
False
805 icf.maxSeedsPerSP_Pixels = 5
806 icf.keepAllConfirmedPixelSeeds =
False
813 icf.extension =
"Pixel"
814 icf.isLowPt =
lambda pcf : pcf.Tracking.doMinBias
817 if pcf.Beam.Type
is BeamType.Cosmics:
818 return 0.5 * Units.GeV * pcf.BField.configuredSolenoidFieldScale
819 if pcf.Tracking.PrimaryPassConfig
is PrimaryPassConfig.UPC:
820 return 0.05 * Units.GeV * pcf.BField.configuredSolenoidFieldScale
821 if pcf.Tracking.PrimaryPassConfig
is PrimaryPassConfig.HIP:
822 return 0.05 * Units.GeV * pcf.BField.configuredSolenoidFieldScale
823 if pcf.Tracking.doMinBias:
824 return 0.05 * Units.GeV * pcf.BField.configuredSolenoidFieldScale
825 return 0.1 * Units.GeV * pcf.BField.configuredSolenoidFieldScale
830 def _pick( default, hion, cosmics):
831 def _internal( pcf ):
832 if pcf.Tracking.PrimaryPassConfig
is PrimaryPassConfig.HeavyIon:
834 if pcf.Beam.Type
is BeamType.Cosmics:
839 icf.maxHoles = _pick( default = 1, hion = 0, cosmics = 3 )
840 icf.maxPixelHoles = _pick( default = 1, hion = 0, cosmics = 3 )
842 icf.maxDoubleHoles = 0
843 icf.minSiNotShared = 3
845 icf.nHolesMax = _pick( default = 1, hion = 0, cosmics = 3 )
846 icf.nHolesGapMax = _pick( default = 1, hion = 0, cosmics = 3 )
848 icf.useSCTSeeding =
False
850 icf.maxPrimaryImpact =
lambda pcf: (
851 1000. * Units.mm
if pcf.Beam.Type
is BeamType.Cosmics
else
852 10. * Units.mm
if pcf.Tracking.doUPC
else
854 icf.roadWidth =
lambda pcf: (
855 60.0
if pcf.Beam.Type
is BeamType.Cosmics
else
857 icf.maxZImpact =
lambda pcf: (
858 10000. * Units.mm
if pcf.Beam.Type
is BeamType.Cosmics
else
859 320. * Units.mm
if pcf.Tracking.doLowMu
else
860 250. * Units.mm
if pcf.Tracking.doMinBias
else
862 icf.Xi2max =
lambda pcf: (
863 60.
if pcf.Beam.Type
is BeamType.Cosmics
else
864 15.
if pcf.Tracking.doLowMu
else
866 icf.Xi2maxNoAdd =
lambda pcf: (
867 100.0
if pcf.Beam.Type
is BeamType.Cosmics
else
868 35.
if pcf.Tracking.doLowMu
else
870 icf.nWeightedClustersMin = 6
871 icf.doBremRecoverySi =
False
873 icf.RunPixelPID =
lambda pcf: (
874 pcf.Tracking.PrimaryPassConfig
is PrimaryPassConfig.UPC)
875 icf.RunTRTPID =
False
881 icf.extension =
"Disappearing"
882 icf.usePrdAssociationTool =
True
883 icf.storeSeparateContainer =
True
884 icf.minPT =
lambda pcf: (
885 5 * Units.GeV * pcf.BField.configuredSolenoidFieldScale)
888 icf.maxPixelHoles = 0
890 icf.maxDoubleHoles = 0
891 icf.minSiNotShared = 3
897 icf.useSCTSeeding =
False
899 icf.doBremRecoverySi =
False
900 def MainPassFlags(pcf):
901 return pcf.Tracking.__getattr__(pcf.Tracking.PrimaryPassConfig.value+
'Pass')
902 icf.maxPrimaryImpact =
lambda pcf: MainPassFlags(pcf).maxPrimaryImpact
903 icf.maxZImpact =
lambda pcf: MainPassFlags(pcf).maxZImpact
904 icf.roadWidth =
lambda pcf: MainPassFlags(pcf).roadWidth
910 icf.extension =
"SCT"
912 icf.maxDoubleHoles = 1
913 icf.minSiNotShared = 5
915 icf.usePixelSeeding =
False
919 if pcf.Beam.Type
is BeamType.Cosmics:
920 return 0.5 * Units.GeV * pcf.BField.configuredSolenoidFieldScale
921 if pcf.Tracking.doMinBias:
922 return 0.1 * Units.GeV * pcf.BField.configuredSolenoidFieldScale
923 return 0.1 * Units.GeV * pcf.BField.configuredSolenoidFieldScale
927 icf.maxPrimaryImpact =
lambda pcf: (
928 1000. * Units.mm
if pcf.Beam.Type
is BeamType.Cosmics
else
929 10. * Units.mm
if pcf.Tracking.doLowMu
else
931 icf.maxZImpact =
lambda pcf: (
932 10000. * Units.mm
if pcf.Beam.Type
is BeamType.Cosmics
else
933 320. * Units.mm
if pcf.Tracking.doLowMu
else
936 icf.maxHoles =
lambda pcf: 3
if pcf.Beam.Type
is BeamType.Cosmics
else 2
937 icf.nHolesMax =
lambda pcf: 3
if pcf.Beam.Type
is BeamType.Cosmics
else 2
938 icf.nHolesGapMax =
lambda pcf: 3
if pcf.Beam.Type
is BeamType.Cosmics
else 2
939 icf.maxPixelHoles =
lambda pcf: 0
if pcf.Beam.Type
is BeamType.Cosmics
else 0
940 icf.maxSctHoles =
lambda pcf: 3
if pcf.Beam.Type
is BeamType.Cosmics
else 2
942 icf.roadWidth =
lambda pcf: (
943 60.
if pcf.Beam.Type
is BeamType.Cosmics
else
944 20.
if pcf.Tracking.doLowMu
else
946 icf.Xi2max =
lambda pcf: (
947 60.
if pcf.Beam.Type
is BeamType.Cosmics
else
948 15.
if pcf.Tracking.doLowMu
else
950 icf.Xi2maxNoAdd =
lambda pcf: (
951 100.0
if pcf.Beam.Type
is BeamType.Cosmics
else
952 35.
if pcf.Tracking.doLowMu
else
954 icf.nWeightedClustersMin =
lambda pcf: 4
if pcf.Beam.Type
is BeamType.Cosmics
else 6
955 icf.minClusters =
lambda pcf: (
956 4
if pcf.Beam.Type
is BeamType.Cosmics
else
957 7
if pcf.Tracking.doLowMu
else
959 icf.minSiNotShared =
lambda pcf: 4
if pcf.Beam.Type
is BeamType.Cosmics
else 5
960 icf.doBremRecoverySi =
False
962 icf.RunPixelPID =
False
963 icf.RunTRTPID =
False
969 icf.extension =
"TRT"
970 icf.useTIDE_Ambi =
False
971 icf.usePrdAssociationTool =
True
972 icf.minPT =
lambda pcf: (
973 0.4 * Units.GeV * pcf.BField.configuredSolenoidFieldScale)
974 icf.doBremRecoverySi =
False
976 icf.RunPixelPID =
False
977 icf.RunTRTPID =
False
984 icf.extension =
"TRTStandalone"
985 icf.useTIDE_Ambi =
False
986 icf.usePrdAssociationTool =
True
987 icf.doBremRecoverySi =
False
995 print(
"************************************************************************")
997 print(
"******************** Tracking reconstruction Config ********************")
998 print(
" Primary Config is",flags.Tracking[flags.Tracking.PrimaryPassConfig.value+
"Pass"].extension)
999 flags.dump(pattern=
"Tracking."+flags.Tracking.PrimaryPassConfig.value+
"Pass.*", evaluate=
True)
1000 print(
"************************************************************************")
1006 print(
"************************************************************************")
1008 print(
"******************** Tracking reconstruction Config ********************")
1009 print(
" Active Config is",flags.Tracking.ActiveConfig.extension)
1010 flags.dump(pattern=
"Tracking.ActiveConfig.*", evaluate=
True)
1011 print(
"************************************************************************")
1018 if __name__ ==
"__main__":
1020 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
1023 from AthenaConfiguration.TestDefaults
import defaultTestFiles
1024 flags.Input.Files=defaultTestFiles.RAW_RUN2
1026 from AthenaCommon.Logging
import logging
1027 l = logging.getLogger(
'TrackingPassFlags')
1031 flags = flags.cloneAndReplace(
"Tracking.ActiveConfig",
"Tracking.MainPass")
1033 assert flags.Tracking.ActiveConfig.maxPrimaryImpact == 5.0 * Units.mm,
"wrong cut value {} ".
format(flags.Tracking.ActiveConfig.maxPrimaryImpact)
1034 assert flags.Tracking.HeavyIonPass.maxPrimaryImpact == 10.0 * Units.mm,
"wrong cut value {} ".
format(flags.Tracking.HeavyIonPass.maxPrimaryImpact)
1035 flags.Tracking.doBLS =
True
1036 assert flags.Tracking.ActiveConfig.maxPrimaryImpact == 10.0 * Units.mm,
"wrong cut value {} ".
format(flags.Tracking.ActiveConfig.maxPrimaryImpact)
1038 assert flags.Tracking.ActiveConfig.minPT == 0.5 * Units.GeV,
"wrong cut value {} ".
format(flags.Tracking.ActiveConfig.minPT)
1039 flags.BField.configuredSolenoidFieldScale = 0.1
1040 assert flags.Tracking.ActiveConfig.minPT == 0.05 * Units.GeV,
"wrong cut value {} ".
format(flags.Tracking.ActiveConfig.minPT)
1042 l.info(
"flags.Tracking.ActiveConfig.minPT %f", flags.Tracking.ActiveConfig.minPT * 1.0)
1043 l.info(
"type(flags.Tracking.ActiveConfig.minPT) " +
str(
type(flags.Tracking.ActiveConfig.minPT)))