15def precisionCaloSequenceGenCfg(flags, ion=False, is_probe_leg=False):
16 """ Creates PrecisionCalo sequence """
17 TrigEgammaKeys = getTrigEgammaKeys(flags, ion=ion)
18
19 hiInfo = 'HI' if ion else ''
20
21 InViewRoIs="PrecisionCaloRoIs"
22 roiTool = CompFactory.ViewCreatorPreviousROITool()
23
24
25
26 roiTool.RoISGKey = "HLT_Roi_FastElectron"
27
28 recoAcc = InViewRecoCA(tag(ion),InViewRoIs=InViewRoIs, RoITool = roiTool, RequireParentView = True, isProbe=is_probe_leg)
29
30 from TriggerMenuMT.HLT.Photon.PrecisionCaloRecoSequences import precisionCaloRecoSequence
31 recoAcc.mergeReco(precisionCaloRecoSequence(flags, InViewRoIs,'gPrecisionCaloRecoSequence'+hiInfo, ion))
32
33 selAcc = SelectionCA('gPrecisionCaloMenuSequence'+hiInfo, isProbe=is_probe_leg)
34
35 pedestalCA = None
36 if ion is True:
37
38
39
40
41
42 from TriggerMenuMT.HLT.HeavyIon.HeavyIonMenuSequences import egammaFSHIEventShapeMakerCfg
43 pedestalCA = egammaFSHIEventShapeMakerCfg(flags)
44
45 selAcc.mergeReco(recoAcc, upSequenceCA=pedestalCA)
46
47 hypoAlg = CompFactory.TrigEgammaPrecisionCaloHypoAlg('Photon' + tag(ion) + 'Hypo')
48
49 hypoAlg.CaloClusters = TrigEgammaKeys.precisionPhotonCaloClusterContainer
50
51 selAcc.addHypoAlgo(hypoAlg)
52
53 from TrigEgammaHypo.TrigEgammaPrecisionCaloHypoTool import TrigEgammaPrecisionCaloHypoToolFromDict
54
55 return MenuSequence(flags, selAcc, HypoToolGen=TrigEgammaPrecisionCaloHypoToolFromDict)