Skip to content
Snippets Groups Projects

Bs2KMuNu analysis production

Merged Maurizio Martinelli requested to merge mamartin/bs2kmunu into master
+ 6
5
@@ -168,6 +168,8 @@ def GetStrippingLineLocation(name,stream='Semileptonic',noLine=False, year='2015
Args:
name (str): the name of the stripping line
stream (str, optional): the name of the stream. Defaults to 'Semileptonic'.
noLine (bool, optional): whether to add 'Line' to the stripping line name or not. Defaults to False.
year (str, optional): the year of data-taking. Defaults to 2015.
Returns:
str: the TES location of the selected candidates
@@ -177,7 +179,7 @@ def GetStrippingLineLocation(name,stream='Semileptonic',noLine=False, year='2015
return lname
def GetPathLoKiTool(line, location, job_options):
"""Returns the path for isolation variables
"""Returns the path where the LoKi tool can find the Related Info of the stripping line
Args:
line (str): the stripping line name
@@ -349,7 +351,9 @@ def SetupLoKiTool(dtt, branch_name, loki_dict, line, job_options):
job_options (dict): the steering job options.
"""
branch = GetDTTNode(dtt,branch_name)
if branch is None: return
if branch is None:
print(f'WARNING(SetupLoKiTool): {branch_name} is not valid!')
return
if len(list(loki_dict.keys())) == 0:
print (f'WARNING: The dictionary with the LoKi variables to store is empty ({branch.name})')
# Define LoKi Tools
@@ -358,7 +362,6 @@ def SetupLoKiTool(dtt, branch_name, loki_dict, line, job_options):
loki_tuptool.Preambulo = loki_dict['Preambulo']
loki_tuptool.Variables = loki_dict['Variables']
for name, args in loki_dict['RELINFO'].items():
#LoKi_Tool.Variables[name] = "RELINFO('"+(self.getInput() if self.Opts['lokitools']['Line'] == None else self.Opts['lokitools']['Line'])+"/%(stripName)s','%(varName)s', %(default)s )" % args
loki_tuptool.Variables[name] = f"RELINFO('{GetPathLoKiTool(job_options['Stream'], line, args['Location'],job_options)}','{args['varName']}',{args['Default']})"
return
@@ -414,7 +417,6 @@ def CreateDTT(name, job_opts=basic_options):
"""
dtt = BasicDTT(name,job_opts)
SetupGeneralTools(dtt)
#SetupSLTools(dtt)
SetupGeometryTool(dtt)
#SetupTrackPositionTool(dtt)
if job_opts['IsMC']: SetupMCTools(dtt, False)
@@ -427,7 +429,6 @@ def CreateDTT(name, job_opts=basic_options):
SetupLoKiTool(dtt, brName, loki_dict, name, job_opts)
SetupIsoGenericTool(dtt,job_opts)
print(dtt)
#SetupToolsPrompt(dtt, TriggerLists, Probnn, IsTurbo, IsMC)
return dtt
def GetFilterCode(lines, filter = 'HLT_PASS_RE'):
Loading