ATLAS Offline Software
Loading...
Searching...
No Matches
python.FPGATrackSimMapMakerConfig Namespace Reference

Functions

 getFirstStagePlanes (flags)
 getSecondStagePlanes (flags)
 FPGATrackSimMapMakerCfg (flags)

Variables

 flags = initConfigFlags()
 log = logging.getLogger(__name__)
 acc = MainServicesCfg(flags)
 statusCode = acc.run()

Function Documentation

◆ FPGATrackSimMapMakerCfg()

python.FPGATrackSimMapMakerConfig.FPGATrackSimMapMakerCfg ( flags)

Definition at line 66 of file FPGATrackSimMapMakerConfig.py.

66def FPGATrackSimMapMakerCfg(flags):
67 acc = ComponentAccumulator()
68 from FPGATrackSimConfTools.FPGATrackSimDataPrepConfig import FPGATrackSimReadInputCfg, FPGATrackSimEventSelectionSvcCfg
69 alg = CompFactory.FPGATrackSimMapMakerAlg(
70 GeometryVersion=flags.GeoModel.AtlasVersion,
71 OutFileName=flags.OutFileName,
72 KeyString=flags.KeyString,
73 nSlices=flags.nSlices,
74 region=flags.Trigger.FPGATrackSim.region,
75 trim=flags.trim,
76 globalTrim=flags.globalTrim,
77 eventSelector = acc.getPrimaryAndMerge(FPGATrackSimEventSelectionSvcCfg(flags)),
78 planes = getFirstStagePlanes(flags),
79 planes2 = getSecondStagePlanes(flags)
80 )
81
82 if flags.Trigger.FPGATrackSim.wrapperFileName and flags.Trigger.FPGATrackSim.wrapperFileName is not None:
83 alg.InputTool = acc.getPrimaryAndMerge(FPGATrackSimReadInputCfg(flags))
84 alg.SGInputTool = ""
85 else:
86 from ActsConfig.ActsGeometryConfig import ActsTrackingGeometryToolCfg
87 acc.getPrimaryAndMerge(ActsTrackingGeometryToolCfg(flags))
88 alg.InputTool = ""
89 from FPGATrackSimSGInput.FPGATrackSimSGInputConfig import FPGATrackSimSGInputToolCfg
90 alg.SGInputTool = acc.getPrimaryAndMerge(FPGATrackSimSGInputToolCfg(flags))
91 alg.SGInputTool.ReadOfflineClusters=False
92 alg.SGInputTool.ReadOfflineTracks=False
93
94 acc.addEventAlgo(alg)
95 return acc
96
97

◆ getFirstStagePlanes()

python.FPGATrackSimMapMakerConfig.getFirstStagePlanes ( flags)
Default logic for selecting logical layer / plane configuration for first stage.
   This used to be hardcoded in the map maker header file. Now it's hardcoded here.

Definition at line 6 of file FPGATrackSimMapMakerConfig.py.

6def getFirstStagePlanes(flags):
7 """ Default logic for selecting logical layer / plane configuration for first stage.
8 This used to be hardcoded in the map maker header file. Now it's hardcoded here."""
9 planes = getSecondStagePlanes(flags)
10
11 # The first stage planes should always be either the first 5, 9, or 8 layers.
12 # For additional algorithms more permutations here could be added.
13 # This could also fire based off of the "pipeline" setting if we want.
14 if flags.doInsideOut:
15 return planes[:5]
16 elif flags.Trigger.FPGATrackSim.spacePoints:
17 return planes[:9]
18 else:
19 return planes[:8]
20
21

◆ getSecondStagePlanes()

python.FPGATrackSimMapMakerConfig.getSecondStagePlanes ( flags)
Default logic for selecting logical layer / plane configuration for first stage.
   This used to be hardcoded in the map maker header file. Now it's hardcoded here.

Definition at line 22 of file FPGATrackSimMapMakerConfig.py.

