diff --git a/Lb2LcD0pi/Lb2LcD0pi.py b/Lb2LcD0pi/Lb2LcD0pi.py new file mode 100644 index 0000000000000000000000000000000000000000..1b7da5d50ebd1a4a55e7d8668b56e7e11c29c3a9 --- /dev/null +++ b/Lb2LcD0pi/Lb2LcD0pi.py @@ -0,0 +1,482 @@ +year = "2016" +backend = "forAP" +#backend = "ganga" + +if backend=="local": + nMax = 5000 +elif backend=="forAP": + nMax = -1 + + +############################################################### +######################## Lb2LcD0pi.py ######################## +############################################################### + + +from Configurables import DaVinci + + +# DaVinci().InputType = 'MDST' +DaVinci().TupleFile = "Lb2LcD0pi.root" # Ntuple +DaVinci().PrintFreq = 10000 +DaVinci().EvtMax = nMax #Number of events +#DaVinci().DataType = year +DaVinci().Simulation = False +#DaVinci().Lumi = not DaVinci().Simulation +#DaVinci().SkipEvents = 0 +DaVinci().RootInTES = '/Event/Bhadron' +# Events to skip + + + + +############################################################### +######################## Lb2LcD0pi.py ######################## +############################################################### + + + +from os import environ +from GaudiKernel.SystemOfUnits import * +from Gaudi.Configuration import * +from Configurables import GaudiSequencer, CombineParticles +from Configurables import DecayTreeTuple, EventTuple, TupleToolTrigger, TupleToolTISTOS,FilterDesktop, MCDecayTreeTuple, TupleToolPrimaries, TupleToolPi0Info, TupleToolTrackPosition, TupleToolGeometry, TupleToolTrackInfo +from Configurables import TupleToolKinematic, TupleToolStripping, FilterInTrees +from Configurables import BackgroundCategory, TupleToolDecay, TupleToolVtxIsoln,TupleToolPid,EventCountHisto,TupleToolRecoStats, TupleToolPhotonInfo, TupleToolCaloHypo +from Configurables import TupleToolProtoPData +from Configurables import TupleToolMCTruth, TupleToolMCBackgroundInfo +from Configurables import LoKi__Hybrid__TupleTool, TupleToolVeto +from Configurables import LoKi__Hybrid__EvtTupleTool,LoKi__Hybrid__DictOfFunctors, LoKi__Hybrid__Dict2Tuple, LoKi__Hybrid__DTFDict +from Configurables import TupleToolDecayTreeFitter + + +from DecayTreeTuple.Configuration import * +from Configurables import SubstitutePID +from LoKiPhys.decorators import * + +# Load Selection objects +from PhysConf.Selections import CombineSelection, FilterSelection, MomentumScaling +from PhysConf.Selections import SelectionSequence + +from PhysConf.Selections import Combine3BodySelection + +from PhysSelPython.Wrappers import AutomaticData, Selection, SelectionSequence, DataOnDemand, SimpleSelection, MergedSelection +from PhysConf.Selections import Selection +from PhysConf.Filters import LoKi_Filters + +from Configurables import DaVinci +from Configurables import GaudiSequencer + + +# Load input particles +from StandardParticles import StdVeryLooseAllPhotons as photons +from StandardParticles import StdAllLooseGammaLL +from StandardParticles import StdAllLooseGammaDD +from StandardParticles import StdLooseResolvedPi0 as pi0resolved + + +from collections import OrderedDict +from MVADictHelpers import * + + + +################## functions #################### +def TISTOSToolConfig(branch): + trigger_tool = branch.addTupleTool('TupleToolTISTOS') + trigger_tool.VerboseL0 = True + trigger_tool.VerboseHlt1 = True + trigger_tool.VerboseHlt2 = True + trigger_tool.Verbose = True + trigger_tool.TriggerList = mtl + +def TrackConfig(branch): + loki = branch.addTupleTool('LoKi::Hybrid::TupleTool/LoKi_EvtTuple_Track') + loki.Variables = { + "ETA": "ETA", + "Y_rapidity" : "Y", + "PHI" : "PHI", + "KL" : "CLONEDIST", + } + +def ResConfig(branch): + loki = branch.addTupleTool('LoKi::Hybrid::TupleTool/LoKi_EvtTuple_Res') + loki.Variables = { + "ETA": "ETA", + "Y_rapidity" : "Y", + "PHI" : "PHI", + "LOKI_FDCHI2" : "BPVVDCHI2", + "LOKI_FDS" : "BPVDLS", + "LOKI_DIRA" : "BPVDIRA", + "LOKI_TAU" : "BPVLTIME()", + "LOKI_MAXDOCA": "LoKi.Particles.PFunA(AMAXDOCA('LoKi::DistanceCalculator'))", + "LOKI_LV01" : "LV01", + "LOKI_LV02" : "LV02" + } + + +def PVDTFConfig(branch): + loki = branch.addTupleTool('LoKi::Hybrid::TupleTool/LoKi_EvtTuple_PVDTF') + loki.Variables = { + "PVDTF_CHI2NDOF": "DTF_CHI2NDOF(True)", + + "PVDTF_M": "DTF_FUN(M, True)", + "PVDTF_PX": "DTF_FUN(PX, True)", + "PVDTF_PY": "DTF_FUN(PY, True)", + "PVDTF_PZ": "DTF_FUN(PZ, True)", + "PVDTF_P": "DTF_FUN(P, True)", + "PVDTF_PT": "DTF_FUN(PT, True)", + "PVDTF_E": "DTF_FUN(E, True)", + "PVDTF_DIRA": "DTF_FUN(BPVDIRA, True)", + "PVDTF_IP": "DTF_FUN(BPVIP(), True)", + "PVDTF_IPCHI2": "DTF_FUN(BPVIPCHI2(), True)", + "PVDTF_FDCHI2": "DTF_FUN(BPVVDCHI2, True)", + "PVDTF_FDS": "DTF_FUN(BPVDLS, True)", + "PVDTF_TAU": "DTF_FUN(BPVLTIME(), True)", + + "PVDTF_C1_M": "DTF_FUN(CHILD(M,1), True)", + "PVDTF_C1_PX": "DTF_FUN(CHILD(PX,1), True)", + "PVDTF_C1_PY": "DTF_FUN(CHILD(PY,1), True)", + "PVDTF_C1_PZ": "DTF_FUN(CHILD(PZ,1), True)", + "PVDTF_C1_P": "DTF_FUN(CHILD(P,1), True)", + "PVDTF_C1_PT": "DTF_FUN(CHILD(PT,1), True)", + "PVDTF_C1_E": "DTF_FUN(CHILD(E,1), True)", + "PVDTF_C1_DIRA": "DTF_FUN(CHILD(BPVDIRA,1), True)", + "PVDTF_C1_IP": "DTF_FUN(CHILD(BPVIP(),1), True)", + "PVDTF_C1_IPCHI2": "DTF_FUN(CHILD(BPVIPCHI2(),1), True)", + "PVDTF_C1_FDCHI2": "DTF_FUN(CHILD(BPVVDCHI2,1), True)", + "PVDTF_C1_FDS": "DTF_FUN(CHILD(BPVDLS,1), True)", + "PVDTF_C1_TAU": "DTF_FUN(CHILD(BPVLTIME(),1), True)", + + "PVDTF_CTAU": "DTF_CTAU(0, True)", + "PVDTF_CTAUS": "DTF_CTAUSIGNIFICANCE(0, True)", + } + + + + + +def dau_vars(): + return {#"MIPCHI2" : "MIPCHI2DV(PRIMARY)", + #"MIP" : "MIPDV(PRIMARY)", + "KEY" : "KEY", + "log_TRACK_VeloCHI2NDOF" : "log10(switch(TINFO(LHCb.Track.FitVeloNDoF,-1)>0,TINFO(LHCb.Track.FitVeloChi2,-1)/TINFO(LHCb.Track.FitVeloNDoF,-1),-1))", + "log_TRACK_TCHI2NDOF" : "log10(switch(TINFO(LHCb.Track.FitTNDoF,-1)>0,TINFO(LHCb.Track.FitTChi2,-1)/TINFO(LHCb.Track.FitTNDoF,-1),-1))", + "log_TRACK_MatchCHI2" : "log10(TINFO(LHCb.Track.FitMatchChi2,-1.))", + "log_TRACK_GhostProb" : "log10(TRGHOSTPROB)", + "atan_RichDLLe" : "atan(PPINFO(LHCb.ProtoParticle.RichDLLe,-1000))", + "atan_RichDLLmu" : "atan(PPINFO(LHCb.ProtoParticle.RichDLLmu,-1000))", + "atan_RichDLLk" : "atan(PPINFO(LHCb.ProtoParticle.RichDLLk,-1000))", + "atan_RichDLLp" : "atan(PPINFO(LHCb.ProtoParticle.RichDLLp,-1000))", + "atan_RichDLLbt" : "atan(PPINFO(LHCb.ProtoParticle.RichDLLbt,-1000))", + "atan_MuonLLbg" : "atan(switch(PPINFO(LHCb.ProtoParticle.InAccMuon,0)==1,PPINFO(LHCb.ProtoParticle.MuonBkgLL,-10000),-1000))", + "atan_MuonLLmu" : "atan(switch(PPINFO(LHCb.ProtoParticle.InAccMuon,0)==1,PPINFO(LHCb.ProtoParticle.MuonMuLL,-10000),-1000))", + "MuonNShared" : "switch(PPINFO(LHCb.ProtoParticle.InAccMuon,0)==1,PPINFO(LHCb.ProtoParticle.MuonNShared,0),-1)", + "VeloCharge" : "PPINFO(LHCb.ProtoParticle.VeloCharge,-1000)"} + +#tracks and hits +def event_vars(): + return {"nPV" : "RECSUMMARY(LHCb.RecSummary.nPVs,-9999)", + "nLong" : "RECSUMMARY(LHCb.RecSummary.nLongTracks,-9999)", + "nDown" : "RECSUMMARY(LHCb.RecSummary.nDownstreamTracks,-9999)", + "nUp" : "RECSUMMARY(LHCb.RecSummary.nUpstreamTracks,-9999)", + "nVelo" : "RECSUMMARY(LHCb.RecSummary.nVeloTracks,-9999)", + "nTT" : "RECSUMMARY(LHCb.RecSummary.nTTracks,-9999)", + "nBack" : "RECSUMMARY(LHCb.RecSummary.nBackTracks,-9999)", + "nMuon" : "RECSUMMARY(LHCb.RecSummary.nMuonTracks,-9999)", + "nTracks" : "RECSUMMARY(LHCb.RecSummary.nTracks,-9999)", + "hRich1" : "RECSUMMARY(LHCb.RecSummary.nRich1Hits,-9999)", + "hRich2" : "RECSUMMARY(LHCb.RecSummary.nRich2Hits,-9999)", + "hVelo" : "RECSUMMARY(LHCb.RecSummary.nVeloClusters,-9999)", + "hIT" : "RECSUMMARY(LHCb.RecSummary.nITClusters,-9999)", + "hTT" : "RECSUMMARY(LHCb.RecSummary.nTTClusters,-9999)", + "hOT" : "RECSUMMARY(LHCb.RecSummary.nOTClusters,-9999)", + "hSPD" : "RECSUMMARY(LHCb.RecSummary.nSPDhits,-9999)"} + + + +def lorentz_vars(descriptor_template, ptetaphi = False): + vars = {"E":"E", "PT":"PT", "ETA":"ETA", "PHI":"PHI"} if ptetaphi else {"PE":"E", "PX":"PX", "PY":"PY", "PZ":"PZ"} + def add_variables(branches): + for k, v in branches.items() : + if ptetaphi : + vars[k+"_E"] = "CHILD(E,'{}')".format(str(v)) + vars[k+"_PT"] = "CHILD(PT,'{}')".format(str(v)) + vars[k+"_ETA"] = "CHILD(ETA,'{}')".format(str(v)) + vars[k+"_PHI"] = "CHILD(PHI,'{}')".format(str(v)) + else : + vars[k+"_PE"] = "CHILD(E,'{}')".format(str(v)) + vars[k+"_PX"] = "CHILD(PX,'{}')".format(str(v)) + vars[k+"_PY"] = "CHILD(PY,'{}')".format(str(v)) + vars[k+"_PZ"] = "CHILD(PZ,'{}')".format(str(v)) + return + if(isinstance(descriptor_template, str)): + add_variables(parse_descriptor_template(descriptor_template)) + elif(isinstance(descriptor_template, dict)): + add_variables(descriptor_template) + else : print("ERROR in std_lorentz_vars: that shouldn't happen") + return vars + + + + + +################## END functions ################# +SeqPhys = GaudiSequencer("SeqPhys") + + + +# Unit + +l0_lines = [ 'L0HadronDecision'] + +hlt1_lines = [ 'Hlt1TrackMVADecision' + , 'Hlt1TwoTrackMVADecision' + , 'Hlt1TrackMVALooseDecision' + , 'Hlt1TwoTrackMVALooseDecision' + , 'Hlt1L0AnyDecision' + , 'Hlt1GlobalDecision' ] + +hlt2_lines = [ 'Hlt2Topo2BodyDecision' + , 'Hlt2Topo3BodyDecision' + , 'Hlt2Topo4BodyDecision' + , 'Hlt2TopoE2BodyDecision' + , 'Hlt2TopoE3BodyDecision' + , 'Hlt2TopoE4BodyDecision' + , 'Hlt2TopoEE2BodyDecision' + , 'Hlt2TopoEE3BodyDecision' + , 'Hlt2TopoEE4BodyDecision' + , 'Hlt2TopoMu2BodyDecision' + , 'Hlt2TopoMu3BodyDecision' + , 'Hlt2TopoMu4BodyDecision' + , 'Hlt2TopoMuE2BodyDecision' + , 'Hlt2TopoMuE3BodyDecision' + , 'Hlt2TopoMuE4BodyDecision' + , 'Hlt2TopoMuMu2BodyDecision' + , 'Hlt2TopoMuMu3BodyDecision' + , 'Hlt2TopoMuMu4BodyDecision' + , 'Hlt2TopoMuMuDDDecision' + , 'Hlt2PhiIncPhiDecision'] + +mtl = l0_lines + hlt1_lines + hlt2_lines + +tl = ["TupleToolKinematic", "TupleToolPid", "TupleToolANNPID","TupleToolEventInfo", "TupleToolTrackInfo","TupleToolRecoStats", "TupleToolTISTOS", "TupleToolGeometry", "TupleToolPrimaries", "TupleToolPropertime", "TupleToolDira", "TupleToolAngles", "TupleToolVtxIsoln", "TupleToolTrackPosition"] + + +LcD0pi_line = 'Phys/X2LcD0PiD02KPiBeauty2CharmLine/Particles' + + +################################################################# +################################################################# +############################ Lb2LcD0pi ############################ +################################################################# +################################################################# + + +FilterLcD0pi = FilterDesktop("FilterLcD0pi") +DLcdaughter = { "D0" : OrderedDict({'K':1, 'pi':2}), "Lc" : OrderedDict({'p':1, 'K':2, 'pi':3}) } +FilterLcD0pi.Code = "((M > 5.1*GeV) & ( M < 6*GeV ) &\ + (P>32*GeV) & (4*GeV<PT) & \ + (PT<80*GeV) & (2<ETA) & (ETA<5) &\ + (DOCA(1,2)<0.2*mm) & (DOCA(1,3)<0.25*mm) & (DOCA(2,3)<0.25*mm) &\ + (CHILD(DOCA(1,2),1)<0.4*mm) & (CHILD(DOCA(1,3),1)<0.4*mm) & (CHILD(DOCA(2,3),1)<0.4*mm) & (CHILD(DOCA(1,2),2)<0.4*mm) &\ + (CHILD(PROBNNpi,3)>0.1) & (CHILD(CHILD(PROBNNk,1),2)*CHILD(CHILD(PROBNNpi,2),2)>0.01) & (BPVIPCHI2()<12) & (BPVVD>1.5*mm) &\ + (CHILD(P,1)>12*GeV) & (CHILD(P,2)>10*GeV) & (CHILD(P,3)>2.5*GeV) & (CHILD(PT,1)>1*GeV) & (CHILD(PT,2)>800*MeV) & (CHILD(PT,3)>150*MeV) &\ + (CHILD(CHILD(P,1),1)>4*GeV) & (CHILD(CHILD(P,2),1)>2.5*GeV) & (CHILD(CHILD(P,3),1)>1.5*GeV) &\ + (CHILD(CHILD(P,1),2)>2.5*GeV) & (CHILD(CHILD(P,2),2)>1.5*GeV) &\ + (CHILD(CHILD(PT,1),1)>300*MeV) & (CHILD(CHILD(PT,2),1)>150*MeV) & (CHILD(CHILD(PT,1),2)>150*MeV) )" + + +LcD0pi_sel = Selection("Sel_LcD0pi", + Algorithm = FilterLcD0pi, + RequiredSelections = [AutomaticData(Location=LcD0pi_line)] + ) + +from Configurables import CheckPV +checkpv = CheckPV() + +LcD0pi_sel = MomentumScaling (LcD0pi_sel ) + + + +############################ Bc2KKpi ############################# +tuple_LcD0pi_Tree = DecayTreeTuple("tuple_LcD0pi_Tree", + Decay = "((B0 -> ^(Lambda_c+ -> ^p+ ^K- ^pi+) ^(D0 -> ^K+ ^pi-) ^pi-) || (B0 -> ^(Lambda_c~- -> ^p~- ^K+ ^pi-) ^(D0 -> ^K- ^pi+) ^pi+))", + Branches = { + "B0" : "((B0 -> (Lambda_c+ -> p+ K- pi+) (D0 -> K+ pi-) pi-) || (B0 -> (Lambda_c~- -> p~- K+ pi-) (D0 -> K- pi+) pi+))", + "Lc" : "((B0 -> ^(Lambda_c+ -> p+ K- pi+) (D0 -> K+ pi-) pi-) || (B0 -> ^(Lambda_c~- -> p~- K+ pi-) (D0 -> K- pi+) pi+))", + "D0" : "((B0 -> (Lambda_c+ -> p+ K- pi+) ^(D0 -> K+ pi-) pi-) || (B0 -> (Lambda_c~- -> p~- K+ pi-) ^(D0 -> K- pi+) pi+))", + "pi" : "((B0 -> (Lambda_c+ -> p+ K- pi+) (D0 -> K+ pi-) ^pi-) || (B0 -> (Lambda_c~- -> p~- K+ pi-) (D0 -> K- pi+) ^pi+))", + "Lc_p" : "((B0 -> (Lambda_c+ -> ^p+ K- pi+) (D0 -> K+ pi-) pi-) || (B0 -> (Lambda_c~- -> ^p~- K+ pi-) (D0 -> K- pi+) pi+))", + "Lc_K" : "((B0 -> (Lambda_c+ -> p+ ^K- pi+) (D0 -> K+ pi-) pi-) || (B0 -> (Lambda_c~- -> p~- ^K+ pi-) (D0 -> K- pi+) pi+))", + "Lc_pi" : "((B0 -> (Lambda_c+ -> p+ K- ^pi+) (D0 -> K+ pi-) pi-) || (B0 -> (Lambda_c~- -> p~- K+ ^pi-) (D0 -> K- pi+) pi+))", + "D0_K" : "((B0 -> (Lambda_c+ -> p+ K- pi+) (D0 -> ^K+ pi-) pi-) || (B0 -> (Lambda_c~- -> p~- K+ pi-) (D0 -> ^K- pi+) pi+))", + "D0_pi" : "((B0 -> (Lambda_c+ -> p+ K- pi+) (D0 -> K+ ^pi-) pi-) || (B0 -> (Lambda_c~- -> p~- K+ pi-) (D0 -> K- ^pi+) pi+))", + } + ) + + + +tuple_LcD0pi_sel = Selection("tuple_LcD0pi", + Algorithm = tuple_LcD0pi_Tree, + RequiredSelections = [ LcD0pi_sel]) +tuple_LcD0pi = tuple_LcD0pi_sel.algorithm() + + +tuple_LcD0pi.ReFitPVs = True +tuple_LcD0pi.ToolList += tl + + + +for particle in ["B0","Lc", "D0", "pi", "Lc_p", "Lc_K", "Lc_pi", "D0_K", "D0_pi"]: + tuple_LcD0pi.addTool(TupleToolDecay, name = particle) +###Track +TupleToolTrackPosition = TupleToolTrackPosition('TupleToolTrackPosition') +#TupleToolTrackPosition.Z = 7500.#PositionZ? + +###reconstruction +TupleToolRecoStats = TupleToolRecoStats('TupleToolRecoStats') +TupleToolRecoStats.Verbose = True +###Geometry +TupleToolGeometry = TupleToolGeometry('TupleToolGeometry') +TupleToolGeometry.RefitPVs = True +TupleToolGeometry.Verbose = True +###TrackInfo +TupleToolTrackInfo = TupleToolTrackInfo('TupleToolTrackInfo') +TupleToolTrackInfo.Verbose = True +###Trigger +TupleToolTrigger = TupleToolTrigger('TupleToolTrigger') +TupleToolTrigger.Verbose = True +TupleToolTrigger.VerboseL0 = True +TupleToolTrigger.VerboseHlt1 = True +TupleToolTrigger.VerboseHlt2 = False +TupleToolTrigger.FillHlt2 = False +TupleToolTrigger.TriggerList = tl +TupleToolTrigger.OutputLevel = 6 + +tuple_LcD0pi.addTool(TupleToolTrackPosition) +tuple_LcD0pi.addTool(TupleToolRecoStats) +tuple_LcD0pi.addTool(TupleToolGeometry) +tuple_LcD0pi.addTool(TupleToolTrackInfo) +tuple_LcD0pi.addTool(TupleToolTrigger) + + + +################Fit############### + +tuple_LcD0pi.B0.ToolList += ["TupleToolDecayTreeFitter/PVFit0"] +tuple_LcD0pi.B0.addTool(TupleToolDecayTreeFitter("PVFit0")) +tuple_LcD0pi.B0.PVFit0.Verbose = True +tuple_LcD0pi.B0.PVFit0.UpdateDaughters = True + + +tuple_LcD0pi.B0.ToolList += ["TupleToolDecayTreeFitter/PVFit"] +tuple_LcD0pi.B0.addTool(TupleToolDecayTreeFitter("PVFit")) +tuple_LcD0pi.B0.PVFit.Verbose = True +tuple_LcD0pi.B0.PVFit.constrainToOriginVertex = True +tuple_LcD0pi.B0.PVFit.UpdateDaughters = True +tuple_LcD0pi.B0.PVFit.daughtersToConstrain = ["Lambda_c+", "D0"] + +tuple_LcD0pi.B0.ToolList += ["TupleToolDecayTreeFitter/PVFitB0"] +tuple_LcD0pi.B0.addTool(TupleToolDecayTreeFitter("PVFitB0")) +tuple_LcD0pi.B0.PVFitB0.Verbose = True +tuple_LcD0pi.B0.PVFitB0.constrainToOriginVertex = True +tuple_LcD0pi.B0.PVFitB0.UpdateDaughters = True +tuple_LcD0pi.B0.PVFitB0.daughtersToConstrain = ["Lambda_c+", "D0", "B0"] + +LcMassFit_Lb = tuple_LcD0pi.B0.addTupleTool('TupleToolDecayTreeFitter/LcMassFit') +LcMassFit_Lb.UpdateDaughters = True +LcMassFit_Lb.Verbose = True +LcMassFit_Lb.constrainToOriginVertex = False +LcMassFit_Lb.daughtersToConstrain = [ "Lambda_c+" ] + +LcFullFit_Lb = tuple_LcD0pi.B0.addTupleTool('TupleToolDecayTreeFitter/LcFullFit') +LcFullFit_Lb.UpdateDaughters = True +LcFullFit_Lb.Verbose = True +LcFullFit_Lb.constrainToOriginVertex = True +LcFullFit_Lb.daughtersToConstrain = [ "Lambda_c+" ] + + + + + + + + + +TISTOSToolConfig(tuple_LcD0pi.B0) +TISTOSToolConfig(tuple_LcD0pi.Lc) +TISTOSToolConfig(tuple_LcD0pi.D0) +ResConfig(tuple_LcD0pi.B0) +ResConfig(tuple_LcD0pi.Lc) +ResConfig(tuple_LcD0pi.D0) + +# tuple_LcD0pi.pi.addTupleTool("LoKi::Hybrid::TupleTool/KLoKiTool").Variables = dau_vars() +# tuple_LcD0pi.Lc_p.addTupleTool("LoKi::Hybrid::TupleTool/KLoKiTool").Variables = dau_vars() +# tuple_LcD0pi.Lc_K.addTupleTool("LoKi::Hybrid::TupleTool/KLoKiTool").Variables = dau_vars() +# tuple_LcD0pi.D0_K.addTupleTool("LoKi::Hybrid::TupleTool/KLoKiTool").Variables = dau_vars() +# tuple_LcD0pi.D0_pi.addTupleTool("LoKi::Hybrid::TupleTool/KLoKiTool").Variables = dau_vars() +TrackConfig(tuple_LcD0pi.pi) +TrackConfig(tuple_LcD0pi.Lc_p) +TrackConfig(tuple_LcD0pi.Lc_K) +TrackConfig(tuple_LcD0pi.Lc_pi) +TrackConfig(tuple_LcD0pi.D0_K) +TrackConfig(tuple_LcD0pi.D0_pi) +PVDTFConfig(tuple_LcD0pi.B0) + + + + +loki_chic_B0 = tuple_LcD0pi.B0.addTupleTool('LoKi::Hybrid::TupleTool/LoKi_EvtTuple_chic') +loki_chic_B0.Variables = { + "chic_M12": "M12", + #"K_IPCHI2": "CHILD(BPVIPCHI2(), 1)", + #"K2_IPCHI2": "CHILD(MIPCHI2DV(), 1)",###not working + } + +loki_chic_Lc = tuple_LcD0pi.Lc.addTupleTool('LoKi::Hybrid::TupleTool/LoKi_EvtTuple_chic') +loki_chic_Lc.Variables = { + "chic_M": "M12", + #"K_IPCHI2": "CHILD(BPVIPCHI2(), 1)", + #"K2_IPCHI2": "CHILD(MIPCHI2DV(), 1)",###not working + } + +loki_chic_D0 = tuple_LcD0pi.D0.addTupleTool('LoKi::Hybrid::TupleTool/LoKi_EvtTuple_chic') +loki_chic_D0.Variables = { + "chic_M": "M12", + #"K_IPCHI2": "CHILD(BPVIPCHI2(), 1)", + #"K2_IPCHI2": "CHILD(MIPCHI2DV(), 1)",###not working + } +seq_LcD0pi = SelectionSequence ( tuple_LcD0pi_sel.name()+'_SEQ' , tuple_LcD0pi_sel ) + + +#from Configurables import CheckPV +#check1PV = CheckPV('Check1PV', MinPVs=1) +#DaVinci().EventPreFilters=[check1PV] + + +#DaVinci().RootInTES = '/Event/Dimuon/' +DaVinci().UserAlgorithms = [seq_LcD0pi.sequence()] + + +# from Configurables import CondDB +# CondDB(LatestGlobalTagByDataType = year ) +# #CondDB().LocalTags["LHCBCOND"] = ["calo-20170505"] +# # +# #from Configurables import PhysConf +# #PhysConf().CaloReProcessing=True + +# if year=="2016": +# inputpath = 'PFN:root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/LHCb/Collision16/BHADRON.MDST/00103400/0000/00103400_00001121_1.bhadron.mdst' +# #inputpath = 'PFN:root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/LHCb/Collision16/BHADRON.MDST/00103400/0001/00103400_00011422_1.bhadron.mdst' +# elif year=='2011': +# inputpath = '' +# elif year=='2012': +# inputpath = '' +# elif year=='2017': +# inputpath = 'PFN:root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/LHCb/Collision17/BHADRONCOMPLETEEVENT.DST/00071907/0001/00071907_00011001_1.bhadroncompleteevent.dst' +# elif year=='2018': +# inputpath = '' + + +# if backend=="local": +# DaVinci().Input = [inputpath] diff --git a/Lb2LcD0pi/info.yaml b/Lb2LcD0pi/info.yaml new file mode 100644 index 0000000000000000000000000000000000000000..d7e38ab735dc49e8f96f940fa78b7349dafc1fc1 --- /dev/null +++ b/Lb2LcD0pi/info.yaml @@ -0,0 +1,21 @@ +defaults: + application: DaVinci/v46r11 + wg: BandQ + automatically_configure: yes + turbo: no + inform: + - chencheng.feng@cern.ch + options: + - Lb2LcD0pi.py + output: Lb2LcD0pi.root + + +Lb2LcD0pi_2016_MagUp_jobs: + input: + bk_query: "/LHCb/Collision16/Beam6500GeV-VeloClosed-MagUp/Real Data/Reco16/Stripping28r2/90000000/BHADRON.MDST" + + + +Lb2LcD0pi_2016_MagDown_jobs: + input: + bk_query: "/LHCb/Collision16/Beam6500GeV-VeloClosed-MagDown/Real Data/Reco16/Stripping28r2/90000000/BHADRON.MDST"