From c915642bc705672cb24edc838a6d006161e4b827 Mon Sep 17 00:00:00 2001
From: Roel Aaij <raaij@nikhef.nl>
Date: Tue, 19 Apr 2016 15:18:35 +0200
Subject: [PATCH 1/3] Allow routing bit 48 to configured from threshold
 settings and configure it from Calibration_VeloMicroBias.

---
 Hlt/HltConf/python/HltConf/HltOutput.py       |  4 +-
 Hlt/HltSettings/doc/release.notes             |  4 ++
 .../HltSettings/Calibration_VeloMicroBias.py  | 50 +++++++++++--------
 3 files changed, 35 insertions(+), 23 deletions(-)

diff --git a/Hlt/HltConf/python/HltConf/HltOutput.py b/Hlt/HltConf/python/HltConf/HltOutput.py
index 289772d8c..a535ae477 100644
--- a/Hlt/HltConf/python/HltConf/HltOutput.py
+++ b/Hlt/HltConf/python/HltConf/HltOutput.py
@@ -34,6 +34,7 @@ class HltOutputConf(LHCbConfigurableUser):
 
     ## Streams we know about: {name : rb}
     __streams__ = {"VELOCLOSING" : 40,
+                   "HLT1NOBIAS"  : 48,
                    "TURBOFULL"   : 85,
                    "BEAMGAS"     : 86,
                    "FULL"        : 87,
@@ -71,7 +72,8 @@ class HltOutputConf(LHCbConfigurableUser):
                                              "TURBO" : None,
                                              "TURBOFULL" : None,
                                              "TURCAL" : None,
-                                             "VELOCLOSING" : None},
+                                             "VELOCLOSING" : None,
+                                             "HLT1NOBIAS"  : None},
                  'StreamsWithLumi'        : ['FULL', 'TURCAL', 'TURBO', 'TURBOFULL', 'NOBIAS', 'SMOGPHYS', 'PARKED'],
                  'OutputAlgProperties'    : None,
                  'HltEndSequence'         : None,
diff --git a/Hlt/HltSettings/doc/release.notes b/Hlt/HltSettings/doc/release.notes
index e48756241..5d7d44581 100644
--- a/Hlt/HltSettings/doc/release.notes
+++ b/Hlt/HltSettings/doc/release.notes
@@ -4,6 +4,10 @@
 ! Purpose     : All trigger threshold settings
 !-----------------------------------------------------------------------------
 
+! 2016-04-19 - Roel Aaij
+ - Update Calibration_VeloMicroBias to include Hlt1Tell1Error and to set
+   routing bit 48 (HLT1NOBIAS) to use Hlt1MBMicroBiasVelo.
+
 !========================= HltSettings v7r9 2016-04-18 =========================
 
 ! 2016-04-19 - Mark Williams
diff --git a/Hlt/HltSettings/python/HltSettings/Calibration_VeloMicroBias.py b/Hlt/HltSettings/python/HltSettings/Calibration_VeloMicroBias.py
index fbfe1371e..4388d4f45 100644
--- a/Hlt/HltSettings/python/HltSettings/Calibration_VeloMicroBias.py
+++ b/Hlt/HltSettings/python/HltSettings/Calibration_VeloMicroBias.py
@@ -1,14 +1,14 @@
 class Calibration_VeloMicroBias :
     """
-    Threshold settings for OT aging activity 
-    
+    Threshold settings for OT aging activity
+
     WARNING :: DO NOT EDIT WITHOUT PERMISSION OF THE AUTHORS
-    
+
     @author J. Albrecht
     @date 2010-08-09
     """
-    
-    
+
+
     def __init__(self) :
         self.StripEndSequence = ['']
 
@@ -16,38 +16,44 @@ class Calibration_VeloMicroBias :
         return 'Calibration_VeloMicroBias'
 
     def L0TCK(self) :
-        return '0x1710'
+        return '0x1715'
 
     def ActiveHlt2Lines(self) :
         """
         Returns a list of active Hlt2 lines
         """
         return  []
-   
+
     def ActiveHlt1Lines(self) :
         """
         Returns a list of active Hlt1 lines
         """
-        return [ 'Hlt1MBMicroBiasVelo' ]
+        return [ 'Hlt1MBMicroBiasVelo', 'Hlt1Tell1Error' ]
 
     def Thresholds(self) :
         """
         Returns a dictionary of cuts
         """
