Skip to content
Snippets Groups Projects
Commit 41f8787f authored by Will Buttinger's avatar Will Buttinger
Browse files

Update TriggerInfo.py - reimplement the inversion of cuts that appear in the presel detail block

parent 25b5a4a7
No related branches found
No related tags found
1 merge request!74440Update TriggerInfo.py - add another details-tag that has inverted order...
Pipeline #8176348 passed
......@@ -327,13 +327,25 @@ class TriggerLeg:
if tag1 == tag2: return -1
#lower mv2 and deltaR/deltaZ/deltaPhi values are tighter, put a minus sign to trick it
inverseCuts = ("mv2c","dr","dz","dphi","dl1d","dl1r","gn1","gn2","presel2c20XX2c20b")
inverseCuts = ("mv2c","dr","dz","dphi","dl1d","dl1r","gn1","gn2")
for cut in inverseCuts:
tag1 = tag1.replace(cut,cut+"-")
tag2 = tag2.replace(cut,cut+"-")
#only make a statement on the numerical values, with everything else identical
reself = self.detailpattern.findall(tag1)
reother = self.detailpattern.findall(tag2)
extra_inverseCuts = ("b","c","bgtwo","gntau") # appear after "presel" string
for l in [reself,reother]:
if "presel" in l:
foundPresel = False
for i,s in enumerate(l):
# only look after the presel string ... warning: this might invert things that follow presel block though (i.e. after next "_")
if not foundPresel:
if s=="presel": foundPresel=True
continue
for cut in extra_inverseCuts:
if s==cut: l[i+1] = "-" + l[i+1] # adds a minus sign to the number that follows
if len(reself) != len(reother): return -9
thecomp = [mycomp(a,b) for a,b in zip(reself,reother)]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment