Ejemplo n.º 1
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)
Ejemplo n.º 2
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)
Ejemplo n.º 3
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)
Ejemplo n.º 4
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)
Ejemplo n.º 5
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)
Ejemplo n.º 6
0
def StreamingMenuSequence():

    inputMakerAlg = InputMakerForRoI("IM_streamerInputMaker")
    inputMakerAlg.RoITool = ViewCreatorInitialROITool()
    inputMakerAlg.RoIs = "streamerInputRoIs"
    streamingSequence = seqAND("streamerSequence", [inputMakerAlg])

    #hypo
    streamerHypoAlg = TrigStreamerHypoAlgMT("StreamerHypoAlg")
    streamerHypoAlg.RuntimeValidation = False  #Needed to avoid the ERROR ! Decision has no 'feature' ElementLink
    streamerHypoToolGen = StreamerHypoToolMTgenerator

    return MenuSequence(Sequence=streamingSequence,
                        Maker=inputMakerAlg,
                        Hypo=streamerHypoAlg,
                        HypoToolGen=streamerHypoToolGen)
Ejemplo n.º 7
0
    def getTimeBurnerStep(self):
        # Input maker - required by the framework, but inputs don't matter for TimeBurner
        inputMaker = InputMakerForRoI("IM_TimeBurner")
        inputMaker.RoITool = ViewCreatorInitialROITool()
        inputMaker.RoIs = "TimeBurnerInputRoIs"
        inputMakerSeq = seqAND("TimeBurnerSequence", [inputMaker])

        # TimeBurner alg works as a reject-all hypo
        hypoAlg = conf2toConfigurable(TimeBurnerCfg())
        hypoAlg.SleepTimeMillisec = 200

        seq = MenuSequence(Sequence=inputMakerSeq,
                           Maker=inputMaker,
                           Hypo=hypoAlg,
                           HypoToolGen=TimeBurnerHypoToolGen)

        return ChainStep(name='Step1_TimeBurner', Sequences=[seq])
Ejemplo n.º 8
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 )
Ejemplo n.º 9
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)
Ejemplo n.º 10
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)
Ejemplo n.º 11
0
    def getMinBiasSpStep(self):
        """ Use the reco-dict to construct a single MinBias step """
        def generateSPCountHypo(chainDict):
            hypo = SPCountHypoTool(chainDict["chainName"])
            if "hmt" in chainDict["chainName"]:
                hypo.totNumSctSP = int(
                    chainDict["chainParts"][0]["hypoL2Info"].strip("sp"))
            if "mb_sptrk" in chainDict["chainName"]:
                hypo.totNumPixSP = 2
                hypo.totNumSctSP = 3
            # will set here thresholds
            return hypo

        SpList = []
        from TrigT2MinBias.TrigT2MinBiasConf import TrigCountSpacePointsMT, SPCountHypoAlgMT, SPCountHypoTool

        SPInputMakerAlg = EventViewCreatorAlgorithm("IM_SPEventViewCreator")
        SPInputMakerAlg.ViewFallThrough = True
        SPInputMakerAlg.RoITool = ViewCreatorInitialROITool()
        SPInputMakerAlg.InViewRoIs = "InputRoI"
        SPInputMakerAlg.Views = "SPView"
        idAlgs, verifier = makeInDetAlgs(whichSignature='MinBias',
                                         separateTrackParticleCreator='',
                                         rois=SPInputMakerAlg.InViewRoIs,
                                         viewVerifier='SPViewDataVerifier')
        verifier.DataObjects += [('TrigRoiDescriptorCollection',
                                  'StoreGateSvc+InputRoI'),
                                 ('SCT_ID', 'DetectorStore+SCT_ID'),
                                 ('PixelID', 'DetectorStore+PixelID'),
                                 ('TagInfo', 'DetectorStore+ProcessingTags')]

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

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

        SpList = idAlgs[:-2]

        SpCount = TrigCountSpacePointsMT()
        SpCount.SpacePointsKey = recordable("HLT_SpacePointCounts")

        from TrigT2MinBias.TrigT2MinBiasMonitoringMT import SpCountMonitoring
        SpCount.MonTool = SpCountMonitoring()

        SPrecoSeq = parOR("SPrecoSeq", SpList + [SpCount])
        SPSequence = seqAND("SPSequence", [SPInputMakerAlg, SPrecoSeq])
        SPInputMakerAlg.ViewNodeName = SPrecoSeq.name()

        SpCountHypo = SPCountHypoAlgMT()
        SpCountHypo.SpacePointsKey = recordable("HLT_SpacePointCounts")

        Step1_SPCount = ChainStep("Step1_SPCount", [
            MenuSequence(Sequence=SPSequence,
                         Maker=SPInputMakerAlg,
                         Hypo=SpCountHypo,
                         HypoToolGen=generateSPCountHypo)
        ])

        return Step1_SPCount
