コード例 #1
0
def configure(datafiles, catalogs=[], castor=False):
    """
    Configure the job
    """
    from Configurables import DaVinci  ## needed for job configuration
    from Configurables import EventSelector  ## needed for job configuration

    from PhysConf.Filters import LoKi_Filters

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

    davinci = DaVinci(
        DataType='2012',
        PrintFreq=1000,
        EventPreFilters=filters,
        EvtMax=-1,
        ##
        HistogramFile='Jpsi_Histos.root',
        TupleFile='Jpsi_Tuples.root',
        ##
        Lumi=True,
        ##
    )

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

    RootInTES = 'Leptonic'

    from BenderTools.MicroDST import uDstConf
    uDstConf(RootInTES)

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

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

    gaudi = appMgr()

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

    return SUCCESS
コード例 #2
0
ファイル: Alg2.py プロジェクト: bmcharek/Bu2JpsiKKpi
def configure_EW(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

    ## the_year = '2011'
    the_year = '2012'

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

    from Configurables import CondDB
    CondDB(LatestGlobalTagByDataType=the_year)

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

    # ------- decoding set-up start ----------
    from BenderTools.MicroDST import uDstConf
    uDstConf(rootInTES)
    # ------- decoding set-up end  -----------

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

    return SUCCESS
コード例 #3
0
ファイル: CW.py プロジェクト: bmcharek/Bu2JpsiKKpi
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'
        elif hasInFile(datafiles, 'Stripping20r1'):
            the_year = '2011'
        elif hasInFile(datafiles, 'Stripping20r1p1'):
            the_year = '2011'
        elif hasInFile(datafiles, 'Stripping20r0p1'):
            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)

    typ = ''
    if hasInFile(datafiles, 'Fake'):
        typ = 'Fake'
    elif hasInFile(datafiles, 'EW'):
        typ = 'EW'
    else:
        raise AttributeError, 'Invalid Type'

    logger.info("``Type'' is set to be: %s" % typ)

    rootInTES = '/Event/Charm%s' % typ

    davinci = DaVinci(
        DataType=the_year,
        InputType='MDST',
        Simulation=False,
        PrintFreq=10000,
        EvtMax=-1,
        #
        HistogramFile='%s_Histos.root' % typ,
        TupleFile='%s.root' % typ,
        #
        Lumi=True,
        #
    )

    from Configurables import CondDB
    CondDB(LatestGlobalTagByDataType=the_year)

    #
    # remove excessive printout
    #
    from Configurables import MessageSvc
    msg = MessageSvc()
    msg.setError += ['HcalDet.Quality',
                     'EcalDet.Quality',
                     'MagneticFieldSvc',
                     'PropertyConfigSvc',
                     'ToolSvc.L0DUConfig',
                     'ToolSvc.L0CondDBProvider',
                     'L0MuonFromRaw',
                     'IntegrateBeamCrossing']

    #
    ## msg.Format = "% F%50W%S%7W%R%T %0W%M"
    #
    # take care about micro-dst
    #

    from BenderTools.MicroDST import uDstConf
    uDstConf(rootInTES)
    #
    # come back to Bender
    #
    setData(datafiles, catalogs, castor)

    #
    # start Gaudi
    #
    gaudi = appMgr()

    #
    # more silence
    #
    _a = gaudi.tool('ToolSvc.L0DUConfig')
    _a.OutputLevel = 4

    algW = CW(
        'CW',
        RootInTES=rootInTES,
        Inputs=['/Event/Phys/CharmAndW/Particles']
    )

    algZ = CZ(
        'CZ',
        RootInTES=rootInTES,
        Inputs=['/Event/Phys/CharmAndZ/Particles']
    )

    mainSeq = gaudi.algorithm('GaudiSequencer/DaVinciUserSequence', True)
    mainSeq.Members += [algW . name(),
                        algZ . name()]

    return SUCCESS
