当前位置: 首页>>代码示例>>Python>>正文


Python LoKi_Filters.filters方法代码示例

本文整理汇总了Python中PhysConf.Filters.LoKi_Filters.filters方法的典型用法代码示例。如果您正苦于以下问题:Python LoKi_Filters.filters方法的具体用法?Python LoKi_Filters.filters怎么用?Python LoKi_Filters.filters使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PhysConf.Filters.LoKi_Filters的用法示例。


在下文中一共展示了LoKi_Filters.filters方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: configure_common

# 需要导入模块: from PhysConf.Filters import LoKi_Filters [as 别名]
# 或者: from PhysConf.Filters.LoKi_Filters import filters [as 别名]
def configure_common(rootInTES,
                     datafiles,
                     catalogs=[],
                     castor=False):
    """
    Job configuration 
    """

    from Configurables import DaVinci  # needed for job configuration
    from Configurables import EventSelector  # needed for job configuration
    from Configurables import FileCatalog  # needed for job configuration
    from Configurables import NTupleSvc  # needed for job configuration

    from PhysConf.Filters import LoKi_Filters

    fltrs = LoKi_Filters(
        STRIP_Code="""
        HLT_PASS_RE ( 'Stripping.*CharmAndDiMuon.*Decision' ) |
        HLT_PASS_RE ( 'Stripping.*DiMuonAndCharm.*Decision' ) |
        HLT_PASS_RE ( 'Stripping.*DiCharm.*Decision'        ) | 
        HLT_PASS_RE ( 'Stripping.*DoubleDiMuon.*Decision'   ) 
        """
    )
    filters = fltrs.filters('Filters')
    # filters.reverse()

    davinci = DaVinci(
        DataType='2011',
        InputType='MDST',
        Simulation=False,
        PrintFreq=1000,
        EventPreFilters=filters,
        EvtMax=-1,
        #
        HistogramFile='2xCharm_Histos.root',
        TupleFile='2xCharm.root',
        #
        Lumi=True,
        #
    )

    from Configurables import CondDB
    CondDB(UseLatestTags=["2011"],
           ## UseOracle     = True
           )

    # from Configurables import Gaudi__IODataManager as IODataManager
    # IODataManager().AgeLimit = 2

    # ------- decoding set-up start ----------
    from Bender.MicroDST import uDstConf
    uDstConf(rootInTES)
    logger.info("Configure RootInTES:  %s " % rootInTES)
    # ------- decoding set-up end  -----------

    # come back to Bender
    setData(datafiles, catalogs, castor)

    return SUCCESS
开发者ID:bmcharek,项目名称:Bu2JpsiKKpi,代码行数:61,代码来源:Alg.py

示例2: configure

# 需要导入模块: from PhysConf.Filters import LoKi_Filters [as 别名]
# 或者: from PhysConf.Filters.LoKi_Filters import filters [as 别名]
def configure(datafiles, catalogs=[], params={}, castor=False):
    from Configurables import DaVinci
    from Configurables import EventSelector

    from PhysConf.Filters import LoKi_Filters

    fltrs = LoKi_Filters(
        VOID_Code="""
        0 < CONTAINS ('/Event/PSIX/Phys/SelPsi3KPiForPsiX/Particles')
        """
    )
    filters = fltrs.filters('Filters')

    daVinci = DaVinci(
        DataType=params['year'],
        PrintFreq=1000,
        EvtMax=-1,
        #
        TupleFile='Bu2JpsiKpipi.root',
        EventPreFilters=filters,
        #
        Lumi=True,
        #RootInTES = 'PSIX'
        #
    )

    from Configurables import Gaudi__IODataManager as IODataManager
    IODataManager().AgeLimit = 2

    # define input data
    setData(datafiles, catalogs, castor)

    #
    # Dynamic Configuration: Jump into the wonderful world of GaudiPython
    #

    # get the actual application manager (create if needed)
    gaudi = appMgr()

    # create local algorithm:
    alg = Bu2JpsiKpipi(
        'JpsiKpipi',
        # input particles :
        RootInTES='/Event/PSIX',
        Inputs=['Phys/SelPsi3KPiForPsiX/Particles']
    )
    mainSeq = gaudi.algorithm('GaudiSequencer/DaVinciUserSequence', True)
    mainSeq.Members += [alg.name()]

    # gaudi.addAlgorithm ( alg )

    return SUCCESS
开发者ID:sashabaranov,项目名称:Bu2JpsiKKpi,代码行数:54,代码来源:Bu2JpsiKpipi.py

示例3: configure_PsiP

