Exemple #1
0
def precisionElectronSequence(ConfigFlags):
    """ fourth step:  precision electron....."""
    InViewRoIs = "precisionElectron"
    # EVCreator:
    precisionElectronViewsMaker = EventViewCreatorAlgorithm(
        "IMprecisionElectron")
    precisionElectronViewsMaker.RoIsLink = "initialRoI"
    precisionElectronViewsMaker.RoITool = ViewCreatorInitialROITool()
    precisionElectronViewsMaker.InViewRoIs = InViewRoIs
    precisionElectronViewsMaker.Views = "precisionElectronViews"  #precisionElectronViews
    precisionElectronViewsMaker.ViewFallThrough = True
    precisionElectronViewsMaker.RequireParentView = True

    # Configure the reconstruction algorithm sequence
    from TriggerMenuMT.HLTMenuConfig.Electron.PrecisionElectronRecoSequences import precisionElectronRecoSequence
    (electronPrecisionRec, electronPrecisionTrack,
     sequenceOut) = precisionElectronRecoSequence(InViewRoIs)

    electronPrecisionInViewAlgs = parOR(
        "electronPrecisionInViewAlgs",
        [electronPrecisionTrack, electronPrecisionRec])
    precisionElectronViewsMaker.ViewNodeName = "electronPrecisionInViewAlgs"

    electronPrecisionAthSequence = seqAND(
        "electronPrecisionAthSequence",
        [precisionElectronViewsMaker, electronPrecisionInViewAlgs])
    return (electronPrecisionAthSequence, precisionElectronViewsMaker,
            sequenceOut)
Exemple #2
0
def muEFSAFSAlgSequence(ConfigFlags):

    efsafsInputMaker = EventViewCreatorAlgorithm("IMMuonFS")
    fsRoiTool = ViewCreatorFSROITool()
    fsRoiTool.RoisWriteHandleKey = "MuonFS_RoIs"
    #
    efsafsInputMaker.RoIsLink = "initialRoI"  # Only expect to get in one FS RI
    efsafsInputMaker.RoITool = fsRoiTool  # Use new FS roi (note: the ViewCreatorInitialROITool should work excactly the same here)
    #
    efsafsInputMaker.Views = "MUFSViewRoI"
    efsafsInputMaker.InViewRoIs = "MUFSRoIs"
    #
    efsafsInputMaker.ViewFallThrough = True

    ### get EF reco sequence ###
    from TriggerMenuMT.HLTMenuConfig.Muon.MuonSetup import muEFSARecoSequence, makeMuonPrepDataAlgs
    viewAlgs_MuonPRD = makeMuonPrepDataAlgs(RoIs=efsafsInputMaker.InViewRoIs,
                                            forFullScan=True)
    muEFSAFSRecoSequence, sequenceOut = muEFSARecoSequence(
        efsafsInputMaker.InViewRoIs, 'FS')

    muEFFSRecoSequence = parOR("muEFSAFSRecoSequence",
                               [viewAlgs_MuonPRD, muEFSAFSRecoSequence])
    efsafsInputMaker.ViewNodeName = muEFFSRecoSequence.name()

    muonEFSAFSSequence = seqAND("muonEFSAFSSequence",
                                [efsafsInputMaker, muEFFSRecoSequence])

    return (muonEFSAFSSequence, efsafsInputMaker, sequenceOut)
Exemple #3
0
def muIsoAlgSequence(ConfigFlags):

    l2muIsoViewsMaker = EventViewCreatorAlgorithm("IMl2muIso")
    #
    l2muIsoViewsMaker.RoIsLink = "roi"  # Merge based on L2SA muon
    l2muIsoViewsMaker.RoITool = ViewCreatorPreviousROITool(
    )  # Spawn EventViews on L2SA muon ROI
    #
    l2muIsoViewsMaker.Views = "MUIsoViewRoIs"
    l2muIsoViewsMaker.InViewRoIs = "MUIsoRoIs"
    #
    l2muIsoViewsMaker.RequireParentView = True
    l2muIsoViewsMaker.ViewFallThrough = True

    ### get EF reco sequence ###
    from TriggerMenuMT.HLTMenuConfig.Muon.MuonSetup import l2muisoRecoSequence
    l2muisoRecoSequence, sequenceOut = l2muisoRecoSequence(
        l2muIsoViewsMaker.InViewRoIs)

    l2muIsoViewsMaker.ViewNodeName = l2muisoRecoSequence.name()

    ### Define a Sequence to run for muIso ###
    l2muIsoSequence = seqAND("l2muIsoSequence",
                             [l2muIsoViewsMaker, l2muisoRecoSequence])

    return (l2muIsoSequence, l2muIsoViewsMaker, sequenceOut)
Exemple #4
0
def muFastAlgSequence(ConfigFlags):

    ### set the EVCreator ###
    l2MuViewsMaker = EventViewCreatorAlgorithm("IMl2Mu")
    #
    l2MuViewsMaker.RoIsLink = "initialRoI"  # ROI is from L1
    l2MuViewsMaker.RoITool = ViewCreatorInitialROITool()  # ROI is from L1
    #
    l2MuViewsMaker.Views = "MUViewRoIs"
    l2MuViewsMaker.InViewRoIs = "MURoIs"
    #
    l2MuViewsMaker.ViewFallThrough = True

    ### get muFast reco sequence ###
    from TriggerMenuMT.HLTMenuConfig.Muon.MuonSetup import muFastRecoSequence, makeMuonPrepDataAlgs
    viewAlgs_MuonPRD = makeMuonPrepDataAlgs(RoIs=l2MuViewsMaker.InViewRoIs)
    muFastRecoSequence, sequenceOut = muFastRecoSequence(
        l2MuViewsMaker.InViewRoIs, doFullScanID=False)
    muFastSequence = parOR("muFastRecoSequence",
                           [viewAlgs_MuonPRD, muFastRecoSequence])
    l2MuViewsMaker.ViewNodeName = muFastSequence.name()

    l2muFastSequence = seqAND("l2muFastSequence",
                              [l2MuViewsMaker, muFastSequence])
    return (l2muFastSequence, l2MuViewsMaker, sequenceOut)
Exemple #5
0
def muEFSAAlgSequence(ConfigFlags):

    efsaViewsMaker = EventViewCreatorAlgorithm("IMefsa")
    #
    efsaViewsMaker.RoIsLink = "initialRoI"  # Merge based on initial RoI

    newRoITool = ViewCreatorFetchFromViewROITool()
    newRoITool.RoisWriteHandleKey = recordable(
        "HLT_Roi_L2SAMuonForEF")  #RoI collection recorded to EDM
    newRoITool.InViewRoIs = "forMS"  #input RoIs from L2 SA views
    newRoITool.ViewToFetchFrom = "MUViewRoIs"
    efsaViewsMaker.RoITool = newRoITool  # Create a new ROI centred on the L2 SA muon from Step 1
    #
    efsaViewsMaker.Views = "MUEFSAViewRoIs"
    efsaViewsMaker.InViewRoIs = "MUEFSARoIs"
    #
    efsaViewsMaker.RequireParentView = True
    efsaViewsMaker.ViewFallThrough = True

    ### get EF reco sequence ###
    from TriggerMenuMT.HLTMenuConfig.Muon.MuonSetup import muEFSARecoSequence
    muEFSARecoSequence, sequenceOut = muEFSARecoSequence(
        efsaViewsMaker.InViewRoIs, 'RoI')

    efsaViewsMaker.ViewNodeName = muEFSARecoSequence.name()

    muonEFSAonlySequence = seqAND("muonEFSAonlySequence",
                                  [efsaViewsMaker, muEFSARecoSequence])

    return (muonEFSAonlySequence, efsaViewsMaker, sequenceOut)
