Example #1
0
def Dstar ( name,
            D0Sel,
            config,
            Monitor) :
    """
    Selection for D*
    """
    
    _DSt = CombineParticles("StripDSt")
    _DSt.DecayDescriptor = "[D*(2010)+ -> D0 pi+]cc"
    slowPiCuts = "(PT>%(SlowPiPt)s) & (TRCHI2DOF < %(SlowPiTrkChi2)s)" %locals()['config']
    d0Cuts = "ALL"
    _DSt.DaughtersCuts   = { 'pi+' : slowPiCuts, 'D0' : d0Cuts }
    combcut = """
    (APT>%(DstarPt)s)
    & (ADAMASS('D*(2010)+')<75)
    & (AM - AM1 < 165 * MeV) 
    """
    _DSt.CombinationCut = combcut %locals()['config']
    mothercut = """
    (VFASPF(VCHI2PDOF)<%(DstarVtxChi2Ndof)s)
    & (M-MAXTREE('D0'==ABSID,M)<%(DeltaM_Max)s)
    & (M-MAXTREE('D0'==ABSID,M)>%(DeltaM_Min)s)
    """
    _DSt.MotherCut =  mothercut %locals()['config']
    
    if Monitor != None :    
        _DSt.Preambulo    += [
            ## define historam type (shortcut)
            "Histo  = Gaudi.Histo1DDef"  ,
            ## monitor LL-case
            "mass     = monitor ( M / GeV ,    Histo ( 'DSt' , 1.93 , 2.09 , 100 ) , 'M'     ) " ,
            "deltaM   = monitor ( M - M1 /MeV, Histo ( 'DSt' , 135  , 160  , 50  ) , 'DeltaM') " ,
            "pT       = monitor ( PT / GeV ,   Histo ( 'DSt' , 0.00 , 20.0 , 100 ) , 'pT'    ) " ,
            "y        = monitor ( Y ,          Histo ( 'DSt' , 1.60 , 5.40 , 100 ) , 'y'     ) "
            ]
        _DSt.Monitor       = True
        _DSt.HistoProduce  = True
        _DSt.MotherMonitor = """ process ( mass )
        >> process ( deltaM )
        >> process ( pT )
        >> process ( y )
        >> EMPTY
        """
        
    DSt = Selection("SelDSt2D0Pi",
                    Algorithm = _DSt,
                    RequiredSelections = [StdNoPIDsPions,
                                          D0Sel])
    
    return DSt
Example #2
0
def D0 ( name,
         config,
         Monitor
         ) :
    """
    Selection for D0
    """
    
    _D0 = CombineParticles("StripD0")
    _D0.DecayDescriptor = "[D0 -> K- pi+]cc"
    dauCutStr = "(PT > %(DaugPt)s) & (P > %(DaugP)s) & (TRCHI2DOF < %(DaugTrkChi2)s) & (MIPCHI2DV(PRIMARY) > %(DaugIPChi2)s)" %locals()['config']
    _D0.DaughtersCuts = { "K+" : dauCutStr,
                          "pi+" : dauCutStr
                          }
    _D0.CombinationCut = "(ADAMASS('D0')<85 * MeV)" %locals()['config']
    mothercut = """
    (PT>%(D0Pt)s)
    & (VFASPF(VCHI2PDOF)<%(D0VtxChi2Ndof)s)
    & (BPVVDCHI2>%(D0FDChi2)s)
    & (BPVDIRA>%(D0BPVDira)s)
    & (BPVIPCHI2()<%(D0IPChi2)s)
    & (ADMASS('D0') < %(D0MassWin)s )
    & ( ADWM( 'D0' , WM( 'pi-' , 'K+') ) > %(DCS_WrongMass)s)
    & ( ADWM( 'D0' , WM( 'K-' , 'K+') ) > %(KK_WrongMass)s)
    & ( ADWM( 'D0' , WM( 'pi-' , 'pi+') ) > %(PiPi_WrongMass)s)
    """
    _D0.MotherCut = mothercut %locals()['config']
    
    if Monitor != None :    
        _D0.Preambulo    += [
            ## define historam type (shortcut)
            "Histo  = Gaudi.Histo1DDef"  ,
            ## monitor LL-case
            "mass     = monitor ( M / GeV , Histo ( 'D0' , 1.79 , 1.94 , 100 ) , 'M'     ) " ,
            "pT       = monitor ( PT / GeV , Histo ( 'D0' , 0.00 , 20.0 , 100 ) , 'pT'   ) " ,
            "y        = monitor ( Y , Histo ( 'D0' , 1.60 , 5.40 , 100 ) , 'y'           ) "
            ]
        _D0.Monitor       = True
        _D0.HistoProduce  = True
        _D0.MotherMonitor = """ process ( mass )
        >> process ( pT )
        >> process ( y )
        >> EMPTY
            """
            
    D0 = Selection("SelD02RSKPi",
                   Algorithm = _D0,
                   RequiredSelections = [StdNoPIDsKaons,
                                         StdNoPIDsPions])
    return D0
