Skip to content
Snippets Groups Projects

Draft: DrellYan Low Mass Prompt Comm23

Closed Ozgur Durmus requested to merge odurmus/DrellYan_SuperLiason into master
4 unresolved threads
Files
3
+ 104
0
###############################################################################
# (c) Copyright 2022 CERN for the benefit of the LHCb Collaboration #
# #
# This software is distributed under the terms of the GNU General Public #
# Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING". #
# #
# In applying this licence, CERN does not waive the privileges and immunities #
# granted to it by virtue of its status as an Intergovernmental Organization #
# or submit itself to any jurisdiction. #
###############################################################################
from DrellYan_sliaison.tupling_funcs_data import (
make_composite_variables,
make_basic_variables,
make_hlt_event_variables,
make_track_variables,
Funtuple_with_filter,
make_neutral_variables,
)
    • Comment on lines +15 to +19

      Could you remove the code for make_hlt_event_variables and make_neutral_variables from the imports here and from tupling_funcs_data.py please? It looks like they are unused, so it would be good to de-clutter.

Please register or sign in to reply
from PyConf.components import force_location
from DaVinci import make_config, Options
from FunTuple.functorcollections import SelectionInfo
from PyConf.reading import get_particles, get_pvs, get_odin
from RecoConf.reconstruction_objects import reconstruction
from FunTuple import FunctorCollection
import Functors as F
#from FunTuple.functorcollections import Kinematics, HltTisTos
from DaVinci.algorithms import create_lines_filter
from FunTuple import FunTuple_Particles as Funtuple
def drell_yan_config(options: Options):
line_name = "Hlt2QEE_DiMuon_DrellYan_LowMass_OS_Prompt"
line_name_ss = "Hlt2QEE_DiMuon_DrellYan_LowMass_SS_Prompt"
name = "DrellYan"
data = get_particles(f"/Event/HLT2/{line_name}/Particles")
data_ss = get_particles(f"/Event/HLT2/{line_name_ss}/Particles")
fields = {
"Z": "Z0 -> mu+ mu-",
"mup": "Z0 -> ^mu+ mu-",
"mum": "Z0 -> mu+ ^mu-",
}
fields_ss = {
"Z": "[Z0 -> mu+ mu+]CC",
"mup_ss": "[Z0 -> ^mu+ mu+]CC",
"mum_ss": "[Z0 -> mu+ ^mu+]CC",
}
variables = {
"Z": make_composite_variables(options, data),
"mup": make_basic_variables(options, data) + make_track_variables(options, data),
"mum": make_basic_variables(options, data) + make_track_variables(options, data),
}
variables_ss = {
"Z": make_composite_variables(options, data),
"mup_ss": make_basic_variables(options, data) + make_track_variables(options, data),
"mum_ss": make_basic_variables(options, data) + make_track_variables(options, data),
}
# get odin which hold the event information
odin = get_odin()
evt_variables = FunctorCollection(
{"RUNNUMBER": F.RUNNUMBER(odin), "EVENTNUMBER": F.EVENTNUMBER(odin)}
)
hlt_filter = create_lines_filter(
name=f"HDRFilter_{line_name}",
lines=[line_name])
hlt_filter_ss = create_lines_filter(
name=f"HDRFilter_{line_name_ss}",
lines=[line_name_ss])
my_tuple = Funtuple(
name="Tuple",
tuple_name="DecayTree",
fields=fields,
variables=variables,
event_variables=evt_variables,
inputs=data,
)
my_tuple_ss = Funtuple(
name="TupleSS",
tuple_name="DecayTree",
fields=fields_ss,
variables=variables_ss,
event_variables=evt_variables,
inputs=data_ss,
)
user_algorithms = {
"Alg1": [hlt_filter, my_tuple],
"Alg2": [hlt_filter_ss, my_tuple_ss],
}
return make_config(options, user_algorithms)
Loading