Exemple #6
0
def tauEFSequence(ConfigFlags):

    RecoSequenceName = "tauEFInViewSequence"

    newRoITool = ViewCreatorFetchFromViewROITool()
    newRoITool.RoisWriteHandleKey = recordable(
        "HLT_Roi_TauID")  #RoI collection recorded to EDM
    newRoITool.InViewRoIs = "UpdatedTrackRoI"  #input RoIs from calo only step

    efViewsMaker = EventViewCreatorAlgorithm("IMTauEF")
    efViewsMaker.RoIsLink = "roi"
    efViewsMaker.RoITool = newRoITool
    efViewsMaker.InViewRoIs = "RoiForTauCore"
    efViewsMaker.Views = "TAUEFViews"
    efViewsMaker.ViewFallThrough = True
    efViewsMaker.RequireParentView = True
    efViewsMaker.ViewNodeName = RecoSequenceName

    (tauEFInViewSequence,
     sequenceOut) = tauIdTrackSequence(efViewsMaker.InViewRoIs,
                                       RecoSequenceName)

    tauEFSequence = seqAND("tauEFSequence",
                           [efViewsMaker, tauEFInViewSequence])
    return (tauEFSequence, efViewsMaker, sequenceOut)
Exemple #7
0
def tauCaloMVASequence(ConfigFlags):
    """ Creates L2 Fast Calo sequence for Taus"""
    # EV creator
    InViewRoIs = "TAUCaloRoIs"
    RecoSequenceName = "tauCaloMVAInViewSequence"

    tauCaloMVAViewsMaker = EventViewCreatorAlgorithm("IMtauCaloMVA")
    tauCaloMVAViewsMaker.ViewFallThrough = True
    tauCaloMVAViewsMaker.RoIsLink = "initialRoI"
    tauCaloMVAViewsMaker.RoITool = ViewCreatorInitialROITool()
    tauCaloMVAViewsMaker.InViewRoIs = InViewRoIs
    tauCaloMVAViewsMaker.Views = "TAUCaloMVAViews"
    tauCaloMVAViewsMaker.ViewNodeName = RecoSequenceName
    (tauCaloMVAInViewSequence,
     sequenceOut) = tauCaloMVARecoSequence(InViewRoIs, RecoSequenceName)

    tauCaloMVARecoVDV = CfgMgr.AthViews__ViewDataVerifier("tauCaloMVARecoVDV")
    tauCaloMVARecoVDV.DataObjects = [
        ('TrigRoiDescriptorCollection', 'StoreGateSvc+TAUCaloRoIs'),
        ('CaloBCIDAverage', 'StoreGateSvc+CaloBCIDAverage'),
        ('ILArHVScaleCorr', 'ConditionStore+LArHVScaleCorrRecomputed'),
        ('xAOD::EventInfo', 'StoreGateSvc+EventInfo'),
        ('SG::AuxElement', 'StoreGateSvc+EventInfo.ActIntPerXDecor'),
        ('SG::AuxElement', 'StoreGateSvc+EventInfo.AveIntPerXDecor')
    ]
    tauCaloMVAInViewSequence += tauCaloMVARecoVDV

    tauCaloMVASequence = seqAND(
        "tauCaloMVASequence", [tauCaloMVAViewsMaker, tauCaloMVAInViewSequence])
    return (tauCaloMVASequence, tauCaloMVAViewsMaker, sequenceOut)
Exemple #8
0
def tauFTFCoreSequence(ConfigFlags):

    RecoSequenceName = "tauFTFCoreInViewSequence"

    newRoITool = ViewCreatorFetchFromViewROITool()
    newRoITool.RoisWriteHandleKey = recordable(
        "HLT_Roi_TauCore")  #RoI collection recorded to EDM
    newRoITool.InViewRoIs = "UpdatedCaloRoI"  #input RoIs from calo only step

    ftfCoreViewsMaker = EventViewCreatorAlgorithm("IMFTFCore")
    ftfCoreViewsMaker.RoIsLink = "roi"
    ftfCoreViewsMaker.RoITool = newRoITool
    ftfCoreViewsMaker.InViewRoIs = "RoiForTauCore"
    ftfCoreViewsMaker.Views = "TAUFTFCoreViews"
    ftfCoreViewsMaker.ViewFallThrough = True
    ftfCoreViewsMaker.RequireParentView = True
    ftfCoreViewsMaker.ViewNodeName = RecoSequenceName

    (tauFTFCoreInViewSequence,
     sequenceOut) = tauCoreTrackSequence(ftfCoreViewsMaker.InViewRoIs,
                                         RecoSequenceName)

    tauFastTrackCoreSequence = seqAND(
        "tauFastTrackCoreSequence",
        [ftfCoreViewsMaker, tauFTFCoreInViewSequence])
    return (tauFastTrackCoreSequence, ftfCoreViewsMaker, sequenceOut)