コード例 #4
0
ファイル: Alg4.py プロジェクト: bmcharek/Bu2JpsiKKpi
def configure(datafiles,
              catalogs=[],
              castor=False):
    """
    Job configuration 
    """

    from Configurables import DaVinci  # needed for job configuration

    ## the_year  = '2011'
    the_year = '2012'

    rootInTES = '/Event/Y2Mu'
    davinci = DaVinci(
        DataType=the_year,
        InputType='MDST',
        Simulation=False,
        PrintFreq=1000,
        EvtMax=-1,
        #
        HistogramFile='Ydimu_Histos.root',
        TupleFile='Ydimu.root',
        #
        Lumi=True,
        #
    )

    from Configurables import CondDB
    CondDB(LatestGlobalTagByDataType=the_year)

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

    # ------- decoding set-up start ----------
    from BenderTools.MicroDST import uDstConf
    uDstConf(rootInTES)
    # ------- decoding set-up end  -----------

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

    #
    # start Gaudi
    #
    gaudi = appMgr()

    #
    # Set properties of the TisTosTools
    #
    for t in (gaudi.tool('Ydimu.L0TriggerTisTos'),
              gaudi.tool('Ydimu.TriggerTisTos')):

        # t . UseParticle2LHCbIDsMap = 2
        t . PropertiesPrint = True

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

    return SUCCESS
コード例 #5
0
ファイル: TrgEff.py プロジェクト: bmcharek/Bu2JpsiKKpi
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
コード例 #6
0
ファイル: WGX.py プロジェクト: bmcharek/Bu2JpsiKKpi
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/B'

    davinci = DaVinci(
        DataType=the_year,
        InputType='MDST',
        Simulation=False,
        PrintFreq=1000,
        EvtMax=-1,
        #
        HistogramFile='B2X_Histos.root',
        TupleFile='B2X.root',
        #
        Lumi=True,
        #
    )

    from Configurables import CondDB
    CondDB(LatestGlobalTagByDataType=the_year)

    # ------- decoding set-up start ----------
    from BenderTools.MicroDST import uDstConf
    uDstConf(rootInTES)
    # ------- decoding set-up end  -----------

    # suppress some unnesessary prints
    from BenderTools.Utils import silence
    silence()

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

    #
    # start Gaudi
    #
    gaudi = appMgr()

    alg = B2X(
        'B2X',  # Algorithm name ,
        RootInTES=rootInTES,
        Inputs=['Phys/Bplus/Particles']
    )

    mainSeq = gaudi.algorithm('GaudiSequencer/DaVinciUserSequence', True)
    mainSeq.Members += [alg . name()]

    return SUCCESS
コード例 #7
0
ファイル: CY.py プロジェクト: bmcharek/Bu2JpsiKKpi
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/YC'

    davinci = DaVinci(
        DataType=the_year,
        InputType='DST',
        Simulation=False,
        PrintFreq=1000,
        EvtMax=-1,
        #
        HistogramFile='CY_Histos.root',
        TupleFile='CY.root',
        #
        Lumi=True,
        #
    )

    from Configurables import CondDB
    CondDB(LatestGlobalTagByDataType=the_year)

    # ------- decoding set-up start ----------
    from BenderTools.MicroDST import uDstConf
    uDstConf(rootInTES)
    # ------- decoding set-up end  -----------

    from BenderTools.Utils import silence
    silence()

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

    #
    # start Gaudi
    #
    gaudi = appMgr()

    alg1 = CY(
        'YD0', RootInTES=rootInTES, Inputs=['Phys/Y&D0/Particles'])
    alg2 = CY(
        'YD+', RootInTES=rootInTES, Inputs=['Phys/Y&D+/Particles'])
    alg3 = CY(
        'YDs', RootInTES=rootInTES, Inputs=['Phys/Y&Ds+/Particles'])
    alg4 = CY(
        'YLc', RootInTES=rootInTES, Inputs=['Phys/Y&Lc+/Particles'])
    alg5 = CY(
        'YDst', RootInTES=rootInTES, Inputs=['Phys/Y&Dstar+/Particles'])
    alg6 = CY(
        'YSc', RootInTES=rootInTES, Inputs=['Phys/Y&Sigmac/Particles'])
    alg7 = CY(
        'YLcst', RootInTES=rootInTES, Inputs=['Phys/Y&Lcstar+/Particles'])

    # single charm
    alg8 = C1(
        'D01', RootInTES=rootInTES, Inputs=['Phys/SelD02HHForPromptCharm/Particles '])
    alg9 = C1(
        'Dp1', RootInTES=rootInTES, Inputs=['Phys/SelDForPromptCharm/Particles'])
    alg10 = C1(
        'Ds1', RootInTES=rootInTES, Inputs=['Phys/SelDsForPromptCharm/Particles'])
    alg11 = C1(
        'Lc1', RootInTES=rootInTES, Inputs=['Phys/SelLambdaCForPromptCharm/Particles'])

    alg8 ._mode = "[ D0         -> K- pi+    ]CC"
    alg9 ._mode = "[ D+        --> K- pi+ pi+]CC"
    alg10._mode = "[ D_s+      --> K- K+  pi+]CC"
    alg11._mode = "[ Lambda_c+ --> p+ K-  pi+]CC"

    mainSeq = gaudi.algorithm('GaudiSequencer/DaVinciUserSequence', True)
    mainSeq.Members += [alg1  . name(),
                        alg2  . name(),
                        alg3  . name(),
                        alg4  . name(),
                        alg5  . name(),
                        # alg6  . name () ,
                        # alg7  . name () ,
                        #
                        alg8  . name(),
                        alg9  . name(),
                        alg10 . name(),
                        alg11 . name()
                        ]

    return SUCCESS