Example #3
0
phi2kk = CombineParticles("Phi2KK")
phi2kk.addTool(PhysDesktop())
phi2kk.PhysDesktop.InputLocations = ["Phys/StdLooseKaons"]
phi2kk.DecayDescriptor = "phi(1020) -> K+ K-"
phi2kk.CombinationCut = "ADAMASS('phi(1020)')<50"
phi2kk.MotherCut = "(VFASPF(VCHI2/VDOF)<100)"
GaudiSequencer("TutorialSeq").Members.append(phi2kk)

bs2jpsiphi = CombineParticles("Bs2JpsiPhi")
bs2jpsiphi.addTool(PhysDesktop())
bs2jpsiphi.PhysDesktop.InputLocations = ["Phys/Jpsi2MuMu", "Phys/Phi2KK"]
bs2jpsiphi.DecayDescriptor = "B_s0 -> phi(1020) J/psi(1S)"
bs2jpsiphi.CombinationCut = "ADAMASS('B_s0')<2*GeV"
bs2jpsiphi.MotherCut = "(VFASPF(VCHI2/VDOF)<10) & (BPVIPCHI2()<100)"

bs2jpsiphi.HistoProduce = True
bs2jpsiphi.addTool(PlotTool("DaughtersPlots"))
bs2jpsiphi.DaughtersPlots.Histos = {"P/1000": ('momentum', 0, 100),
                                    "PT/1000": ('pt_%1%', 0, 5, 500),
                                    "M": ('mass in MeV_%1%_%2%_%3%',
                                          0.8 * Units.GeV, 4 * Units.GeV)}
bs2jpsiphi.addTool(PlotTool("MotherPlots"))
bs2jpsiphi.MotherPlots.Histos = {"P/1000": ('momentum', 0, 100),
                                 "PT/1000": ('pt_%1%', 0, 5, 500),
                                 "M": ('mass in MeV_%1%_%2%_%3%',
                                       4 * Units.GeV, 6 * Units.GeV)}

GaudiSequencer("TutorialSeq").Members.append(bs2jpsiphi)
GaudiSequencer("TutorialSeq").IgnoreFilterPassed = False
HistogramPersistencySvc().OutputFile = "DVHistos.root"
ApplicationMgr().EvtMax = 1000
Example #4
0
# Phi -> KK Selection
Phi2KK = Selection("SelPhi2KK",
                   Algorithm=_phi2kk,
                   RequiredSelections=[StdLooseKaons])

# Bs configurable
_bs2jpsiphi = CombineParticles(
    "Bs2JpsiPhi",
    DecayDescriptor="B_s0 -> phi(1020) J/psi(1S)",
    CombinationCut="ADAMASS('B_s0')<2*GeV",
    MotherCut="(VFASPF(VCHI2/VDOF)<10) & (BPVIPCHI2()<100)")

# Now let's add some plots
from Configurables import LoKi__Hybrid__PlotTool as PlotTool

_bs2jpsiphi.HistoProduce = True
_bs2jpsiphi.addTool(PlotTool("DaughtersPlots"))
# Note that it's using the same functors as above. Hence the same syntax.
_bs2jpsiphi.DaughtersPlots.Histos = {
    "P/1000": ('momentum', 0, 100),
    "PT/1000": ('pt_%1%', 0, 5, 500),
    "M": ('mass in MeV_%1%_%2%_%3%', 0.8 * Units.GeV, 4 * Units.GeV)
}
_bs2jpsiphi.addTool(PlotTool("MotherPlots"))
_bs2jpsiphi.MotherPlots.Histos = {
    "P/1000": ('momentum', 0, 100),
    "PT/1000": ('pt_%1%', 0, 5, 500),
    "M": ('mass in MeV_%1%_%2%_%3%', 4 * Units.GeV, 6 * Units.GeV)
}

# Bs -> J/Psi Phi Selection