Skip to content
Snippets Groups Projects

DaVinci example to show how to get charged particles in a DaVinci script

Closed Guillaume Max Pietrzyk requested to merge guillaume_davinci_example into master
5 unresolved threads
1 file
+ 16
17
Compare changes
  • Side-by-side
  • Inline
from FunTuple import FunTuple_Particles as Funtuple
from DaVinci import Options, make_config
from DaVinci.algorithms import add_filter
from Hlt2Conf.standard_particles import ( make_long_muons,
make_long_electrons_with_brem,
make_long_kaons,
make_long_pions,
)
from Hlt2Conf.standard_particles import (
make_long_muons,
make_long_electrons_with_brem,
make_long_kaons,
make_long_pions,
)
import FunTuple.functorcollections as FC
"""
Very simple DaVinci option file.
@@ -15,27 +15,26 @@ The only purpose of this script is to show how to get the charged particles from
Not using with reconstruction.bind(from_file=True, spruce=True) can make it look for protoparticles in /Event/pRec/ProtoP/Charged/, which most likely does not exist in your DST processed by Moore.
"""
def main(options: Options):
## Line definitions
process = 'HLT2'
line = 'Hlt2TrackEff_Velo2Long_B2JpsiK_MuonProbe_VELO' #Just an example
line = 'Hlt2TrackEff_Velo2Long_B2JpsiK_MuonProbe_VELO' #Just an example
from RecoConf.reconstruction_objects import reconstruction, upfront_reconstruction
with reconstruction.bind(from_file=True, spruce=True):
long_muons = make_long_muons()
long_electrons = make_long_electrons_with_brem()
long_kaons = make_long_kaons()
long_pions = make_long_pions()
long_muons = make_long_muons()
long_electrons = make_long_electrons_with_brem()
long_kaons = make_long_kaons()
long_pions = make_long_pions()
unpack_data = upfront_reconstruction()
filter_line = add_filter("HDRFilter_Bu2JpsiK",
f"HLT_PASS('{line}')")
filter_line = add_filter("HDRFilter_Bu2JpsiK", f"HLT_PASS('{line}')")
algs = {
"B02JpsiK": [filter_line] + unpack_data + [long_muons, long_electrons, long_kaons, long_pions],
"B02JpsiK": [filter_line] + unpack_data +
[long_muons, long_electrons, long_kaons, long_pions],
}
return make_config(options, algs)
Loading