コード例 #8
0
ファイル: Jibo.py プロジェクト: mazurov/cross
def configure ( datafiles , catalogs  = [] , castor = False ) :
    """
    Configure the job
    """
    from Configurables           import DaVinci       ## needed for job configuration
    from Configurables           import EventSelector ## needed for job configuration 
    
    from PhysConf.Filters import LoKi_Filters
    
    fltrs = LoKi_Filters (
        STRIP_Code = """
        HLT_PASS_RE ( 'Stripping.*DiMuonInc.*Decision' )
        """ ,
        VOID_Code  = """
        0 < CONTAINS ('/Event/Leptonic/Phys/MicroDSTDiMuonDiMuonIncLine/Particles') 
        """
        )
    filters = fltrs.filters('Filters')
    
    davinci = DaVinci (
        DataType      = '2012' ,
        PrintFreq     = 1000   ,
        EventPreFilters = filters ,
        EvtMax        = -1     ,
        ##
        HistogramFile = 'Jpsi_Histos.root' ,
        TupleFile     = 'Jpsi_Tuples.root' ,
        ##
        Lumi          = True ,
        ##
        )

    
##     from Configurables import CondDB
##     CondDB ( UseLatestTags = ["2011"] , 
##              UseOracle     = True     )
    
    RootInTES = 'Leptonic'
    
    from BenderTools.MicroDST import uDstConf 
    uDstConf(RootInTES)
    
    from Configurables import Gaudi__IODataManager as IODataManager
    IODataManager().AgeLimit = 2 
    
    # come back to Bender 
    setData ( datafiles , catalogs , castor )
    
    gaudi = appMgr()
    
    alg = Jpsi (
        'Jpsi'                      ,   ## Algorithm name ,
        # input particles 
        Inputs    = [ 'Phys/MicroDSTDiMuonDiMuonIncLine' ] ,
        RootInTES = RootInTES 
        )
    #
    mainSeq = gaudi.algorithm ('GaudiSequencer/DaVinciUserSequence', True )
    mainSeq.Members += [ alg.name() ]
    
    return SUCCESS 