Exemple #9
0
def precisionPhotonSequence(ConfigFlags):
    """ This function creates the PrecisionPhoton sequence"""

    # Prepare first the EventView
    InViewRoIs = "PrecisionPhotonRoIs"
    precisionPhotonViewsMaker = EventViewCreatorAlgorithm("IMprecisionPhoton")
    precisionPhotonViewsMaker.ViewFallThrough = True
    precisionPhotonViewsMaker.RequireParentView = True
    precisionPhotonViewsMaker.RoIsLink = "initialRoI"  # ROI link used to merge inputs
    precisionPhotonViewsMaker.RoITool = ViewCreatorInitialROITool(
    )  # Tool used to supply ROIs for EventViews
    precisionPhotonViewsMaker.InViewRoIs = InViewRoIs  # names to use for the collection of which the RoIs are picked up
    precisionPhotonViewsMaker.Views = "precisionPhotonViews"  # Output container which has the view objects

    # Configure the reconstruction algorithm sequence
    from TriggerMenuMT.HLTMenuConfig.Photon.PhotonRecoSequences import precisionPhotonRecoSequence
    (precisionPhotonInViewSequence,
     sequenceOut) = precisionPhotonRecoSequence(InViewRoIs)

    precisionPhotonViewsMaker.ViewNodeName = precisionPhotonInViewSequence.name(
    )

    theSequence = seqAND(
        "precisionPhotonSequence",
        [precisionPhotonViewsMaker, precisionPhotonInViewSequence])
    return (theSequence, precisionPhotonViewsMaker, sequenceOut)
Exemple #10
0
def fastElectronSequence(ConfigFlags):
    """ second step:  tracking....."""

    from TrigInDetConfig.InDetSetup import makeInDetAlgs
    RoIs = "EMIDRoIs"  # contract with the fastCalo
    viewAlgs, viewVerify = makeInDetAlgs(
        whichSignature="Electron",
        separateTrackParticleCreator="Electron",
        rois=RoIs)

    # A simple algorithm to confirm that data has been inherited from parent view
    # Required to satisfy data dependencies
    from TriggerMenuMT.HLTMenuConfig.CommonSequences.CaloSequenceSetup import CaloMenuDefs
    viewVerify.DataObjects += [('xAOD::TrigEMClusterContainer',
                                'StoreGateSvc+' + CaloMenuDefs.L2CaloClusters),
                               ('TrigRoiDescriptorCollection',
                                'StoreGateSvc+' + RoIs)]

    from IOVDbSvc.CondDB import conddb
    if not conddb.folderRequested("/PIXEL/DCS/FSMSTATUS"):
        viewVerify.DataObjects += [('CondAttrListCollection',
                                    'ConditionStore+/PIXEL/DCS/FSMSTATUS')]
    if not conddb.folderRequested("/PIXEL/DCS/FSMSTATE"):
        viewVerify.DataObjects += [('CondAttrListCollection',
                                    'ConditionStore+/PIXEL/DCS/FSMSTATE')]

    TrackParticlesName = ""
    for viewAlg in viewAlgs:
        if "InDetTrigTrackParticleCreatorAlg" in viewAlg.name():
            TrackParticlesName = viewAlg.TrackParticlesName

    from TrigEgammaHypo.TrigEgammaFastElectronFexMTConfig import EgammaFastElectronFex_1
    theElectronFex = EgammaFastElectronFex_1()
    theElectronFex.TrigEMClusterName = CaloMenuDefs.L2CaloClusters
    theElectronFex.TrackParticlesName = TrackParticlesName
    theElectronFex.ElectronsName = recordable("HLT_FastElectrons")

    # EVCreator:
    l2ElectronViewsMaker = EventViewCreatorAlgorithm("IMl2Electron")
    l2ElectronViewsMaker.RoIsLink = "initialRoI"
    l2ElectronViewsMaker.RoITool = ViewCreatorInitialROITool()
    l2ElectronViewsMaker.InViewRoIs = RoIs
    l2ElectronViewsMaker.Views = "EMElectronViews"
    l2ElectronViewsMaker.ViewFallThrough = True
    l2ElectronViewsMaker.RequireParentView = True

    theElectronFex.RoIs = l2ElectronViewsMaker.InViewRoIs
    # ATR-20453
    # Until such time as FS and RoI collections do not interfere, a hacky fix
    #electronInViewAlgs = parOR("electronInViewAlgs", viewAlgs + [ theElectronFex ])
    electronInViewAlgs = seqAND("electronInViewAlgs",
                                viewAlgs + [theElectronFex])
    l2ElectronViewsMaker.ViewNodeName = "electronInViewAlgs"

    electronAthSequence = seqAND("electronAthSequence",
                                 [l2ElectronViewsMaker, electronInViewAlgs])
    return (electronAthSequence, l2ElectronViewsMaker,
            theElectronFex.ElectronsName)
