Skip to content
Snippets Groups Projects

Re-add bremsstrahlung test

Merged Albert Lopez Huertas requested to merge alopezhu_testbrem into master
Files
2
@@ -24,11 +24,16 @@ from GaudiKernel.SystemOfUnits import MeV, picosecond
from RecoConf.reconstruction_objects import (make_pvs, upfront_reconstruction,
reconstruction)
from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_fastest_reconstruction
from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction
from RecoConf.hlt2_global_reco import make_light_reconstruction
from RecoConf.hlt1_tracking import make_VeloClusterTrackingSIMD, make_velo_full_clusters
from Hlt2Conf.algorithms_thor import ParticleFilter, ParticleCombiner
from RecoConf.event_filters import require_pvs
from RecoConf.hlt2_muonid import make_muon_hits as make_muon_hits_hlt2
from RecoConf.hlt1_muonid import make_muon_hits as make_muon_hits_hlt1
from PyConf import configurable
from PyConf.Algorithms import ParticleMassMonitor, ParticleMassDTFMonitor
from PyConf.Algorithms import ParticleMassMonitor, ParticleMassDTFMonitor, VeloRetinaClusterTrackingSIMD, VPRetinaFullClusterDecoder
# get the basic particles
from Hlt2Conf.standard_particles import (
@@ -66,15 +71,12 @@ def make_B2JpsiK(Jpsi,
# require the Jpsi and K to come from the same vertex + lifetime cut
mother_cut = F.require_all(F.CHI2DOF < maxVertexChi2,
F.BPVLTIME > lifetime)
F.BPVLTIME(pvs) > lifetime)
return ParticleCombiner(
particles=[Jpsi, kaons],
pvs=pvs,
DecayDescriptor=["[B+ -> J/psi(1S) K+]cc"],
CombinationCut=combination_cut,
MotherCut=mother_cut)
return ParticleCombiner([Jpsi, kaons],
DecayDescriptor="[B+ -> J/psi(1S) K+]cc",
CombinationCut=combination_cut,
CompositeCut=mother_cut)
@configurable
@@ -85,29 +87,21 @@ def filter_kaons(
pidCut=0,
mipChi2Cut=4,
):
code = F.require_all(F.PID_K > pidCut,
F.MINIPCHI2(pvs) > mipChi2Cut)
return ParticleFilter(
kaons,
F.FILTER(code),
name=name
)
code = F.require_all(F.PID_K > pidCut, F.MINIPCHI2(pvs) > mipChi2Cut)
return ParticleFilter(kaons, F.FILTER(code), name=name)
@configurable
def filter_jpsi_ee(dielectron,
pvs,
name='jpsi_ee_{hash}',
massWind_Jpsi=1000 * MeV,
minPt_Jpsi=0 * MeV):
code = F.require_all(F.ABS_DELTA_MASS('J/psi(1S)') < massWind_Jpsi,
F.PT > minPt_Jpsi)
code = F.require_all(
F.ABS_DELTA_MASS('J/psi(1S)') < massWind_Jpsi, F.PT > minPt_Jpsi)
return ParticleFilter(
dielectron,
F.FILTER(code),
name=name
)
return ParticleFilter(dielectron, F.FILTER(code), name=name)
@register_line_builder(all_lines)
@@ -126,7 +120,7 @@ def b2jpsik_eeline(name='Hlt2BToJpsiK_JpsiToEE',
detached_dielectron = make_detached_dielectron()
# filter the detached Jpsi candidates
Jpsi = filter_jpsi_ee(detached_dielectron)
Jpsi = filter_jpsi_ee(detached_dielectron, pvs)
# get the basic kaons
kaons = make_has_rich_long_kaons()
@@ -162,7 +156,7 @@ def b2jpsik_eeline(name='Hlt2BToJpsiK_JpsiToEE',
return Hlt2Line(
name=name,
algs=upfront_reconstruction() + [B2JpsiK] +
algs=upfront_reconstruction() + [require_pvs(pvs), B2JpsiK] +
[checkJpsiM, checkBuM, checkBuDTFM],
prescale=prescale,
)
@@ -189,10 +183,42 @@ def all_lines():
public_tools = [stateProvider_with_simplified_geom()]
# ft decoding Version
default_ft_decoding_version.global_bind(value=6)
#default_ft_decoding_version.global_bind(value=6)
# Use velo retina decoding:
#make_VeloClusterTrackingSIMD.global_bind(
# algorithm=VeloRetinaClusterTrackingSIMD)
#make_velo_full_clusters.global_bind(
# make_full_cluster=VPRetinaFullClusterDecoder)
# This is needed for Muon decoding v3
make_muon_hits_hlt2.global_bind(geometry_version=3)
make_muon_hits_hlt1.global_bind(geometry_version=3)
# To be removed once data is updated to use a tag including
# https://gitlab.cern.ch/lhcb-conddb/DDDB/-/merge_requests/107
from DDDB.CheckDD4Hep import UseDD4Hep
if UseDD4Hep:
from Configurables import DDDBConf
DDDBConf().GeometryVersion = 'before-rich1-geom-update-26052022'
from RecoConf.calorimeter_reconstruction import make_digits
make_digits.global_bind(calo_raw_bank=True)
# input
options.set_input_and_conds_from_testfiledb('upgrade_B2JpsiK_ee_MU')
#options.set_input_and_conds_from_testfiledb('upgrade_B2JpsiK_ee_MU')
options.input_files = [
'root://x509up_u137380@eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Dev/DIGI/00185029/0000/00185029_00000005_1.digi',
'root://x509up_u137380@eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Dev/DIGI/00185029/0000/00185029_00000008_1.digi'
]
options.dddb_tag = 'dddb-20230313'
options.conddb_tag = 'sim-20230322-vc-md100'
options.geometry_version = 'before-rich1-geom-update-26052022'
options.conditions_version = 'master'
options.simulation = True
options.data_type = "Upgrade"
options.input_type = 'ROOT'
options.evt_max = 1000
@@ -202,6 +228,10 @@ options.ntuple_file = 'outputfile_B2JpsiK.root'
# run
with reconstruction.bind(from_file=False),\
hlt2_reconstruction.bind(make_reconstruction=make_fastest_reconstruction):
config = run_moore(
options, all_lines, public_tools, exclude_incompatible=False)
make_light_reconstruction.bind(usePatPVFuture=True): #xd (no fa res)
#hlt2_reconstruction.bind():
run_moore(
options,
make_streams=all_lines,
public_tools=public_tools,
exclude_incompatible=False)
Loading