コード例 #9
0
ファイル: WG4.py プロジェクト: bmcharek/Bu2JpsiKKpi
def configure(datafiles,
              catalogs=[],
              castor=False,
              params={}):
    """
    Job configuration 
    """

    ## needed for job configuration
    from Configurables import DaVinci

    the_year = "2011"

    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/PSIX0'

    davinci = DaVinci(
        DataType=the_year,
        InputType='DST',
        Simulation=False,
        PrintFreq=1000,
        EvtMax=-1,
        #
        HistogramFile='WGv4_Histos.root',
        TupleFile='WGv4.root',
        #
        Lumi=True,
        #
    )

    from Configurables import CondDB
    CondDB(LatestGlobalTagByDataType=the_year)

    # ------- decoding set-up start ----------
    from BenderTools.MicroDST import uDstConf
    uDstConf(rootInTES)
    # ------- decoding set-up end  -----------

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

    #
    # start Gaudi
    #
    gaudi = appMgr()

    alg1 = B2Keta(
        'Keta2g',
        RootInTES=rootInTES,
        Inputs=['Phys/SelB2PsiKEta2ggForPsiX0/Particles']
    )

    alg2 = B2Keta(
        'Keta3pi',
        RootInTES=rootInTES,
        Inputs=['Phys/SelB2PsiKEta23piForPsiX0/Particles']
    )

    alg3 = B2Keta(
        'Ketap2rg',
        RootInTES=rootInTES,
        Inputs=['Phys/SelB2PsiKEtap2rhogForPsiX0/Particles']
    )

    alg4 = B2Keta(
        'Ketap2ppe',
        RootInTES=rootInTES,
        Inputs=['Phys/SelB2PsiKEtap2pipietaForPsiX0/Particles']
    )

    alg5 = B2Keta(
        'Komega',
        RootInTES=rootInTES,
        Inputs=['Phys/SelB2PsiKOmegaForPsiX0/Particles']
    )

    #
    # kaons
    #

    alg3.mode1K = '[ Beauty -> ( Meson -> mu+ mu- ) K+     eta_prime  ]CC'
    alg3.mode2K = '  Beauty -> ( Meson -> mu+ mu- ) K+ K-  eta_prime     '

    alg4.mode1K = '[ Beauty -> ( Meson -> mu+ mu- ) K+     eta_prime  ]CC'
    alg4.mode2K = '  Beauty -> ( Meson -> mu+ mu- ) K+ K-  eta_prime     '

    alg5.mode1K = '[ Beauty -> ( Meson -> mu+ mu- ) K+     omega(782) ]CC'
    alg5.mode2K = '  Beauty -> ( Meson -> mu+ mu- ) K+ K-  omega(782)    '

    alg6 = B2Keta(
        'Pieta2g',
        RootInTES=rootInTES,
        Inputs=['Phys/SelB2PsiPiEta2ggForPsiX0/Particles']
    )

    alg7 = B2Keta(
        'Pieta3pi',
        RootInTES=rootInTES,
        Inputs=['Phys/SelB2PsiPiEta23piForPsiX0/Particles']
    )

    alg8 = B2Keta(
        'Pietap2rg',
        RootInTES=rootInTES,
        Inputs=['Phys/SelB2PsiPiEtap2rhogForPsiX0/Particles']
    )

    alg9 = B2Keta(
        'Pietap2ppe',
        RootInTES=rootInTES,
        Inputs=['Phys/SelB2PsiPiEtap2pipietaForPsiX0/Particles']
    )

    alg10 = B2Keta(
        'Piomega',
        RootInTES=rootInTES,
        Inputs=['Phys/SelB2PsiPiOmegaForPsiX0/Particles']
    )

    alg6 .mode1K = '[ Beauty -> ( Meson -> mu+ mu- ) pi+     eta        ]CC'
    alg6 .mode2K = '  Beauty -> ( Meson -> mu+ mu- ) pi+ pi- eta           '

    alg7 .mode1K = '[ Beauty -> ( Meson -> mu+ mu- ) pi+     eta        ]CC'
    alg7 .mode2K = '  Beauty -> ( Meson -> mu+ mu- ) pi+ pi- eta           '

    alg8 .mode1K = '[ Beauty -> ( Meson -> mu+ mu- ) pi+     eta_prime  ]CC'
    alg8 .mode2K = '  Beauty -> ( Meson -> mu+ mu- ) pi+ pi- eta_prime     '

    alg9 .mode1K = '[ Beauty -> ( Meson -> mu+ mu- ) pi+     eta_prime  ]CC'
    alg9 .mode2K = '  Beauty -> ( Meson -> mu+ mu- ) pi+ pi- eta_prime     '

    alg10.mode1K = '[ Beauty -> ( Meson -> mu+ mu- ) pi+     omega(782) ]CC'
    alg10.mode2K = '  Beauty -> ( Meson -> mu+ mu- ) pi+ pi- omega(782)    '

    mainSeq = gaudi.algorithm('GaudiSequencer/DaVinciUserSequence', True)
    mainSeq.Members += [alg1  . name(),
                        alg2  . name(),
                        alg3  . name(),
                        alg4  . name(),
                        alg5  . name(),
                        #
                        alg5  . name(),
                        alg6  . name(),
                        alg7  . name(),
                        alg8  . name(),
                        alg9  . name(),
                        alg10 . name()]

    return SUCCESS