-        from Hlt1Lines.Hlt1MBLines             import Hlt1MBLinesConf
-        d = {
-            Hlt1MBLinesConf : {
-                'ODIN' : {
-                    # TODO how to change TRGTYP below?
-                    'MicroBias'               : '( (ODIN_TRGTYP == LHCb.ODIN.PhysicsTrigger) | (ODIN_TRGTYP == LHCb.ODIN.TimingTrigger) )',
-                    'MicroBiasLowMultVelo'    : 'ODIN_PASS(LHCb.ODIN.NoBias)',
-                    'NoBias'                  : 'ODIN_PASS(LHCb.ODIN.NoBias)',
-                    'CharmCalibrationNoBias'  : 'ODIN_PASS(LHCb.ODIN.NoBias)',
-                    'NoBiasLeadingCrossing'   : 'ODIN_PASS(LHCb.ODIN.SequencerTrigger)',
-                },
-                'Prescale' : { 'Hlt1MBMicroBias.*' : 0.01 },
-                # 'Postscale': { 'Hlt1MBMicroBias.*' : 'RATE(5000)' },
+        from Hlt1Lines.Hlt1MBLines import Hlt1MBLinesConf
+        from Hlt1Lines.Hlt1CommissioningLines   import Hlt1CommissioningLinesConf
+
+        d = {Hlt1CommissioningLinesConf : {'Prescale'  : {'Hlt1Tell1Error'   : 1},
+                                           'Postscale' : {'Hlt1Tell1Error'   : 'RATE(10)'},
+                                          },
+                                          # TODO how to change TRGTYP below?
+             Hlt1MBLinesConf : {'ODIN' : {'MicroBias'               : '( (ODIN_TRGTYP == LHCb.ODIN.PhysicsTrigger) | (ODIN_TRGTYP == LHCb.ODIN.TimingTrigger) )',
+                                          'MicroBiasLowMultVelo'    : 'ODIN_PASS(LHCb.ODIN.NoBias)',
+                                          'NoBias'                  : 'ODIN_PASS(LHCb.ODIN.NoBias)',
+                                          'CharmCalibrationNoBias'  : 'ODIN_PASS(LHCb.ODIN.NoBias)',
+                                          'NoBiasLeadingCrossing'   : 'ODIN_PASS(LHCb.ODIN.SequencerTrigger)'},
+                                'Prescale' : {'Hlt1MBMicroBias.*' : 1. }
+                               }
             }
-        }
 
         return d
+
+    def Streams(self):
+        return {
+            'VELOCLOSING' : None,
+            'HLT1NOBIAS'  : "HLT_PASS('%sDecision')" % self.ActiveHlt1Lines()[0]
+        }
-- 
GitLab


From 75437d50836512c19945f5a11c7f40c0eeda3dd8 Mon Sep 17 00:00:00 2001
From: Roel Aaij <raaij@nikhef.nl>
Date: Tue, 19 Apr 2016 15:50:17 +0200
Subject: [PATCH 2/3] Set VeloClosing bit too.

---
 .../python/HltSettings/Calibration_VeloMicroBias.py        | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/Hlt/HltSettings/python/HltSettings/Calibration_VeloMicroBias.py b/Hlt/HltSettings/python/HltSettings/Calibration_VeloMicroBias.py
index 4388d4f45..2ac0a6679 100644
--- a/Hlt/HltSettings/python/HltSettings/Calibration_VeloMicroBias.py
+++ b/Hlt/HltSettings/python/HltSettings/Calibration_VeloMicroBias.py
@@ -53,7 +53,6 @@ class Calibration_VeloMicroBias :
         return d
 
     def Streams(self):
-        return {
-            'VELOCLOSING' : None,
-            'HLT1NOBIAS'  : "HLT_PASS('%sDecision')" % self.ActiveHlt1Lines()[0]
-        }
+        expr = "HLT_PASS('%sDecision')" % self.ActiveHlt1Lines()[0]
+        return {'VELOCLOSING' : expr,
+                'HLT1NOBIAS'  : expr}
-- 
GitLab


From 22f1dfa99256afde88d6aaeb303e9624c3cb1cc7 Mon Sep 17 00:00:00 2001
From: Roel Aaij <raaij@nikhef.nl>
Date: Tue, 19 Apr 2016 16:36:49 +0200
Subject: [PATCH 3/3] Change ODIN requirement for Hlt1MBMicroBiasVelo to use
 ODIN_PASS(LHCb.ODIN.Physics).

---
 Hlt/HltSettings/python/HltSettings/Calibration_VeloMicroBias.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Hlt/HltSettings/python/HltSettings/Calibration_VeloMicroBias.py b/Hlt/HltSettings/python/HltSettings/Calibration_VeloMicroBias.py
index 2ac0a6679..6c773b245 100644
--- a/Hlt/HltSettings/python/HltSettings/Calibration_VeloMicroBias.py
+++ b/Hlt/HltSettings/python/HltSettings/Calibration_VeloMicroBias.py
@@ -41,7 +41,7 @@ class Calibration_VeloMicroBias :
                                            'Postscale' : {'Hlt1Tell1Error'   : 'RATE(10)'},
                                           },
                                           # TODO how to change TRGTYP below?
-             Hlt1MBLinesConf : {'ODIN' : {'MicroBias'               : '( (ODIN_TRGTYP == LHCb.ODIN.PhysicsTrigger) | (ODIN_TRGTYP == LHCb.ODIN.TimingTrigger) )',
+             Hlt1MBLinesConf : {'ODIN' : {'MicroBias'               : 'ODIN_PASS(LHCb.ODIN.Physics)',
                                           'MicroBiasLowMultVelo'    : 'ODIN_PASS(LHCb.ODIN.NoBias)',
                                           'NoBias'                  : 'ODIN_PASS(LHCb.ODIN.NoBias)',
                                           'CharmCalibrationNoBias'  : 'ODIN_PASS(LHCb.ODIN.NoBias)',
-- 
GitLab