Skip to content
Snippets Groups Projects

Draft: Validation of IFT end of year re-sprucing

Open Kara Mattioli requested to merge kmattiol/ift-EoYspruce-validation into master
1 unresolved thread
@@ -144,9 +144,10 @@ def main(options: Options):
charm_photons = get_particles(f"/Event/Spruce/SpruceIFT_SMOG2DsToKKPi/Photons/Particles")
ds_cands = get_particles(f"/Event/Spruce/SpruceIFT_SMOG2DsToKKPi/Particles")
smog2_testDstar = ParticleCombiner([ds_cands, charm_photons],
smog2_testDstar = ParticleCombiner( Inputs=[ds_cands, charm_photons],
DecayDescriptor="[D*_s+ -> D_s+ gamma]cc",
name="smog2_testDstar",
name="smog2_testDstar",
ParticleCombiner="ParticleAdder",
)
input_data_frompersist = {'TestPersistency_LcTopKPi': smog2_testLc,
@@ -355,11 +356,52 @@ def main(options: Options):
'B_PV_Y':F.BPVY(v2_pvs),
'BPVIP': F.BPVIP(v2_pvs),
'BPVIPCHI2': F.BPVIPCHI2(v2_pvs),
### BestPVnTracks
'nBestPVTracks': F.VALUE_OR(-1) @ F.CAST_TO_INT @ F.SIZE_OF @ F.PVTRACKS @ F.BPV(v2_pvs),
'nBestPVbackTracks': F.VALUE_OR(-1) @ F.CAST_TO_INT @ F.COUNT_IF( F.TRACKISVELOBACKWARD ) @ F.PVTRACKS @ F.BPV(v2_pvs),
'nBestPVTracks': F.VALUE_OR(-1) @ F.CAST_TO_INT @ F.SIZE_OF @ F.PVTRACKS @ F.BPV(v2_pvs),
'nBestPVbackTracks': F.VALUE_OR(-1) @ F.CAST_TO_INT @ F.COUNT_IF( F.TRACKISVELOBACKWARD ) @ F.PVTRACKS @ F.BPV(v2_pvs),
})
variables_without_vertex = FunctorCollection({ 'ID': F.PARTICLE_ID,
'KEY': F.OBJECT_KEY,
'CHARGE': F.CHARGE,
'PT': F.PT,
'PX': F.PX,
'PY': F.PY,
'PZ': F.PZ,
'ETA': F.ETA,
'PHI': F.PHI,
'YSTAR':0.5*fmath.log( (F.ENERGY+F.PZ)/(F.ENERGY-F.PZ))-4.79,
'Y':0.5*fmath.log( (F.ENERGY+F.PZ)/(F.ENERGY-F.PZ)),
'MASS':F.MASS,
'ENERGY': F.ENERGY,
'P': F.P,
'FOURMOMENTUM': F.FOURMOMENTUM,
'CHI2': F.CHI2,
'CHI2DOF': F.CHI2DOF,
'DOCA': F.DOCA(Child1=1, Child2=2),
'DOCACHI2': F.DOCACHI2(Child1=1, Child2=2),
'SDOCA': F.SDOCA(Child1=1, Child2=2),
'SDOCACHI2': F.SDOCACHI2(Child1=1, Child2=2)
})
variables_without_vertex_children = FunctorCollection({ 'ID': F.PARTICLE_ID,
'KEY': F.OBJECT_KEY,
'CHARGE': F.CHARGE,
'PT': F.PT,
'PX': F.PX,
'PY': F.PY,
'PZ': F.PZ,
'ETA': F.ETA,
'PHI': F.PHI,
'YSTAR':0.5*fmath.log( (F.ENERGY+F.PZ)/(F.ENERGY-F.PZ))-4.79,
'Y':0.5*fmath.log( (F.ENERGY+F.PZ)/(F.ENERGY-F.PZ)),
'MASS':F.MASS,
'ENERGY': F.ENERGY,
'P': F.P,
'FOURMOMENTUM': F.FOURMOMENTUM,
'CHI2': F.CHI2,
'CHI2DOF': F.CHI2DOF,
})
parent_variables = FunctorCollection({ 'DOCA': F.DOCA(Child1=1, Child2=2),
'DOCACHI2': F.DOCACHI2(Child1=1, Child2=2),
'SDOCA': F.SDOCA(Child1=1, Child2=2),
@@ -457,12 +499,16 @@ def main(options: Options):
if line in lines_nocomposite:
d_variables[line] = { parts[line][0]:all_variables+TisTos_variables+Hlt2_TisTos_variables+children_variables }
elif line == 'TestPersistency_DstarToDsGamma':
d_variables[line] = { parts[line][0]:variables_without_vertex+TisTos_variables+Hlt2_TisTos_variables+children_variables }
else:
d_variables[line] = { parts[line][0]:all_variables+TisTos_variables+Hlt2_TisTos_variables+parent_variables }
for ichildren in range( 1, len(parts[line]) ):
if line in lines_intermediate_daughters and ichildren==1:
d_variables[line][parts[line][ichildren]] = all_variables+TisTos_variables+parent_variables
elif line == 'TestPersistency_DstarToDsGamma':
d_variables[line][parts[line][ichildren]] = variables_without_vertex_children+TisTos_variables+children_variables
else:
d_variables[line][parts[line][ichildren]] = all_variables+TisTos_variables+children_variables
Loading