13 raise ValueError(
"jet collection name is empty - pass the full HLT jet collection name to getBJetSequenceCfg().")
15 prmVtxKey = flags.Trigger.InDetTracking.fullScan.vertex
16 outputRoIName = flags.Trigger.InDetTracking.bjet.roi
18 jc_key = f
'{jc_name}_'
21 roiTool = CompFactory.ViewCreatorCentredOnJetWithPVConstraintROITool(
22 RoisWriteHandleKey = recordable( outputRoIName ),
23 VertexReadHandleKey = prmVtxKey,
24 PrmVtxLink = prmVtxKey.replace(
"HLT_",
"" ),
25 RoIEtaWidth = flags.Trigger.InDetTracking.bjet.etaHalfWidth,
26 RoIPhiWidth = flags.Trigger.InDetTracking.bjet.phiHalfWidth,
27 RoIZWidth = flags.Trigger.InDetTracking.bjet.zedHalfWidth,
31 bJetBtagSequence = InViewRecoCA(f
"BTagViews_{jc_name}", RoITool = roiTool,
32 InViewRoIs =
"InViewRoIs",
33 mergeUsingFeature =
True,
34 RequireParentView =
False,
35 ViewFallThrough =
True,
36 InViewJets = recordable( f
'{jc_key}bJets' ),
38 PlaceJetInView =
True)
39 InputMakerAlg = bJetBtagSequence.inputMaker()
41 from TriggerMenuMT.HLT.Bjet.BjetTrackingConfig
import secondStageBjetTrackingCfg
42 secondStageAlgs = secondStageBjetTrackingCfg(flags,
43 inputRoI=InputMakerAlg.InViewRoIs,
44 inputVertex=prmVtxKey,
45 inputJets=InputMakerAlg.InViewJets)
47 PTTrackParticles = flags.Trigger.InDetTracking.bjet.tracks_IDTrig
49 from TriggerMenuMT.HLT.Bjet.BjetFlavourTaggingConfig
import flavourTaggingCfg
50 flavourTaggingAlgs = flavourTaggingCfg(flags,
51 inputJets=str(InputMakerAlg.InViewJets),
52 inputVertex=prmVtxKey,
53 inputTracks=PTTrackParticles,
55 bJetBtagSequence.mergeReco(secondStageAlgs)
56 bJetBtagSequence.mergeReco(flavourTaggingAlgs)
58 from TrigGenericAlgs.TrigGenericAlgsConfig
import ROBPrefetchingAlgCfg_Si
59 robPrefetch = ROBPrefetchingAlgCfg_Si(flags, nameSuffix=InputMakerAlg.name)
61 BjetAthSequence = SelectionCA( f
"BjetAthSequence_{jc_name}_step2", )
62 BjetAthSequence.mergeReco(bJetBtagSequence, robPrefetchCA=robPrefetch)
64 from TrigBjetHypo.TrigBjetMonitoringConfig
import TrigBjetOnlineMonitoring
65 hypo = CompFactory.TrigBjetBtagHypoAlg(
66 f
"TrigBjetBtagHypoAlg_{jc_name}",
68 BTaggedJetKey = InputMakerAlg.InViewJets,
69 TracksKey = PTTrackParticles,
70 PrmVtxKey = InputMakerAlg.RoITool.VertexReadHandleKey,
72 PrmVtxLink = InputMakerAlg.RoITool.PrmVtxLink,
74 MonTool = TrigBjetOnlineMonitoring(flags)
76 BjetAthSequence.addHypoAlgo(hypo)
78 from TrigBjetHypo.TrigBjetBtagHypoTool
import TrigBjetBtagHypoToolFromDict
79 return MenuSequence(flags,
81 HypoToolGen = TrigBjetBtagHypoToolFromDict)