Ejemplo n.º 12
0
    def getMinBiasTrkStep(self):
        """ Use the reco-dict to construct a single MinBias step """
        def generateTrackCountHypo(chainDict):
            hypo = TrackCountHypoTool(chainDict["chainName"])
            if "hmt" in chainDict["chainName"]:
                hypo.required_ntrks = int(
                    chainDict["chainParts"][0]["hypoEFInfo"].strip("trk"))
            if "mb_sptrk" in chainDict["chainName"]:
                hypo.min_pt = 0.2
                hypo.max_z0 = 401

            # will set here cuts
            return hypo

        from TrigMinBias.TrigMinBiasConf import TrackCountHypoAlgMT, TrackCountHypoTool

        TrkInputMakerAlg = EventViewCreatorAlgorithm("IM_TrkEventViewCreator")
        TrkInputMakerAlg.ViewFallThrough = True
        TrkInputMakerAlg.RoITool = ViewCreatorInitialROITool()
        TrkInputMakerAlg.InViewRoIs = "InputRoI"  # contract with the consumer
        TrkInputMakerAlg.Views = "TrkView"
        TrkInputMakerAlg.RequireParentView = True
        TrkInputMakerAlg.ViewNodeName = "TrkCountHypoAlgMTNode"

        # prepare algorithms to run in views, first, inform scheduler that input data is available in parent view (has to be done by hand)
        idAlgs, verifier = makeInDetAlgs(whichSignature='MinBias',
                                         separateTrackParticleCreator='',
                                         rois=TrkInputMakerAlg.InViewRoIs,
                                         viewVerifier='TrkrecoSeqDataVerifier')
        verifier.DataObjects += [
            ('TrigRoiDescriptorCollection', 'StoreGateSvc+InputRoI'),
            ('IDCInDetBSErrContainer',
             'StoreGateSvc+SCT_FlaggedCondData_TRIG'),
            ('InDet::SCT_ClusterContainer', 'StoreGateSvc+SCT_TrigClusters'),
            ('SpacePointContainer', 'StoreGateSvc+SCT_TrigSpacePoints'),
            ('InDet::PixelClusterContainer', 'StoreGateSvc+PixelTrigClusters'),
            ('SpacePointContainer', 'StoreGateSvc+PixelTrigSpacePoints')
        ]

        if globalflags.InputFormat.is_bytestream():
            verifier.DataObjects += [
                ('InDetBSErrContainer', 'StoreGateSvc+PixelByteStreamErrs'),
                ('IDCInDetBSErrContainer', 'StoreGateSvc+SCT_ByteStreamErrs')
            ]

        TrkList = idAlgs[
            -2:]  # FTF and Track to xAOD::TrackParticle conversion alg
        TrackCountHypo = TrackCountHypoAlgMT()
        TrackCountHypo.trackCountKey = recordable("HLT_TrackCount")
        TrackCountHypo.tracksKey = recordable("HLT_IDTrack_MinBias_FTF")

        from TrigMinBias.TrackCountMonitoringMT import TrackCountMonitoring
        TrackCountHypo.MonTool = TrackCountMonitoring()

        TrkrecoSeq = parOR("TrkrecoSeq", [verifier] + TrkList)
        TrkSequence = seqAND("TrkSequence", [TrkInputMakerAlg, TrkrecoSeq])
        TrkInputMakerAlg.ViewNodeName = TrkrecoSeq.name()

        Step2_TrkCount = ChainStep("Step2_TrkCount", [
            MenuSequence(Sequence=TrkSequence,
                         Maker=TrkInputMakerAlg,
                         Hypo=TrackCountHypo,
                         HypoToolGen=generateTrackCountHypo)
        ])
        return Step2_TrkCount