PV association for FT input
We want to create a container with all the long and upstream tracks wrt the signal PV and a container with an IPCHI2 cut wrt any PV in the event. A_S_Week___FT_and_BnoC_lines.pdf
- A full working code example can be found on branch "FT_input_test" at "Hlt/Hlt2Conf/python/Hlt2Conf/lines/Bds2hhhh.py"
- To execute the code with MC data obtaining the .dst file see: "options/hlt2_run_B04pi_forFT.py"
- Most relevant piece of code:
def get_particles_WithPVs(particles, pvs, mipchi2_min=6):
code = require_all('MIPCHI2DV(PRIMARY) > {mipchi2_min}')
.format(mipchi2_min=mipchi2_min)
return ParticleFilterWithPVs(particles, pvs=pvs, Code=code)
@register_line_builder(all_lines)
def Bds_pipipipi_line(name='Hlt2BnoCBdsTopimpippimpipLine', prescale=1):
pvs = make_pvs()
pions = filter_pions(make_has_rich_long_pions(), pvs)
Bds = make_Bds(particles=[pions],pvs=pvs,
descriptors=['B0 -> pi- pi+ pi- pi+'])
upstreamPV = get_particles_WithPVs(
_make_particles(species='pion',
get_track_selector=get_upstream_track_selector),
pvs, mipchi2_min=0)
longPV = get_particles_WithPVs(
_make_particles(species='pion',
get_track_selector=get_long_track_selector), pvs,
mipchi2_min=0)
upstreamALL = get_particles_WithPVs(
_make_particles(species='pion',
get_track_selector=get_upstream_track_selector),
make_pvs())
longALL = get_particles_WithPVs(
_make_particles(species='pion',
get_track_selector=get_long_track_selector),
make_pvs())
return HltLine(
name=name,
algs=upfront_reconstruction() + [Bds],
extra_outputs=[
("LongPionsPV", longPV),
("UpstreamPionsPV", upstreamPV),
("LongPionsALLCHI2", longALL),
("UpstreamPionsALLCHI2", upstreamALL),
],
prescale=prescale)
Is this the right way to proceed?