# 需要导入模块: from PhysConf.Filters import LoKi_Filters [as 别名]
# 或者: from PhysConf.Filters.LoKi_Filters import filters [as 别名]
def configure_PsiP(datafiles, catalogs=[], castor=False):
    """
    Job configuration 
    """
    ## needed for job configuration
    from Configurables import DaVinci

    from PhysConf.Filters import LoKi_Filters

    fltrs = LoKi_Filters(
        STRIP_Code="""
        HLT_PASS_RE ( 'Stripping.*DiMuonInc.*Decision'  )        
        """,
        VOID_Code="""
        ( 0.5 < CONTAINS ( '/Event/Leptonic/Phys/MicroDSTDiMuonDiMuonIncLine/Particles' ) ) &
        ( 0.5 < CONTAINS ( '/Event/Leptonic/Rec/Vertex/Primary'                         ) )         
        """
    )
    filters = fltrs.filters('Filters')
    filters.reverse()

    davinci = DaVinci(
        DataType='2011',
        InputType='MDST',
        Simulation=False,
        PrintFreq=1000,
        EventPreFilters=filters,
        EvtMax=-1,
        #
        HistogramFile='TrgEff_Histos.root',
        TupleFile='TrgEff.root',
        #
        Lumi=True,
        #
    )

    from Configurables import CondDB
    CondDB(UseLatestTags=["2011"])

    #
    # configure microDST treatment
    #
    rootInTES = '/Event/Leptonic'

    from BenderTools.MicroDST import uDstConf
    uDstConf(rootInTES)

    #
    # come back to Bender
    #
    setData(datafiles, catalogs, castor)

    gaudi = appMgr()

    alg = TrgPsiPEff(
        RootInTES=rootInTES,
        Inputs=['Phys/MicroDSTDiMuonDiMuonIncLine/Particles']
    )
    #
    mainSeq = gaudi.algorithm('GaudiSequencer/DaVinciUserSequence', True)
    mainSeq.Members += [alg.name()]

    return SUCCESS
开发者ID:bmcharek,项目名称:Bu2JpsiKKpi,代码行数:65,代码来源:TrgEff.py

示例4: configure

# 需要导入模块: from PhysConf.Filters import LoKi_Filters [as 别名]
# 或者: from PhysConf.Filters.LoKi_Filters import filters [as 别名]

#.........这里部分代码省略.........
        ( ctau    > 50 * micrometer ) 
        """ ,
        ParticleCombiners={'': 'LoKi::VertexFitter'},
        ReFitPVs=True
    )
    #
    Bc_1p = Selection(
        'Psi1Pi',
        Algorithm=bc_pi,
        RequiredSelections=[jpsi, pions]
    )

    from PhysSelPython.Wrappers import SelectionSequence

    Bc_1PI = SelectionSequence("PSIPi", TopSelection=Bc_1p)
    Bc_3PI = SelectionSequence("PSI3Pi", TopSelection=Bc_3p)
    Bc_Ds = SelectionSequence("PSIDs", TopSelection=BDs_sel)

    # Read only fired events to speed up
    from PhysConf.Filters import LoKi_Filters
    fltrs = LoKi_Filters(
        STRIP_Code="HLT_PASS_RE('Stripping.*DiMuonJpsi2MuMuDeta.*')",
        VOID_Code="""
        0.5 < CONTAINS('%s')
        """ % jpsi_location
    )

    # =====================================================================
    from Configurables import DaVinci  # needed for job configuration

    the_year = '2011'

    davinci = DaVinci(
        EventPreFilters=fltrs.filters('FilterMC'),
        DataType=the_year,
        InputType='DST',
        Simulation=True,
        PrintFreq=1000,
        EvtMax=-1,
        #
        HistogramFile='BcMC_Histos.root',
        TupleFile='BcMC.root',
        ## HistogramFile = 'BcMC1pi_Histos.root' ,
        ## TupleFile     = 'BcMC1pi.root'        ,
        #
        # for Ds
        #DDDBtag   = 'MC2011-20120727'          ,
        #CondDBtag = 'MC2011-20120727-vc-mu100' ,
        #
        # for  pi
        # DDDBtag   =  'MC11-20111102' ,
        # CondDBtag =  'sim-20111111-vc-md100' ,
        #
        ## Lumi          = True ,
        #
    )

    from Configurables import GaudiSequencer
    seqDs = GaudiSequencer(
        'DS',
        Members=[Bc_Ds   . sequence(),
                 "MCBc2Ds"]
    )
    from Configurables import GaudiSequencer
    seq1pi = GaudiSequencer(
        'Pi1',
开发者ID:bmcharek,项目名称:Bu2JpsiKKpi,代码行数:70,代码来源:MCBc.py

示例5: configure

# 需要导入模块: from PhysConf.Filters import LoKi_Filters [as 别名]
# 或者: from PhysConf.Filters.LoKi_Filters import filters [as 别名]

#.........这里部分代码省略.........
        """
        Pions for   B -> psi X lines
        """
        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
        ## from StandardParticles                     import StdAllLoosePions as inpts
        from StandardParticles                     import StdNoPIDsPions   as inpts
        ##
        return self.make_selection (
            'Pion'                 ,
            FilterDesktop          ,
            [ inpts ]              ,
            Code = self['PionCut'] ,
        )

    jpsi_name = 'FullDSTDiMuonJpsi2MuMuDetachedLine'
    psi2_name = 'FullDSTDiMuonPsi2MuMuDetachedLine'

    from PhysSelPython.Wrappers import AutomaticData
    jpsi  = AutomaticData ( '/Event/AllStreams/Phys/%s/Particles' % jpsi_name )
    psi2s = AutomaticData ( '/Event/AllStreams/Phys/%s/Particles' % psi2_name )
    #
    ## merged selectoon for J/psi & psi'
    #
    from PhysSelPython.Wrappers import MergedSelection
    psis = MergedSelection (
        'SelDetachedPsisForBandQ' ,
        RequiredSelections = [ jpsi ]
    )

    def _psi_ ( self ) :
        """
        psi(') -> mu+ mu-
        """
        return psis


    PSIX.pions = _pions_
    PSIX.kaons = _kaons_
    PSIX.psi   = _psi_

    ## use builder
    builder = PSIX ( 'PsiX' , builder_configuration  )



    from PhysSelPython.Wrappers import SelectionSequence

    psi3k      = SelectionSequence ( 'Psi3K'       , builder.psi_3K   () )
    psi3kpi    = SelectionSequence ( 'Psi3Kpi'     , builder.psi_3Kpi () )

    from PhysConf.Filters import LoKi_Filters
    fltrs   = LoKi_Filters (
        STRIP_Code = """
            HLT_PASS_RE('Stripping.*FullDSTDiMuonJpsi2MuMuDetachedLine.*')
        """
    )

    davinci = DaVinci(
        EventPreFilters = fltrs.filters('WG'),
        InputType     = 'DST'    ,
        Simulation    = True     ,
        PrintFreq     = 1000     ,
        EvtMax        = -1       ,
        Lumi          = True     ,
        DataType = params['Year'],
        DDDBtag = params['DDDB'],
        CondDBtag = params['SIMCOND'],
        # HistogramFile = 'DVHistos.root' ,
        TupleFile     = 'output_kpipi.root' ,
    )

    from Configurables import GaudiSequencer
    # seq   = GaudiSequencer('SEQ1', Members=[psi3k.sequence()])
    seq   = GaudiSequencer('SEQ2', Members=[psi3kpi.sequence()])


    my_name = "Bplus"


    davinci.UserAlgorithms = [ my_name ]

    setData ( datafiles , catalogs , castor )

    gaudi = appMgr()

    from StandardParticles import StdAllNoPIDsPions, StdAllNoPIDsKaons

    # create local algorithm:
    alg = MCAnalysisAlgorithm(
        my_name,
        Inputs = [
            StdAllNoPIDsPions.outputLocation(),
            StdAllNoPIDsKaons.outputLocation(),
            '/Event/AllStreams/Phys/%s/Particles' % jpsi_name
        ] ,
        PP2MCs = [ 'Relations/Rec/ProtoP/Charged' ],
        ReFitPVs = True
    )

    return SUCCESS
开发者ID:sashabaranov,项目名称:Bu2JpsiKKpi,代码行数:104,代码来源:loop.py

示例6: configure

# 需要导入模块: from PhysConf.Filters import LoKi_Filters [as 别名]
# 或者: from PhysConf.Filters.LoKi_Filters import filters [as 别名]
def configure(datafiles, catalogs=[], params={}, castor=False):

    from Configurables import DaVinci
    from Configurables import EventSelector

    from PhysConf.Filters import LoKi_Filters

    fltrs = LoKi_Filters(
        VOID_Code="""
        0 < CONTAINS ('/Event/PSIX/Phys/SelPsi3KForPsiX/Particles')
        """
    )
    filters = fltrs.filters('Filters')

    the_year = '2011'

    daVinci = DaVinci(
        #
        EventPreFilters = filters ,
        #
        DataType  = params['year'] ,
        InputType = 'MDST' ,
        RootInTES = 'PSIX' ,
        #
        PrintFreq =  1000  ,
        EvtMax    =    -1  ,
        #
        TupleFile='Bu2JpsiKKK.root',
        #
        Lumi=True
        #
        )

    daVinci.UserAlgorithms = [ 'JpsiKKK' ]

    from Configurables import CondDB
    CondDB ( LatestGlobalTagByDataType = the_year )

    #
    ## define input data
    #
    setData(datafiles, catalogs, castor)

    #
    ## suppress some extra printput
    #
    from BenderTools.Utils import silence
    silence()

    #
    ## get the actual application manager (create if needed)
    #
    gaudi = appMgr()

    #
    ## create local algorithm:
    #
    alg = Bu2JpsiKKK (
        'JpsiKKK',
        # input particles :
        RootInTES='/Event/PSIX',
        Inputs=['Phys/SelPsi3KForPsiX/Particles']
        )

    return SUCCESS
开发者ID:sashabaranov,项目名称:Bu2JpsiKKpi,代码行数:67,代码来源:Bu2JpsiKKK.py

示例7: importOptions

# 需要导入模块: from PhysConf.Filters import LoKi_Filters [as 别名]
# 或者: from PhysConf.Filters.LoKi_Filters import filters [as 别名]
from Configurables import  DecayTreeTuple, MCDecayTreeTuple
importOptions("Xb2JpsiXTree.py")


tuple = DecayTreeTuple( "Lb2JpsiSTree" )
tuple.Inputs = [ SeqLb2JpsiS.outputLocation() ]



from PhysConf.Filters import LoKi_Filters
fltrs = LoKi_Filters(STRIP_Code = "(HLT_PASS_RE('StrippingFullDSTDiMuonJpsi2MuMuDetachedLineDecision'))" )

from Configurables import DaVinci
DaVinci().Simulation   = False
DaVinci().EvtMax = -1                        # Number of events
DaVinci().EventPreFilters = fltrs.filters('Filter')
DaVinci().UserAlgorithms = [ seq, tuple  ]
from Configurables import CondDB
#CondDB(UseOracle = True)
#importOptions("$APPCONFIGOPTS/DisableLFC.py")
#CondDB().IgnoreHeartBeat = True
DaVinci().DataType = "2012"
#DaVinci().DDDBtag   = "head-20110914"
#DaVinci().CondDBtag = "head-20111102"
DaVinci().TupleFile = "DVNtuples.root"
DaVinci().PrintFreq = 10000
#For luminosity
#CondDB().LocalTags["LHCBCOND"] = ['lumi-20100825']
DaVinci().Lumi = True

开发者ID:goi42,项目名称:LbJpsipPi,代码行数:31,代码来源:DataXb2JpsiS.py

示例8: configure

# 需要导入模块: from PhysConf.Filters import LoKi_Filters [as 别名]
# 或者: from PhysConf.Filters.LoKi_Filters import filters [as 别名]
def configure(datafiles,
              catalogs=[],
              castor=False,
              params={}):
    """
    Job configuration 
    """

    ## needed for job configuration
    from Configurables import DaVinci

    the_year = "2012"

    from BenderTools.Parser import hasInFile

    if params:
        the_year = params['Year']
        logger.info('Year is set from params to be %s ' % the_year)
    else:
        if hasInFile(datafiles, 'Collision11'):
            the_year = '2011'
        elif hasInFile(datafiles, 'Collision12'):
            the_year = '2012'
        elif hasInFile(datafiles, 'Collision13'):
            the_year = '2013'
        elif hasInFile(datafiles, 'Stripping17'):
            the_year = '2011'
        elif hasInFile(datafiles, 'Stripping13'):
            the_year = '2011'
        elif hasInFile(datafiles, 'Stripping15'):
            the_year = '2011'
        elif hasInFile(datafiles, 'Stripping19'):
            the_year = '2012'
        logger.info('Year is set from files  to be %s ' % the_year)

    #
    # check
    #
    if '2011' == the_year and hasInFile(datafiles, 'Collision12'):
        raise AttributeError, 'Invalid Year %s ' % the_year
    if '2012' == the_year and hasInFile(datafiles, 'Collision11'):
        raise AttributeError, 'Invalid Year %s ' % the_year

    logger.info('Use the Year = %s ' % the_year)

    rootInTES = '/Event/Charm'

    # Read only fired events to speed up
    from PhysConf.Filters import LoKi_Filters
    fltrs = LoKi_Filters(
        STRIP_Code="""
        HLT_PASS_RE( 'Stripping.*DsLamCForPromptCharm.*' ) 
        """
    )

    dv = DaVinci(
        EventPreFilters=fltrs.filters('Filters'),
        DataType=the_year,
        InputType='MDST',
        RootInTES=rootInTES,
        Simulation=False,
        PrintFreq=1000,
        EvtMax=-1,
        #
        HistogramFile='LB_Histos.root',
        TupleFile='LB.root',
        #
        Lumi=True,
        #
    )

    dv.UserAlgorithms = ['LB']

    from Configurables import CondDB
    CondDB(LatestGlobalTagByDataType=the_year)

    from BenderTools.Utils import silence
    silence()

    #
    # come back to Bender
    #
    setData(datafiles, catalogs, castor)

    #
    # start Gaudi
    #
    gaudi = appMgr()
    alg = LB(
        'LB',
        RootInTES=rootInTES,
        Inputs=['Phys/DsLamCForPromptCharm/Particles']
    )
    return SUCCESS
开发者ID:bmcharek,项目名称:Bu2JpsiKKpi,代码行数:96,代码来源:Lb.py

示例9: LoKi_Filters

# 需要导入模块: from PhysConf.Filters import LoKi_Filters [as 别名]
# 或者: from PhysConf.Filters.LoKi_Filters import filters [as 别名]
)
#
# protection agains ``corrupted'' Stripping 17b DIMUON.DST
fltrs_0 = LoKi_Filters(
    VOID_Code="""
    ( EXISTS ( '/Event/DAQ/RawEvent') | EXISTS('/Event/Trigger/RawEvent' ) ) 
    & EXISTS ( '/Event/Strip/Phys/DecReports') 
    """
)

## the_year = "2011"
the_year = "2012"

from Configurables import DaVinci
dv = DaVinci(
    EventPreFilters=fltrs_0.filters(
        'Filters0') + fltrs.filters('Filters'),
    InputType='DST',
    DataType=the_year,
    EvtMax=-1,
    Lumi=True,
    HistogramFile="DVHistos.root",
    # dbase
    ## DDDBtag       = "head-20120413"  ,
    ## CondDBtag     = "head-20120724"  ,
    #
    PrintFreq=1000
)
#
from Configurables import CondDB
CondDB(LatestGlobalTagByDataType=the_year)
开发者ID:bmcharek,项目名称:Bu2JpsiKKpi,代码行数:33,代码来源:WriteBc.py

示例10: configure

# 需要导入模块: from PhysConf.Filters import LoKi_Filters [as 别名]
# 或者: from PhysConf.Filters.LoKi_Filters import filters [as 别名]
def configure(datafiles, catalogs=[], castor=True, params={}):
    """
    Configure the job
    """

    from Configurables import DaVinci  # needed for job configuration
    from Configurables import EventSelector  # needed for job configuration
    from Configurables import NTupleSvc

    from PhysConf.Filters import LoKi_Filters

    fltrs = LoKi_Filters(
        STRIP_Code="""
        HLT_PASS_RE ( 'Stripping.*DiMuonHighMass.*Decision' )
        """,
        VOID_Code="""
        0 < CONTAINS (
            '/Event/Dimuon/Phys/FullDSTDiMuonDiMuonHighMassLine/Particles')
        """
    )

    filters = fltrs.filters('Filters')
    filters.reverse()

    the_year = params["year"]

    davinci = DaVinci(  # noqa
        DataType=the_year,
        InputType='MDST',
        HistogramFile="chib_histos.root",
        TupleFile="chib_tuples.root",
        PrintFreq=1000,
        Lumi=True,
        EvtMax=-1
    )
    from Configurables import CondDB
    CondDB(LatestGlobalTagByDataType=the_year)

    #=========================================================================
    # RootInTES = '/Event/ChiB'
    # RootInTES = '/Event/Bottomonia'
    RootInTES = '/Event/BOTTOM'
    #=========================================================================
    from BenderTools.MicroDST import uDstConf
    uDstConf(RootInTES)
    # =========================================================================
    from Configurables import Gaudi__IODataManager as IODataManager
    IODataManager().AgeLimit = 2
    # =========================================================================
    from Configurables import TrackScaleState
    state_scale = TrackScaleState('StateScale', RootInTES='/Event/BOTTOM')
    # =========================================================================
    davinci.UserAlgorithms = [
        state_scale,
        "ChibAlg",
        "UpsilonAlg"
    ]
    # =========================================================================
    # come back to Bender
    setData(datafiles, catalogs, castor)
    gaudi = appMgr()
    alg_chib = Chib(
        'ChibAlg',  # Algorithm name ,
        # input particles
        RootInTES=RootInTES,
        Inputs=[
            # 'Phys/Chi_b/Particles'
            'Phys/ChiB/Particles'
        ],
        # take care about the proper particle combiner
        ParticleCombiners={'': 'LoKi::VertexFitter'}
    )
    alg_upsilon = Upsilon(
        'UpsilonAlg',  # Algorithm name ,
        # input particles
        RootInTES=RootInTES,
        Inputs=[
            'Phys/Upsilon/Particles'
        ],
        # take care about the proper particle combiner
        ParticleCombiners={'': 'LoKi::VertexFitter'}
    )

    # =========================================================================
    # mainSeq = gaudi.algorithm('GaudiSequencer/DaVinciUserSequence', True)
    # mainSeq.Members += [state_scale, alg_chib.name(), alg_upsilon.name()]
    # =========================================================================
    return SUCCESS
开发者ID:mazurov,项目名称:chib,代码行数:90,代码来源:tuples.py

示例11: configure

# 需要导入模块: from PhysConf.Filters import LoKi_Filters [as 别名]
# 或者: from PhysConf.Filters.LoKi_Filters import filters [as 别名]
def configure(datafiles,
              catalogs=[],
              castor=False,
              params={}):
    """
    Job configuration 
    """

    ## needed for job configuration
    from Configurables import DaVinci

    from BenderTools.Parser import hasInFile

    the_year = "2011"

    if params:
        the_year = params['Year']
        logger.info('Year is set from params to be %s ' % the_year)
    else:
        if hasInFile(datafiles, 'Collision11'):
            the_year = '2011'
        elif hasInFile(datafiles, 'Collision12'):
            the_year = '2012'
        elif hasInFile(datafiles, 'Stripping17'):
            the_year = '2011'
        elif hasInFile(datafiles, 'Stripping13'):
            the_year = '2011'
        elif hasInFile(datafiles, 'Stripping15'):
            the_year = '2011'
        elif hasInFile(datafiles, 'Stripping17'):
            the_year = '2011'
        elif hasInFile(datafiles, 'Stripping19'):
            the_year = '2012'
        logger.info('Year is set from files  to be %s ' % the_year)

    #
    # check
    #
    if '2011' == the_year and hasInFile(datafiles, 'Collision12'):
        raise AttributeError, 'Invalid Year %s ' % the_year
    if '2012' == the_year and hasInFile(datafiles, 'Collision11'):
        raise AttributeError, 'Invalid Year %s ' % the_year

    logger.info('Use the Year = %s ' % the_year)

    rootInTES = '/Event/PSIX'

    # Read only fired events to speed up
    from PhysConf.Filters import LoKi_Filters
    fltrs = LoKi_Filters(
        VOID_Code="""
        ( CONTAINS('/Event/PSIX/Phys/SelPsiKForPsiX/Particles'  ) > 0.5 ) |
        ( CONTAINS('/Event/PSIX/Phys/SelPsiPiForPsiX/Particles' ) > 0.5 ) 
        """
    )

    davinci = DaVinci(
        EventPreFilters=fltrs.filters('Filters'),
        DataType=the_year,
        InputType='MDST',
        RootInTES=rootInTES,
        Simulation=False,
        PrintFreq=1000,
        EvtMax=-1,
        #
        HistogramFile='Bc_Histos.root',
        TupleFile='Bc.root',
        #
        Lumi=True,
        #
    )

    from BenderTools.Utils import silence
    silence()

    from Configurables import TrackScaleState
    state_scale = TrackScaleState('StateScale')
    davinci.UserAlgorithms = [
        state_scale,
        'B2K',
        'B2P'
    ]

    from Configurables import CondDB
    CondDB(LatestGlobalTagByDataType=the_year)

    #
    # come back to Bender
    #
    setData(datafiles, catalogs, castor)

    #
    # start Gaudi
    #
    gaudi = appMgr()

    #
    alg1 = B2PsiH(
        'B2K',  # Algorithm name ,
        RootInTES=rootInTES,
#.........这里部分代码省略.........
开发者ID:bmcharek,项目名称:Bu2JpsiKKpi,代码行数:103,代码来源:BcT.py

示例12: HLT_PASS_RE

# 需要导入模块: from PhysConf.Filters import LoKi_Filters [as 别名]
# 或者: from PhysConf.Filters.LoKi_Filters import filters [as 别名]
    STRIP_Code=" HLT_PASS_RE('Stripping.*%s.*') " % jpsi_name
)
fltrs2 = LoKi_Filters(
    VOID_Code="""
    ( RECSUMMARY (  0 , -1 ) > 0.5 ) & 
    ( RECSUMMARY ( 10 , -1 ) < 500 ) & 
    ( RECSUMMARY ( 13 , -1 ) < 500 )
    """
)

##the_year = "2011"
the_year = "2012"

from Configurables import DaVinci
dv = DaVinci(
    EventPreFilters=fltrs1.filters(
        'Filters1') + fltrs2.filters('Filters2'),
    InputType='DST',
    DataType=the_year,
    EvtMax=-1,
    Lumi=True,
    HistogramFile="DVHistos.root",
    #
    PrintFreq=50000
)
#
from Configurables import CondDB
CondDB(LatestGlobalTagByDataType=the_year)
#

dv.appendToMainSequence([udstWriter.sequence()])
开发者ID:bmcharek,项目名称:Bu2JpsiKKpi,代码行数:33,代码来源:WriteX.py

示例13: configure

# 需要导入模块: from PhysConf.Filters import LoKi_Filters [as 别名]
# 或者: from PhysConf.Filters.LoKi_Filters import filters [as 别名]
def configure(datafiles,
              catalogs=[],
              castor=False,
              params={}):
    """
    Job configuration 
    """

    ## needed for job configuration
    from Configurables import DaVinci

    from BenderTools.Parser import hasInFile

    the_year = "2011"

    if params:
        the_year = params['Year']
        logger.info('Year is set from params to be %s ' % the_year)
    else:
        if hasInFile(datafiles, 'Collision11'):
            the_year = '2011'
        elif hasInFile(datafiles, 'Collision12'):
            the_year = '2012'
        elif hasInFile(datafiles, 'Stripping17'):
            the_year = '2011'
        elif hasInFile(datafiles, 'Stripping13'):
            the_year = '2011'
        elif hasInFile(datafiles, 'Stripping15'):
            the_year = '2011'
        elif hasInFile(datafiles, 'Stripping17'):
            the_year = '2011'
        elif hasInFile(datafiles, 'Stripping19'):
            the_year = '2012'
        logger.info('Year is set from files  to be %s ' % the_year)

    #
    # check
    #
    if '2011' == the_year and hasInFile(datafiles, 'Collision12'):
        raise AttributeError, 'Invalid Year %s ' % the_year
    if '2012' == the_year and hasInFile(datafiles, 'Collision11'):
        raise AttributeError, 'Invalid Year %s ' % the_year

    logger.info('Use the Year = %s ' % the_year)

    rootInTES = '/Event/Charm'

    from PhysConf.Filters import LoKi_Filters
    fltrs = LoKi_Filters(
        STRIP_Code="""
        HLT_PASS_RE ( 'Stripping.*Xicc.*ForPromptCharm.*' ) 
        """
    )

    davinci = DaVinci(
        DataType=the_year,
        EventPreFilters=fltrs.filters('Filters'),
        InputType='MDST',
        RootInTES=rootInTES,
        Simulation=False,
        PrintFreq=1000,
        EvtMax=-1,
        #
        HistogramFile='Xic_Histos.root',
        TupleFile='Xic.root',
        #
        Lumi=True,
        #
    )

    from BenderTools.Utils import silence
    silence()

    from Configurables import TrackScaleState
    state_scale = TrackScaleState(
        'StateScale',
    )

    davinci.UserAlgorithms = [state_scale, 'Xi1', 'Xi2']

    from Configurables import CondDB
    CondDB(LatestGlobalTagByDataType=the_year)

    #
    # come back to Bender
    #
    setData(datafiles, catalogs, castor)

    #
    # start Gaudi
    #
    gaudi = appMgr()

    #
    alg1 = Xicc(
        'Xi1',  # Algorithm name ,
        RootInTES=rootInTES,
        Inputs=['Phys/Xicc+ForPromptCharm/Particles']
    )

#.........这里部分代码省略.........
开发者ID:bmcharek,项目名称:Bu2JpsiKKpi,代码行数:103,代码来源:Xicc.py

示例14: configure_Ups

# 需要导入模块: from PhysConf.Filters import LoKi_Filters [as 别名]
# 或者: from PhysConf.Filters.LoKi_Filters import filters [as 别名]
def configure_Ups(datafiles, catalogs=[], castor=False):
    """
    Job configuration 
    """
    ## needed for job configuration
    from Configurables import DaVinci

    from PhysConf.Filters import LoKi_Filters

    fltrs = LoKi_Filters(
        STRIP_Code="""
        HLT_PASS_RE ( 'Stripping.*DiMuonHighMass.*Decision'  )
        """,
        VOID_Code="""
        ( 0.5 < CONTAINS ( '/Event/Dimuon/Phys/FullDSTDiMuonDiMuonHighMassLine/Particles' ) ) & 
        ( 0.5 < CONTAINS ( '/Event/Rec/Vertex/Primary'                                    ) )         
        """
    )
    filters = fltrs.filters('Filters')
    filters.reverse()

    davinci = DaVinci(
        DataType='2011',
        InputType='DST',
        Simulation=False,
        PrintFreq=1000,
        EventPreFilters=filters,
        EvtMax=-1,
        #
        HistogramFile='TrgEff_Histos.root',
        TupleFile='TrgEff.root',
        #
        Lumi=True,
        #
    )

    from Configurables import CondDB
    CondDB(UseLatestTags=["2011"])

    #
    # come back to Bender
    #
    setData(datafiles, catalogs, castor)

    gaudi = appMgr()

    # for t in ( 'TrgEff.L0TriggerTisTos',
    #           'TrgEff.TriggerTisTos'  ) :
    #
    #    t1 = gaudi.tool ( t )
    #    t1.TOSFracMuon     =  0.01
    #    t1.PropertiesPrint = True

    alg = TrgUpsEff(
        'TrgEff',  # Algorithm name ,
        Inputs=[
            '/Event/Dimuon/Phys/FullDSTDiMuonDiMuonHighMassLine/Particles']
    )
    #
    mainSeq = gaudi.algorithm('GaudiSequencer/DaVinciUserSequence', True)
    mainSeq.Members += [alg.name()]

    return SUCCESS
开发者ID:bmcharek,项目名称:Bu2JpsiKKpi,代码行数:65,代码来源:TrgEff.py

示例15: configure

# 需要导入模块: from PhysConf.Filters import LoKi_Filters [as 别名]
# 或者: from PhysConf.Filters.LoKi_Filters import filters [as 别名]
def configure(datafiles, catalogs=[]):
    """
    Job configuration 
    """

    ## needed for job configuration
    from Configurables import DaVinci
    ## needed for job configuration
    from Configurables import EventSelector
    ## needed for job configuration
    from GaudiConf.Configuration import FileCatalog
    ## needed for job configuration
    from GaudiConf.Configuration import NTupleSvc

    from PhysConf.Filters import LoKi_Filters

    fltrs = LoKi_Filters(
        STRIP_Code="""
        HLT_PASS_RE ( 'Stripping.*DiMuonInc.*Decision'  )
        """,
        VOID_Code="""
        0.5 < CONTAINS ('/Event/Leptonic/Phys/MicroDSTDiMuonDiMuonIncLine/Particles' )
        """
    )
    filters = fltrs.filters('Filters')
    filters.reverse()

    davinci = DaVinci(
        DataType='2011',
        InputType='MDST',
        Simulation=False,
        PrintFreq=1000,
        EventPreFilters=filters,
        EvtMax=-1,
        #
        HistogramFile='MuPidEff_Histos.root',
        TupleFile='MuPidEff.root',
        #
        Lumi=True,
        #
    )

    from Configurables import CondDB
    CondDB(UseLatestTags=["2011"],
           UseOracle=True
           )

    # from Configurables import Gaudi__IODataManager as IODataManager
    # IODataManager().AgeLimit = 2

    # configure TIS-TOS
    rootInTES = '/Event/Leptonic'

    # ------- decoding set-up start ----------

    ## from MicroDSTConf.TriggerConfUtils import configureL0AndHltDecoding
    # configureL0AndHltDecoding(rootInTES)

    # ------- decoding set-up end  -----------

    # come back to Bender

    setData(datafiles, catalogs)

    gaudi = appMgr()

    alg = MuPidEff(
        'MuPidEff',  # Algorithm name ,
        RootInTES=rootInTES,
        Inputs=['Phys/MicroDSTDiMuonDiMuonIncLine/Particles']
    )
    #
    mainSeq = gaudi.algorithm('GaudiSequencer/DaVinciUserSequence', True)
    mainSeq.Members += [alg.name()]

    return SUCCESS
开发者ID:bmcharek,项目名称:Bu2JpsiKKpi,代码行数:78,代码来源:MuPidEff.py


注:本文中的PhysConf.Filters.LoKi_Filters.filters方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。