コード例 #10
0
ファイル: CFake.py プロジェクト: bmcharek/Bu2JpsiKKpi
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'
        elif hasInFile(datafiles, 'Stripping20r1'):
            the_year = '2011'
        elif hasInFile(datafiles, 'Stripping20r1p1'):
            the_year = '2011'
        elif hasInFile(datafiles, 'Stripping20r0p1'):
            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/CharmFake'

    davinci = DaVinci(
        DataType=the_year,
        InputType='MDST',
        Simulation=False,
        PrintFreq=10000,
        EvtMax=-1,
        #
        HistogramFile='Fake_Histos.root',
        TupleFile='Fake.root',
        #
        Lumi=True,
        #
    )

    from Configurables import CondDB
    CondDB(LatestGlobalTagByDataType=the_year)

    #
    # take care abotu micro-dst
    #

    from BenderTools.MicroDST import uDstConf
    uDstConf(rootInTES)
    #
    # come back to Bender
    #
    setData(datafiles, catalogs, castor)

    #
    # start Gaudi
    #
    gaudi = appMgr()

    algF = CFake(
        'Fake',
        RootInTES=rootInTES,
        Inputs=['/Event/Phys/CharmAndW/Particles']
    )

    mainSeq = gaudi.algorithm('GaudiSequencer/DaVinciUserSequence', True)
    mainSeq.Members += [algF . name()]

    return SUCCESS