22def getSecondStagePlanes(flags):
23 """ Default logic for selecting logical layer / plane configuration for first stage.
24 This used to be hardcoded in the map maker header file. Now it's hardcoded here."""
25 if (not flags.Trigger.FPGATrackSim.oldRegionDefs) or flags.doInsideOut:
26 # Use a very generic assignment that just maps all modules to a layer to ensure they are turned on.
27 # NOTE: this will *not* work in the forward region. There we need to be more subtle about what pixel layers
28 # are "first stage" vs "second stage". Everywhere else though it's sufficient to assume strip == second stage, pixel == first stage.
29 # (for the inside out algorithm).
30 # Numbers here are taken from boundaries in FPGATrackSimModuleRelabel.h
31 return [
32 ["pb0"] + [f"pe{x}+" for x in range(0, 21)],
33 ["pb1"] + [f"pe{x}+" for x in range(21, 44)],
34 ["pb2"] + [f"pe{x}+" for x in range(44, 61)],
35 ["pb3"] + [f"pe{x}+" for x in range(61, 77)],
36 ["pb4"] + [f"pe{x}+" for x in range(77, 95)],
37 ["sb0", "se4+", "se0+"],
38 ["sb1", "se5+", "se1+"],
39 ["sb2", "se6+", "se2+"],
40 ["sb3", "se7+", "se3+"],
41 ["sb4", "se8+"],
42 ["sb5", "se9+"],
43 ["sb6", "se10+"],
44 ["sb7", "se11+"]
45 ]
46 else:
47 # Use layer assignments for the old regions for the Hough-like algorithms.
48 if flags.Trigger.FPGATrackSim.spacePoints:
49 # New as of Python 3.10! (We are using 3.11)
50 match flags.Trigger.FPGATrackSim.region:
51 case 0 | 1 | 5 | 6 | 7:
52 return [["pb4"],["sb0"],["sb1"],["sb2"],["sb3"],["sb4"],["sb5"],["sb6"],["sb7"],["pb0"],["pb1"],["pb2"],["pb3"]]
53 case 3:
54 return [["pb4","pe83+","pe84+","pe85+","pe86+","pe87+","pe88+","pe89+"],["se4+"],["se5+"],["se6+"],["se7+"],["se8+"],["se9+"],["se10+"],["se11+"],["pb2"],["pb3","pe58+"],["se2+"],["se3+"]]
55 case 2 | 4 | _:
56 return [["-1"],["-1"],["-1"],["-1"],["-1"],["-1"],["-1"],["-1"],["-1"],["-1"],["-1"],["-1"],["-1"]]
57 else:
58 match flags.Trigger.FPGATrackSim.region:
59 case 0 | 1 | 5 | 6 | 7:
60 return [["pb4"],["sb0"],["sb2"],["sb3"],["sb4"],["sb5"],["sb6"],["sb7"],["pb0"],["pb1"],["pb2"],["pb3"], ["sb1"]]
61 case 3:
62 return [["pb4","pe83+","pe84+","pe85+","pe86+","pe87+","pe88+","pe89+"],["se5+"],["se6+"],["se7+"],["se8+"],["se9+"],["se10+"],["se11+"],["pb2"],["pb3","pe58+"],["se2+"],["se3+"], ["se4+"]]
63 case 2 | 4 | _:
64 return [["-1"],["-1"],["-1"],["-1"],["-1"],["-1"],["-1"],["-1"],["-1"],["-1"],["-1"],["-1"],["-1"]]
65

Variable Documentation

◆ acc

python.FPGATrackSimMapMakerConfig.acc = MainServicesCfg(flags)

Definition at line 119 of file FPGATrackSimMapMakerConfig.py.

◆ flags

python.FPGATrackSimMapMakerConfig.flags = initConfigFlags()

Definition at line 101 of file FPGATrackSimMapMakerConfig.py.

◆ log

python.FPGATrackSimMapMakerConfig.log = logging.getLogger(__name__)

Definition at line 110 of file FPGATrackSimMapMakerConfig.py.

◆ statusCode

python.FPGATrackSimMapMakerConfig.statusCode = acc.run()

Definition at line 128 of file FPGATrackSimMapMakerConfig.py.