Commit a137b1d5 authored by Joerg Stelzer's avatar Joerg Stelzer
Browse files

L1Calo and Topo extensions (ThrVal and MultiAlg)

parent af3678bd
......@@ -131,6 +131,9 @@ namespace TrigConf {
virtual unsigned int thrValueCounts(int eta = 0) const;
/** access to the list of ThresholdValues */
const ValueWithEtaDependence<unsigned int> & thrValues() const;
protected:
/** Update the internal data after modification of the data object */
......
......@@ -66,6 +66,11 @@ TrigConf::L1Threshold::thrValueCounts(int eta) const {
return thrValue(eta);
}
const TrigConf::ValueWithEtaDependence<unsigned int> &
TrigConf::L1Threshold::thrValues() const {
return m_etaDepThrValue;
}
TrigConf::IsolationLegacy::IsolationLegacy( const boost::property_tree::ptree & pt ) {
......
......@@ -245,6 +245,7 @@ class LegacyThreshold( Threshold ):
("etamax", thrV.etamax),
("phimin", thrV.phimax),
("phimax", thrV.phimin),
("window", thrV.window),
("priority", thrV.priority)
]) )
elif self.ttype == ThrType.TE:
......
......@@ -276,6 +276,7 @@ class MultiplicityAlgo(TopoAlgo):
def json(self):
from collections import OrderedDict as odict
confObj = odict()
confObj["type"] = self.classtype
confObj["threshold"] = self.threshold
confObj["input"] = self.input
confObj["output"] = self.outputs
......@@ -284,7 +285,7 @@ class MultiplicityAlgo(TopoAlgo):
class EMMultiplicityAlgo(MultiplicityAlgo):
def __init__(self, classtype, name, algoId, threshold, nbits):
def __init__(self, name, algoId, threshold, nbits, classtype = "EMMultiplicity" ):
super(EMMultiplicityAlgo, self).__init__(classtype=classtype, name=name,
algoId=algoId,
threshold = threshold,
......@@ -295,7 +296,7 @@ class EMMultiplicityAlgo(MultiplicityAlgo):
class TauMultiplicityAlgo(MultiplicityAlgo):
def __init__(self, classtype, name, algoId, threshold, nbits):
def __init__(self, name, algoId, threshold, nbits, classtype = "TauMultiplicity" ):
super(TauMultiplicityAlgo, self).__init__(classtype=classtype, name=name,
algoId=algoId,
threshold = threshold,
......@@ -303,7 +304,7 @@ class TauMultiplicityAlgo(MultiplicityAlgo):
nbits=nbits)
class JetMultiplicityAlgo(MultiplicityAlgo):
def __init__(self, classtype, name, algoId, threshold, nbits):
def __init__(self, name, algoId, threshold, nbits, classtype = "JetMultiplicity" ):
super(JetMultiplicityAlgo, self).__init__(classtype=classtype, name=name,
algoId=algoId,
threshold = threshold,
......@@ -311,7 +312,7 @@ class JetMultiplicityAlgo(MultiplicityAlgo):
nbits=nbits)
class XEMultiplicityAlgo(MultiplicityAlgo):
def __init__(self, classtype, name, algoId, threshold, nbits):
def __init__(self, name, algoId, threshold, nbits, classtype = "EnergyThreshold"):
super(XEMultiplicityAlgo, self).__init__( classtype = classtype, name=name,
algoId = algoId,
threshold = threshold,
......
......@@ -20,9 +20,8 @@ class TopoMultiplicityAlgoDef(object):
]
for em in emThresholds:
alg = EMMultiplicityAlgo( classtype = "ThresholdMult",
name = "Mult_%s" % em,
algoId = currentAlgoId,
alg = EMMultiplicityAlgo( name = "Mult_%s" % em,
algoId = currentAlgoId,
threshold = em,
nbits = 3)
tm.registerTopoAlgo(alg)
......@@ -31,9 +30,8 @@ class TopoMultiplicityAlgoDef(object):
tauThresholds = [ "eTAU12", "eTAU12IM", "eTAU20", "eTAU20IM", "eTAU25IM", "eTAU40", "eTAU60", "eTAU100" ]
for tau in tauThresholds:
alg = TauMultiplicityAlgo( classtype = "ThresholdMult",
name = "Mult_%s" % tau,
algoId = currentAlgoId,
alg = TauMultiplicityAlgo( name = "Mult_%s" % tau,
algoId = currentAlgoId,
threshold = tau,
nbits = 3)
tm.registerTopoAlgo(alg)
......@@ -42,9 +40,8 @@ class TopoMultiplicityAlgoDef(object):
"jJ35.0ETA23", "jJ40.0ETA25", "jJ40", "jJ50", "jJ85", "jJ100", "jJ15.31ETA49", "jJ20.31ETA49", "jJ75.31ETA49" ]
for jJet in jJThresholds:
alg = JetMultiplicityAlgo( classtype = "ThresholdMult",
name = "Mult_%s" % jJet,
algoId = currentAlgoId,
alg = JetMultiplicityAlgo( name = "Mult_%s" % jJet,
algoId = currentAlgoId,
threshold = jJet,
nbits = 3)
tm.registerTopoAlgo(alg)
......@@ -53,9 +50,8 @@ class TopoMultiplicityAlgoDef(object):
gXEThresholds = [ "gXERHO20", "gXERHO30", "gXERHO35", "gXERHO40", "gXERHO45", "gXERHO50", "gXEPUFIT20", "gXEPUFIT50", "gXE50" ]
for gXE in gXEThresholds:
alg = XEMultiplicityAlgo( classtype = "ThresholdMult",
name = "Mult_%s" % gXE,
algoId = currentAlgoId,
alg = XEMultiplicityAlgo( name = "Mult_%s" % gXE,
algoId = currentAlgoId,
threshold = gXE,
nbits = 1)
tm.registerTopoAlgo(alg)
......@@ -64,9 +60,8 @@ class TopoMultiplicityAlgoDef(object):
jXEThresholds = [ "jXE50" ]
for jXE in jXEThresholds:
alg = XEMultiplicityAlgo( classtype = "ThresholdMult",
name = "Mult_%s" % jXE,
algoId = currentAlgoId,
alg = XEMultiplicityAlgo( name = "Mult_%s" % jXE,
algoId = currentAlgoId,
threshold = jXE,
nbits = 1)
tm.registerTopoAlgo(alg)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment