51def FPGATrackSimBankGenCfg(flags, **kwargs):
52
53 acc = ComponentAccumulator()
54
55 theFPGATrackSimMatrixGenAlg = CompFactory.FPGATrackSimMatrixGenAlgo()
56 theFPGATrackSimMatrixGenAlg.Clustering = True
57 theFPGATrackSimMatrixGenAlg.IdealiseGeometry = 2
58 theFPGATrackSimMatrixGenAlg.SingleSector = False
59 theFPGATrackSimMatrixGenAlg.HoughConstants = True
60 theFPGATrackSimMatrixGenAlg.DeltaPhiConstants = False
61 theFPGATrackSimMatrixGenAlg.PT_THRESHOLD = 1.0
62 theFPGATrackSimMatrixGenAlg.D0_THRESHOLD = 2.0
63 theFPGATrackSimMatrixGenAlg.TRAIN_PDG = 13
64 theFPGATrackSimMatrixGenAlg.NBanks = 1
65
66 theFPGATrackSimMatrixGenAlg.SpacePoints = flags.Trigger.FPGATrackSim.spacePoints
67 if flags.Trigger.FPGATrackSim.spacePoints:
68 theFPGATrackSimMatrixGenAlg.SpacePointTool = acc.getPrimaryAndMerge(FPGATrackSimSpacePointsToolCfg(flags))
69 theFPGATrackSimMatrixGenAlg.minSpacePlusPixel = flags.Trigger.FPGATrackSim.minSpacePlusPixel
70
71 theFPGATrackSimMatrixGenAlg.FPGATrackSimEventSelectionSvc = acc.getPrimaryAndMerge(FPGATrackSimEventSelectionSvcCfg(flags))
72 theFPGATrackSimMatrixGenAlg.FPGATrackSimMappingSvc = acc.getPrimaryAndMerge(FPGATrackSimMappingCfg(flags))
73
74 if (flags.Trigger.FPGATrackSim.ActiveConfig.secondStage):
75 from FPGATrackSimConfTools.FPGATrackSimAnalysisConfig import FPGATrackSimTrackFitterToolCfg,FPGATrackSimOverlapRemovalToolCfg
76 from FPGATrackSimConfTools.FPGATrackSimSecondStageConfig import FPGATrackSimWindowExtensionToolCfg
77 theFPGATrackSimMatrixGenAlg.TrackFitter_1st = acc.getPrimaryAndMerge(FPGATrackSimTrackFitterToolCfg(flags))
78 theFPGATrackSimMatrixGenAlg.OverlapRemoval_1st = acc.getPrimaryAndMerge(FPGATrackSimOverlapRemovalToolCfg(flags))
79 theFPGATrackSimMatrixGenAlg.TrackExtensionTool = acc.getPrimaryAndMerge(FPGATrackSimWindowExtensionToolCfg(flags))
80 theFPGATrackSimMatrixGenAlg.SecondStage = True
81 else:
82 theFPGATrackSimMatrixGenAlg.SecondStage = False
83
84
85
86 theFPGATrackSimMatrixGenAlg.WCmax = 2
87 theFPGATrackSimMatrixGenAlg.dropHitsAndFill = flags.dropHitsAndFill
88
89 theFPGATrackSimMatrixGenAlg.FPGATrackSimRawToLogicalHitsTool = acc.getPrimaryAndMerge(FPGATrackSimRawLogicCfg(flags))
90 if (flags.Trigger.FPGATrackSim.ActiveConfig.genScan):
91 theFPGATrackSimMatrixGenAlg.RoadFinder = acc.getPrimaryAndMerge(FPGATrackSimRoadUnionToolGenScanCfg(flags))
92 elif (flags.Trigger.FPGATrackSim.ActiveConfig.hough1D):
93 theFPGATrackSimMatrixGenAlg.RoadFinder = acc.getPrimaryAndMerge(FPGATrackSimRoadUnionTool1DCfg(flags))
94 else:
95 theFPGATrackSimMatrixGenAlg.RoadFinder = acc.getPrimaryAndMerge(FPGATrackSimRoadUnionToolCfg(flags))
96
97 from BeamSpotConditions.BeamSpotConditionsConfig import BeamSpotCondAlgCfg
98 acc.merge(BeamSpotCondAlgCfg(flags))
99
100 theFPGATrackSimMatrixGenAlg.FPGATrackSimSGToRawHitsTool = acc.popToolsAndMerge(FPGATrackSimSGToRawHitsToolCfg(flags))
101 theFPGATrackSimMatrixGenAlg.FPGATrackSimClusteringFTKTool = CompFactory.FPGATrackSimClusteringTool()
102
103 theFPGATrackSimMatrixGenAlg.sectorQPtBins = [-0.001, -0.0005, 0, 0.0005, 0.001]
104 theFPGATrackSimMatrixGenAlg.qptAbsBinning = False
105
106 acc.addEventAlgo(theFPGATrackSimMatrixGenAlg)
107
108 return acc
109
110