コード例 #11
0
ファイル: WG1.py プロジェクト: bmcharek/Bu2JpsiKKpi
def configure(datafiles,
              catalogs=[],
              castor=False,
              params={}):
    """
    Job configuration 
    """

    ## needed for job configuration
    from Configurables import DaVinci

    from BenderTools.Parser import hasInFile

    the_year = "2012"

    if params:
        the_year = params['Year']
        logger.info('Year is set from params to be %s ' % the_year)
        logger.info('Year is set from files  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, 'Stripping19'):
            the_year = '2012'
        elif hasInFile(datafiles, 'Stripping20'):
            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

    rootInTES = '/Event/PSIX'

    from PhysConf.Filters import LoKi_Filters
    fltr5 = LoKi_Filters(
        VOID_Code="""
        (   0  < CONTAINS ( '/Event/PSIX/Phys/SelPsi5KPiForPsiX/Particles' ) ) 
        | ( 0  < CONTAINS ( '/Event/PSIX/Phys/SelPsi5KForPsiX/Particles'   ) ) 
        | ( 0  < CONTAINS ( '/Event/PSIX/Phys/SelPsi5PiForPsiX/Particles'  ) ) 
        """
    )
    fltr4 = LoKi_Filters(
        VOID_Code="""
        (   0  < CONTAINS ( '/Event/PSIX/Phys/SelPsi4KPiForPsiX/Particles' ) ) 
        | ( 0  < CONTAINS ( '/Event/PSIX/Phys/SelPsi4KForPsiX/Particles'   ) ) 
        | ( 0  < CONTAINS ( '/Event/PSIX/Phys/SelPsi4PiForPsiX/Particles'  ) ) 
        """
    )

    ## filters =fltr5.filters ('Filters')
    # filters.reserse()

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

    #

    from Configurables import CondDB
    CondDB(LatestGlobalTagByDataType=the_year)

    # ------- decoding set-up start ----------
    from BenderTools.MicroDST import uDstConf
    uDstConf(rootInTES)
    # ------- decoding set-up end  -----------

    from Configurables import MessageSvc
    msg = MessageSvc()
    msg.setError += [
        'HcalDet.Quality',
        'EcalDet.Quality',
        'MagneticFieldSvc',
        'PropertyConfigSvc',
        'IntegrateBeamCrossing'
    ]

    # come back to Bender
    #
    setData(datafiles, catalogs, castor, castor)
    #
    # start Gaudi
    #
    gaudi = appMgr()

    alg3 = Psi3(
        'Psi3',  # Algorithm name ,
        RootInTES=rootInTES,
        Inputs=[
            'Phys/SelPsi3KForPsiX/Particles',
            'Phys/SelPsi3KPiForPsiX/Particles',
            'Phys/SelPsi3PiForPsiX/Particles',
        ]
    )

    alg4 = Psi4(
        'Psi4',  # Algorithm name ,
        RootInTES=rootInTES,
        Inputs=[
            'Phys/SelPsi4KForPsiX/Particles',
            'Phys/SelPsi4KPiForPsiX/Particles',
            'Phys/SelPsi4PiForPsiX/Particles',
        ]
    )

    alg5 = Psi5(
        'Psi5',  # Algorithm name ,
        RootInTES=rootInTES,
        Inputs=[
            'Phys/SelPsi5KForPsiX/Particles',
            'Phys/SelPsi5KPiForPsiX/Particles',
            'Phys/SelPsi5PiForPsiX/Particles',
        ]
    )

    alg6 = Psi6(
        'Psi6',  # Algorithm name ,
        RootInTES=rootInTES,
        Inputs=[
            'Phys/SelPsi6KForPsiX/Particles',
            'Phys/SelPsi6KPiForPsiX/Particles',
            'Phys/SelPsi6PiForPsiX/Particles',
        ]
    )

    alg1 = Psi1(
        'Psi1',  # Algorithm name ,
        RootInTES=rootInTES,
        Inputs=[
            'Phys/SelPsiKForPsiX/Particles',
        ]
    )

    mainSeq = gaudi.algorithm('GaudiSequencer/DaVinciUserSequence', True)
    mainSeq.Members += [
        #alg3 . name () ,
        alg4 . name(),
        #alg5 . name () ,
        #alg6 . name () ,
        #alg1 . name ()
    ]

    return SUCCESS
コード例 #12
0
ファイル: CheckTrg.py プロジェクト: gdujany/phi2KsKs
            if options.UseOracle and os.environ.has_key('LHCBGRIDSYSROOT') :
                if os.environ.has_key('LHCBGRIDCONFIGROOT') :
                    if os.path.exists ( os.environ['LHCBGRIDSYSROOT'] )  :
                        if os.path.exists ( os.environ['LHCBGRIDCONFIGROOT'] ) :
                            #
                            ## Use Oracle if possible
                            CondDB ( UseOracle = True  )
                            logger.info('Oracle DB will be used')
                            

    if options.RootInTES: 
        # ------- decoding set-up start ----------
        #from MicroDSTConf.TriggerConfUtils import configureL0AndHltDecoding
        #from Bender.uDstTisTos import configureL0AndHltDecoding
        from BenderTools.MicroDST import uDstConf 
        uDstConf(options.RootInTES)
        logger.info('Reconfigure uDST')
        # ------- decoding set-up end  -----------
        
    
    ## get xml-catalogs (if specified) 
    catalogs = [ options.XmlCatalogue ] if options.XmlCatalogue else []

    ## import all:
    from Bender.Main import *
    
    ## set input data
    setData ( Files , catalogs , options.Castor  )

    ## instantiate the application manager
    gaudi=appMgr ()
コード例 #13
0
ファイル: tuples.py プロジェクト: mazurov/chib
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
コード例 #14
0
ファイル: WG.py プロジェクト: bmcharek/Bu2JpsiKKpi
def configure(datafiles,
              catalogs=[],
              castor=False,
              params={}):
    """
    Job configuration 
    """

    ## needed for job configuration
    from Configurables import DaVinci

    from BenderTools.Parser import hasInFile

    the_year = "2012"

    rootInTES = '/Event/PSIX'

    davinci = DaVinci(
        DataType=the_year,
        InputType='MDST',
        Simulation=False,
        PrintFreq=1000,
        EvtMax=-1,
        #
        HistogramFile='PsiX_Histos.root',
        TupleFile='PsiX.root',
        #
        Lumi=True,
        #
    )

    from Configurables import CondDB
    CondDB(LatestGlobalTagByDataType=the_year)

    # ------- decoding set-up start ----------
    from BenderTools.MicroDST import uDstConf
    uDstConf(rootInTES)
    # ------- decoding set-up end  -----------

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

    #
    # start Gaudi
    #
    gaudi = appMgr()

    alg = PsiX(
        'PsiX',  # Algorithm name ,
        RootInTES=rootInTES,
        Inputs=[
            'Phys/SelPsi%sForPsiX/Particles' % i for i in ['K',
                                                           'Pi',
                                                           #
                                                           '2K',
                                                           'KPi',
                                                           '2Pi',
                                                           #
                                                           '3K',
                                                           '3KPi',
                                                           '3Pi',
                                                           #
                                                           '4K',
                                                           '4KPi',
                                                           '4Pi',
                                                           #
                                                           '5K',
                                                           '5KPi',
                                                           '5Pi']
        ]
    )

    mainSeq = gaudi.algorithm('GaudiSequencer/DaVinciUserSequence', True)
    mainSeq.Members += [alg . name()]

    return SUCCESS