Exemple #11
0
def muEFCBAlgSequence(ConfigFlags):

    #By default the EFCB sequence will run both outside-in and
    #(if zero muons are found) inside-out reconstruction
    from TrigMuonEF.TrigMuonEFConf import MuonFilterAlg, MergeEFMuonsAlg
    from TriggerMenuMT.HLTMenuConfig.Muon.MuonSetup import muEFCBRecoSequence, muEFInsideOutRecoSequence

    efcbViewsMaker = EventViewCreatorAlgorithm("IMefcbtotal")
    #
    efcbViewsMaker.RoIsLink = "roi"  # Merge based on L2SA muon
    efcbViewsMaker.RoITool = ViewCreatorPreviousROITool(
    )  # Spawn EventViews on L2SA muon ROI
    #
    efcbViewsMaker.Views = "MUEFCBViewRoIs"
    efcbViewsMaker.InViewRoIs = "MUEFCBRoIs"
    #
    efcbViewsMaker.RequireParentView = True
    efcbViewsMaker.ViewFallThrough = True
    efcbViewsMaker.mergeUsingFeature = True

    #outside-in reco sequence
    muEFCBRecoSequence, sequenceOutCB = muEFCBRecoSequence(
        efcbViewsMaker.InViewRoIs, "RoI")

    #Algorithm to filter events with no muons
    muonFilter = MuonFilterAlg("FilterZeroMuons")
    muonFilter.MuonContainerLocation = sequenceOutCB

    #inside-out reco sequence - runs only if filter is passed
    muonEFInsideOutRecoSequence, sequenceOutInsideOut = muEFInsideOutRecoSequence(
        efcbViewsMaker.InViewRoIs, "RoI")
    muonInsideOutSequence = seqAND("muonEFInsideOutSequence",
                                   [muonFilter, muonEFInsideOutRecoSequence])

    #combine outside-in and inside-out sequences
    muonRecoSequence = parOR("muonEFCBandInsideOutRecoSequence",
                             [muEFCBRecoSequence, muonInsideOutSequence])

    #Merge muon containers from outside-in and inside-out reco
    muonMerger = MergeEFMuonsAlg("MergeEFMuons")
    muonMerger.MuonCBContainerLocation = sequenceOutCB
    muonMerger.MuonInsideOutContainerLocation = sequenceOutInsideOut
    muonMerger.MuonOutputLocation = muNames.EFCBName
    sequenceOut = muonMerger.MuonOutputLocation

    #Add merging alg in sequence with reco sequences
    mergeSequence = seqOR("muonCBInsideOutMergingSequence",
                          [muonRecoSequence, muonMerger])

    #Final sequence running in view
    efcbViewsMaker.ViewNodeName = mergeSequence.name()
    muonSequence = seqAND("muonEFCBandInsideOutSequence",
                          [efcbViewsMaker, mergeSequence])

    return (muonSequence, efcbViewsMaker, sequenceOut)
