diff --git a/buc2dpdz_2024/README.md b/buc2dpdz_2024/README.md new file mode 100644 index 0000000000000000000000000000000000000000..926ac7271484876d3bee2d8bd05e4ec26fd97661 --- /dev/null +++ b/buc2dpdz_2024/README.md @@ -0,0 +1,33 @@ +Analysis Production for the Run 3 2024 data B(c)+ -> D0b (Ds/D+/D*+) decays + +# B2OC Run3 2024 Analysis Production + +## Hlt2 stripping lines: +Hlt2B2OC_BcToD0Dsp_D0ToHH_DspToHHH +Hlt2B2OC_BuToD0Dsp_D0ToHH_DspToHHH +Hlt2B2OC_BcToD0Dsp_D0ToHHHH_DspToHHH +Hlt2B2OC_BuToD0Dsp_D0ToHHHH_DspToHHH +Hlt2B2OC_BcToD0Dsp_D0ToKsLLHH_DspToHHH +Hlt2B2OC_BcToD0Dsp_D0ToKsDDHH_DspToHHH +Hlt2B2OC_BcToD0Dp_D0ToHH_DpToHHH +Hlt2B2OC_BuToD0Dp_D0ToHH_DpToHHH +Hlt2B2OC_BcToD0Dp_D0ToHHHH_DpToHHH +Hlt2B2OC_BuToD0Dp_D0ToHHHH_DpToHHH +Hlt2B2OC_BcToD0Dp_D0ToKsLLHH_DpToHHH +Hlt2B2OC_BcToD0Dp_D0ToKsDDHH_DpToHHH +Hlt2B2OC_BcToDstD0_DstToD0Pi_D0ToHH_D0ToHH +Hlt2B2OC_BuToDstD0_DstToD0Pi_D0ToHH_D0ToHH +Hlt2B2OC_BcToDstD0_DstToD0Pi_D0ToHH_D0ToHHHH +Hlt2B2OC_BuToDstD0_DstToD0Pi_D0ToHH_D0ToHHHH +Hlt2B2OC_BcToDstD0_DstToD0Pi_D0ToHH_D0ToKsLLHH +Hlt2B2OC_BcToDstD0_DstToD0Pi_D0ToHH_D0ToKsDDHH +Hlt2B2OC_BcToDstD0_DstToD0Pi_D0ToHHHH_D0ToHH +Hlt2B2OC_BuToDstD0_DstToD0Pi_D0ToHHHH_D0ToHH +Hlt2B2OC_BcToDstD0_DstToD0Pi_D0ToHHHH_D0ToHHHH +Hlt2B2OC_BuToDstD0_DstToD0Pi_D0ToHHHH_D0ToHHHH +Hlt2B2OC_BcToDstD0_DstToD0Pi_D0ToHHHH_D0ToKsLLHH +Hlt2B2OC_BcToDstD0_DstToD0Pi_D0ToHHHH_D0ToKsDDHH + + +## decay of interest: +Bc, Bu -> D(s)(*) D~0 \ No newline at end of file diff --git a/buc2dpdz_2024/b2ddtup.py b/buc2dpdz_2024/b2ddtup.py new file mode 100644 index 0000000000000000000000000000000000000000..63ef0b98f59730c1605bd92d8e4589bc37f58530 --- /dev/null +++ b/buc2dpdz_2024/b2ddtup.py @@ -0,0 +1,398 @@ +from DaVinci import Options, make_config +from DaVinci.algorithms import create_lines_filter +from PyConf.reading import get_particles,get_pvs, get_rec_summary +from FunTuple import FunctorCollection +from FunTuple import functorcollections as FC +from FunTuple import FunTuple_Particles as Funtuple +import Functors as F +import Functors.math as fmath +from DecayTreeFitter import DecayTreeFitter + + +fields = { + 'Hlt2B2OC_BcToD0Dsp_D0ToHH_DspToHHH': { + 'B': '[B_c- -> D_s- [D0]CC ]CC', + 'Ds': '[B_c- -> ^D_s- [D0]CC ]CC', + 'Dz': '[B_c- -> D_s- ^[D0]CC ]CC', + }, + 'Hlt2B2OC_BuToD0Dsp_D0ToHH_DspToHHH': { + 'B': '[B- -> D_s- [D0]CC ]CC', + 'Ds': '[B- -> ^D_s- [D0]CC ]CC', + 'Dz': '[B- -> D_s- ^[D0]CC ]CC', + }, + 'Hlt2B2OC_BcToD0Dsp_D0ToHHHH_DspToHHH': { + 'B': '[B_c- -> D_s- [D0]CC ]CC', + 'Ds': '[B_c- -> ^D_s- [D0]CC ]CC', + 'Dz': '[B_c- -> D_s- ^[D0]CC ]CC', + }, + 'Hlt2B2OC_BuToD0Dsp_D0ToHHHH_DspToHHH': { + 'B': '[B- -> D_s- [D0]CC ]CC', + 'Ds': '[B- -> ^D_s- [D0]CC ]CC', + 'Dz': '[B- -> D_s- ^[D0]CC ]CC', + }, + 'Hlt2B2OC_BcToD0Dsp_D0ToKsLLHH_DspToHHH': { + 'B': '[B_c- -> D_s- [D0]CC ]CC', + 'Ds': '[B_c- -> ^D_s- [D0]CC ]CC', + 'Dz': '[B_c- -> D_s- ^[D0]CC ]CC', + }, + 'Hlt2B2OC_BcToD0Dsp_D0ToKsDDHH_DspToHHH': { + 'B': '[B_c- -> D_s- [D0]CC ]CC', + 'Ds': '[B_c- -> ^D_s- [D0]CC ]CC', + 'Dz': '[B_c- -> D_s- ^[D0]CC ]CC', + }, + 'Hlt2B2OC_BcToD0Dp_D0ToHH_DpToHHH': { + 'B': '[B_c- -> D- [D0]CC ]CC', + 'Dp': '[B_c- -> ^D- [D0]CC ]CC', + 'Dz': '[B_c- -> D- ^[D0]CC ]CC', + }, + 'Hlt2B2OC_BuToD0Dp_D0ToHH_DpToHHH': { + 'B': '[B- -> D- [D0]CC ]CC', + 'Dp': '[B- -> ^D- [D0]CC ]CC', + 'Dz': '[B- -> D- ^[D0]CC ]CC', + }, + 'Hlt2B2OC_BcToD0Dp_D0ToHHHH_DpToHHH': { + 'B': '[B_c- -> D- [D0]CC ]CC', + 'Dp': '[B_c- -> ^D- [D0]CC ]CC', + 'Dz': '[B_c- -> D- ^[D0]CC ]CC', + }, + 'Hlt2B2OC_BuToD0Dp_D0ToHHHH_DpToHHH': { + 'B': '[B- -> D- [D0]CC ]CC', + 'Dp': '[B- -> ^D- [D0]CC ]CC', + 'Dz': '[B- -> D- ^[D0]CC ]CC', + }, + 'Hlt2B2OC_BcToD0Dp_D0ToKsLLHH_DpToHHH': { + 'B': '[B_c- -> D- [D0]CC ]CC', + 'Dp': '[B_c- -> ^D- [D0]CC ]CC', + 'Dz': '[B_c- -> D- ^[D0]CC ]CC', + }, + 'Hlt2B2OC_BcToD0Dp_D0ToKsDDHH_DpToHHH': { + 'B': '[B_c- -> D- [D0]CC ]CC', + 'Dp': '[B_c- -> ^D- [D0]CC ]CC', + 'Dz': '[B_c- -> D- ^[D0]CC ]CC', + }, + 'Hlt2B2OC_BcToDstD0_DstToD0Pi_D0ToHH_D0ToHH': { + 'B': '[B_c- -> (D*(2010)- -> [D0]CC pi- ) [D0]CC ]CC', + 'Dst': '[B_c- -> ^(D*(2010)- -> [D0]CC pi- ) [D0]CC ]CC', + 'Dzs': '[B_c- -> (D*(2010)- -> ^[D0]CC pi- ) [D0]CC ]CC', + 'ps': '[B_c- -> (D*(2010)- -> [D0]CC ^pi- ) [D0]CC ]CC', + 'Dz': '[B_c- -> (D*(2010)- -> [D0]CC pi- ) ^[D0]CC ]CC', + }, + 'Hlt2B2OC_BuToDstD0_DstToD0Pi_D0ToHH_D0ToHH': { + 'B': '[B- -> (D*(2010)- -> [D0]CC pi- ) [D0]CC ]CC', + 'Dst': '[B- -> ^(D*(2010)- -> [D0]CC pi- ) [D0]CC ]CC', + 'Dzs': '[B- -> (D*(2010)- -> ^[D0]CC pi- ) [D0]CC ]CC', + 'ps': '[B- -> (D*(2010)- -> [D0]CC ^pi- ) [D0]CC ]CC', + 'Dz': '[B- -> (D*(2010)- -> [D0]CC pi- ) ^[D0]CC ]CC', + }, + 'Hlt2B2OC_BcToDstD0_DstToD0Pi_D0ToHH_D0ToHHHH': { + 'B': '[B_c- -> (D*(2010)- -> [D0]CC pi- ) [D0]CC ]CC', + 'Dst': '[B_c- -> ^(D*(2010)- -> [D0]CC pi- ) [D0]CC ]CC', + 'Dzs': '[B_c- -> (D*(2010)- -> ^[D0]CC pi- ) [D0]CC ]CC', + 'ps': '[B_c- -> (D*(2010)- -> [D0]CC ^pi- ) [D0]CC ]CC', + 'Dz': '[B_c- -> (D*(2010)- -> [D0]CC pi- ) ^[D0]CC ]CC', + }, + 'Hlt2B2OC_BuToDstD0_DstToD0Pi_D0ToHH_D0ToHHHH': { + 'B': '[B- -> (D*(2010)- -> [D0]CC pi- ) [D0]CC ]CC', + 'Dst': '[B- -> ^(D*(2010)- -> [D0]CC pi- ) [D0]CC ]CC', + 'Dzs': '[B- -> (D*(2010)- -> ^[D0]CC pi- ) [D0]CC ]CC', + 'ps': '[B- -> (D*(2010)- -> [D0]CC ^pi- ) [D0]CC ]CC', + 'Dz': '[B- -> (D*(2010)- -> [D0]CC pi- ) ^[D0]CC ]CC', + }, + 'Hlt2B2OC_BcToDstD0_DstToD0Pi_D0ToHH_D0ToKsLLHH': { + 'B': '[B_c- -> (D*(2010)- -> [D0]CC pi- ) [D0]CC ]CC', + 'Dst': '[B_c- -> ^(D*(2010)- -> [D0]CC pi- ) [D0]CC ]CC', + 'Dzs': '[B_c- -> (D*(2010)- -> ^[D0]CC pi- ) [D0]CC ]CC', + 'ps': '[B_c- -> (D*(2010)- -> [D0]CC ^pi- ) [D0]CC ]CC', + 'Dz': '[B_c- -> (D*(2010)- -> [D0]CC pi- ) ^[D0]CC ]CC', + }, + 'Hlt2B2OC_BcToDstD0_DstToD0Pi_D0ToHH_D0ToKsDDHH': { + 'B': '[B_c- -> (D*(2010)- -> [D0]CC pi- ) [D0]CC ]CC', + 'Dst': '[B_c- -> ^(D*(2010)- -> [D0]CC pi- ) [D0]CC ]CC', + 'Dzs': '[B_c- -> (D*(2010)- -> ^[D0]CC pi- ) [D0]CC ]CC', + 'ps': '[B_c- -> (D*(2010)- -> [D0]CC ^pi- ) [D0]CC ]CC', + 'Dz': '[B_c- -> (D*(2010)- -> [D0]CC pi- ) ^[D0]CC ]CC', + }, + 'Hlt2B2OC_BcToDstD0_DstToD0Pi_D0ToHHHH_D0ToHH': { + 'B': '[B_c- -> (D*(2010)- -> [D0]CC pi- ) [D0]CC ]CC', + 'Dst': '[B_c- -> ^(D*(2010)- -> [D0]CC pi- ) [D0]CC ]CC', + 'Dzs': '[B_c- -> (D*(2010)- -> ^[D0]CC pi- ) [D0]CC ]CC', + 'ps': '[B_c- -> (D*(2010)- -> [D0]CC ^pi- ) [D0]CC ]CC', + 'Dz': '[B_c- -> (D*(2010)- -> [D0]CC pi- ) ^[D0]CC ]CC', + }, + 'Hlt2B2OC_BuToDstD0_DstToD0Pi_D0ToHHHH_D0ToHH': { + 'B': '[B- -> (D*(2010)- -> [D0]CC pi- ) [D0]CC ]CC', + 'Dst': '[B- -> ^(D*(2010)- -> [D0]CC pi- ) [D0]CC ]CC', + 'Dzs': '[B- -> (D*(2010)- -> ^[D0]CC pi- ) [D0]CC ]CC', + 'ps': '[B- -> (D*(2010)- -> [D0]CC ^pi- ) [D0]CC ]CC', + 'Dz': '[B- -> (D*(2010)- -> [D0]CC pi- ) ^[D0]CC ]CC', + }, + 'Hlt2B2OC_BcToDstD0_DstToD0Pi_D0ToHHHH_D0ToHHHH': { + 'B': '[B_c- -> (D*(2010)- -> [D0]CC pi- ) [D0]CC ]CC', + 'Dst': '[B_c- -> ^(D*(2010)- -> [D0]CC pi- ) [D0]CC ]CC', + 'Dzs': '[B_c- -> (D*(2010)- -> ^[D0]CC pi- ) [D0]CC ]CC', + 'ps': '[B_c- -> (D*(2010)- -> [D0]CC ^pi- ) [D0]CC ]CC', + 'Dz': '[B_c- -> (D*(2010)- -> [D0]CC pi- ) ^[D0]CC ]CC', + }, + 'Hlt2B2OC_BuToDstD0_DstToD0Pi_D0ToHHHH_D0ToHHHH': { + 'B': '[B- -> (D*(2010)- -> [D0]CC pi- ) [D0]CC ]CC', + 'Dst': '[B- -> ^(D*(2010)- -> [D0]CC pi- ) [D0]CC ]CC', + 'Dzs': '[B- -> (D*(2010)- -> ^[D0]CC pi- ) [D0]CC ]CC', + 'ps': '[B- -> (D*(2010)- -> [D0]CC ^pi- ) [D0]CC ]CC', + 'Dz': '[B- -> (D*(2010)- -> [D0]CC pi- ) ^[D0]CC ]CC', + }, + 'Hlt2B2OC_BcToDstD0_DstToD0Pi_D0ToHHHH_D0ToKsLLHH': { + 'B': '[B_c- -> (D*(2010)- -> [D0]CC pi- ) [D0]CC ]CC', + 'Dst': '[B_c- -> ^(D*(2010)- -> [D0]CC pi- ) [D0]CC ]CC', + 'Dzs': '[B_c- -> (D*(2010)- -> ^[D0]CC pi- ) [D0]CC ]CC', + 'ps': '[B_c- -> (D*(2010)- -> [D0]CC ^pi- ) [D0]CC ]CC', + 'Dz': '[B_c- -> (D*(2010)- -> [D0]CC pi- ) ^[D0]CC ]CC', + }, + 'Hlt2B2OC_BcToDstD0_DstToD0Pi_D0ToHHHH_D0ToKsDDHH': { + 'B': '[B_c- -> (D*(2010)- -> [D0]CC pi- ) [D0]CC ]CC', + 'Dst': '[B_c- -> ^(D*(2010)- -> [D0]CC pi- ) [D0]CC ]CC', + 'Dzs': '[B_c- -> (D*(2010)- -> ^[D0]CC pi- ) [D0]CC ]CC', + 'ps': '[B_c- -> (D*(2010)- -> [D0]CC ^pi- ) [D0]CC ]CC', + 'Dz': '[B_c- -> (D*(2010)- -> [D0]CC pi- ) ^[D0]CC ]CC', + }, +} + +Hlt1_decisions = [ + "Hlt1TrackMVADecision", + "Hlt1TwoTrackMVADecision", + "Hlt1GlobalDecision", + "Hlt1PhysDecision" +] +Hlt2_decisions = [ + "Hlt2Topo2Body", + "Hlt2Topo3Body", + "Hlt2Topo4Body", + "Hlt2B2OC_BcToD0Dsp_D0ToHH_DspToHHH", + "Hlt2B2OC_BuToD0Dsp_D0ToHH_DspToHHH", + "Hlt2B2OC_BcToD0Dsp_D0ToHHHH_DspToHHH", + "Hlt2B2OC_BuToD0Dsp_D0ToHHHH_DspToHHH", + "Hlt2B2OC_BcToD0Dsp_D0ToKsLLHH_DspToHHH", + "Hlt2B2OC_BcToD0Dsp_D0ToKsDDHH_DspToHHH", + "Hlt2B2OC_BcToD0Dp_D0ToHH_DpToHHH", + "Hlt2B2OC_BuToD0Dp_D0ToHH_DpToHHH", + "Hlt2B2OC_BcToD0Dp_D0ToHHHH_DpToHHH", + "Hlt2B2OC_BuToD0Dp_D0ToHHHH_DpToHHH", + "Hlt2B2OC_BcToD0Dp_D0ToKsLLHH_DpToHHH", + "Hlt2B2OC_BcToD0Dp_D0ToKsDDHH_DpToHHH", + "Hlt2B2OC_BcToDstD0_DstToD0Pi_D0ToHH_D0ToHH", + "Hlt2B2OC_BuToDstD0_DstToD0Pi_D0ToHH_D0ToHH", + "Hlt2B2OC_BcToDstD0_DstToD0Pi_D0ToHH_D0ToHHHH", + "Hlt2B2OC_BuToDstD0_DstToD0Pi_D0ToHH_D0ToHHHH", + "Hlt2B2OC_BcToDstD0_DstToD0Pi_D0ToHH_D0ToKsLLHH", + "Hlt2B2OC_BcToDstD0_DstToD0Pi_D0ToHH_D0ToKsDDHH", + "Hlt2B2OC_BcToDstD0_DstToD0Pi_D0ToHHHH_D0ToHH", + "Hlt2B2OC_BuToDstD0_DstToD0Pi_D0ToHHHH_D0ToHH", + "Hlt2B2OC_BcToDstD0_DstToD0Pi_D0ToHHHH_D0ToHHHH", + "Hlt2B2OC_BuToDstD0_DstToD0Pi_D0ToHHHH_D0ToHHHH", + "Hlt2B2OC_BcToDstD0_DstToD0Pi_D0ToHHHH_D0ToKsLLHH", + "Hlt2B2OC_BcToDstD0_DstToD0Pi_D0ToHHHH_D0ToKsDDHH" +] + + + + +def alg_config(options: Options, line_name): + + # Creating v2 reconstructed vertices to be used in the following functor + pvs = get_pvs() + + + line_data = get_particles(f"/Event/HLT2/{line_name}/Particles") + my_filter = create_lines_filter(name=f"HDRFilter_{line_name}", lines=[f"{line_name}"]) + + + mcs=["D0"] + if "DspToHHH" in line_name: mcs.append("D_s+") + if "DpToHHH" in line_name: mcs.append("D+") + if "DstToD0Pi" in line_name: mcs.append("D*(2010)+") + DTF = DecayTreeFitter( + name="DTF"+line_name, input_particles=line_data, input_pvs=pvs, mass_constraints=mcs + ) + + # Specify functor collections + all_variables = FunctorCollection( + { + "ID": F.PARTICLE_ID, + "PT": F.PT, + "PX": F.PX, + "PY": F.PY, + "PZ": F.PZ, + "ETA": F.ETA, + "ENERGY": F.ENERGY, + "P": F.P, + "M": F.MASS, + "ENERGY": F.ENERGY, + "BPVIPCHI2": F.BPVIPCHI2(pvs), + "CHI2DOF": F.CHI2DOF, + } + ) + b_variables = FunctorCollection( + { + "DTF_M" : DTF(F.MASS), + "DTF_CTAU": DTF.CTAU, + "DTF_CTAUERR": DTF.CTAUERR, + "DTF_CHI2": DTF.CHI2, + "DTF_CHI2DOF": DTF.CHI2DOF, + "BPVLTIME": F.BPVLTIME(pvs), + "BPVDIRA": F.BPVDIRA(pvs), + "BPVFDCHI2": F.BPVFDCHI2(pvs), + "BPVFD": F.BPVFD(pvs), + "BPVX": F.BPVX(pvs), + "BPVY": F.BPVY(pvs), + "BPVZ": F.BPVZ(pvs), + "END_VX": F.END_VX, + "END_VY": F.END_VY, + "END_VZ": F.END_VZ, + "END_VCHI2DOF": F.CHI2DOF @ F.ENDVERTEX, + "BPVCHI2DOF": F.CHI2DOF @ F.BPV(pvs), + } + ) + d_variables = FunctorCollection( + { + "DTF_M" : DTF(F.MASS), + "DTF_CTAU": DTF.CTAU, + "DTF_CTAUERR": DTF.CTAUERR, + "DTF_CHI2": DTF.CHI2, + "DTF_CHI2DOF": DTF.CHI2DOF, + "BPVLTIME": F.BPVLTIME(pvs), + "BPVDIRA": F.BPVDIRA(pvs), + "BPVFDCHI2": F.BPVFDCHI2(pvs), + "BPVFD": F.BPVFD(pvs), + "BPVX": F.BPVX(pvs), + "BPVY": F.BPVY(pvs), + "BPVZ": F.BPVZ(pvs), + "END_VX": F.END_VX, + "END_VY": F.END_VY, + "END_VZ": F.END_VZ, + "END_VCHI2DOF": F.CHI2DOF @ F.ENDVERTEX, + "MINIPCHI2": F.MINIPCHI2(pvs), + } + ) + dst_variables = FunctorCollection( + { + 'DOCA12': F.DOCA(1, 2), + } + ) + h_variables = {} + for i in range(1,5): + h_variables[i] = FunctorCollection( + { + f'h{i}_MINIPCHI2': F.CHILD(i, F.MINIPCHI2(pvs)), + f'h{i}_PIDK': F.CHILD(i, F.PID_K), + f'h{i}_PIDp': F.CHILD(i, F.PID_P), + f'h{i}_PIDe': F.CHILD(i, F.PID_E), + f'h{i}_PIDmu': F.CHILD(i, F.PID_MU), + f'h{i}_ID': F.CHILD(i, F.PARTICLE_ID), + f'h{i}_PX': F.CHILD(i, F.PX), + f'h{i}_PY': F.CHILD(i, F.PY), + f'h{i}_PZ': F.CHILD(i, F.PZ), + f'h{i}_P': F.CHILD(i, F.P), + f'h{i}_PT': F.CHILD(i, F.PT), + f'h{i}_ETA': F.CHILD(i, F.ETA), + f'h{i}_ETA': F.CHILD(i, F.ETA), + f'h{i}_CHI2DOF': F.CHILD(i, F.CHI2DOF), + f'h{i}_BPVIPCHI2': F.CHILD(i, F.BPVIPCHI2(pvs)), + } + ) + + ps_variables = FunctorCollection( + { + "MINIPCHI2": F.MINIPCHI2(pvs), + "PIDK": F.PID_K, + "PIDp": F.PID_P, + "PIDe": F.PID_E, + "PIDmu": F.PID_MU, + } + ) + + Ks_variables = FunctorCollection( + { + 'ks_pi1_MINIPCHI2': F.CHILD(1, F.CHILD(1, F.MINIPCHI2(pvs))), + 'ks_pi1_PIDK': F.CHILD(1, F.CHILD(1, F.PID_K)), + 'ks_pi1_PIDp': F.CHILD(1, F.CHILD(1, F.PID_P)), + 'ks_pi1_PIDe': F.CHILD(1, F.CHILD(1, F.PID_E)), + 'ks_pi1_PIDmu': F.CHILD(1, F.CHILD(1, F.PID_MU)), + 'ks_pi1_ID': F.CHILD(1, F.CHILD(1, F.PARTICLE_ID)), + 'ks_pi1_PX': F.CHILD(1, F.CHILD(1, F.PX)), + 'ks_pi1_PY': F.CHILD(1, F.CHILD(1, F.PY)), + 'ks_pi1_PZ': F.CHILD(1, F.CHILD(1, F.PZ)), + 'ks_pi1_P': F.CHILD(1, F.CHILD(1, F.P)), + 'ks_pi1_PT': F.CHILD(1, F.CHILD(1, F.PT)), + 'ks_pi1_ETA': F.CHILD(1, F.CHILD(1, F.ETA)), + 'ks_pi1_ETA': F.CHILD(1, F.CHILD(1, F.ETA)), + 'ks_pi1_CHI2DOF': F.CHILD(1, F.CHILD(1, F.CHI2DOF)), + 'ks_pi1_BPVIPCHI2': F.CHILD(1, F.CHILD(1, F.BPVIPCHI2(pvs))), + 'ks_pi2_ID': F.CHILD(1, F.CHILD(2, F.PARTICLE_ID)), + 'ks_pi2_PX': F.CHILD(1, F.CHILD(2, F.PX)), + 'ks_pi2_PY': F.CHILD(1, F.CHILD(2, F.PY)), + 'ks_pi2_PZ': F.CHILD(1, F.CHILD(2, F.PZ)), + 'ks_pi2_P': F.CHILD(1, F.CHILD(2, F.P)), + 'ks_pi2_PT': F.CHILD(1, F.CHILD(2, F.PT)), + 'ks_pi2_ETA': F.CHILD(1, F.CHILD(2, F.ETA)), + 'ks_pi2_ETA': F.CHILD(1, F.CHILD(2, F.ETA)), + 'ks_pi2_CHI2DOF': F.CHILD(1, F.CHILD(2, F.CHI2DOF)), + 'ks_pi2_BPVIPCHI2': F.CHILD(1, F.CHILD(2, F.BPVIPCHI2(pvs))), + "ks_DOCA": F.CHILD(1, F.DOCA(1, 2)), + "ks_CHI2DOF": F.CHI2DOF, + } + ) + + tistos_vars = FunctorCollection({}) + tistos_vars += FC.HltTisTos(selection_type="Hlt1", trigger_lines=Hlt1_decisions, data=line_data) + + # define variables for each particle + variables = { + "ALL": all_variables+tistos_vars, + 'B': b_variables, + } + if 'Dst' in line_name: + variables['Dst'] = d_variables+dst_variables + variables['ps'] = ps_variables + if line_name.split('_')[-2]=='D0ToHH': + variables['Dzs'] = d_variables+h_variables[1]+h_variables[2] + if line_name.split('_')[-2]=='D0ToHHHH': + variables['Dzs'] = d_variables+h_variables[1]+h_variables[2]+h_variables[3]+h_variables[4] + if line_name.split('_')[-1]=='D0ToHH': + variables['Dz'] = d_variables+h_variables[1]+h_variables[2] + if line_name.split('_')[-1]=='D0ToHHHH': + variables['Dz'] = d_variables+h_variables[1]+h_variables[2]+h_variables[3]+h_variables[4] + else: + if 'Dsp' in line_name: + variables['Ds'] = d_variables+h_variables[1]+h_variables[2]+h_variables[3] + if 'Dp' in line_name: + variables['Dp'] = d_variables+h_variables[1]+h_variables[2]+h_variables[3] + if line_name.split('_')[-2]=='D0ToHH': + variables['Dz'] = d_variables+h_variables[1]+h_variables[2] + if line_name.split('_')[-2]=='D0ToHHHH': + variables['Dz'] = d_variables+h_variables[1]+h_variables[2]+h_variables[3]+h_variables[4] + if 'D0ToKsLLHH' in line_name or 'D0ToKsDDHH' in line_name: + variables['Dz'] = d_variables+h_variables[1]+h_variables[2]+h_variables[3]+Ks_variables + + + rec_summary = get_rec_summary() + evt_variables = FC.RecSummary(rec_summary) + evt_variables += FC.AllPrimaryVertexInfo(pvs, extra_info=True) + evt_variables += FC.SelectionInfo(selection_type="Hlt1",trigger_lines=Hlt1_decisions) + evt_variables += FC.SelectionInfo(selection_type="Hlt2",trigger_lines=Hlt2_decisions) + + + # define FunTuple instance + my_tuple = Funtuple( + name=line_name+"_Tuple", + tuple_name="DecayTree", + fields=fields[line_name], + variables=variables, + event_variables=evt_variables, + inputs=line_data, + ) + + return [my_filter, my_tuple] + + +def tuple_config(options: Options, lines=list(fields.keys())): + algs = {f'{line}_Algs': alg_config(options, line) for line in lines} + return make_config(options, algs) \ No newline at end of file diff --git a/buc2dpdz_2024/info.yaml b/buc2dpdz_2024/info.yaml new file mode 100644 index 0000000000000000000000000000000000000000..470b9d324aa81ade2b2944e59470735ee4a38ea5 --- /dev/null +++ b/buc2dpdz_2024/info.yaml @@ -0,0 +1,43 @@ +defaults: + application: DaVinci/v64r12 + output: DATA.ROOT + options: + entrypoint: buc2dpdz_2024.b2ddtup:tuple_config + extra_options: + input_type: ROOT + input_raw_format: 0.5 + simulation: false + input_process: "TurboPass" + geometry_version: run3/2024.Q1.2-v00.00 + conditions_version: master + lumi: true + data_type: "Upgrade" + input_stream: b2oc + inform: + - rudolf.oldeman@cern.ch + wg: B2OC + +B2OC_24d_c2: + input: + bk_query: "/LHCb/Collision24/Beam6800GeV-VeloClosed-MagDown/Real Data/Sprucing24c2/94000000/B2OC.DST" + +B2OC_24u_c2: + input: + bk_query: "/LHCb/Collision24/Beam6800GeV-VeloClosed-MagUp/Real Data/Sprucing24c2/94000000/B2OC.DST" + +B2OC_24d_c3: + input: + bk_query: "/LHCb/Collision24/Beam6800GeV-VeloClosed-MagDown/Real Data/Sprucing24c3/94000000/B2OC.DST" + +B2OC_24u_c3: + input: + bk_query: "/LHCb/Collision24/Beam6800GeV-VeloClosed-MagUp/Real Data/Sprucing24c3/94000000/B2OC.DST" + +B2OC_24d_c4: + input: + bk_query: "/LHCb/Collision24/Beam6800GeV-VeloClosed-MagDown/Real Data/Sprucing24c4/94000000/B2OC.DST" + +B2OC_24u_c4: + input: + bk_query: "/LHCb/Collision24/Beam6800GeV-VeloClosed-MagUp/Real Data/Sprucing24c4/94000000/B2OC.DST" +