95 name='DCMathSegmentMaker',
99 from MuonConfig.MuonRIO_OnTrackCreatorToolConfig
import MdtDriftCircleOnTrackCreatorCfg, TriggerChamberClusterOnTrackCreatorCfg, MdtCalibToolForRotsCfg
100 from MuonCombinedConfig.MuonCombinedRecToolsConfig
import MuonSegmentSelectionToolCfg
115 result=ComponentAccumulator()
117 from MuonConfig.MuonRecToolsConfig
import MuonEDMHelperSvcCfg
118 kwargs.setdefault(
"edmHelper", result.getPrimaryAndMerge(MuonEDMHelperSvcCfg(flags)))
119 kwargs.setdefault(
"RefitSegment",
True)
120 kwargs.setdefault(
"AssumePointingPhi", flags.Beam.Type
is not BeamType.Cosmics)
121 kwargs.setdefault(
"OutputFittedT0",
True)
125 kwargs.setdefault(
"UsePreciseError",
True)
126 kwargs.setdefault(
"SinAngleCut", 0.4)
128 doSegmentT0Fit = doSegmentT0Fit
or flags.Beam.Type
in [BeamType.SingleBeam, BeamType.Cosmics]
129 if flags.Beam.Type
in [BeamType.SingleBeam, BeamType.Cosmics]:
130 kwargs.setdefault(
"SinAngleCut", 0.9)
131 kwargs.setdefault(
"AddUnassociatedPhiHits",
True)
132 kwargs.setdefault(
"RecoverBadRpcCabling",
True)
133 kwargs.setdefault(
"CurvedErrorScaling",
False)
134 elif not flags.Input.isMC:
135 kwargs.setdefault(
"AddUnassociatedPhiHits",
True)
136 kwargs.setdefault(
"RecoverBadRpcCabling",
True)
138 if flags.Muon.updateSegmentSecondCoordinate:
139 kwargs.setdefault(
"UpdatePhiUsingPhiHits",
True)
141 if flags.Muon.enableCurvedSegmentFinding:
142 kwargs.setdefault(
"CurvedErrorScaling",
False)
143 kwargs.setdefault(
"PreciseErrorScale", 1)
144 kwargs.setdefault(
"UsePreciseError",
True)
148 result.merge(MuonStationIntersectCondAlgCfg(flags))
150 kwargs.setdefault(
"MdtCreator", result.getPrimaryAndMerge(MdtDriftCircleOnTrackCreatorCfg(flags)))
152 kwargs.setdefault(
"MuonCompetingClustersCreator", result.getPrimaryAndMerge(TriggerChamberClusterOnTrackCreatorCfg(flags)))
153 edm_printer = result.getPrimaryAndMerge(MuonEDMPrinterToolCfg(flags) )
154 kwargs.setdefault(
"EDMPrinter", edm_printer )
156 mdt_dcot_CA = MdtDriftCircleOnTrackCreatorCfg(flags,
157 name=
"MdtDriftCircleOnTrackCreatorAdjustableT0",
159 CalibrationTool = result.popToolsAndMerge(MdtCalibToolForRotsCfg(flags,
160 DoTofCorrection=
True,
161 TimeWindowSetting=MdtCalibWindowNumber(
'Collision_data'))))
162 kwargs.setdefault(
"MdtCreatorT0", result.getPrimaryAndMerge(mdt_dcot_CA))
163 kwargs.setdefault(
"MdtSegmentFinder", result.getPrimaryAndMerge(
MdtMathSegmentFinderCfg(flags, name=
'MdtMathT0FitSegmentFinder', doSegmentT0Fit=
True)))
165 kwargs.setdefault(
"MdtCreatorT0",
"")
168 kwargs.setdefault(
"SegmentFitter", result.getPrimaryAndMerge(
MuonSegmentFittingToolCfg(flags, name=
"MuonSegmentFittingTool")))
170 kwargs.setdefault(
"SegmentSelector", result.popToolsAndMerge(MuonSegmentSelectionToolCfg(flags)))
172 dc_segment_maker = CompFactory.Muon.DCMathSegmentMaker(name=name, **kwargs)
173 result.setPrivateTools(dc_segment_maker)
179 CscAlignmentTool=CompFactory.CscAlignmentTool
180 etaposAlignConsts = [
181 0.0, -0.0902347, -0.0984321, -0.141175,
182 0.0, -0.166412, -0.150399, -0.18592,
183 0.0, -0.0544449, 0.101448, -0.0433321,
184 0.0, -0.047769, -0.156247, -0.0854826,
185 0.0, -0.0970101, -0.227578, -0.301079,
186 0.0, -0.152912, -0.365218, -0.314042,
187 0.0, 0.0338696, -0.264766, -0.224567,
188 0.0, -0.107372, -0.16099, -0.13508,
189 0.0, -0.0663979, -0.0312645, -0.130711,
190 0.0, -0.249974, -0.269372, -0.353648,
191 0.0, -0.194175, 0.0238348, -0.188433,
192 0.0, 0.0977346, 0.0492461, 0.150434,
193 0.0, 0.0444637, -0.0871214, -0.0627541,
194 0.0, 0.0347245, -0.0226186, -0.0826478,
195 0.0, -0.00408879, -0.0638005, -0.206868,
196 0.0, 0.0331328, 0.0402103, 0.118611,
197 0.0, -0.0634537, -0.0516743, 0.0045364,
198 0.0, -0.0957718, -0.235246, -0.439811,
199 0.0, -0.163504, -0.0129115, 0.00140143,
200 0.0, -0.182903, -0.0503858, -0.207799,
201 0.0, -0.0970927, 0, 0.124744,
202 0.0, -0.0169602, -0.0527447, 0.0319154,
203 0.0, -0.176499, -0.196542, -0.0846979,
204 0.0, 0.0589994, 0.0131431, 0.0461769,
205 0.0, -0.0237507, -0.0307316, 0.144429,
206 0.0, -0.0144483, -0.0328234, -0.00553684,
207 0.0, 0.113188, -0.176182, 0.0635706,
208 0.0, -0.109776, -0.727705, -0.756824,
209 0.0, -0.0553061, -0.056162, -0.0336955,
210 0.0, -0.070077, -0.127203, -0.140082,
211 0.0, -0.0844368, -0.0735331, -0.016667,
212 0.0, 0.0426443, -0.153659, -0.129711,
215 phiposAlignConsts = [
249 kwargs.setdefault(
"phiposAlignConsts", phiposAlignConsts)
250 kwargs.setdefault(
"etaposAlignConsts", etaposAlignConsts)
251 kwargs.setdefault(
"useAlignment", flags.Input.isMC
is False and flags.Muon.Align.UseILines
is False )
258 QratCscClusterFitter=CompFactory.QratCscClusterFitter
259 result=ComponentAccumulator()
261 0.000000, 0.000000, 0.000000, 0.000000, 0.0699381, 0.178291, 0.271303, 0.345611,
262 0.400738, 0.452451, 0.493772, 0.526792, 0.553845, 0.580111, 0.603337, 0.624749,
263 0.646065, 0.663924, 0.681897, 0.701345, 0.716067, 0.730324, 0.743168, 0.760598,
264 0.773341, 0.786406, 0.798358, 0.811339, 0.820949, 0.832676, 0.843917, 0.85412,
265 0.863914, 0.873229, 0.88251, 0.892856, 0.903296, 0.910067, 0.917892, 0.928028,
266 0.93461, 0.943679, 0.951617, 0.958326, 0.964428, 0.97341, 0.978204, 0.987075,
270 0.000000, 0.000000, 0.000000, 0.000000, 0.0290177, 0.0834867, 0.188683, 0.269967,
271 0.334887, 0.393036, 0.440317, 0.481884, 0.51725, 0.545107, 0.56959, 0.592327,
272 0.614087, 0.635344, 0.655252, 0.672766, 0.690929, 0.707293, 0.722742, 0.738323,
273 0.753562, 0.76749, 0.780983, 0.79354, 0.806521, 0.818085, 0.829987, 0.841443,
274 0.853723, 0.863393, 0.87431, 0.883139, 0.892962, 0.902803, 0.911276, 0.921417,
275 0.929387, 0.938106, 0.947072, 0.954406, 0.961692, 0.97055, 0.978517, 0.985133,
278 kwargs.setdefault(
"qratcor_csl_eta",qratcor_csl_eta)
279 kwargs.setdefault(
"qratcor_css_eta",qratcor_css_eta)
281 kwargs.setdefault(
"CscAlignmentTool", csc_align_tool )
344 from MuonConfig.MuonRecToolsConfig
import MuonTrackToSegmentToolCfg
345 from TrkConfig.TrkTrackSummaryToolConfig
import MuonTrackSummaryToolCfg
346 result=ComponentAccumulator()
347 kwargs.setdefault(
"IPConstraint", flags.Beam.Type
is BeamType.Collisions)
348 kwargs.setdefault(
'SegmentAmbiguityTool', result.popToolsAndMerge( MuonAmbiProcessorCfg(flags) ) )
349 kwargs.setdefault(
'SLFitter', result.popToolsAndMerge( MCTBSLFitterMaterialFromTrackCfg(flags) ) )
350 kwargs.setdefault(
"TrackToSegmentTool", result.popToolsAndMerge( MuonTrackToSegmentToolCfg(flags) ) )
351 kwargs.setdefault(
"Printer", result.getPrimaryAndMerge(MuonEDMPrinterToolCfg(flags)) )
352 if flags.Beam.Type
is not BeamType.Collisions:
353 kwargs.setdefault(
"MmOccupancyBinWidth", 2048)
355 kwargs.setdefault(
'TrackCleaner', result.popToolsAndMerge( MuonTrackCleanerCfg(flags, name=
'MuonTrackCleaner_seg',seg=
True) ) )
356 kwargs.setdefault(
'TrackSummaryTool', result.popToolsAndMerge( MuonTrackSummaryToolCfg(flags, name=
'MuonTrackSummary') ) )
358 from MuonConfig.MuonRIO_OnTrackCreatorToolConfig
import MuonClusterOnTrackCreatorCfg
359 kwargs.setdefault(
"MuonClusterCreator", result.popToolsAndMerge(MuonClusterOnTrackCreatorCfg(flags)) )
361 result.setPrivateTools(CompFactory.Muon.MuonNSWSegmentFinderTool(name,**kwargs))
411 from MuonConfig.MuonRIO_OnTrackCreatorToolConfig
import MuonClusterOnTrackCreatorCfg, MdtDriftCircleOnTrackCreatorCfg, MdtCalibToolForRotsCfg
412 result = ComponentAccumulator()
414 if not flags.Detector.EnableRPC:
415 kwargs.setdefault(
"RpcPrepDataContainer",
"")
416 if not flags.Detector.EnableTGC:
417 kwargs.setdefault(
"TgcPrepDataContainer",
"")
419 if "MdtCreator" not in kwargs:
422 if not flags.Input.isMC
and flags.Beam.Type
is BeamType.Collisions:
423 if flags.Muon.doSegmentT0Fit:
424 timeWindowSetting = MdtCalibWindowNumber(
'Collision_t0fit')
426 timeWindowSetting = MdtCalibWindowNumber(
'Collision_data')
427 acc = MdtDriftCircleOnTrackCreatorCfg(flags, name=
"MdtDriftCircleOnTrackCreatorSegmentFinding",
428 CreateTubeHit =
False,
429 CalibrationTool = result.popToolsAndMerge(MdtCalibToolForRotsCfg(flags,
430 TimeWindowSetting = timeWindowSetting))
434 acc = MdtDriftCircleOnTrackCreatorCfg(flags)
436 kwargs.setdefault(
'MdtCreator', result.popToolsAndMerge(acc))
438 kwargs.setdefault(
'ClusterCreator', result.popToolsAndMerge(MuonClusterOnTrackCreatorCfg(flags)))
439 kwargs.setdefault(
"Printer", result.getPrimaryAndMerge(MuonEDMPrinterToolCfg(flags) ))
440 kwargs.setdefault(
'TgcPrepDataContainer',
'TGC_MeasurementsAllBCs')
442 if flags.Beam.Type
is BeamType.Cosmics:
443 kwargs.setdefault(
"AngleCutPhi", 1e9)
444 kwargs.setdefault(
"DropDistance", 100000000.)
446 result.setPrivateTools( CompFactory.Muon.MuonPatternCalibration(name, **kwargs) )
450 from MuonConfig.MuonRIO_OnTrackCreatorToolConfig
import MuonClusterOnTrackCreatorCfg
451 result = ComponentAccumulator()
453 kwargs.setdefault(
"doStgcSegments", flags.Detector.EnablesTGC)
454 kwargs.setdefault(
"doMMSegments", flags.Detector.EnableMM)
455 kwargs.setdefault(
"doMdtSegments",
False)
456 kwargs.setdefault(
"CSC_clusterkey",
"CSC_Clusters" if flags.Detector.EnableCSC
else "")
458 kwargs.setdefault(
"SegmentCollectionName",
"NCB_TrackMuonSegments")
460 kwargs.setdefault(
"NSWSegmentCollectionName",
"")
461 kwargs.setdefault(
"SegmentQuality", 1)
465 if flags.Detector.EnableCSC:
467 name=
'CscSegmentUtilTool_NCB',
472 name=
'Csc2dSegmentMaker_NCB',
473 segmentTool=csc_segment_util_tool))
476 name=
'Csc4dSegmentMaker_NCB',
477 segmentTool=csc_segment_util_tool))
479 kwargs.setdefault(
"Csc2dSegmentMaker", csc_2d_segment_maker)
480 kwargs.setdefault(
"Csc4dSegmentMaker", csc_4d_segment_maker)
482 if flags.Detector.EnablesTGC
or flags.Detector.EnableMM:
483 kwargs.setdefault(
"MuonClusterCreator", result.popToolsAndMerge(MuonClusterOnTrackCreatorCfg(flags)))
485 extrapolator = result.getPrimaryAndMerge(MuonStraightLineExtrapolatorCfg(flags))
486 result.addPublicTool(extrapolator)
487 cleaner = result.popToolsAndMerge( MuonTrackCleanerCfg(flags, name=
'MuonTrackCleaner_seg',seg=
True) )
489 name =
"MuonNSWSegmentFinderTool",
490 TrackCleaner = cleaner,
491 SeedMMStereos =
False,
492 IPConstraint =
False,
493 CaloConstraint =
True))
494 kwargs.setdefault(
"NSWSegmentMaker", segment_finder)
495 the_alg = CompFactory.MuonSegmentFinderAlg(name, **kwargs)
496 result.addEventAlgo(the_alg, primary =
True)
500 from MuonConfig.MuonRIO_OnTrackCreatorToolConfig
import MuonClusterOnTrackCreatorCfg
501 result = ComponentAccumulator()
503 kwargs.setdefault(
"EDMPrinter", result.getPrimaryAndMerge(MuonEDMPrinterToolCfg(flags)) )
508 kwargs.setdefault(
'SegmentMaker', segment_maker)
511 if flags.Detector.EnableMM
or flags.Detector.EnablesTGC:
512 kwargs.setdefault(
"MuonClusterCreator", result.popToolsAndMerge(MuonClusterOnTrackCreatorCfg(flags)))
515 extrapolator = result.getPrimaryAndMerge(MuonStraightLineExtrapolatorCfg(flags))
516 result.addPublicTool(extrapolator)
517 cleaner = result.popToolsAndMerge( MuonTrackCleanerCfg(flags, name=
'MuonTrackCleaner_seg',seg=
True) )
518 segment_finder = result.getPrimaryAndMerge(
MuonNSWSegmentFinderToolCfg(flags, name =
"MuonNSWSegmentFinderTool", TrackCleaner = cleaner))
519 kwargs.setdefault(
"NSWSegmentMaker", segment_finder)
522 if flags.Detector.EnableCSC:
526 kwargs.setdefault(
"CSC_clusterkey",
"")
528 kwargs.setdefault(
"PrintSummary", flags.Muon.printSummary)
529 kwargs.setdefault(
"doStgcSegments", flags.Detector.EnablesTGC)
530 kwargs.setdefault(
"doMMSegments", flags.Detector.EnableMM)
532 kwargs.setdefault(
"SegmentCollectionName",
"TrackMuonSegments" if flags.Muon.segmentOrigin !=
"TruthTracking" else "ThirdChainSegments")
534 the_alg = CompFactory.MuonSegmentFinderAlg( name, **kwargs)
535 result.addEventAlgo(the_alg)
558 Returns a CA setting up Muon Segment Finding
559 @param setup_bytestream if True and if Format.BS, sets up reading from bytestream. If False, disables setting up BS, even if Format.BS is True
563 result = ComponentAccumulator()
565 from MuonConfig.MuonGeometryConfig
import MuonGeoModelCfg
566 result.merge( MuonGeoModelCfg(flags) )
567 from MuonConfig.MuonRecToolsConfig
import MuonEDMHelperSvcCfg
568 result.merge(MuonEDMHelperSvcCfg(flags))
573 if flags.Input.Format
is Format.BS:
574 from MuonConfig.MuonBytestreamDecodeConfig
import MuonByteStreamDecodersCfg
575 result.merge( MuonByteStreamDecodersCfg(flags) )
577 if flags.Input.Format
is Format.BS
or 'StreamRDO' in flags.Input.ProcessingTags:
578 from MuonConfig.MuonRdoDecodeConfig
import MuonRDOtoPRDConvertorsCfg
579 result.merge( MuonRDOtoPRDConvertorsCfg(flags) )
584 if flags.Muon.scheduleActsReco:
585 if not flags.Muon.usePhaseIIGeoSetup:
586 raise RuntimeError(
"The phase II reconstruction flag cannot be set to true without also running the job from a proper SQLite input")
587 from MuonPatternRecognitionAlgs.MuonPatternRecognitionConfig
import MuonPatternRecognitionCfg
589 result.merge(MuonPatternRecognitionCfg(flags))
597 if flags.Muon.runCommissioningChain:
600 if flags.Beam.Type
is BeamType.Collisions:
603 SegmentContainerName=
"NCB_TrackMuonSegments",
604 xAODContainerName=
"NCB_MuonSegments") )
606 if flags.Detector.EnableMM
or flags.Detector.EnablesTGC:
608 SegmentContainerName=
"TrackMuonNSWSegments",
609 xAODContainerName=
"xAODNSWSegments"))