Exemple #12
0
def fastPhotonMenuSequence():
    """Creates secpond step photon sequence"""

    from TriggerMenuMT.HLTMenuConfig.CommonSequences.CaloSequenceSetup import CaloMenuDefs
    ViewVerify = CfgMgr.AthViews__ViewDataVerifier(
        "FastPhotonViewDataVerifier")
    ViewVerify.DataObjects = [('xAOD::TrigEMClusterContainer',
                               'StoreGateSvc+' + CaloMenuDefs.L2CaloClusters),
                              ('TrigRoiDescriptorCollection',
                               'StoreGateSvc+EMIDRoIs')]

    from TrigEgammaHypo.TrigEgammaFastPhotonFexMTConfig import EgammaFastPhotonFex_1
    thePhotonFex = EgammaFastPhotonFex_1()
    thePhotonFex.TrigEMClusterName = CaloMenuDefs.L2CaloClusters
    thePhotonFex.PhotonsName = recordable("HLT_FastPhotons")
    #thePhotonFex.RoIs="EMIDRoIs"

    l2PhotonViewsMaker = EventViewCreatorAlgorithm("IMl2Photon")
    l2PhotonViewsMaker.RoIsLink = "initialRoI"
    l2PhotonViewsMaker.InViewRoIs = "EMIDRoIs"
    #l2PhotonViewsMaker.InViewRoIs = "EMCaloRoIs"
    l2PhotonViewsMaker.RoITool = ViewCreatorInitialROITool()
    l2PhotonViewsMaker.Views = "EMPhotonViews"
    l2PhotonViewsMaker.ViewFallThrough = True
    l2PhotonViewsMaker.RequireParentView = True

    thePhotonFex.RoIs = l2PhotonViewsMaker.InViewRoIs

    photonInViewAlgs = parOR("photonInViewAlgs", [ViewVerify, thePhotonFex])

    l2PhotonViewsMaker.ViewNodeName = "photonInViewAlgs"

    from TrigEgammaHypo.TrigEgammaHypoConf import TrigEgammaFastPhotonHypoAlgMT
    thePhotonHypo = TrigEgammaFastPhotonHypoAlgMT()
    thePhotonHypo.Photons = thePhotonFex.PhotonsName
    thePhotonHypo.RunInView = True

    # this needs to be added:
    #electronDecisionsDumper = DumpDecisions("electronDecisionsDumper", Decisions = theElectronHypo.Output )

    photonAthSequence = seqAND("photonAthSequence",
                               [l2PhotonViewsMaker, photonInViewAlgs])
    from TrigEgammaHypo.TrigEgammaFastPhotonHypoTool import TrigEgammaFastPhotonHypoToolFromDict

    return MenuSequence(Maker=l2PhotonViewsMaker,
                        Sequence=photonAthSequence,
                        Hypo=thePhotonHypo,
                        HypoToolGen=TrigEgammaFastPhotonHypoToolFromDict)
Exemple #13
0
def allTE_trkfast( signature="FS" ):
        inputMakerAlg = EventViewCreatorAlgorithm("IM_beamspot_"+signature)
        inputMakerAlg.ViewFallThrough = True
        inputMakerAlg.RoIsLink = "initialRoI"
        inputMakerAlg.RoITool = ViewCreatorInitialROITool()
        inputMakerAlg.InViewRoIs = "beamspotViewRoI_"+signature
        inputMakerAlg.Views      = "beamspotViewRoI_"+signature

        from TrigInDetConfig.InDetSetup import makeInDetAlgs
        from TrigT2BeamSpot.T2VertexBeamSpotConfig import T2VertexBeamSpot_activeAllTE

        viewAlgs, viewVerify  = makeInDetAlgs( whichSignature=signature, rois=inputMakerAlg.InViewRoIs )

        vertexAlg = T2VertexBeamSpot_activeAllTE( "vertex_"+signature )
        vertexAlg.TrackCollection = "TrigFastTrackFinder_Tracks_"+signature

        viewVerify.DataObjects += [( 'TrigRoiDescriptorCollection' , 'StoreGateSvc+beamspotViewRoI_'+signature ),
                                   ( 'xAOD::EventInfo' , 'StoreGateSvc+EventInfo' ),
                                   ( 'TagInfo' , 'DetectorStore+ProcessingTags' )]

        # Make sure this is still available at whole-event level
        from AthenaCommon.AlgSequence import AlgSequence
        topSequence = AlgSequence()
        topSequence.SGInputLoader.Load += [( 'TagInfo' , 'DetectorStore+ProcessingTags' )]

        beamspotSequence = seqAND( "beamspotSequence_"+signature, viewAlgs+[vertexAlg] )
        inputMakerAlg.ViewNodeName = beamspotSequence.name()
        beamspotViewsSequence = seqAND( "beamspotViewsSequence"+signature, [ inputMakerAlg, beamspotSequence ])


        #hypo
        beamspotHypoAlg = TrigStreamerHypoAlgMT("BeamspotHypoAlg_"+signature)
        beamspotHypoAlg.RuntimeValidation = False #Needed to avoid the ERROR ! Decision has no 'feature' ElementLink
        beamspotHypoToolGen= StreamerHypoToolMTgenerator


        return  MenuSequence( Sequence    = beamspotViewsSequence,
                              Maker       = inputMakerAlg,
                              Hypo        = beamspotHypoAlg,
                              HypoToolGen = beamspotHypoToolGen )
Exemple #14
0
def efLateMuRoIAlgSequence(ConfigFlags):

    from TriggerMenuMT.HLTMenuConfig.Muon.MuonSetup import efLateMuRoISequence

    eflateViewsMaker = EventViewCreatorAlgorithm("IMeflatemuroi")
    #
    eflateViewsMaker.RoIsLink = "initialRoI"
    eflateViewsMaker.RoITool = ViewCreatorInitialROITool()
    #
    eflateViewsMaker.Views = "MULATEViewRoIs"
    eflateViewsMaker.InViewRoIs = "MULATERoIs"
    #
    eflateViewsMaker.ViewFallThrough = True

    #Get Late Muon RoIs
    efLateMuRoISequence, sequenceOut = efLateMuRoISequence()

    #Final sequence running in view
    eflateViewsMaker.ViewNodeName = efLateMuRoISequence.name()
    muonSequence = seqAND("lateMuonRoISequence",
                          [eflateViewsMaker, efLateMuRoISequence])

    return (muonSequence, eflateViewsMaker, sequenceOut)
Exemple #15
0
def precisionCaloSequence(ConfigFlags):
    """ Creates PrecisionCalo sequence """
    # EV creator
    InViewRoIs = "PrecisionCaloRoIs"
    precisionCaloViewsMaker = EventViewCreatorAlgorithm("IMprecisionCalo")
    precisionCaloViewsMaker.ViewFallThrough = True
    precisionCaloViewsMaker.RoIsLink = "initialRoI"
    precisionCaloViewsMaker.RoITool = ViewCreatorInitialROITool()
    precisionCaloViewsMaker.InViewRoIs = InViewRoIs
    precisionCaloViewsMaker.Views = "precisionCaloViews"
    precisionCaloViewsMaker.RequireParentView = True

    # reco sequence
    from TriggerMenuMT.HLTMenuConfig.Egamma.PrecisionCaloRec import precisionCaloRecoSequence
    (precisionCaloInViewSequence,
     sequenceOut) = precisionCaloRecoSequence(None, InViewRoIs)

    precisionCaloViewsMaker.ViewNodeName = precisionCaloInViewSequence.name()

    # connect EVC and reco
    theSequence = seqAND(
        "precisionCaloSequence",
        [precisionCaloViewsMaker, precisionCaloInViewSequence])
    return (theSequence, precisionCaloViewsMaker, sequenceOut)
Exemple #16
0
def muCombAlgSequence(ConfigFlags):
    ### set the EVCreator ###
    l2muCombViewsMaker = EventViewCreatorAlgorithm("IMl2muComb")
    newRoITool = ViewCreatorFetchFromViewROITool()
    newRoITool.RoisWriteHandleKey = recordable(
        "HLT_Roi_L2SAMuon")  #RoI collection recorded to EDM
    newRoITool.InViewRoIs = muNames.L2forIDName  #input RoIs from L2 SA views

    #
    l2muCombViewsMaker.RoIsLink = "initialRoI"  # ROI for merging is still from L1, we get exactly one L2 SA muon per L1 ROI
    l2muCombViewsMaker.RoITool = newRoITool  # Create a new ROI centred on the L2 SA muon from Step 1
    #
    l2muCombViewsMaker.Views = "MUCombViewRoIs"  #output of the views maker (key in "storegate")
    l2muCombViewsMaker.InViewRoIs = "MUIDRoIs"  # Name of the RoI collection inside of the view, holds the single ROI used to seed the View.
    #
    l2muCombViewsMaker.RequireParentView = True
    l2muCombViewsMaker.ViewFallThrough = True  #if this needs to access anything from the previous step, from within the view

    ### get ID tracking and muComb reco sequences ###
    from TriggerMenuMT.HLTMenuConfig.Muon.MuonSetup import muCombRecoSequence, muonIDFastTrackingSequence
    muCombRecoSequence, sequenceOut = muCombRecoSequence(
        l2muCombViewsMaker.InViewRoIs, "FTF")

    #Filter algorithm to run muComb only if non-Bphysics muon chains are active
    from TrigMuonEF.TrigMuonEFConf import MuonChainFilterAlg
    from TriggerMenuMT.HLTMenuConfig.Menu.MenuComponentsNaming import CFNaming
    muonChainFilter = MuonChainFilterAlg("FilterBphysChains")
    bphysChains = getBphysChainNames()
    muonChainFilter.ChainsToFilter = bphysChains
    muonChainFilter.InputDecisions = [
        CFNaming.inputMakerOutName(l2muCombViewsMaker.name())
    ]
    muonChainFilter.L2MuCombContainer = sequenceOut

    muCombFilterSequence = seqAND("l2muCombFilterSequence",
                                  [muonChainFilter, muCombRecoSequence])

    extraLoads = []
    from IOVDbSvc.CondDB import conddb
    if not conddb.folderRequested('/PIXEL/DCS/FSMSTATUS'):
        extraLoads += [('CondAttrListCollection',
                        'ConditionStore+/PIXEL/DCS/FSMSTATUS')]
    if not conddb.folderRequested('/PIXEL/DCS/FSMSTATE'):
        extraLoads += [('CondAttrListCollection',
                        'ConditionStore+/PIXEL/DCS/FSMSTATE')]

    for decision in muonChainFilter.InputDecisions:
        extraLoads += [('xAOD::TrigCompositeContainer',
                        'StoreGateSvc+' + decision)]

    muFastIDRecoSequence = muonIDFastTrackingSequence(
        l2muCombViewsMaker.InViewRoIs, "", extraLoads)
    muCombIDSequence = parOR("l2muCombIDSequence",
                             [muFastIDRecoSequence, muCombFilterSequence])

    l2muCombViewsMaker.ViewNodeName = muCombIDSequence.name()

    l2muCombSequence = seqAND("l2muCombSequence",
                              [l2muCombViewsMaker, muCombIDSequence])

    return (l2muCombSequence, l2muCombViewsMaker, sequenceOut)