diff --git a/Calorimeter/CaloDetDescr/CaloDetDescr/CaloDepthTool.h b/Calorimeter/CaloDetDescr/CaloDetDescr/CaloDepthTool.h index d7aa087afdadfc53df44a474b94f3e5c315505a6..43233c0f9e25878221b7ecbd4a2c617fb363786f 100755 --- a/Calorimeter/CaloDetDescr/CaloDetDescr/CaloDepthTool.h +++ b/Calorimeter/CaloDetDescr/CaloDetDescr/CaloDepthTool.h @@ -228,21 +228,24 @@ public: private: const CaloDetDescrManager* caloMgr() const; - std::string m_depth_choice; + Gaudi::Property<std::string> m_depth_choice{ this, + "DepthChoice", + "", + "depth choice" }; - /** ID Helper - */ - const CaloCell_ID* m_calo_id; + /** ID Helper + */ + const CaloCell_ID* m_calo_id; - /** DD manager - */ - CxxUtils::CachedPointer<CaloDetDescrManager> m_calo_dd; + /** DD manager + */ + CxxUtils::CachedPointer<CaloDetDescrManager> m_calo_dd; - /** Phi range helper object - */ - CaloPhiRange m_range; + /** Phi range helper object + */ + CaloPhiRange m_range; - double m_default; + double m_default; }; diff --git a/Calorimeter/CaloDetDescr/src/CaloDepthTool.cxx b/Calorimeter/CaloDetDescr/src/CaloDepthTool.cxx index d44c21ece36513a90f6e56ec4091adc07f6fc32c..7bd5f5c49e1353d5860fe954b014ece280e6cff4 100755 --- a/Calorimeter/CaloDetDescr/src/CaloDepthTool.cxx +++ b/Calorimeter/CaloDetDescr/src/CaloDepthTool.cxx @@ -38,12 +38,10 @@ CaloDepthTool::CaloDepthTool(const std::string& type, const std::string& name, const IInterface* parent) : AthAlgTool(type, name, parent), - m_depth_choice(""), m_calo_id(nullptr), m_default(0) { declareInterface<CaloDepthTool>( this ); - declareProperty("DepthChoice", m_depth_choice,"choice of depth paramaterisation" ); } CaloDepthTool::~CaloDepthTool() diff --git a/Calorimeter/CaloRec/python/CaloBCIDAvgAlgSCConfig.py b/Calorimeter/CaloRec/python/CaloBCIDAvgAlgSCConfig.py new file mode 100644 index 0000000000000000000000000000000000000000..dcce6ad783054b4b6563cff468b60610c12b8483 --- /dev/null +++ b/Calorimeter/CaloRec/python/CaloBCIDAvgAlgSCConfig.py @@ -0,0 +1,22 @@ +# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration + +# File: CaloRec/python/CaloBCIDAvgAlgSCConfig.py +# Purpose: Configure CaloBCIDAvgAlgSC. + +from __future__ import print_function +from AthenaConfiguration.ComponentFactory import CompFactory + + +from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator + +def CaloBCIDAvgAlgSCCfg (flags, sequence=None): + result = ComponentAccumulator() + + from CaloRec.CaloBCIDLumiCondAlgSCConfig import CaloBCIDLumiCondAlgSCCfg + result.merge (CaloBCIDLumiCondAlgSCCfg (flags)) + result.addEventAlgo(CompFactory.CaloBCIDAvgAlg( + name="CaloBCIDAvgAlgSC", + IsSuperCell=True, + BCIDLumiKey="CaloBCIDLumiSC", + WriteKey="CaloBCIDAverageSC"), sequenceName=sequence) + return result diff --git a/Calorimeter/CaloRec/python/CaloBCIDCoeffsCondAlgSCConfig.py b/Calorimeter/CaloRec/python/CaloBCIDCoeffsCondAlgSCConfig.py new file mode 100644 index 0000000000000000000000000000000000000000..2d8ad3777ff99cf042a01637a0afd49e172cdc79 --- /dev/null +++ b/Calorimeter/CaloRec/python/CaloBCIDCoeffsCondAlgSCConfig.py @@ -0,0 +1,36 @@ +# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration + +# File: CaloRec/python/CaloBCIDCoeffsCondAlgSCConfig.py +# Purpose: Configure CaloBCIDCoeffsCondAlgSC. + +from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator +from AthenaConfiguration.ComponentFactory import CompFactory + +def CaloBCIDCoeffsCondAlgSCCfg (flags, name = 'CaloBCIDCoeffsCondAlgSC', **kwargs): + acc = ComponentAccumulator() + + if not flags.Input.isMC: + #Data case + pass + else: + #MC case + kwargs.setdefault("MCSymKey", '') + + from LArRecUtils.LArRecUtilsConfig import LArOFCSCCondAlgCfg + acc.merge(LArOFCSCCondAlgCfg(flags)) + kwargs.setdefault("OFCKey", 'LArOFCSC') + + requiredConditions=["PileupAverageSC","ShapeSC"] + from LArConfiguration.LArElecCalibDBConfig import LArElecCalibDBMCSCCfg + acc.merge(LArElecCalibDBMCSCCfg(flags,requiredConditions)) + #conddb.addFolder("LAR_OFL","/LAR/ElecCalibMCSC/LArPileupAverage<tag>LARElecCalibMCSCLArPileupAverage-IOVDEP-00</tag>",className="CondAttrListCollection" + kwargs.setdefault("MinBiasAvgKey", "LArPileupAverageSC") + kwargs.setdefault("ShapeKey", "LArShapeSC") + + kwargs.setdefault("OutputCoeffsKey", 'CaloBCIDCoeffsSC') + + kwargs.setdefault("IsSuperCell", True) + + acc.addCondAlgo (CompFactory.CaloBCIDCoeffsCondAlg(name, **kwargs)) + + return acc diff --git a/Calorimeter/CaloRec/python/CaloBCIDLumiCondAlgSCConfig.py b/Calorimeter/CaloRec/python/CaloBCIDLumiCondAlgSCConfig.py new file mode 100644 index 0000000000000000000000000000000000000000..3d7812d3117c406571a5be123737ca01b97119ab --- /dev/null +++ b/Calorimeter/CaloRec/python/CaloBCIDLumiCondAlgSCConfig.py @@ -0,0 +1,34 @@ +# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration + +# File: CaloRec/python/CaloBCIDLumiCondAlgSCConfig.py +# Purpose: Configure CaloBCIDLumiCondAlgSC. + +from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator +from AthenaConfiguration.ComponentFactory import CompFactory + + +def CaloBCIDLumiCondAlgSCCfg (flags): + result = ComponentAccumulator() + + from CaloRec.CaloBCIDCoeffsCondAlgSCConfig import CaloBCIDCoeffsCondAlgSCCfg + result.merge (CaloBCIDCoeffsCondAlgSCCfg (flags)) + + if not flags.Input.isMC: + from LumiBlockComps.LuminosityCondAlgConfig import LuminosityCondAlgCfg + result.merge (LuminosityCondAlgCfg (flags)) + + else: + from LumiBlockComps.BunchCrossingCondAlgConfig import BunchCrossingCondAlgCfg + result.merge (BunchCrossingCondAlgCfg(flags)) + + + CaloBCIDLumiCondAlg = CompFactory.CaloBCIDLumiCondAlg # CaloRec + alg = CaloBCIDLumiCondAlg ('CaloBCIDLumiCondAlgSC', + CoeffsKey = 'CaloBCIDCoeffsSC', + BunchCrossingCondDataKey = 'BunchCrossingData', + LuminosityCondDataKey = 'LuminosityCondData', + isMC = flags.Input.isMC, + OutputLumiKey = 'CaloBCIDLumiSC') + result.addCondAlgo (alg) + + return result diff --git a/Calorimeter/CaloRec/python/CaloRecoConfig.py b/Calorimeter/CaloRec/python/CaloRecoConfig.py index bd59901c90a4823b1b633abb40b88ccb44a6d847..4628c40cea948bd297d6e6fa67bef9f3fd0fbf6e 100644 --- a/Calorimeter/CaloRec/python/CaloRecoConfig.py +++ b/Calorimeter/CaloRec/python/CaloRecoConfig.py @@ -39,6 +39,13 @@ def CaloRecoCfg(configFlags, clustersname=None,doLCCalib=None): from CaloRec.CaloFwdTopoTowerConfig import CaloFwdTopoTowerCfg result.merge(CaloFwdTopoTowerCfg(configFlags,CaloTopoClusterContainerKey="CaloTopoClusters")) + #Configure NoisyROSummary + from LArCellRec.LArNoisyROSummaryConfig import LArNoisyROSummaryCfg + result.merge(LArNoisyROSummaryCfg(configFlags)) + + from LArROD.LArFebErrorSummaryMakerConfig import LArFebErrorSummaryMakerCfg + result.merge(LArFebErrorSummaryMakerCfg(configFlags)) + return result diff --git a/Calorimeter/CaloTrackingGeometry/CaloTrackingGeometry/CaloSurfaceBuilder.h b/Calorimeter/CaloTrackingGeometry/CaloTrackingGeometry/CaloSurfaceBuilder.h index ff2604fd17fd1566d69206c6f3749380fbddec0b..e582ac553794bc1246e1ca127221335e1495c182 100755 --- a/Calorimeter/CaloTrackingGeometry/CaloTrackingGeometry/CaloSurfaceBuilder.h +++ b/Calorimeter/CaloTrackingGeometry/CaloTrackingGeometry/CaloSurfaceBuilder.h @@ -26,6 +26,7 @@ #include "CaloIdentifier/CaloCell_ID.h" #include "CaloGeoHelpers/CaloPhiRange.h" #include "CaloDetDescr/CaloSubdetNames.h" +#include "CaloDetDescr/CaloDepthTool.h" #include <mutex> #include <vector> @@ -33,7 +34,6 @@ class CaloDetDescrManager; class ICaloCoordinateTool; class IMessageSvc; -class CaloDepthTool; class ICaloRecoMaterialTool; class ICaloRecoSimpleGeomTool; class ICaloSurfaceHelper; @@ -162,9 +162,11 @@ private: ToolHandle<ICaloRecoMaterialTool> m_lar_mat; ToolHandle<ICaloRecoSimpleGeomTool> m_lar_simplegeom; - // Defines the depths for DD and User surfaces : - ToolHandle<CaloDepthTool> m_calodepth; - + // Defines the depths for DD and User surfaces : + ToolHandle<CaloDepthTool> m_calodepth{ this, + "CaloDepthTool", + "CaloDepthTool/CaloDepthTool", + "CaloDepthTool to be used" }; }; inline std::vector<std::pair<const Trk::Surface*,const Trk::Surface*> > CaloSurfaceBuilder::entrySurfaces() const diff --git a/Calorimeter/CaloTrackingGeometry/src/CaloSurfaceBuilder.cxx b/Calorimeter/CaloTrackingGeometry/src/CaloSurfaceBuilder.cxx index e68725a1c093eb1682f3f23a2e6a7761756a4141..2f8b8fa4d72a7712b7bc4da2f3ec76877638f76f 100755 --- a/Calorimeter/CaloTrackingGeometry/src/CaloSurfaceBuilder.cxx +++ b/Calorimeter/CaloTrackingGeometry/src/CaloSurfaceBuilder.cxx @@ -38,7 +38,6 @@ #include "CaloDetDescr/CaloDetDescriptor.h" #include "CaloDetDescr/CaloDetDescrElement.h" #include "CaloDetDescr/ICaloCoordinateTool.h" -#include "CaloDetDescr/CaloDepthTool.h" #include "CaloDetDescr/ICaloRecoMaterialTool.h" #include "CaloDetDescr/ICaloRecoSimpleGeomTool.h" @@ -65,14 +64,11 @@ CaloSurfaceBuilder::CaloSurfaceBuilder(const std::string& type, m_calo_dd(nullptr), m_tile_dd(nullptr), m_lar_mat("LArRecoMaterialTool"), - m_lar_simplegeom("LArRecoSimpleGeomTool"), - m_calodepth("CaloDepthTool") + m_lar_simplegeom("LArRecoSimpleGeomTool") { declareInterface<ICaloSurfaceBuilder>( this ); declareProperty ("LArRecoMaterialTool", m_lar_mat); declareProperty ("LarRecoSimpleGeometryTool", m_lar_simplegeom); - declareProperty ("CaloDepthTool", m_calodepth); - } CaloSurfaceBuilder::~CaloSurfaceBuilder() diff --git a/Control/AthCUDA/AthCUDAKernel/CMakeLists.txt b/Control/AthCUDA/AthCUDAKernel/CMakeLists.txt index d9d141a8422ac6d482a38fc9de730f931cca9410..fa7f974ae64ceda2e369fc14f27b0c645446968c 100644 --- a/Control/AthCUDA/AthCUDAKernel/CMakeLists.txt +++ b/Control/AthCUDA/AthCUDAKernel/CMakeLists.txt @@ -12,6 +12,10 @@ atlas_add_library( AthCUDAKernelLib set_target_properties( AthCUDAKernelLib PROPERTIES POSITION_INDEPENDENT_CODE ON ) +# Disable faulty "declared but never used" warnings for the template code. +target_compile_options( AthCUDAKernelLib PUBLIC + $<$<COMPILE_LANGUAGE:CUDA>:-Xcudafe --diag_suppress=177> ) + # Test(s) in the package. atlas_add_test( ArrayKernelTask SOURCES test/test_ArrayKernelTask.cu diff --git a/Control/AthenaConfiguration/python/AccumulatorCache.py b/Control/AthenaConfiguration/python/AccumulatorCache.py index be082b46d5e9ed0455932f32f5d395a4d3a40e19..dace4c1eae896d80c1516204a2cafee5a15466fa 100644 --- a/Control/AthenaConfiguration/python/AccumulatorCache.py +++ b/Control/AthenaConfiguration/python/AccumulatorCache.py @@ -6,9 +6,11 @@ from AthenaCommon.Logging import logging _msg = logging.getLogger('AccumulatorCache') import functools +import time from copy import deepcopy - from collections.abc import Hashable +from collections import defaultdict +from dataclasses import dataclass class AccumulatorDecorator: """Class for use in function decorators, implements memoization. @@ -24,6 +26,15 @@ class AccumulatorDecorator: VERIFY_NOTHING = 0 VERIFY_HASH = 1 + @dataclass + class CacheStats: + hits : int = 0 + misses: int = 0 + t_hits: float = 0 + t_misses: float = 0 + + _stats = defaultdict(CacheStats) + def __init__(self , func , size , verify , deepCopy): """The constructor is typically called in a function returning a decorator. @@ -44,17 +55,35 @@ class AccumulatorDecorator: self._func = func self._cache = {} self._resultCache = {} - self._hits = 0 - self._misses = 0 self._verify = verify self._deepcopy = deepCopy - def __str__(self): - return "|cache size : " + str(len(self._cache)) + " , misses : " + str(self._misses) + " , hits : " + str(self._hits) + " , function : " + str(self._func.__name__) + "|" + if self._verify not in [self.VERIFY_NOTHING, self.VERIFY_HASH]: + raise RuntimeError(f"Invalid value for verify ({verify}) in AccumulatorCache for {func}") def getInfo(self): - """Rerurn a dictionary with information about the cache size and cache usage""" - return {"cache_size" : len(self._cache) , "misses" : self._misses , "hits" : self._hits , "function" : self._func , "result_cache_size" : len(self._resultCache)} + """Return a dictionary with information about the cache size and cache usage""" + return {"cache_size" : len(self._cache), + "misses" : self._stats[self._func].misses, + "hits" : self._stats[self._func].hits, + "function" : self._func, + "result_cache_size" : len(self._resultCache)} + + @classmethod + def printStats(cls): + """Print cache statistics""" + header = "%-70s | Hits (time) | Misses (time) |" % "AccumulatorCache" + print("-"*len(header)) + print(header) + print("-"*len(header)) + # Print sorted by hit+miss time: + for func, stats in sorted(cls._stats.items(), key=lambda s:s[1].t_hits+s[1].t_misses, reverse=True): + name = f"{func.__module__}.{func.__name__}" + if len(name) > 70: + name = '...' + name[-67:] + print(f"{name:70} | {stats.hits:6} ({stats.t_hits:4.1f}s) | " + f"{stats.misses:6} ({stats.t_misses:4.1f}s) |") + print("-"*len(header)) @classmethod def suspendCaching(cls): @@ -81,6 +110,24 @@ class AccumulatorDecorator: return None def __call__(self , *args , **kwargs): + try: + t0 = time.perf_counter() + res, cacheHit = self._callImpl(*args, **kwargs) + return res + finally: + t1 = time.perf_counter() + if cacheHit is True: + self._stats[self._func].hits += 1 + self._stats[self._func].t_hits += (t1-t0) + elif cacheHit is False: + self._stats[self._func].misses += 1 + self._stats[self._func].t_misses += (t1-t0) + + def _callImpl(self , *args , **kwargs): + """Implementation of __call__. + + Returns: (result, cacheHit) + """ if(AccumulatorDecorator._memoize): hashable_args = True for a in args: @@ -99,7 +146,7 @@ class AccumulatorDecorator: if(hsh in self._cache): res = self._cache[hsh] - + cacheHit = None if(AccumulatorDecorator.VERIFY_HASH == self._verify): resHsh = self._resultCache[hsh] chkHsh = None @@ -113,28 +160,22 @@ class AccumulatorDecorator: _msg.debug("Hash of function result, cached using AccumulatorDecorator, not available for verification.") if((chkHsh is None) or (resHsh is None) or resHsh != chkHsh): # at least one hash is not available (None) so no verification can be performed - # or - # hashes are different - self._misses += 1 + # or hashes are different + cacheHit = False res = self._func(*args , **kwargs) self._cache[hsh] = res self._resultCache[hsh] = None if(AccumulatorDecorator._hasHash(res)): self._resultCache[hsh] = AccumulatorDecorator._getHash(res) else: - self._hits += 1 - elif(AccumulatorDecorator.VERIFY_NOTHING == self._verify): - self._hits += 1 + cacheHit = True else: - _msg.debug("Incorrect value of verify in AccumulatorDecorator, assuming AccumulatorDecorator.VERIFY_NOTHING.") - self._hits += 1 + cacheHit = True + + return (deepcopy(res) if self._deepcopy else res, cacheHit) - if(self._deepcopy): - return deepcopy(res) - else: - return res else: - self._misses += 1 + _msg.debug('Hash not found in AccumulatorCache for function %s' , self._func) if(len(self._cache) >= self._maxSize): del self._cache[next(iter(self._cache))] @@ -147,23 +188,19 @@ class AccumulatorDecorator: if(AccumulatorDecorator._hasHash(res)): self._resultCache[hsh] = AccumulatorDecorator._getHash(res) self._cache[hsh] = res - elif(AccumulatorDecorator.VERIFY_NOTHING == self._verify): - self._cache[hsh] = res else: - _msg.debug("Incorrect value of verify in AccumulatorDecorator, assuming AccumulatorDecorator.VERIFY_NOTHING.") self._cache[hsh] = res - if(self._deepcopy): - return deepcopy(res) - else: - return res + return (deepcopy(res) if self._deepcopy else res, False) else: - self._misses += 1 - return self._func(*args , **kwargs) + _msg.debug('Could not calculate hash of arguments for function %s in AccumulatorCache.' , self._func) + return (self._func(*args , **kwargs), False) else: - return self._func(*args , **kwargs) + return (self._func(*args , **kwargs), None) + -def AccumulatorCache(func = None , maxSize = 128 , verifyResult = AccumulatorDecorator.VERIFY_NOTHING , deepCopy = True): +def AccumulatorCache(func = None, maxSize = 128, + verifyResult = AccumulatorDecorator.VERIFY_NOTHING, deepCopy = True): """Function decorator, implements memoization. Keyword arguments: @@ -180,10 +217,7 @@ def AccumulatorCache(func = None , maxSize = 128 , verifyResult = AccumulatorDec An instance of AccumulatorDecorator. """ - def newWrapper(funct): - return AccumulatorDecorator(funct , maxSize , verifyResult , deepCopy) + def wrapper_accumulator(func): + return AccumulatorDecorator(func, maxSize, verifyResult, deepCopy) - if(func): - return newWrapper(func) - else: - return newWrapper + return wrapper_accumulator(func) if func else wrapper_accumulator diff --git a/Control/AthenaConfiguration/python/testAccumulatorCache.py b/Control/AthenaConfiguration/python/testAccumulatorCache.py index 28671d7d8d2802a3449a854e89abe46fc8bc825a..b6296a5b3802b10830351d016def7f538db6c346 100755 --- a/Control/AthenaConfiguration/python/testAccumulatorCache.py +++ b/Control/AthenaConfiguration/python/testAccumulatorCache.py @@ -40,6 +40,8 @@ class TestCache(unittest.TestCase): self.assertEqual(returnSame.__name__ , "returnSame") self.assertEqual(returnSame.__doc__ , "returns the same number") + AccumulatorDecorator.printStats() + @AccumulatorCache(verifyResult = AccumulatorDecorator.VERIFY_NOTHING , deepCopy = False) def fac(x): return hashwrapper(1 if x.x == 0 else x.x * fac(hashwrapper(x.x - 1)).x) @@ -291,24 +293,6 @@ class TestCache(unittest.TestCase): self.assertEqual(info["misses"] , 3) self.assertEqual(info["cache_size"] , 0) - def runTest(self): - print("... basic tests, simple caching and introspection ...") - self.test_basic() - print("... testing cache limit ...") - self.test_cache_limit() - print("... testing if cached results were modified ...") - self.test_validation() - print("... testing suspend ...") - self.test_suspend() - print("... testing verify copy ...") - self.test_verify_copy() - print("... testing verify default ...") - self.test_verify_default() - - - -if(__name__ == '__main__'): - suite = unittest.TestSuite() - suite.addTest(TestCache()) - runner = unittest.TextTestRunner(failfast = False) - runner.run(suite) + +if __name__ == '__main__': + unittest.main() diff --git a/Control/AthenaExamples/AthAsgExUnittest/test/gt_MockxAODJet.cxx b/Control/AthenaExamples/AthAsgExUnittest/test/gt_MockxAODJet.cxx index 0d28990b6abc5e5ea9c78f5d36427ad864eab0ed..00fc99acdeb999bf1751e9c6c7191ac3e5523a19 100644 --- a/Control/AthenaExamples/AthAsgExUnittest/test/gt_MockxAODJet.cxx +++ b/Control/AthenaExamples/AthAsgExUnittest/test/gt_MockxAODJet.cxx @@ -68,7 +68,7 @@ namespace Athena_test { TEST_F( MockxAODJetTest, jetgetAttribute ) { EXPECT_CALL( mockjet, getAttributeFloat( "test", _ ) ) - .WillOnce( DoAll( SetArgReferee<1>( 42 ), Return(true) ) ); + .WillOnce( testing::DoAll( SetArgReferee<1>( 42 ), Return(true) ) ); float value; EXPECT_TRUE( jet->getAttribute<float>( "test", value ) ); EXPECT_EQ( 42, value ); diff --git a/Control/AthenaMonitoring/python/BadLBFilterTool.py b/Control/AthenaMonitoring/python/BadLBFilterTool.py index e6d97221635dcd407cf393d6981420b73de29811..c9fea67a136f0c654a6ea9006a0211a771ebaf73 100644 --- a/Control/AthenaMonitoring/python/BadLBFilterTool.py +++ b/Control/AthenaMonitoring/python/BadLBFilterTool.py @@ -1,7 +1,6 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration -from PyUtils.Decorators import memoize -from functools import reduce +from functools import reduce, cache def _resolve_db_tag(origDbTag): from AthenaCommon.GlobalFlags import globalflags @@ -32,7 +31,7 @@ def _InstanceFromProjectName(): # Set up the bad lb filter conditions algorithm # Cache instance once already created -@memoize +@cache def GetBadLBFilterAlg(name, defects, writekey, ignoreRecoverable=False, origDbTag=None): """ Configure an instance of the bad LB filter conditions algorithm. Not intended to be called directly by users. @@ -119,7 +118,7 @@ def GetBadLBFilterTool(name, defects, alwaysReturnTrue=False, ignoreRecoverable= return monFilterTool -@memoize +@cache def LArBadDefectList(origDbTag=None): """ Get the defects to configure for LAr - cache results to avoid lots of DB lookups diff --git a/Control/AthenaMonitoring/python/BadLBFilterToolConfig.py b/Control/AthenaMonitoring/python/BadLBFilterToolConfig.py index 18dd4cc5c167c44c05a3582872f060bafd1b47a1..c1f0c58957da5e4bdebbd6dfa904f93154324de0 100644 --- a/Control/AthenaMonitoring/python/BadLBFilterToolConfig.py +++ b/Control/AthenaMonitoring/python/BadLBFilterToolConfig.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration from AthenaConfiguration.ComponentFactory import CompFactory from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from AthenaConfiguration.AccumulatorCache import AccumulatorCache @@ -74,7 +74,6 @@ def BadLBFilterToolCfg(inputFlags,name, defects, alwaysReturnTrue=False, ignoreR return result -#@memoize - hash function on flags is deprecated, use AccumulatorCache instead @AccumulatorCache def LArDefectList(inputFlags,origDbTag=None): """ diff --git a/Control/AthenaMonitoring/python/EventFlagFilterTool.py b/Control/AthenaMonitoring/python/EventFlagFilterTool.py index 581455678654990a31cb206957b7a386c4eca32f..7f710b8c3826f8ed5929c72140a604c1562d59ee 100644 --- a/Control/AthenaMonitoring/python/EventFlagFilterTool.py +++ b/Control/AthenaMonitoring/python/EventFlagFilterTool.py @@ -1,10 +1,10 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration -from PyUtils.Decorators import memoize +from functools import cache # Set up the event cleaning filter tool # Cache instances that are already created -@memoize +@cache def GetEventFlagFilterTool(name, doLAr=True, doTile=True, doSCT=True, doCore=True, alwaysReturnTrue=False): """ Configure an instance of the bad LB filter tool. If called twice with the same options, will return the same instance. diff --git a/Control/AthenaPython/python/Bindings.py b/Control/AthenaPython/python/Bindings.py index a0f1c9c79f9a48597f2d4da7de64f72dded84cdb..4f14bd6d8596a86926a571f071f1bb2ed6c3b1f7 100644 --- a/Control/AthenaPython/python/Bindings.py +++ b/Control/AthenaPython/python/Bindings.py @@ -1,20 +1,18 @@ -# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration # @file: AthenaPython/python/Bindings.py # @author: Sebastien Binet <binet@cern.ch> -from __future__ import print_function - ### data __author__ = """ Sebastien Binet (binet@cern.ch) """ ### imports -from PyUtils.Decorators import memoize +from functools import cache from AthenaCommon.Logging import logging -@memoize +@cache def _load_dict(lib): """Helper function to remember which libraries have been already loaded """ @@ -23,7 +21,7 @@ def _load_dict(lib): lib="lib"+lib return cppyy.load_library(lib) -@memoize +@cache def _import_ROOT(): import ROOT ROOT.gROOT.SetBatch(True) @@ -79,7 +77,7 @@ class _PyAthenaBindingsCatalog(object): return @staticmethod - @memoize + @cache def init(name): """Initialize the python binding with the callback previously registered If no callback was registered, swallow the warning... @@ -100,7 +98,7 @@ class _PyAthenaBindingsCatalog(object): return klass ### helper method to easily retrieve services by name ------------------------- -@memoize +@cache def py_svc(svcName, createIf=True, iface=None): """ Helper function to retrieve a service by name, using Gaudi python bindings. @@ -141,7 +139,7 @@ def py_svc(svcName, createIf=True, iface=None): return svc ### helper method to easily retrieve tools from ToolSvc by name --------------- -@memoize +@cache def py_tool(toolName, createIf=True, iface=None): """ Helper function to retrieve a tool (owned by the ToolSvc) by name, using @@ -193,7 +191,6 @@ def py_tool(toolName, createIf=True, iface=None): return tool ### helper method to easily retrieve algorithms by name ----------------------- -# @c memoize # don't memoize ? def py_alg(algName, iface='IAlgorithm'): """ Helper function to retrieve an IAlgorithm (managed by the IAlgManager_) by @@ -238,7 +235,7 @@ def py_alg(algName, iface='IAlgorithm'): return alg ### pythonizations for StoreGateSvc -@memoize +@cache def _py_init_StoreGateSvc(): ## most probably, user will want to interact with PyRoot objects ## => install the fixes for our user @@ -251,7 +248,7 @@ def _py_init_StoreGateSvc(): return StoreGateSvc ### pythonizations for IIncidentSvc -@memoize +@cache def _py_init_IIncidentSvc(): import cppyy # IIncidentSvc bindings from dictionary @@ -283,7 +280,7 @@ def _py_init_IIncidentSvc(): return IIncidentSvc ### pythonizations for ClassIDSvc -@memoize +@cache def _py_init_ClassIDSvc(): import cppyy # IClassIDSvc bindings from dictionary @@ -304,7 +301,7 @@ def _py_init_ClassIDSvc(): IClassIDSvc._clidgen = clidGenerator(db=None) # add pythonized methods - @memoize + @cache def _clid (self, name): # handle special cases where CLID has been registered with a typedef try: name = _clid_typename_aliases[name] @@ -316,7 +313,7 @@ def _py_init_ClassIDSvc(): IClassIDSvc.clid = _clid del _clid - @memoize + @cache def _typename (self, clid): # handle special cases of missing clids try: @@ -330,7 +327,7 @@ def _py_init_ClassIDSvc(): return IClassIDSvc ### pythonizations for ITHistSvc -@memoize +@cache def _py_init_THistSvc(): import cppyy # ITHistSvc bindings from dictionary @@ -588,7 +585,7 @@ del %s""" % (n,n,n,n,n) return ITHistSvc ### pythonizations for EventStreamInfo -@memoize +@cache def _py_init_EventStreamInfo(): import cppyy # EventStreamInfo bindings from dictionary @@ -620,7 +617,7 @@ def _py_init_EventStreamInfo(): return ESI ### pythonizations for EventType -@memoize +@cache def _py_init_EventType(): import cppyy # EventStreamInfo bindings from dictionary @@ -652,27 +649,27 @@ def _py_init_EventType(): return cls ### pythonizations for DataLink -@memoize +@cache def _py_init_DataLink(): return _gen_data_link ### pythonizations for ElementLink -@memoize +@cache def _py_init_ElementLink(): return _gen_element_link ### pythonizations for ElementLinkVector -@memoize +@cache def _py_init_ElementLinkVector(): return _gen_elv ### pythonizations for NavigationToken -@memoize +@cache def _py_init_NavigationToken(): return _gen_navtok ### helper method to easily instantiate DataLink ------------------------------ -@memoize +@cache def _gen_data_link(klass, storage_policy=None): """helper method to easily instantiate a DataLink class. Sensible default for the storage policy is chosen if none given (it usually @@ -691,7 +688,7 @@ def _gen_data_link(klass, storage_policy=None): return ROOT.DataLink(klass, storage_policy) ### helper method to easily instantiate ElementLink --------------------------- -@memoize +@cache def _gen_element_link(klass, storage_policy=None, indexing_policy=None): """helper method to easily instantiate an ElementLink class. Sensible defaults for the storage and indexing policies are chosen if none @@ -714,7 +711,7 @@ def _gen_element_link(klass, storage_policy=None, indexing_policy=None): return ROOT.ElementLink(klass) ### helper method to easily instantiate ElementLinkVector --------------------- -@memoize +@cache def _gen_elv(klass, storage_policy=None, indexing_policy=None): """helper method to easily instantiate an ElementLinkVector class. Sensible defaults for the storage and indexing policies are chosen if none @@ -734,7 +731,7 @@ def _gen_elv(klass, storage_policy=None, indexing_policy=None): return ROOT.ElementLinkVector(klass, storage_policy, indexing_policy) ### helper method to easily instantiate NavigationToken ----------------------- -@memoize +@cache def _gen_navtok(klass, weight_cls=None, hash_cls=None): """helper method to easily instantiate a NavigationToken class. Sensible default for the weight and hash parameters are chosen if none are diff --git a/Control/IOVSvc/CMakeLists.txt b/Control/IOVSvc/CMakeLists.txt index 468d5f03ef1e13a2f5dc5b05e70f1c3180bacc4a..d05ad5e31dab139971485c013cbcf0d053aabe8b 100644 --- a/Control/IOVSvc/CMakeLists.txt +++ b/Control/IOVSvc/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( IOVSvc ) @@ -14,7 +14,7 @@ atlas_add_library( IOVSvcLib INCLUDE_DIRS ${Boost_INCLUDE_DIRS} PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} LINK_LIBRARIES AthenaBaseComps AthenaKernel GaudiKernel SGTools - PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} PersistentDataModel StoreGateLib xAODEventInfo ) + PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} PersistentDataModel StoreGateLib xAODEventInfo RootUtils ) atlas_add_component( IOVSvc src/components/*.cxx diff --git a/Control/IOVSvc/src/CondInputLoader.cxx b/Control/IOVSvc/src/CondInputLoader.cxx index a3a8a6ed7d2397e1574146142d3c7964643ee420..b0ab7c8a703ff55854dc7d93b3e271d3781a5013 100644 --- a/Control/IOVSvc/src/CondInputLoader.cxx +++ b/Control/IOVSvc/src/CondInputLoader.cxx @@ -21,12 +21,15 @@ #include "AthenaKernel/IIOVSvc.h" #include "StoreGate/CondHandleKey.h" #include "AthenaKernel/CondContMaker.h" +#include "AthenaKernel/ITPCnvBase.h" +#include "RootUtils/WithRootErrorHandler.h" #include "xAODEventInfo/EventInfo.h" #include "AthenaKernel/BaseInfo.h" #include "ICondSvcSetupDone.h" #include "TClass.h" +#include "boost/algorithm/string/predicate.hpp" namespace @@ -89,6 +92,7 @@ CondInputLoader::initialize() ATH_CHECK( m_clidSvc.retrieve() ); ATH_CHECK( m_rcuSvc.retrieve() ); ATH_CHECK( m_dictLoader.retrieve() ); + ATH_CHECK( m_tpCnvSvc.retrieve() ); // Trigger read of IOV database ServiceHandle<IIOVSvc> ivs("IOVSvc",name()); @@ -127,7 +131,22 @@ CondInputLoader::initialize() // Loading root dictionaries in a multithreaded environment // is unreliable. // So try to be sure all dictionaries are loaded now. - m_dictLoader->load_type (id.clid()); + RootType rt = loadDict (id.clid()); + + // Special case for LArConditionsSubset classes. + if (rt.Class()) { + size_t nbases = rt.BaseSize(); + std::string pat = "LArConditionsContainer<"; + for (size_t ibase = 0; ibase < nbases; ++ibase) { + std::string basename = rt.BaseAt(ibase).Name(); + if (boost::starts_with (basename, pat)) { + std::string subset = "LArConditionsSubset<" + basename.substr (pat.size(), std::string::npos); + loadDict (subset); + loadDict ("LArConditionsSubset_p1"); + } + } + } + break; //quit loop over m_load } // end if CondInputLoader deals with this folder }//end loop over m_load @@ -162,7 +181,7 @@ CondInputLoader::initialize() StoreID::storeName(StoreID::CONDITION_STORE)); m_load.value().emplace(vhk.fullKey()); // Again, make sure all needed dictionaries are loaded. - m_dictLoader->load_type (clid2); + m_dictLoader->load_type (clid2, true); } } } @@ -372,3 +391,30 @@ CondInputLoader::extraDeps_update_handler( Gaudi::Details::PropertyBase& /*Extra { // do nothing } + +//----------------------------------------------------------------------------- + +RootType CondInputLoader::loadDict (const std::string& name) +{ + // First try to load the persistent class dictionary. + std::unique_ptr<ITPCnvBase> tpcnv = m_tpCnvSvc->t2p_cnv_unique (name); + if (tpcnv) { + RootType rtp = m_dictLoader->load_type (tpcnv->persistentTInfo()); + if (rtp.Class()) { + return rtp; + } + } + + // Otherwise try to load the dictionary for the class itself. + return m_dictLoader->load_type (name); +} + + +RootType CondInputLoader::loadDict (CLID clid) +{ + std::string name; + if (m_clidSvc->getTypeNameOfID (clid, name).isSuccess()) { + return loadDict (name); + } + return RootType(); +} diff --git a/Control/IOVSvc/src/CondInputLoader.h b/Control/IOVSvc/src/CondInputLoader.h index c705d5c3592449212ce2778aa31be4f7de87f774..266017ea0c39ffae71a0bb76b51580c1bfa078b1 100644 --- a/Control/IOVSvc/src/CondInputLoader.h +++ b/Control/IOVSvc/src/CondInputLoader.h @@ -17,6 +17,7 @@ #include "AthenaKernel/IIOVSvc.h" #include "AthenaKernel/IIOVDbSvc.h" #include "AthenaKernel/IDictLoaderSvc.h" +#include "AthenaKernel/ITPCnvSvc.h" #include "StoreGate/StoreGateSvc.h" #include "AthenaBaseComps/AthAlgorithm.h" #include "PersistentDataModel/AthenaAttributeList.h" @@ -47,6 +48,9 @@ class CondInputLoader // from AthAlgorithm void extraDeps_update_handler(Gaudi::Details::PropertyBase&); + RootType loadDict (CLID clid); + RootType loadDict (const std::string& name); + /// Containers Gaudi::Property<DataObjIDColl> m_load{this,"Load",{}, "List of objects to be loaded","OrderedSet<std::vector<std::string> >"}; @@ -69,6 +73,8 @@ class CondInputLoader ServiceHandle<Athena::IRCUSvc> m_rcuSvc; ServiceHandle<IDictLoaderSvc> m_dictLoader { this, "DictLoaderSvc", "AthDictLoaderSvc", "" }; + ServiceHandle<ITPCnvSvc> m_tpCnvSvc + { this, "TPCnvSvc", "AthTPCnvSvc", "" }; std::map<std::string,std::string> m_keyFolderMap; }; diff --git a/Control/PerformanceMonitoring/PerfMonComps/python/PyPerfMon.py b/Control/PerformanceMonitoring/PerfMonComps/python/PyPerfMon.py index 90ef5b7bdbd1b5a7fa980de4cb4e1cc205162875..9eefffc8dfce0768ba86f778654a82c213e23d9c 100644 --- a/Control/PerformanceMonitoring/PerfMonComps/python/PyPerfMon.py +++ b/Control/PerformanceMonitoring/PerfMonComps/python/PyPerfMon.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration # @file: PyPerfMon.py # @author: Sebastien Binet <binet@cern.ch> @@ -9,18 +9,15 @@ __doc__ = """python module holding a python service to monitor athena perfor """ import os,sys +from functools import cache import AthenaCommon.Logging as L - -_perfMonStates = ('ini','evt','fin') - from PerfMonComps.PyMonUtils import Units, pymon +from PyUtils.Decorators import forking -from PyUtils.Decorators import memoize, forking - -import six +_perfMonStates = ('ini','evt','fin') -@memoize +@cache def _import_ROOT(): # FIXME: work-around ROOT's silly behaviour wrt graphics libraries # see: https://savannah.cern.ch/bugs/?35461 @@ -430,7 +427,7 @@ class Svc(object): ## write out meta-data import PyUtils.dbsqlite as dbs meta = dbs.open(headerFile, 'n') - for k,v in six.iteritems (self.meta): + for k,v in self.meta.items(): meta[k] = v meta['version_id'] = '0.4.0' # stream-format + header file meta['pmon_tuple_files'] = map( os.path.basename, outFiles[1:] ) diff --git a/DataQuality/DataQualityInterfaces/src/DatabaseConfig.cxx b/DataQuality/DataQualityInterfaces/src/DatabaseConfig.cxx index c2950099fecc81cd58947a59debe488130f8c0c7..91f99c41f7e0b45497d2b1751bfbf96f313d01e6 100644 --- a/DataQuality/DataQualityInterfaces/src/DatabaseConfig.cxx +++ b/DataQuality/DataQualityInterfaces/src/DatabaseConfig.cxx @@ -10,7 +10,6 @@ #include "CoolKernel/IDatabaseSvc.h" #include "CoolKernel/IObject.h" #include "CoolKernel/IFolder.h" -#include "CoolKernel/IObject.h" #include "DataQualityInterfaces/DatabaseConfig.h" #include <array> diff --git a/DataQuality/DataQualityTools/src/DQTGlobalWZFinderTool.cxx b/DataQuality/DataQualityTools/src/DQTGlobalWZFinderTool.cxx index 9e23cb4baac4cd60a1a13921823b099f64991f59..3b04dfb7e45643bc4b53c3f8d5877f1eb99dcd51 100644 --- a/DataQuality/DataQualityTools/src/DQTGlobalWZFinderTool.cxx +++ b/DataQuality/DataQualityTools/src/DQTGlobalWZFinderTool.cxx @@ -37,7 +37,6 @@ #include <vector> -#include "xAODEventInfo/EventInfo.h" #include "TProfile.h" #include "LWHists/TH1F_LW.h" #include "LWHists/TH2F_LW.h" diff --git a/DataQuality/DataQualityUtils/DataQualityUtils/CoolMdt.h b/DataQuality/DataQualityUtils/DataQualityUtils/CoolMdt.h index 206fea433991053e0e5de41087d7cccc5fba0501..21508a1aec693c8dad5a7aef9c9e7d5fb74b2c3c 100644 --- a/DataQuality/DataQualityUtils/DataQualityUtils/CoolMdt.h +++ b/DataQuality/DataQualityUtils/DataQualityUtils/CoolMdt.h @@ -45,7 +45,6 @@ #include <sstream> #include <fstream> -#include <string> #include <TCanvas.h> #include <TDirectory.h> #include <TFile.h> diff --git a/DataQuality/DataQualityUtils/DataQualityUtils/CoolRpc.h b/DataQuality/DataQualityUtils/DataQualityUtils/CoolRpc.h index 14fe706af3ba40a7ca3d3c8e1873b3f6e3944a86..5fbe008b7ff163121f885b243ac9b9d5e8d28ae7 100644 --- a/DataQuality/DataQualityUtils/DataQualityUtils/CoolRpc.h +++ b/DataQuality/DataQualityUtils/DataQualityUtils/CoolRpc.h @@ -45,7 +45,6 @@ #include <sstream> #include <fstream> -#include <string> #include <TCanvas.h> #include <TDirectory.h> #include <TFile.h> diff --git a/DataQuality/DataQualityUtils/DataQualityUtils/CoolTgc.h b/DataQuality/DataQualityUtils/DataQualityUtils/CoolTgc.h index 3903a3eb9bc5492a7d182e7ca5ca272576324f75..9903529f105e118af05fc9276ab3a487b666e3da 100644 --- a/DataQuality/DataQualityUtils/DataQualityUtils/CoolTgc.h +++ b/DataQuality/DataQualityUtils/DataQualityUtils/CoolTgc.h @@ -46,7 +46,6 @@ #include <sstream> #include <fstream> -#include <string> #include <TCanvas.h> #include <TDirectory.h> #include <TFile.h> diff --git a/DataQuality/DataQualityUtils/DataQualityUtils/HistogramDataCOOL.h b/DataQuality/DataQualityUtils/DataQualityUtils/HistogramDataCOOL.h index c7716e517835846abae06f6e11347867ee7ca5d9..69381811b99d06110fb891c0f3a8563f672ff75a 100644 --- a/DataQuality/DataQualityUtils/DataQualityUtils/HistogramDataCOOL.h +++ b/DataQuality/DataQualityUtils/DataQualityUtils/HistogramDataCOOL.h @@ -38,7 +38,6 @@ #include <sstream> #include <fstream> -#include <string> #include <TCanvas.h> #include <TDirectory.h> #include <TFile.h> diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/share/rpc.yaml b/DataQuality/DataQualityUtils/data/postprocessing/RPCmon.yaml similarity index 100% rename from MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/share/rpc.yaml rename to DataQuality/DataQualityUtils/data/postprocessing/RPCmon.yaml diff --git a/DataQuality/DataQualityUtils/data/postprocessing/TRTmon.yaml b/DataQuality/DataQualityUtils/data/postprocessing/TRTmon.yaml index 01481b3a6b0c26530a2513c0550b53c02d990e88..edecd232e475f1f55eec50cc5c5b36c9f7582bb2 100644 --- a/DataQuality/DataQualityUtils/data/postprocessing/TRTmon.yaml +++ b/DataQuality/DataQualityUtils/data/postprocessing/TRTmon.yaml @@ -37,3 +37,23 @@ Input: [ 'TRT/(?P<region>Barrel/Stack\d.[A,C]*|[EndcapA|EndcapC]*/Sector\d.)/(? Output: [ 'TRT/{region}/hHitOnTrackVsAll{element}' ] Function: TRTMonitoringRun3.TRTPostProcessing.hHitOnTrackVsAll Description: TRTHITONTRACKVSALL +--- +Input: [ 'TRT/(?P<region>Barrel)/Stack(?P<id>\d+)(?P<side>A|C)/hEfficiencyS' ] +Output: [ 'TRT/Efficiency/hEfficiencyBarrel{side}' ] +Function: TRTMonitoringRun3.TRTPostProcessing.hEfficiency +Description: TRTBARRELEFFICIENCY +--- +Input: [ 'TRT/(?P<region>Endcap)(?P<side>A|C)/Sector(?P<id>\d+)/hEfficiencyS' ] +Output: [ 'TRT/Efficiency/hEfficiencyEndCap{side}' ] +Function: TRTMonitoringRun3.TRTPostProcessing.hEfficiency +Description: TRTENDCAPSEFFICIENCY +--- +Input: [ 'TRT/(?P<region>Barrel)/Stack(?P<id>\d+)(?P<side>A|C)/hEfficiencyS' ] +Output: [ 'TRT/Efficiency/hEfficiencyIntegralBarrel{side}' ] +Function: TRTMonitoringRun3.TRTPostProcessing.hEfficiencyIntegral +Description: TRTBARRELEFFICIENCYINTEGRAL +--- +Input: [ 'TRT/(?P<region>Endcap)(?P<side>A|C)/Sector(?P<id>\d+)/hEfficiencyS' ] +Output: [ 'TRT/Efficiency/hEfficiencyIntegralEndCap{side}' ] +Function: TRTMonitoringRun3.TRTPostProcessing.hEfficiencyIntegral +Description: TRTENDCAPSEFFICIENCYINTEGRAL \ No newline at end of file diff --git a/DataQuality/DataQualityUtils/src/MonitoringFile_DiMuPostProcess.cxx b/DataQuality/DataQualityUtils/src/MonitoringFile_DiMuPostProcess.cxx index b472d5b46453428be04e731fceca7f5c70a626c9..190c202cd7112a26d1621bfe56e12d0da8af6a51 100644 --- a/DataQuality/DataQualityUtils/src/MonitoringFile_DiMuPostProcess.cxx +++ b/DataQuality/DataQualityUtils/src/MonitoringFile_DiMuPostProcess.cxx @@ -27,7 +27,6 @@ #include "RooCBShape.h" #include "RooFFTConvPdf.h" #include "RooGlobalFunc.h" -#include "RooPlot.h" namespace dqutils { diff --git a/DataQuality/DataQualityUtils/src/MonitoringFile_IDPerfPostProcess.cxx b/DataQuality/DataQualityUtils/src/MonitoringFile_IDPerfPostProcess.cxx index 9a13f7b4043664f96d188f7a21cc6b1bf4998263..b222ae1500e5a34185c88b1783d222013e0c0f30 100644 --- a/DataQuality/DataQualityUtils/src/MonitoringFile_IDPerfPostProcess.cxx +++ b/DataQuality/DataQualityUtils/src/MonitoringFile_IDPerfPostProcess.cxx @@ -30,7 +30,6 @@ #include "RooCBShape.h" #include "RooFFTConvPdf.h" #include "RooGlobalFunc.h" -#include "RooPlot.h" namespace dqutils { diff --git a/DataQuality/GoodRunsLists/GoodRunsLists/TGoodRunsListReader.h b/DataQuality/GoodRunsLists/GoodRunsLists/TGoodRunsListReader.h index 0548b02bc67e45c50aeeec5da8d43c2cebf0fab7..dd5109c4fc6980ad606a8cb6642ba6e28fed9c06 100644 --- a/DataQuality/GoodRunsLists/GoodRunsLists/TGoodRunsListReader.h +++ b/DataQuality/GoodRunsLists/GoodRunsLists/TGoodRunsListReader.h @@ -22,8 +22,6 @@ #include "GoodRunsLists/TMsgLogger.h" #include "GoodRunsLists/TGRLCollection.h" -#include <vector> - class TXMLNode; namespace Root { diff --git a/DataQuality/GoodRunsLists/GoodRunsLists/TGoodRunsListWriter.h b/DataQuality/GoodRunsLists/GoodRunsLists/TGoodRunsListWriter.h index a91d27a86958d9c666052e6661701e37f1b8e485..9c2348091ba674af99ea1b9b2a891cec12441388 100644 --- a/DataQuality/GoodRunsLists/GoodRunsLists/TGoodRunsListWriter.h +++ b/DataQuality/GoodRunsLists/GoodRunsLists/TGoodRunsListWriter.h @@ -24,8 +24,6 @@ #include "GoodRunsLists/TGoodRunsList.h" #include "GoodRunsLists/TGRLCollection.h" -#include <vector> - typedef unsigned char xmlChar; typedef struct _xmlTextWriter xmlTextWriter; typedef xmlTextWriter *xmlTextWriterPtr; diff --git a/DataQuality/HanConfigGenerator/src/hcg.cxx b/DataQuality/HanConfigGenerator/src/hcg.cxx index 8859308f621995082158e27fa6bf732abdd0f62c..5c4a55fb406c9b8db558ac7264b2b6b8c870f701 100644 --- a/DataQuality/HanConfigGenerator/src/hcg.cxx +++ b/DataQuality/HanConfigGenerator/src/hcg.cxx @@ -38,7 +38,6 @@ #include "TDirectory.h" #include "TPad.h" -#include "TStyle.h" diff --git a/DataQuality/dqm_algorithms/src/OccupancyHoleFinder.cxx b/DataQuality/dqm_algorithms/src/OccupancyHoleFinder.cxx index de422647e604dc660c6c609fa268613e1c4f6fe0..5eeb3cd486209413521ccbca3c34c680e6cd7eb7 100644 --- a/DataQuality/dqm_algorithms/src/OccupancyHoleFinder.cxx +++ b/DataQuality/dqm_algorithms/src/OccupancyHoleFinder.cxx @@ -21,7 +21,6 @@ #include <algorithm> #include <utility> #include <map> -#include <sstream> #include <cstdlib> #include <dqm_core/AlgorithmManager.h> diff --git a/DataQuality/dqm_algorithms/src/RPC_OccupancyHoleFinder.cxx b/DataQuality/dqm_algorithms/src/RPC_OccupancyHoleFinder.cxx index 196a946d1249b2c90930a4a5ea3892a9cc2560d1..0a237e7d6ec51856e3e49319c134db9739851d74 100644 --- a/DataQuality/dqm_algorithms/src/RPC_OccupancyHoleFinder.cxx +++ b/DataQuality/dqm_algorithms/src/RPC_OccupancyHoleFinder.cxx @@ -26,7 +26,6 @@ #include <algorithm> #include <utility> #include <map> -#include <sstream> #include <cstdlib> #include <dqm_core/AlgorithmManager.h> diff --git a/Database/CoolRunQuery/python/AtlRunQueryInterpretDataPeriods.py b/Database/CoolRunQuery/python/AtlRunQueryInterpretDataPeriods.py index 05b7782ed3267ac032683f34cfb6a2d49e311b31..e31e1b8e9a2f6c8a5890a55e20b76ea0827a3cd6 100755 --- a/Database/CoolRunQuery/python/AtlRunQueryInterpretDataPeriods.py +++ b/Database/CoolRunQuery/python/AtlRunQueryInterpretDataPeriods.py @@ -1,16 +1,14 @@ #!/usr/bin/env python -# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration """ Periods are assigned an ordinate by which they can be sorted """ -from __future__ import print_function -from PyUtils.Decorators import memoize - - +from functools import cache import re,sys + pat_last = re.compile(r"(?:l|la|las|last) (\d*)$") # l(ast) NN runs pat_number = re.compile(r"\d{5,8}[+-]?$") # run number (5-8 digits), possibly followed by a + or - pat_range = re.compile(r"\d{5,8}-\d{5,8}$") # range of run numbers (each 5-8 digits) @@ -42,7 +40,7 @@ def getRunsFromPeriods(list_of_periods): return runlist -@memoize +@cache def getSortedAvailablePeriods(): from CoolRunQuery.AtlRunQueryCOMA import ARQ_COMA available_periods = ARQ_COMA.get_all_periods() diff --git a/Database/CoralUtilities/src/blobaccess.cxx b/Database/CoralUtilities/src/blobaccess.cxx index 3639a817712fcf694b69bae567e9dcbf11e4c0cf..5ed56c257d25f2d11bfd11f2607f75d33745cfc3 100644 --- a/Database/CoralUtilities/src/blobaccess.cxx +++ b/Database/CoralUtilities/src/blobaccess.cxx @@ -108,8 +108,10 @@ bool readBlobAsJson(const coral::Blob &blob, nlohmann::json& out){ bool readBlobAsTTree(const coral::Blob &blob, TTree*& out){ std::string sb = reinterpret_cast<const char*>(blob.startingAddress()); std::vector<unsigned char> bdata = CxxUtils::base64_decode(sb); - TMemFile f("buffer", reinterpret_cast<char*>(bdata.data()), static_cast<uLongf>(blob.size())); - TTree* t = (TTree*) f.Get("tmptree"); + TMemFile f("buffer", reinterpret_cast<char*>(bdata.data()), static_cast<uLongf>(bdata.size())); + TTree* t = (TTree*) f.Get("tree"); + t->LoadBaskets(); + t->SetDirectory(0); f.Close(); out = t; return true; diff --git a/DetectorDescription/DetDescrCond/DetDescrCondTools/share/coolHist_insertFileToCatalog.py b/DetectorDescription/DetDescrCond/DetDescrCondTools/share/coolHist_insertFileToCatalog.py index a2a145594b5094566439c29b6e4ef8ef28c40161..e8c2e33a47b1c96965005c5b368d4f8c50bb59b7 100755 --- a/DetectorDescription/DetDescrCond/DetDescrCondTools/share/coolHist_insertFileToCatalog.py +++ b/DetectorDescription/DetDescrCond/DetDescrCondTools/share/coolHist_insertFileToCatalog.py @@ -7,8 +7,8 @@ import os,sys,getopt def usage(): - print 'Usage: coolHist_insertFileToCatalog.py {-u fileCatalog} file1 {file2}...' - print 'Default file catalogue is PoolFileCatalog.xml' + print("Usage: coolHist_insertFileToCatalog.py {-u fileCatalog} file1 {file2}...") + print("Default file catalogue is PoolFileCatalog.xml") # get options (only -u) destcat='file:PoolFileCatalog.xml' @@ -23,7 +23,7 @@ except getopt.GetoptError: if len(args)<1: usage() sys.exit(1) -print 'Destination catalog is',destcat +print(f"Destination catalog is {destcat}") # open fake source catalogue and write header sourcename='coolhist_tempcat.xml' @@ -33,7 +33,7 @@ sourcecat.write("""<?xml version="1.0" encoding="UTF-8" standalone="no" ?> """) for myfile in args: - print '>= Obtain GUID for file',myfile + print(f">= Obtain GUID for file {myfile}") rc=os.system('coolHist_extractFileIdentifier.sh %s' % myfile) if (rc==0): guid=open('coolhist_guid.tmp','r').readline()[:-1] @@ -46,18 +46,18 @@ for myfile in args: </File> """ % (guid,myfile)) else: - print '>= No GUID available for file',myfile + print(f">= No GUID available for file {myfile}") else: - print '>= Problems obtaining GUID for file',myfile + print(f">= Problems obtaining GUID for file {myfile}") # write catalogue trailer sourcecat.write('</POOLFILECATALOG>') sourcecat.close() # now merge catalogues using Pool utility comm='FCpublish -d %s -u file:%s' % (destcat,sourcename) -print 'Execute',comm +print(f"Execute {comm}") rc=os.system(comm) if (rc!=0): - print 'Error from Pool FCpublish' + print("Error from Pool FCpublish") else: - print 'Insertion done' + print("Insertion done") diff --git a/DetectorDescription/RegSelLUT/src/RegSelRoI.cxx b/DetectorDescription/RegSelLUT/src/RegSelRoI.cxx index c7473fa2073819ee792be99575b843ee5f05b503..a116413ef6a6cbe65e81e4a4e8a928edf9c2b88f 100644 --- a/DetectorDescription/RegSelLUT/src/RegSelRoI.cxx +++ b/DetectorDescription/RegSelLUT/src/RegSelRoI.cxx @@ -42,12 +42,18 @@ RegSelRoI::RegSelRoI(double zMin, double zMax, m_aMin = 1/m_invaMin; m_aMax = 1/m_invaMax; + // just check explicitly, in case either range individually + // is set to pi + if ( m_phiMin==float(-M_PI) ) m_phiMin=-M_PI; + if ( m_phiMax==float( M_PI) ) m_phiMax= M_PI; + // AAARGH!!!! Check that the roi is in the correct range double deltaphi = m_phiMax-m_phiMin; if ( m_phiMax<m_phiMin ) deltaphi+=M_2PI; - if ( std::fabs(deltaphi-M_2PI)>1e-10 ) { + /// prefer std::fabs here since want manifest double precision + if ( std::fabs(deltaphi-M_2PI)>1e-6 ) { if ( m_phiMin> M_PI ) m_phiMin -= M_2PI; if ( m_phiMin<-M_PI ) m_phiMin += M_2PI; @@ -55,6 +61,8 @@ RegSelRoI::RegSelRoI(double zMin, double zMax, if ( m_phiMax<-M_PI ) m_phiMax += M_2PI; } else { + /// shouldn't be needed now if the float(M_PI) tests + /// work but leave for more guaranteed robustness m_phiMin = -M_PI; m_phiMax = M_PI; } diff --git a/DetectorDescription/RoiDescriptor/RoiDescriptor/RoiDescriptor.h b/DetectorDescription/RoiDescriptor/RoiDescriptor/RoiDescriptor.h index d4b1836eda1afe9a226ef9e37968b78ba31a0e5b..d238cc00d0caa25ee8ada5d80c2a90609ed78e95 100644 --- a/DetectorDescription/RoiDescriptor/RoiDescriptor/RoiDescriptor.h +++ b/DetectorDescription/RoiDescriptor/RoiDescriptor/RoiDescriptor.h @@ -124,6 +124,8 @@ public: /// is this a full scan RoI? bool isFullscan() const { return m_fullscan; } + virtual void setFullscan(bool b=true) { m_fullscan=b; } + /// SuperRoI compatability methods diff --git a/Event/EventInfoMgt/CMakeLists.txt b/Event/EventInfoMgt/CMakeLists.txt index b3cec368945f81d57781c89f8d226534e2a565cf..a307f5d8462b62d271fecbef0475ca200eec4c16 100644 --- a/Event/EventInfoMgt/CMakeLists.txt +++ b/Event/EventInfoMgt/CMakeLists.txt @@ -16,7 +16,7 @@ atlas_add_component( EventInfoMgt # Install files from the package: atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} ) -atlas_install_joboptions( share/EventInfoMgt_jobOptions.py ) +atlas_install_joboptions( share/EventInfoMgt_jobOptions.py share/AMITagFix.py ) atlas_install_scripts( share/dumpRunNumber.py ) atlas_add_test( TagInfoMgrCfg diff --git a/Event/EventInfoMgt/share/AMITagFix.py b/Event/EventInfoMgt/share/AMITagFix.py new file mode 100644 index 0000000000000000000000000000000000000000..4426686e0b9366744657db6f210bdd909a9eb768 --- /dev/null +++ b/Event/EventInfoMgt/share/AMITagFix.py @@ -0,0 +1,112 @@ +# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration +"""postInclude to fix AMITag for AOD outputs + +The input AMITag is contained in the name of the dataset holding the input +files and should also be in the AMITag attribute of the /TagInfo. At the time +of writing a bug was discovered in the in-file metadata propogation of the +AMITag. This script checks the AMITag from metadata against the one in the name +of in input dataset name. If there is a mismatch the AMITag from the input +dataset name is used to overwrite the value in the in-file metadata for the +output. + + Usage: + Reco_tf.py --postInclude a2da:EventInfoMgt/AMITagFix.py +""" +import os +import re +from PyUtils.MetaReaderPeeker import metadata +from AthenaCommon.Logging import logging +from AthenaCommon.AppMgr import ServiceMgr +from RecExConfig.RecFlags import rec + +log = logging.getLogger("AMITagFix") +amitagRegex = re.compile('^[a-z][0-9]+') + + +def TagsFromInputDataset(): + """Returns list of AMITags, e.g. ["e6337", "s3681", "r13145"] + + Looks for the INDS environmental variable to parse the AMITag from the + input dataset name. If this is not found just use what can be parsed from + the in-file metadata. + """ + # from INDS environmental variable + inputDataSetName = os.environ.get('INDS') + if inputDataSetName: + # try extracting the AMITag of the input dataset from its name + tags = inputDataSetName.split('.')[-1].split('_') + tags = [tag for tag in tags if amitagRegex.match(tag)] + log.debug('Built input AMITag from input dataset name: ', tags) + return tags + else: + log.debug("Not INDS environmental variable for reference") + return list() + + +def TagsFromMetadata(): + """Returns list of AMITags, e.g. ["e6337", "s3681", "r13145"] + + Looks up the AMITag from the /TagInfo in-file metadata. If this is the well + known string format, it is converted into a list for convenience. + """ + try: + tags = metadata['AMITag'] + if isinstance(tags, str): + tags = tags.split('_') + log.debug('Built input AMITag from in-file metadata: ', tags) + return tags + except KeyError: + log.warning("Cannot access /TagInfo/AMITag from in-file metadata") + except NameError: + log.warning("Cannot access in-file metadata") + return list() + + +def main(): + """Checks the input AMITags for consitency and sets output AMITag + + Retrieves the AMITag according to the input dataset name and the in-file + metadata. Checks for consistency and sets the AMITag for in-file metadata + of the output file. + """ + tags = TagsFromInputDataset() + tagsFromMeta = TagsFromMetadata() + + # tagsFromName will be empty if INDS is not set + if not tags or tags == tagsFromMeta: + # Either we do not have a reference or everything is OK + return + + log.info("Input AMITag mismatch, overwriting with dataset name") + + # add this workflow's AMITag + try: + if rec.AMITag() not in tags: + tags += [rec.AMITag()] + except NameError: + # No recflags to work with, try runArgs + try: + if runArgs.AMITag not in tags: + tags += runArgs.AMITag + except NameError: + log.info(("Failed to get workflow AMITag from arguments or " + "configuraiton flags")) + except KeyError: + log.info("No AMITag provided for this workflow step") + # If the flags or runArgs cannot be converted to a string + + try: + # strip things like "" or "NONE" + tags = [tag for tag in tags if amitagRegex.match(tag)] + amitag = '_'.join(tags) + ServiceMgr.TagInfoMgr.ExtraTagValuePairs.update( + {'AMITag': amitag}) + log.info("Output AMITag in in-file metadata set to {}".format(amitag)) + except NameError: + log.error("TagInfoMgr not available to set output AMITag") + except TypeError: + log.info("AMITags could not be converted to standard string") + + +# Do the work +main() diff --git a/Event/xAOD/xAODTrigger/Root/TrigComposite_v1.cxx b/Event/xAOD/xAODTrigger/Root/TrigComposite_v1.cxx index 031f887128b8c4cb4d352b2a282f47931ab0f58c..12f716d1e758fc662b810bf518b6ca09c8e7ba12 100644 --- a/Event/xAOD/xAODTrigger/Root/TrigComposite_v1.cxx +++ b/Event/xAOD/xAODTrigger/Root/TrigComposite_v1.cxx @@ -17,8 +17,17 @@ // Local include(s): #include "xAODTrigger/versions/TrigComposite_v1.h" +#ifndef XAOD_STANDALONE +#include "AthenaKernel/BaseInfo.h" +#endif + namespace xAOD { + + ExcNotIParticleContainer::ExcNotIParticleContainer (const std::string& msg) + : std::runtime_error (msg) + { + } const std::string TrigComposite_v1::s_collectionSuffix{"__COLL"}; @@ -261,9 +270,14 @@ namespace xAOD { return false; } - bool TrigComposite_v1::derivesFromIParticle(const CLID /*clid*/) const { - // It would be nice to include some logic here. - return true; + bool TrigComposite_v1::derivesFromIParticle(const CLID clid [[maybe_unused]]) const { +#ifndef XAOD_STANDALONE + const SG::BaseInfoBase* bib = SG::BaseInfoBase::find (clid); + if (bib) { + return bib->is_base (ClassID_traits< xAOD::IParticleContainer >::ID()); + } +#endif + return true; } AUXSTORE_OBJECT_GETTER( TrigComposite_v1, std::vector< std::string >, diff --git a/Event/xAOD/xAODTrigger/xAODTrigger/versions/TrigComposite_v1.h b/Event/xAOD/xAODTrigger/xAODTrigger/versions/TrigComposite_v1.h index c9e2a100147a9929056d90d640d1773f0026632b..c39b3e2a959a790f8553d8f5503561a38e6b659c 100644 --- a/Event/xAOD/xAODTrigger/xAODTrigger/versions/TrigComposite_v1.h +++ b/Event/xAOD/xAODTrigger/xAODTrigger/versions/TrigComposite_v1.h @@ -30,6 +30,13 @@ namespace TrigCompositeUtils{ namespace xAOD { + class ExcNotIParticleContainer + : public std::runtime_error + { + public: + ExcNotIParticleContainer (const std::string& msg); + }; + /// Class used to describe composite objects in the HLT /// /// This is a generic class for describing the output of high-level diff --git a/Event/xAOD/xAODTrigger/xAODTrigger/versions/TrigComposite_v1.icc b/Event/xAOD/xAODTrigger/xAODTrigger/versions/TrigComposite_v1.icc index eb12e216145ba6efddb41281ae9256236c7ac6ef..7ab7e5828b08464956fc62a828ac2ebf28d8aad0 100644 --- a/Event/xAOD/xAODTrigger/xAODTrigger/versions/TrigComposite_v1.icc +++ b/Event/xAOD/xAODTrigger/xAODTrigger/versions/TrigComposite_v1.icc @@ -1,7 +1,7 @@ // Dear emacs, this is -*- c++ -*- /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ // $Id: TrigComposite_v1.icc 784388 2016-11-15 17:08:58Z tamartin $ @@ -303,8 +303,8 @@ namespace xAOD { void TrigComposite_v1::checkTypes(const uint32_t storedCLID, const std::string& name) const { if (ClassID_traits< CONTAINER >::ID() == ClassID_traits< xAOD::IParticleContainer >::ID()) { if (!derivesFromIParticle(storedCLID)) { - throw std::runtime_error( "xAOD::TrigComposite::checkTypes: " - "Cannot retrieve \"" + name + "\" as an IParticle"); + throw ExcNotIParticleContainer( "xAOD::TrigComposite::checkTypes: " + "Cannot retrieve \"" + name + "\" as an IParticle"); } } else if (ClassID_traits< CONTAINER >::ID() != storedCLID) { const std::string typeName = SG::normalizedTypeinfoName( typeid( CONTAINER ) ); diff --git a/Generators/Epos_i/CMakeLists.txt b/Generators/Epos_i/CMakeLists.txt index 71cc7163022a2ad9968a947b67e2dce0f6089aee..412eccb881bbee0b44ca091bacfb8140041cb898 100644 --- a/Generators/Epos_i/CMakeLists.txt +++ b/Generators/Epos_i/CMakeLists.txt @@ -1,5 +1,8 @@ # Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration +# Minimum CMake requirement for the package. +cmake_minimum_required( VERSION 3.21 ) + # Declare the package name: atlas_subdir( Epos_i ) @@ -29,18 +32,23 @@ atlas_add_component( Epos_i # Install files from the package: atlas_install_joboptions( share/common/*.py ) -atlas_install_runtime( share/file/epos_crmc.param - ${CRMC_LCGROOT}/tabs/dpmjet.dat - ${CRMC_LCGROOT}/tabs/epos.initl - ${CRMC_LCGROOT}/tabs/epos.iniev - ${CRMC_LCGROOT}/tabs/epos.inirj - ${CRMC_LCGROOT}/tabs/epos.inirj.lhc - ${CRMC_LCGROOT}/tabs/epos.inics - ${CRMC_LCGROOT}/tabs/epos.inics.lhc - ${CRMC_LCGROOT}/tabs/epos.inidi ) - +atlas_install_runtime( share/file/epos_crmc.param ) + +# Install files from Crmc. +foreach( _file "epos.initl" "epos.iniev" "epos.inirj" "epos.inirj.lhc" + "epos.inics" "epos.inics.lhc" "epos.inidi" ) + find_file( _datFile "${_file}" + PATHS "${CRMC_LCGROOT}" + PATH_SUFFIXES "tabs" "share/crmc" + NO_CACHE ) + if( _datFile ) + atlas_install_runtime( "${_datFile}" ) + else() + message( WARNING "Could not find data file \"${_file}\"" ) + endif() +endforeach() + +# Set up the runtime environment for the package. set( EposEnvironment_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE PATH "Location of EposEnvironment.cmake" ) find_package( EposEnvironment ) - - diff --git a/Generators/GeneratorObjectsTPCnv/share/McEventCollectionCnv_p4_test.ref b/Generators/GeneratorObjectsTPCnv/share/McEventCollectionCnv_p4_test.ref index be9012532f76d391c9decb6895986776ac887246..404876d4f404bb7175ada7c3f224b81e838024f6 100644 --- a/Generators/GeneratorObjectsTPCnv/share/McEventCollectionCnv_p4_test.ref +++ b/Generators/GeneratorObjectsTPCnv/share/McEventCollectionCnv_p4_test.ref @@ -1,4 +1,4 @@ -GeneratorObjectsTPCnv/McEventCollectionCnv_p5_test +GeneratorObjectsTPCnv/McEventCollectionCnv_p4_test Initializing Gaudi ApplicationMgr using job opts /afs/cern.ch/user/s/ssnyder/atlas-work3h/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/GeneratorObjectsTPCnv/GeneratorObjectsTPCnv_test.txt diff --git a/Generators/GeneratorObjectsTPCnv/src/McEventCollectionCnv_p4.cxx b/Generators/GeneratorObjectsTPCnv/src/McEventCollectionCnv_p4.cxx index ecc6a9d5cf4acb7f9f60cd41878e4cf64ef23cb8..bb8c8ca7ff234c5e03d0a63701dd89cdcdd5da29 100755 --- a/Generators/GeneratorObjectsTPCnv/src/McEventCollectionCnv_p4.cxx +++ b/Generators/GeneratorObjectsTPCnv/src/McEventCollectionCnv_p4.cxx @@ -142,13 +142,31 @@ void McEventCollectionCnv_p4::persToTrans( const McEventCollection_p4* persObj, // As not all particles are stable (d'oh!) we take 50% of the number of // particles as an initial size of the hash-map (to prevent re-hash) ParticlesMap_t partToEndVtx( (persEvt.m_particlesEnd-persEvt.m_particlesBegin)/2 ); + // This is faster than the HepMC::barcode_to_vertex + std::map<int, HepMC::GenVertexPtr> brc_to_vertex; // create the vertices const unsigned int endVtx = persEvt.m_verticesEnd; for ( unsigned int iVtx= persEvt.m_verticesBegin; iVtx != endVtx; ++iVtx ) { - createGenVertex( *persObj, persObj->m_genVertices[iVtx], partToEndVtx, datapools, genEvt ); + auto vtx = createGenVertex( *persObj, persObj->m_genVertices[iVtx], partToEndVtx, datapools, genEvt ); + brc_to_vertex[persObj->m_genVertices[iVtx].m_barcode] = vtx; } //> end loop over vertices + // set the signal process vertex + const int sigProcVtx = persEvt.m_signalProcessVtx; + if ( sigProcVtx != 0 && brc_to_vertex.count(sigProcVtx) ) { + HepMC::set_signal_process_vertex(genEvt, brc_to_vertex[sigProcVtx] ); + } + + // connect particles to their end vertices + for ( ParticlesMap_t::iterator p = partToEndVtx.begin(), endItr = partToEndVtx.end(); p != endItr; ++p ) { + if ( brc_to_vertex.count(p->second) ) { + auto decayVtx = brc_to_vertex[p->second]; + decayVtx->add_particle_in( p->first ); + } else { + msg << MSG::ERROR << "GenParticle points to null end vertex !!" << endmsg; + } + } #else genEvt->m_signal_process_id = persEvt.m_signalProcessId; genEvt->m_event_number = persEvt.m_eventNbr; @@ -197,7 +215,7 @@ void McEventCollectionCnv_p4::persToTrans( const McEventCollection_p4* persObj, partToEndVtx, datapools ) ); } //> end loop over vertices -#endif + // set the signal process vertex const int sigProcVtx = persEvt.m_signalProcessVtx; if ( sigProcVtx != 0 ) @@ -205,6 +223,7 @@ void McEventCollectionCnv_p4::persToTrans( const McEventCollection_p4* persObj, HepMC::set_signal_process_vertex(genEvt,HepMC::barcode_to_vertex(genEvt, sigProcVtx ) ); } + // connect particles to their end vertices for ( ParticlesMap_t::iterator p = partToEndVtx.begin(), @@ -224,6 +243,7 @@ void McEventCollectionCnv_p4::persToTrans( const McEventCollection_p4* persObj, << endmsg; } } +#endif } //> end loop over m_genEvents msg << MSG::DEBUG << "Loaded McEventCollection from persistent state [OK]" @@ -249,7 +269,7 @@ void McEventCollectionCnv_p4::transToPers( const McEventCollection* transObj, itr != itrEnd; ++itr ) { -#ifdef HEPMC3 +#ifdef HEPMC3 const unsigned int nPersVtx = persObj->m_genVertices.size(); const unsigned int nPersParts = persObj->m_genParticles.size(); const HepMC::GenEvent* genEvt = *itr; @@ -263,23 +283,23 @@ void McEventCollectionCnv_p4::transToPers( const McEventCollection* transObj, //m_hepMCWeightSvc->setWeightNames( names_to_name_index_map(names) ); } } - auto A_signal_process_id=genEvt->attribute<HepMC3::IntAttribute>("signal_process_id"); - auto A_event_scale=genEvt->attribute<HepMC3::DoubleAttribute>("event_scale"); - auto A_alphaQCD=genEvt->attribute<HepMC3::DoubleAttribute>("alphaQCD"); - auto A_alphaQED=genEvt->attribute<HepMC3::DoubleAttribute>("alphaQED"); - auto signal_process_vertex = HepMC::signal_process_vertex(genEvt); - auto A_random_states=genEvt->attribute<HepMC3::VectorLongIntAttribute>("random_states"); + auto A_signal_process_id=genEvt->attribute<HepMC3::IntAttribute>("signal_process_id"); + auto A_event_scale=genEvt->attribute<HepMC3::DoubleAttribute>("event_scale"); + auto A_alphaQCD=genEvt->attribute<HepMC3::DoubleAttribute>("alphaQCD"); + auto A_alphaQED=genEvt->attribute<HepMC3::DoubleAttribute>("alphaQED"); + auto signal_process_vertex = HepMC::signal_process_vertex(genEvt); + auto A_random_states=genEvt->attribute<HepMC3::VectorLongIntAttribute>("random_states"); persObj->m_genEvents. push_back( GenEvent_p4( A_signal_process_id?(A_signal_process_id->value()):0, genEvt->event_number(), - A_event_scale?(A_event_scale->value()):0.0, - A_alphaQCD?(A_alphaQCD->value()):0.0, - A_alphaQED?(A_alphaQED->value()):0.0, - signal_process_vertex?HepMC::barcode(signal_process_vertex):0, - genEvt->weights(), - std::vector<double>(),//No idea why it is empty - A_random_states?(A_random_states->value()):std::vector<long>(), + A_event_scale?(A_event_scale->value()):0.0, + A_alphaQCD?(A_alphaQCD->value()):0.0, + A_alphaQED?(A_alphaQED->value()):0.0, + signal_process_vertex?HepMC::barcode(signal_process_vertex):0, + genEvt->weights(), + std::vector<double>(),//No idea why it is empty + A_random_states?(A_random_states->value()):std::vector<long>(), nPersVtx, nPersVtx + genEvt->vertices().size(), nPersParts, @@ -314,7 +334,7 @@ void McEventCollectionCnv_p4::transToPers( const McEventCollection* transObj, ? genEvt->m_signal_process_vertex->barcode() : 0; //save the weight names to metadata via the HepMCWeightSvc - m_hepMCWeightSvc->setWeightNames( genEvt->m_weights.m_names ).ignore(); + m_hepMCWeightSvc->setWeightNames( genEvt->m_weights.m_names ).ignore(); persObj->m_genEvents. push_back( GenEvent_p4( genEvt->m_signal_process_id, genEvt->m_event_number, @@ -454,7 +474,7 @@ McEventCollectionCnv_p4::createGenParticle( const GenParticle_p4& persPart, p->set_status( persPart.m_status); p->add_attribute("phi",std::make_shared<HepMC3::DoubleAttribute>(persPart.m_phiPolarization)); p->add_attribute("theta",std::make_shared<HepMC3::DoubleAttribute>(persPart.m_thetaPolarization)); - p->add_attribute("barcode",std::make_shared<HepMC3::IntAttribute>(persPart.m_barcode)); + p->add_attribute("barcode",std::make_shared<HepMC3::IntAttribute>(persPart.m_barcode)); // Note: do the E calculation in extended (long double) precision. // That happens implicitly on x86 with optimization on; saying it @@ -554,10 +574,10 @@ McEventCollectionCnv_p4::createGenParticle( const GenParticle_p4& persPart, #ifdef HEPMC3 void McEventCollectionCnv_p4::writeGenVertex( HepMC::ConstGenVertexPtr vtx, McEventCollection_p4& persEvt ) const -{ +{ const HepMC::FourVector& position = vtx->position(); - auto A_weights=vtx->attribute<HepMC3::VectorDoubleAttribute>("weights"); - auto A_barcode=vtx->attribute<HepMC3::IntAttribute>("barcode"); + auto A_weights=vtx->attribute<HepMC3::VectorDoubleAttribute>("weights"); + auto A_barcode=vtx->attribute<HepMC3::IntAttribute>("barcode"); std::vector<double> weights=A_weights?(A_weights->value()):std::vector<double>(); persEvt.m_genVertices.push_back( GenVertex_p4( position.x(), @@ -631,7 +651,7 @@ void McEventCollectionCnv_p4::writeGenVertex( const HepMC::GenVertex& vtx, #ifdef HEPMC3 int McEventCollectionCnv_p4::writeGenParticle( HepMC::ConstGenParticlePtr p, McEventCollection_p4& persEvt ) const -{ +{ const HepMC::FourVector& mom = p->momentum(); const double ene = mom.e(); const double m2 = mom.m2(); @@ -642,11 +662,11 @@ int McEventCollectionCnv_p4::writeGenParticle( HepMC::ConstGenParticlePtr p, !(std::abs(m2) < 2.0*DBL_EPSILON*ene*ene); // !isLightlike const short recoMethod = ( !useP2M2 ? 0: ( ene >= 0. ? 1 : 2 ) ); - auto A_theta=p->attribute<HepMC3::DoubleAttribute>("theta"); - auto A_phi=p->attribute<HepMC3::DoubleAttribute>("phi"); - auto A_flows=p->attribute<HepMC3::VectorIntAttribute>("flows"); - - + auto A_theta=p->attribute<HepMC3::DoubleAttribute>("theta"); + auto A_phi=p->attribute<HepMC3::DoubleAttribute>("phi"); + auto A_flows=p->attribute<HepMC3::VectorIntAttribute>("flows"); + + persEvt.m_genParticles.push_back( GenParticle_p4( mom.px(), mom.py(), mom.pz(), @@ -660,14 +680,14 @@ int McEventCollectionCnv_p4::writeGenParticle( HepMC::ConstGenParticlePtr p, p->end_vertex()?(HepMC::barcode(p->end_vertex())):0, HepMC::barcode(p), recoMethod ) ); - + std::vector< std::pair<int,int> > flow_hepmc2; if(A_flows) flow_hepmc2=vector_to_vector_int_int(A_flows->value()); persEvt.m_genParticles.back().m_flow.assign( flow_hepmc2.begin(),flow_hepmc2.end() ); // we return the index of the particle in the big vector of particles // (contained by the persistent GenEvent) return (persEvt.m_genParticles.size() - 1); -} +} #else int McEventCollectionCnv_p4::writeGenParticle( const HepMC::GenParticle& p, McEventCollection_p4& persEvt ) const diff --git a/Generators/GeneratorObjectsTPCnv/src/McEventCollectionCnv_p5.cxx b/Generators/GeneratorObjectsTPCnv/src/McEventCollectionCnv_p5.cxx index 97680362089936217be397b059aec7d7c014d621..712fde0cb1f23345f041f5c4c1ceeef2edb0dbfd 100755 --- a/Generators/GeneratorObjectsTPCnv/src/McEventCollectionCnv_p5.cxx +++ b/Generators/GeneratorObjectsTPCnv/src/McEventCollectionCnv_p5.cxx @@ -93,14 +93,14 @@ void McEventCollectionCnv_p5::persToTrans( const McEventCollection_p5* persObj, genEvt = datapools.getGenEvent(); } #ifdef HEPMC3 - genEvt->add_attribute("signal_process_id",std::make_shared<HepMC3::IntAttribute>(persEvt.m_signalProcessId)); + genEvt->add_attribute("signal_process_id", std::make_shared<HepMC3::IntAttribute>(persEvt.m_signalProcessId)); genEvt->set_event_number(persEvt.m_eventNbr); - genEvt->add_attribute("mpi",std::make_shared<HepMC3::IntAttribute>(persEvt.m_mpi)); - genEvt->add_attribute("event_scale",std::make_shared<HepMC3::DoubleAttribute>(persEvt.m_eventScale)); - genEvt->add_attribute("alphaQCD",std::make_shared<HepMC3::DoubleAttribute>(persEvt.m_alphaQCD)); - genEvt->add_attribute("alphaQED",std::make_shared<HepMC3::DoubleAttribute>(persEvt.m_alphaQED)); + genEvt->add_attribute("mpi", std::make_shared<HepMC3::IntAttribute>(persEvt.m_mpi)); + genEvt->add_attribute("event_scale", std::make_shared<HepMC3::DoubleAttribute>(persEvt.m_eventScale)); + genEvt->add_attribute("alphaQCD", std::make_shared<HepMC3::DoubleAttribute>(persEvt.m_alphaQCD)); + genEvt->add_attribute("alphaQED", std::make_shared<HepMC3::DoubleAttribute>(persEvt.m_alphaQED)); genEvt->weights()= persEvt.m_weights; - genEvt->add_attribute("random_states",std::make_shared<HepMC3::VectorLongIntAttribute>(persEvt.m_randomStates)); + genEvt->add_attribute("random_states", std::make_shared<HepMC3::VectorLongIntAttribute>(persEvt.m_randomStates)); genEvt->set_units(static_cast<HepMC3::Units::MomentumUnit>(persEvt.m_momentumUnit), static_cast<HepMC3::Units::LengthUnit>(persEvt.m_lengthUnit)); @@ -116,10 +116,10 @@ void McEventCollectionCnv_p5::persToTrans( const McEventCollection_p5* persObj, if( static_cast<bool>(xsection[0]) ) cs->set_cross_section(xsection[2],xsection[1]); else - cs->set_cross_section(-1.0,-1.0); + cs->set_cross_section(-1.0, -1.0); genEvt->set_cross_section(cs); } - + // heavyIon restore if (!persEvt.m_heavyIon.empty()) { auto hi = std::make_shared<HepMC3::GenHeavyIon>(); @@ -165,24 +165,27 @@ void McEventCollectionCnv_p5::persToTrans( const McEventCollection_p5* persObj, // particle. // As not all particles are stable (d'oh!) we take 50% of the number of // particles as an initial size of the hash-map (to prevent re-hash) - ParticlesMap_t partToEndVtx( (persEvt.m_particlesEnd- persEvt.m_particlesBegin)/2 ); + ParticlesMap_t partToEndVtx( (persEvt.m_particlesEnd - persEvt.m_particlesBegin)/2 ); + // This is faster than the HepMC::barcode_to_vertex + std::map<int, HepMC::GenVertexPtr> brc_to_vertex; // create the vertices const unsigned int endVtx = persEvt.m_verticesEnd; - for ( unsigned int iVtx= persEvt.m_verticesBegin; iVtx != endVtx; ++iVtx ) { - createGenVertex( *persObj, persObj->m_genVertices[iVtx], partToEndVtx,datapools, genEvt ); + for ( unsigned int iVtx = persEvt.m_verticesBegin; iVtx != endVtx; ++iVtx ) { + auto vtx = createGenVertex( *persObj, persObj->m_genVertices[iVtx], partToEndVtx, datapools, genEvt ); + brc_to_vertex[persObj->m_genVertices[iVtx].m_barcode] = vtx; } //> end loop over vertices // set the signal process vertex const int sigProcVtx = persEvt.m_signalProcessVtx; - if ( sigProcVtx != 0 ) { - HepMC::set_signal_process_vertex(genEvt,HepMC::barcode_to_vertex(genEvt, sigProcVtx ) ); + if ( sigProcVtx != 0 && brc_to_vertex.count(sigProcVtx) ) { + HepMC::set_signal_process_vertex(genEvt, brc_to_vertex[sigProcVtx] ); } // connect particles to their end vertices - for ( ParticlesMap_t::iterator p = partToEndVtx.begin(),endItr = partToEndVtx.end();p != endItr; ++p ) { - auto decayVtx = HepMC::barcode_to_vertex(genEvt, p->second ); - if ( decayVtx ) { + for ( ParticlesMap_t::iterator p = partToEndVtx.begin(), endItr = partToEndVtx.end(); p != endItr; ++p ) { + if ( brc_to_vertex.count(p->second) ) { + auto decayVtx = brc_to_vertex[p->second]; decayVtx->add_particle_in( p->first ); } else { msg << MSG::ERROR << "GenParticle points to null end vertex !!" << endmsg; @@ -191,12 +194,12 @@ void McEventCollectionCnv_p5::persToTrans( const McEventCollection_p5* persObj, // set the beam particles const int beamPart1 = persEvt.m_beamParticle1; const int beamPart2 = persEvt.m_beamParticle2; - if ( beamPart1 != 0 && beamPart2 !=0 ) { - genEvt->set_beam_particles(HepMC::barcode_to_particle(genEvt,beamPart1), - HepMC::barcode_to_particle(genEvt,beamPart2)); + if ( beamPart1 != 0 && beamPart2 != 0 ) { + genEvt->set_beam_particles(HepMC::barcode_to_particle(genEvt, beamPart1), + HepMC::barcode_to_particle(genEvt, beamPart2)); } -#else +#else genEvt->m_signal_process_id = persEvt.m_signalProcessId; genEvt->m_event_number = persEvt.m_eventNbr; genEvt->m_mpi = persEvt.m_mpi; @@ -362,27 +365,27 @@ void McEventCollectionCnv_p5::transToPers( const McEventCollection* transObj, //m_hepMCWeightSvc->setWeightNames( names_to_name_index_map(names) ); } } - - auto A_mpi=genEvt->attribute<HepMC3::IntAttribute>("mpi"); - auto A_signal_process_id=genEvt->attribute<HepMC3::IntAttribute>("signal_process_id"); - auto A_event_scale=genEvt->attribute<HepMC3::DoubleAttribute>("event_scale"); - auto A_alphaQCD=genEvt->attribute<HepMC3::DoubleAttribute>("alphaQCD"); - auto A_alphaQED=genEvt->attribute<HepMC3::DoubleAttribute>("alphaQED"); - auto signal_process_vertex = HepMC::signal_process_vertex(genEvt); - auto A_random_states=genEvt->attribute<HepMC3::VectorLongIntAttribute>("random_states"); + + auto A_mpi=genEvt->attribute<HepMC3::IntAttribute>("mpi"); + auto A_signal_process_id=genEvt->attribute<HepMC3::IntAttribute>("signal_process_id"); + auto A_event_scale=genEvt->attribute<HepMC3::DoubleAttribute>("event_scale"); + auto A_alphaQCD=genEvt->attribute<HepMC3::DoubleAttribute>("alphaQCD"); + auto A_alphaQED=genEvt->attribute<HepMC3::DoubleAttribute>("alphaQED"); + auto signal_process_vertex = HepMC::signal_process_vertex(genEvt); + auto A_random_states=genEvt->attribute<HepMC3::VectorLongIntAttribute>("random_states"); auto beams=genEvt->beams(); persObj->m_genEvents. push_back( GenEvent_p5(A_signal_process_id?(A_signal_process_id->value()):-1, genEvt->event_number(), - A_mpi?(A_mpi->value()):-1, - A_event_scale?(A_event_scale->value()):0.0, - A_alphaQCD?(A_alphaQCD->value()):0.0, - A_alphaQED?(A_alphaQED->value()):0.0, - signal_process_vertex?HepMC::barcode(signal_process_vertex):0, + A_mpi?(A_mpi->value()):-1, + A_event_scale?(A_event_scale->value()):0.0, + A_alphaQCD?(A_alphaQCD->value()):0.0, + A_alphaQED?(A_alphaQED->value()):0.0, + signal_process_vertex?HepMC::barcode(signal_process_vertex):0, beams.size()>0?HepMC::barcode(beams[0]):0, beams.size()>1?HepMC::barcode(beams[1]):0, genEvt->weights(), - A_random_states?(A_random_states->value()):std::vector<long>(), + A_random_states?(A_random_states->value()):std::vector<long>(), std::vector<double>(), // cross section std::vector<float>(), // heavyion std::vector<double>(), // pdf info @@ -392,8 +395,8 @@ void McEventCollectionCnv_p5::transToPers( const McEventCollection* transObj, nPersVtx + genEvt->vertices().size(), nPersParts, nPersParts + genEvt->particles().size() ) ); - - + + //HepMC::GenCrossSection encoding if (genEvt->cross_section()) { auto cs=genEvt->cross_section(); @@ -407,12 +410,12 @@ void McEventCollectionCnv_p5::transToPers( const McEventCollection* transObj, /// Here we try to mimic HepMC2 if (crossSection[2] < 0) { crossSection[2] = 0.0; - if (crossSection[1] < 0) { + if (crossSection[1] < 0) { crossSection[1] = 0.0; } crossSection[0] = 0.0; } - + } //HepMC::HeavyIon encoding @@ -468,9 +471,9 @@ void McEventCollectionCnv_p5::transToPers( const McEventCollection* transObj, ? genEvt->m_beam_particle_2->barcode() : 0; - //save the weight names to metadata via the HepMCWeightSvc + //save the weight names to metadata via the HepMCWeightSvc m_hepMCWeightSvc->setWeightNames( genEvt->m_weights.m_names ).ignore(); - + persObj->m_genEvents. push_back( GenEvent_p5( genEvt->m_signal_process_id, @@ -559,7 +562,7 @@ HepMC::GenVertexPtr McEventCollectionCnv_p5::createGenVertex( const McEventCollection_p5& persEvt, const GenVertex_p5& persVtx, ParticlesMap_t& partToEndVtx, HepMC::DataPool& datapools - ,HepMC::GenEvent* parent + ,HepMC::GenEvent* parent ) const { HepMC::GenVertexPtr vtx(nullptr); @@ -637,7 +640,7 @@ McEventCollectionCnv_p5::createGenParticle( const GenParticle_p5& persPart, p->set_status( persPart.m_status); p->add_attribute("phi",std::make_shared<HepMC3::DoubleAttribute>(persPart.m_phiPolarization)); p->add_attribute("theta",std::make_shared<HepMC3::DoubleAttribute>(persPart.m_thetaPolarization)); - p->add_attribute("barcode",std::make_shared<HepMC3::IntAttribute>(persPart.m_barcode)); + p->add_attribute("barcode",std::make_shared<HepMC3::IntAttribute>(persPart.m_barcode)); p->set_generated_mass(persPart.m_generated_mass); // Note: do the E calculation in extended (long double) precision. @@ -733,8 +736,8 @@ void McEventCollectionCnv_p5::writeGenVertex( HepMC::ConstGenVertexPtr vtx, McEventCollection_p5& persEvt ) const { const HepMC::FourVector& position = vtx->position(); - auto A_weights=vtx->attribute<HepMC3::VectorDoubleAttribute>("weights"); - auto A_barcode=vtx->attribute<HepMC3::IntAttribute>("barcode"); + auto A_weights=vtx->attribute<HepMC3::VectorDoubleAttribute>("weights"); + auto A_barcode=vtx->attribute<HepMC3::IntAttribute>("barcode"); std::vector<double> weights=A_weights?(A_weights->value()):std::vector<double>(); persEvt.m_genVertices.push_back( GenVertex_p5( position.x(), @@ -813,10 +816,10 @@ int McEventCollectionCnv_p5::writeGenParticle( HepMC::ConstGenParticlePtr p, const bool useP2M2 = !(m2 > 0) && // !isTimelike (m2 < 0) && // isSpacelike !(std::abs(m2) < 2.0*DBL_EPSILON*ene*ene); // !isLightlike - auto A_flows=p->attribute<HepMC3::VectorIntAttribute>("flows"); - auto A_phi=p->attribute<HepMC3::DoubleAttribute>("phi"); - auto A_theta=p->attribute<HepMC3::DoubleAttribute>("theta"); - + auto A_flows=p->attribute<HepMC3::VectorIntAttribute>("flows"); + auto A_phi=p->attribute<HepMC3::DoubleAttribute>("phi"); + auto A_theta=p->attribute<HepMC3::DoubleAttribute>("theta"); + const short recoMethod = ( !useP2M2 ? 0: ( ene >= 0.? 1: 2 ) ); persEvt.m_genParticles. push_back( GenParticle_p5( mom.px(), @@ -833,7 +836,7 @@ int McEventCollectionCnv_p5::writeGenParticle( HepMC::ConstGenParticlePtr p, HepMC::barcode(p), p->generated_mass(), recoMethod ) ); - + std::vector< std::pair<int,int> > flow_hepmc2; if(A_flows) flow_hepmc2=vector_to_vector_int_int(A_flows->value()); persEvt.m_genParticles.back().m_flow.assign( flow_hepmc2.begin(),flow_hepmc2.end() ); diff --git a/Generators/GeneratorObjectsTPCnv/test/McEventCollectionCnv_p4_test.cxx b/Generators/GeneratorObjectsTPCnv/test/McEventCollectionCnv_p4_test.cxx index 7f2d5f1b6799711b31cf11b86f2df434c79752f3..98bea5ef9b97e25629829db5e05fdc22c2e59a6b 100644 --- a/Generators/GeneratorObjectsTPCnv/test/McEventCollectionCnv_p4_test.cxx +++ b/Generators/GeneratorObjectsTPCnv/test/McEventCollectionCnv_p4_test.cxx @@ -12,6 +12,8 @@ #include <iostream> // HepMC includes #include "AtlasHepMC/GenEvent.h" +#include "AtlasHepMC/GenVertex.h" +#include "AtlasHepMC/GenParticle.h" #include "TestTools/initGaudi.h" // CLHEP includes @@ -19,12 +21,132 @@ #include "GeneratorObjectsTPCnv/McEventCollectionCnv_p4.h" -void compare (const HepMC::GenEvent& p1, - const HepMC::GenEvent& p2) +void compareGenParticle(HepMC::ConstGenParticlePtr p1, + HepMC::ConstGenParticlePtr p2) { - assert (HepMC::signal_process_id(p1) == HepMC::signal_process_id(p2) ); - assert (p1.event_number() == p2.event_number() ); - //FIXME Need to loop over GenVertex and GenParticle objects too. + assert (HepMC::barcode(p1) == HepMC::barcode(p2)); + assert (p1->status() == p2->status()); + assert (p1->pdg_id() == p2->pdg_id()); + assert ((p1->momentum().px()) == (p2->momentum().px())); + assert ((p1->momentum().py()) == (p2->momentum().py())); + assert ((p1->momentum().pz()) == (p2->momentum().pz())); + assert (float(p1->momentum().m()) == float(p2->momentum().m())); // only persistified with float precision + return; +} + + +void compareGenVertex(HepMC::ConstGenVertexPtr v1, + HepMC::ConstGenVertexPtr v2) +{ + assert (HepMC::barcode(v1) == HepMC::barcode(v2)); + assert (float(v1->position().x()) == float(v2->position().x())); // only persistified with float precision + assert (float(v1->position().y()) == float(v2->position().y())); // only persistified with float precision + assert (float(v1->position().z()) == float(v2->position().z())); // only persistified with float precision + assert (float(v1->position().t()) == float(v2->position().t())); // only persistified with float precision + assert (HepMC::particles_in_size(v1) == HepMC::particles_in_size(v2)); + assert (HepMC::particles_out_size(v1) == HepMC::particles_out_size(v2)); + +#ifdef HEPMC3 + std::vector<HepMC::ConstGenParticlePtr>::const_iterator originalPartInIter(v1->particles_in().begin()); + const std::vector<HepMC::ConstGenParticlePtr>::const_iterator endOfOriginalListOfParticlesIn(v1->particles_in().end()); + std::vector<HepMC::ConstGenParticlePtr>::const_iterator resetPartInIter(v2->particles_in().begin()); + const std::vector<HepMC::ConstGenParticlePtr>::const_iterator endOfResetListOfParticlesIn(v2->particles_in().end()); +#else + HepMC::GenVertex::particles_in_const_iterator originalPartInIter(v1->particles_in_const_begin()); + const HepMC::GenVertex::particles_in_const_iterator endOfOriginalListOfParticlesIn(v1->particles_in_const_end()); + HepMC::GenVertex::particles_in_const_iterator resetPartInIter(v2->particles_in_const_begin()); + const HepMC::GenVertex::particles_in_const_iterator endOfResetListOfParticlesIn(v2->particles_in_const_end()); +#endif + while( originalPartInIter!=endOfOriginalListOfParticlesIn && + resetPartInIter!=endOfResetListOfParticlesIn ) { + compareGenParticle(*originalPartInIter,*resetPartInIter); + ++resetPartInIter; + ++originalPartInIter; + } + +#ifdef HEPMC3 +std::vector<HepMC::ConstGenParticlePtr>::const_iterator originalPartOutIter(v1->particles_out().begin()); +const std::vector<HepMC::ConstGenParticlePtr>::const_iterator endOfOriginalListOfParticlesOut(v1->particles_out().end()); +std::vector<HepMC::ConstGenParticlePtr>::const_iterator resetPartOutIter(v2->particles_out().begin()); +const std::vector<HepMC::ConstGenParticlePtr>::const_iterator endOfResetListOfParticlesOut(v2->particles_out().end()); +#else +HepMC::GenVertex::particles_out_const_iterator originalPartOutIter(v1->particles_out_const_begin()); +const HepMC::GenVertex::particles_out_const_iterator endOfOriginalListOfParticlesOut(v1->particles_out_const_end()); +HepMC::GenVertex::particles_out_const_iterator resetPartOutIter(v2->particles_out_const_begin()); +const HepMC::GenVertex::particles_out_const_iterator endOfResetListOfParticlesOut(v2->particles_out_const_end()); +#endif + while( originalPartOutIter!=endOfOriginalListOfParticlesOut && + resetPartOutIter!=endOfResetListOfParticlesOut ) { + compareGenParticle(*originalPartOutIter,*resetPartOutIter); + ++resetPartOutIter; + ++originalPartOutIter; + } + + return; +} + + +void compare (const HepMC::GenEvent& e1, + const HepMC::GenEvent& e2) +{ + assert (HepMC::signal_process_id(e1) == HepMC::signal_process_id(e2) ); + assert (e1.event_number() == e2.event_number() ); + // NB Beam Particles are not persistified in this version + +#if HEPMC3 + assert (e1.particles().size() == e2.particles().size()); + assert (e1.vertices().size() == e2.vertices().size()); + + std::vector<HepMC3::ConstGenParticlePtr>::const_iterator origParticleIter(begin(e1)); + const std::vector<HepMC3::ConstGenParticlePtr>::const_iterator endOfOriginalListOfParticles(end(e1)); + std::vector<HepMC3::ConstGenParticlePtr>::const_iterator resetParticleIter(begin(e2)); + const std::vector<HepMC3::ConstGenParticlePtr>::const_iterator endOfResetListOfParticles(end(e2)); + + while( origParticleIter!=endOfOriginalListOfParticles && + resetParticleIter!=endOfResetListOfParticles ) { + compareGenParticle(*origParticleIter,*resetParticleIter); + ++origParticleIter; + ++resetParticleIter; + } + + std::vector<HepMC::ConstGenVertexPtr>::const_iterator origVertexIter(e1.vertices().begin()); + const std::vector<HepMC::ConstGenVertexPtr>::const_iterator endOfOriginalListOfVertices(e1.vertices().end()); + std::vector<HepMC::ConstGenVertexPtr>::const_iterator resetVertexIter(e2.vertices().begin()); + const std::vector<HepMC::ConstGenVertexPtr>::const_iterator endOfResetListOfVertices(e2.vertices().end()); + while( origVertexIter!=endOfOriginalListOfVertices && + resetVertexIter!=endOfResetListOfVertices ) { + compareGenVertex(*origVertexIter,*resetVertexIter); + ++origVertexIter; + ++resetVertexIter; + } +#else + assert (e1.particles_size() == e2.particles_size()); + assert (e1.vertices_size() == e2.vertices_size()); + + HepMC::GenEvent::particle_const_iterator origParticleIter(begin(e1)); + const HepMC::GenEvent::particle_const_iterator endOfOriginalListOfParticles(end(e1)); + HepMC::GenEvent::particle_const_iterator resetParticleIter(begin(e2)); + const HepMC::GenEvent::particle_const_iterator endOfResetListOfParticles(end(e2)); + + while( origParticleIter!=endOfOriginalListOfParticles && + resetParticleIter!=endOfResetListOfParticles ) { + compareGenParticle(*origParticleIter,*resetParticleIter); + ++origParticleIter; + ++resetParticleIter; + } + + HepMC::GenEvent::vertex_const_iterator origVertexIter(e1.vertices_begin()); + const HepMC::GenEvent::vertex_const_iterator endOfOriginalListOfVertices(e1.vertices_end()); + HepMC::GenEvent::vertex_const_iterator resetVertexIter(e2.vertices_begin()); + const HepMC::GenEvent::vertex_const_iterator endOfResetListOfVertices(e2.vertices_end()); + while( origVertexIter!=endOfOriginalListOfVertices && + resetVertexIter!=endOfResetListOfVertices ) { + compareGenVertex(*origVertexIter,*resetVertexIter); + ++origVertexIter; + ++resetVertexIter; + } +#endif + return; } void compare (const McEventCollection& p1, @@ -38,7 +160,7 @@ void compare (const McEventCollection& p1, void populateGenEvent(HepMC::GenEvent & ge) { - HepMC::FourVector myPos( 0.0, 0.0, 0.0, 0.0); + HepMC::FourVector myPos(0.0345682751, 0.00872347682, 0.23671987, 0.0); HepMC::GenVertexPtr myVertex = HepMC::newGenVertexPtr( myPos, -1 ); HepMC::FourVector fourMomentum1( 0.0, 0.0, 1.0, 1.0*CLHEP::TeV); HepMC::GenParticlePtr inParticle1 = HepMC::newGenParticlePtr(fourMomentum1, 2, 10); @@ -59,7 +181,7 @@ void populateGenEvent(HepMC::GenEvent & ge) void populateGenEvent2(HepMC::GenEvent & ge) { - HepMC::FourVector myPos( 0.0, 0.0, 0.0, 0.0); + HepMC::FourVector myPos(0.0054625871, 0.08027374862, 0.32769178, 0.0); HepMC::GenVertexPtr myVertex = HepMC::newGenVertexPtr( myPos, -1 ); HepMC::FourVector fourMomentum1( 0.0, 0.0, 1.0, 1.0*CLHEP::TeV); HepMC::GenParticlePtr inParticle1 = HepMC::newGenParticlePtr(fourMomentum1, 2, 10); @@ -86,8 +208,19 @@ void testit (const McEventCollection& trans1) cnv.transToPers (&trans1, &pers, log); McEventCollection trans2; cnv.persToTrans (&pers, &trans2, log); - +#if HEPMC3 compare (trans1, trans2); +#else + // TP conversion of HepMC2::GenEvents has a feature where the order + // of GenParticles associated with each GenVertex is flipped, so + // agreement is only restored after running TP conversion twice... + McEventCollection_p4 pers2; + cnv.transToPers (&trans2, &pers2, log); + McEventCollection trans3; + cnv.persToTrans (&pers2, &trans3, log); + + compare (trans1, trans3); +#endif } void test1() @@ -128,7 +261,7 @@ int main() setlinebuf(stdout); setlinebuf(stderr); - std::cout << "GeneratorObjectsTPCnv/McEventCollectionCnv_p5_test\n"; + std::cout << "GeneratorObjectsTPCnv/McEventCollectionCnv_p4_test\n"; ISvcLocator* pSvcLoc; if (!Athena_test::initGaudi("GeneratorObjectsTPCnv/GeneratorObjectsTPCnv_test.txt", pSvcLoc)) { std::cerr << "This test can not be run" << std::endl; diff --git a/Generators/GeneratorObjectsTPCnv/test/McEventCollectionCnv_p5_test.cxx b/Generators/GeneratorObjectsTPCnv/test/McEventCollectionCnv_p5_test.cxx index 6e997385328cc9134519c7cf12c0d4cd67a4c645..3c30e5f058759238834aeab5cece418bf57ede8b 100644 --- a/Generators/GeneratorObjectsTPCnv/test/McEventCollectionCnv_p5_test.cxx +++ b/Generators/GeneratorObjectsTPCnv/test/McEventCollectionCnv_p5_test.cxx @@ -12,6 +12,8 @@ #include <iostream> // HepMC includes #include "AtlasHepMC/GenEvent.h" +#include "AtlasHepMC/GenVertex.h" +#include "AtlasHepMC/GenParticle.h" #include "TestTools/initGaudi.h" // CLHEP includes @@ -19,12 +21,147 @@ #include "GeneratorObjectsTPCnv/McEventCollectionCnv_p5.h" -void compare (const HepMC::GenEvent& p1, - const HepMC::GenEvent& p2) +void compareGenParticle(HepMC::ConstGenParticlePtr p1, + HepMC::ConstGenParticlePtr p2) { - assert (HepMC::signal_process_id(p1) == HepMC::signal_process_id(p2) ); - assert (p1.event_number() == p2.event_number() ); - //FIXME Need to loop over GenVertex and GenParticle objects too. + assert (HepMC::barcode(p1) == HepMC::barcode(p2)); + assert (p1->status() == p2->status()); + assert (p1->pdg_id() == p2->pdg_id()); + assert ((p1->momentum().px()) == (p2->momentum().px())); + assert ((p1->momentum().py()) == (p2->momentum().py())); + assert ((p1->momentum().pz()) == (p2->momentum().pz())); + assert (float(p1->momentum().m()) == float(p2->momentum().m())); // only persistified with float precision + + return; +} + + +void compareGenVertex(HepMC::ConstGenVertexPtr v1, + HepMC::ConstGenVertexPtr v2) +{ + assert (HepMC::barcode(v1) == HepMC::barcode(v2)); + assert (float(v1->position().x()) == float(v2->position().x())); // only persistified with float precision + assert (float(v1->position().y()) == float(v2->position().y())); // only persistified with float precision + assert (float(v1->position().z()) == float(v2->position().z())); // only persistified with float precision + assert (float(v1->position().t()) == float(v2->position().t())); // only persistified with float precision + assert (HepMC::particles_in_size(v1) == HepMC::particles_in_size(v2)); + assert (HepMC::particles_out_size(v1) == HepMC::particles_out_size(v2)); + +#ifdef HEPMC3 + std::vector<HepMC::ConstGenParticlePtr>::const_iterator originalPartInIter(v1->particles_in().begin()); + const std::vector<HepMC::ConstGenParticlePtr>::const_iterator endOfOriginalListOfParticlesIn(v1->particles_in().end()); + std::vector<HepMC::ConstGenParticlePtr>::const_iterator resetPartInIter(v2->particles_in().begin()); + const std::vector<HepMC::ConstGenParticlePtr>::const_iterator endOfResetListOfParticlesIn(v2->particles_in().end()); +#else + HepMC::GenVertex::particles_in_const_iterator originalPartInIter(v1->particles_in_const_begin()); + const HepMC::GenVertex::particles_in_const_iterator endOfOriginalListOfParticlesIn(v1->particles_in_const_end()); + HepMC::GenVertex::particles_in_const_iterator resetPartInIter(v2->particles_in_const_begin()); + const HepMC::GenVertex::particles_in_const_iterator endOfResetListOfParticlesIn(v2->particles_in_const_end()); +#endif + while( originalPartInIter!=endOfOriginalListOfParticlesIn && + resetPartInIter!=endOfResetListOfParticlesIn ) { + compareGenParticle(*originalPartInIter,*resetPartInIter); + ++resetPartInIter; + ++originalPartInIter; + } + +#ifdef HEPMC3 +std::vector<HepMC::ConstGenParticlePtr>::const_iterator originalPartOutIter(v1->particles_out().begin()); +const std::vector<HepMC::ConstGenParticlePtr>::const_iterator endOfOriginalListOfParticlesOut(v1->particles_out().end()); +std::vector<HepMC::ConstGenParticlePtr>::const_iterator resetPartOutIter(v2->particles_out().begin()); +const std::vector<HepMC::ConstGenParticlePtr>::const_iterator endOfResetListOfParticlesOut(v2->particles_out().end()); +#else +HepMC::GenVertex::particles_out_const_iterator originalPartOutIter(v1->particles_out_const_begin()); +const HepMC::GenVertex::particles_out_const_iterator endOfOriginalListOfParticlesOut(v1->particles_out_const_end()); +HepMC::GenVertex::particles_out_const_iterator resetPartOutIter(v2->particles_out_const_begin()); +const HepMC::GenVertex::particles_out_const_iterator endOfResetListOfParticlesOut(v2->particles_out_const_end()); +#endif + while( originalPartOutIter!=endOfOriginalListOfParticlesOut && + resetPartOutIter!=endOfResetListOfParticlesOut ) { + compareGenParticle(*originalPartOutIter,*resetPartOutIter); + ++resetPartOutIter; + ++originalPartOutIter; + } + + return; +} + + +void compare (const HepMC::GenEvent& e1, + const HepMC::GenEvent& e2) +{ + assert (HepMC::signal_process_id(e1) == HepMC::signal_process_id(e2) ); + assert (e1.event_number() == e2.event_number() ); + + assert (HepMC::valid_beam_particles(&e1) == HepMC::valid_beam_particles(&e2)); + if ( HepMC::valid_beam_particles(&e1) && HepMC::valid_beam_particles(&e2) ) { +#if HEPMC3 + const std::vector<HepMC::ConstGenParticlePtr> & originalBPs = e1.beams(); + const std::vector<HepMC::ConstGenParticlePtr> & resetBPs = e2.beams(); + compareGenParticle(originalBPs.at(0), resetBPs.at(0)); + compareGenParticle(originalBPs.at(1), resetBPs.at(1)); +#else + std::pair<HepMC::GenParticle*,HepMC::GenParticle*> originalBP = e1.beam_particles(); + std::pair<HepMC::GenParticle*,HepMC::GenParticle*> resetBP = e2.beam_particles(); + compareGenParticle(originalBP.first, resetBP.first); + compareGenParticle(originalBP.second, resetBP.second); +#endif + } + +#if HEPMC3 + assert (e1.particles().size() == e2.particles().size()); + assert (e1.vertices().size() == e2.vertices().size()); + + std::vector<HepMC3::ConstGenParticlePtr>::const_iterator origParticleIter(begin(e1)); + const std::vector<HepMC3::ConstGenParticlePtr>::const_iterator endOfOriginalListOfParticles(end(e1)); + std::vector<HepMC3::ConstGenParticlePtr>::const_iterator resetParticleIter(begin(e2)); + const std::vector<HepMC3::ConstGenParticlePtr>::const_iterator endOfResetListOfParticles(end(e2)); + + while( origParticleIter!=endOfOriginalListOfParticles && + resetParticleIter!=endOfResetListOfParticles ) { + compareGenParticle(*origParticleIter,*resetParticleIter); + ++origParticleIter; + ++resetParticleIter; + } + + std::vector<HepMC::ConstGenVertexPtr>::const_iterator origVertexIter(e1.vertices().begin()); + const std::vector<HepMC::ConstGenVertexPtr>::const_iterator endOfOriginalListOfVertices(e1.vertices().end()); + std::vector<HepMC::ConstGenVertexPtr>::const_iterator resetVertexIter(e2.vertices().begin()); + const std::vector<HepMC::ConstGenVertexPtr>::const_iterator endOfResetListOfVertices(e2.vertices().end()); + while( origVertexIter!=endOfOriginalListOfVertices && + resetVertexIter!=endOfResetListOfVertices ) { + compareGenVertex(*origVertexIter,*resetVertexIter); + ++origVertexIter; + ++resetVertexIter; + } +#else + assert (e1.particles_size() == e2.particles_size()); + assert (e1.vertices_size() == e2.vertices_size()); + + HepMC::GenEvent::particle_const_iterator origParticleIter(begin(e1)); + const HepMC::GenEvent::particle_const_iterator endOfOriginalListOfParticles(end(e1)); + HepMC::GenEvent::particle_const_iterator resetParticleIter(begin(e2)); + const HepMC::GenEvent::particle_const_iterator endOfResetListOfParticles(end(e2)); + + while( origParticleIter!=endOfOriginalListOfParticles && + resetParticleIter!=endOfResetListOfParticles ) { + compareGenParticle(*origParticleIter,*resetParticleIter); + ++origParticleIter; + ++resetParticleIter; + } + + HepMC::GenEvent::vertex_const_iterator origVertexIter(e1.vertices_begin()); + const HepMC::GenEvent::vertex_const_iterator endOfOriginalListOfVertices(e1.vertices_end()); + HepMC::GenEvent::vertex_const_iterator resetVertexIter(e2.vertices_begin()); + const HepMC::GenEvent::vertex_const_iterator endOfResetListOfVertices(e2.vertices_end()); + while( origVertexIter!=endOfOriginalListOfVertices && + resetVertexIter!=endOfResetListOfVertices ) { + compareGenVertex(*origVertexIter,*resetVertexIter); + ++origVertexIter; + ++resetVertexIter; + } + return; +#endif } void compare (const McEventCollection& p1, @@ -38,7 +175,7 @@ void compare (const McEventCollection& p1, void populateGenEvent(HepMC::GenEvent & ge) { - HepMC::FourVector myPos( 0.0, 0.0, 0.0, 0.0); + HepMC::FourVector myPos( 0.0345682751, 0.00872347682, 0.23671987, 0.0 ); HepMC::GenVertexPtr myVertex = HepMC::newGenVertexPtr( myPos, -1 ); HepMC::FourVector fourMomentum1( 0.0, 0.0, 1.0, 1.0*CLHEP::TeV); HepMC::GenParticlePtr inParticle1 = HepMC::newGenParticlePtr(fourMomentum1, 2, 10); @@ -59,7 +196,7 @@ void populateGenEvent(HepMC::GenEvent & ge) void populateGenEvent2(HepMC::GenEvent & ge) { - HepMC::FourVector myPos( 0.0, 0.0, 0.0, 0.0); + HepMC::FourVector myPos(0.0054625871, 0.08027374862, 0.32769178, 0.0); HepMC::GenVertexPtr myVertex = HepMC::newGenVertexPtr( myPos, -1 ); HepMC::FourVector fourMomentum1( 0.0, 0.0, 1.0, 1.0*CLHEP::TeV); HepMC::GenParticlePtr inParticle1 = HepMC::newGenParticlePtr(fourMomentum1, 2, 10); @@ -86,8 +223,19 @@ void testit (const McEventCollection& trans1) cnv.transToPers (&trans1, &pers, log); McEventCollection trans2; cnv.persToTrans (&pers, &trans2, log); - +#if HEPMC3 compare (trans1, trans2); +#else + // TP conversion of HepMC2::GenEvents has a feature where the order + // of GenParticles associated with each GenVertex is flipped, so + // agreement is only restored after running TP conversion twice... + McEventCollection_p5 pers2; + cnv.transToPers (&trans2, &pers2, log); + McEventCollection trans3; + cnv.persToTrans (&pers2, &trans3, log); + + compare (trans1, trans3); +#endif } void test1() diff --git a/Generators/MadGraphControl/python/MadGraphParamHelpers.py b/Generators/MadGraphControl/python/MadGraphParamHelpers.py index 88cad016694534ab907ab833e77230d698a03327..fb2a51526066586b0755d630432277fb0de1f4ce 100644 --- a/Generators/MadGraphControl/python/MadGraphParamHelpers.py +++ b/Generators/MadGraphControl/python/MadGraphParamHelpers.py @@ -11,7 +11,6 @@ def set_SM_params(process_dir,FourFS=False): https://twiki.cern.ch/twiki/bin/view/AtlasProtected/McProductionCommonParametersMC15 """ param_card_settings = { - 'loop' : { '1':"9.118760e+01" }, 'mass' : { '5': "0.000000", '15': "1.777000e+00", @@ -167,7 +166,7 @@ def get_PMG_updates(process_dir): newparamdict['mass'][pid] = mass # Width: Always set it, even if it wasn't in the dictionary if pid not in widths or widths[pid]!=width: - newparamdict['decay'][pid] = 'decay '+pid+' '+width + newparamdict['decay'][pid] = 'DECAY '+pid+' '+width # Yukawa: Set it only if it was in the dictionary # This is to protect against models that don't use Yukawa blocks as normal if pid in yukawas and yukawas[pid]!=mass: diff --git a/Generators/MadGraphControl/python/MadGraphUtils.py b/Generators/MadGraphControl/python/MadGraphUtils.py index 0fb6d90e6027d2c8f370ad800c7bd91bd25669ec..3d0da9d4cc642a42f9368efe0ba0c821671ff3e6 100755 --- a/Generators/MadGraphControl/python/MadGraphUtils.py +++ b/Generators/MadGraphControl/python/MadGraphUtils.py @@ -5,7 +5,7 @@ # updates for aMC@NLO by Josh McFayden <mcfayden@cern.ch> # Attempts to remove path-dependence of MadGraph -import os,time,subprocess,shutil,glob,re,stat +import os,time,subprocess,shutil,glob,re from AthenaCommon import Logging mglog = Logging.logging.getLogger('MadGraphUtils') @@ -20,7 +20,7 @@ MADGRAPH_CATCH_ERRORS=True # PDF setting (global setting) MADGRAPH_PDFSETTING=None MADGRAPH_COMMAND_STACK = [] -from MadGraphControl.MadGraphUtilsHelpers import checkSettingExists,checkSetting,checkSettingIsTrue,settingIsTrue,getDictFromCard,get_runArgs_info,get_physics_short,is_version_or_newer +from MadGraphControl.MadGraphUtilsHelpers import checkSettingExists,checkSetting,checkSettingIsTrue,getDictFromCard,get_runArgs_info,get_physics_short,is_version_or_newer from MadGraphControl.MadGraphParamHelpers import do_PMG_updates,check_PMG_updates @@ -389,16 +389,13 @@ def generate(process_dir='PROC_mssm_0', grid_pack=False, gridpack_compile=False, # Check if process is NLO or LO isNLO=is_NLO_run(process_dir=process_dir) - # use f2py2 if f2py not available + # if f2py not available if get_reweight_card(process_dir=process_dir) is not None: from distutils.spawn import find_executable - if find_executable('f2py2') is not None: - mglog.info('found f2py2, will update configuration') - modify_config_card(process_dir=process_dir,settings={'f2py_compiler':'f2py2','f2py_compiler_py2':'f2py2'}) - elif find_executable('f2py') is not None: + if find_executable('f2py') is not None: mglog.info('Found f2py, will use it for reweighting') else: - raise RuntimeError('Could not find f2py or f2py2, needed for reweighting') + raise RuntimeError('Could not find f2py, needed for reweighting') check_reweight_card(process_dir) if grid_pack: @@ -636,10 +633,6 @@ def generate_from_gridpack(runArgs=None, extlhapath=None, gridpack_compile=None, ls_dir(currdir) ls_dir(MADGRAPH_GRIDPACK_LOCATION) - if not isNLO: - # hack script to add reweighting and systematics, if required - hack_gridpack_script() - # Update the run card according to consistency checks run_card_consistency_check(isNLO=isNLO,process_dir=MADGRAPH_GRIDPACK_LOCATION) @@ -660,19 +653,38 @@ def generate_from_gridpack(runArgs=None, extlhapath=None, gridpack_compile=None, mglog.info('Turning off systematics for now, running standalone later') modify_run_card(process_dir=MADGRAPH_GRIDPACK_LOCATION,settings={'systematics_program':'none'},skipBaseFragment=True) - + global MADGRAPH_COMMAND_STACK if not isNLO: ### LO RUN ### - if not os.access(MADGRAPH_GRIDPACK_LOCATION+'/bin/run.sh',os.R_OK): - mglog.error('/bin/run.sh not found at '+MADGRAPH_GRIDPACK_LOCATION) - raise RuntimeError('Could not find run.sh executable') + if not os.access(MADGRAPH_GRIDPACK_LOCATION+'/bin/gridrun',os.R_OK): + mglog.error('/bin/gridrun not found at '+MADGRAPH_GRIDPACK_LOCATION) + raise RuntimeError('Could not find gridrun executable') else: - mglog.info('Found '+MADGRAPH_GRIDPACK_LOCATION+'/bin/run.sh, starting generation.') - + mglog.info('Found '+MADGRAPH_GRIDPACK_LOCATION+'/bin/gridrun, starting generation.') generate_prep(MADGRAPH_GRIDPACK_LOCATION) - generate = stack_subprocess([MADGRAPH_GRIDPACK_LOCATION+'/bin/run.sh',str(int(nevents)),str(int(random_seed))],stdin=subprocess.PIPE,stderr=subprocess.PIPE if MADGRAPH_CATCH_ERRORS else None) + granularity=1 + mglog.info("Now generating {} events with random seed {} and granularity {}".format(int(nevents),int(random_seed),granularity)) + # not sure whether this is needed but it is done in the old "run.sh" script + new_ld_path=":".join([os.environ['LD_LIBRARY_PATH'],os.getcwd()+'/'+MADGRAPH_GRIDPACK_LOCATION+'/madevent/lib',os.getcwd()+'/'+MADGRAPH_GRIDPACK_LOCATION+'/HELAS/lib']) + os.environ['LD_LIBRARY_PATH']=new_ld_path + MADGRAPH_COMMAND_STACK+=["export LD_LIBRARY_PATH="+":".join(['${LD_LIBRARY_PATH}',new_ld_path])] + generate = stack_subprocess([python,MADGRAPH_GRIDPACK_LOCATION+'/bin/gridrun',str(int(nevents)),str(int(random_seed)),str(granularity)],stdin=subprocess.PIPE,stderr=subprocess.PIPE if MADGRAPH_CATCH_ERRORS else None) (out,err) = generate.communicate() error_check(err) + gp_events=MADGRAPH_GRIDPACK_LOCATION+"/Events/GridRun_{}/unweighted_events.lhe.gz".format(int(random_seed)) + if not os.path.exists(gp_events): + mglog.error('Error in gp generation, did not find events at '+gp_events) + + # add reweighting, which is not run automatically from LO GPs + reweight_card=get_reweight_card(MADGRAPH_GRIDPACK_LOCATION) + if reweight_card is not None: + pythonpath_backup=os.environ['PYTHONPATH'] + # workaround as madevent crashes when path to mg in PYTHONPATH + os.environ['PYTHONPATH']=':'.join([p for p in pythonpath_backup.split(':') if 'madgraph5amc' not in p]) + add_reweighting('GridRun_{}'.format(int(random_seed))) + os.environ['PYTHONPATH']=pythonpath_backup + + shutil.move(gp_events,'events.lhe.gz') else: ### NLO RUN ### @@ -682,7 +694,6 @@ def generate_from_gridpack(runArgs=None, extlhapath=None, gridpack_compile=None, mglog.info('Found '+MADGRAPH_GRIDPACK_LOCATION+'/bin/generate_events, starting generation.') ls_dir(MADGRAPH_GRIDPACK_LOCATION+'/Events/') - global MADGRAPH_COMMAND_STACK if os.access(MADGRAPH_GRIDPACK_LOCATION+'/Events/'+gridpack_run_name, os.F_OK): mglog.info('Removing '+MADGRAPH_GRIDPACK_LOCATION+'/Events/'+gridpack_run_name+' directory from gridpack generation') MADGRAPH_COMMAND_STACK += ['rm -rf '+MADGRAPH_GRIDPACK_LOCATION+'/Events/'+gridpack_run_name] @@ -975,7 +986,7 @@ def setupLHAPDF(process_dir=None, extlhapath=None, allow_links=True): mglog.info('lhapdf-config --datadir: '+str(subprocess.Popen([lhapdfconfig, '--datadir'],stdout = subprocess.PIPE).stdout.read().strip())) mglog.info('lhapdf-config --pdfsets-path: '+str(subprocess.Popen([lhapdfconfig, '--pdfsets-path'],stdout = subprocess.PIPE).stdout.read().strip())) - modify_config_card(process_dir=process_dir,settings={'lhapdf':lhapdfconfig}) + modify_config_card(process_dir=process_dir,settings={'lhapdf':lhapdfconfig,'lhapdf_py3':lhapdfconfig}) mglog.info('Creating links for LHAPDF') if os.path.islink(process_dir+'/lib/PDFsets'): @@ -2069,7 +2080,7 @@ def modify_param_card(param_card_input=None,param_card_backup=None,process_dir=M #do special case of DECAY block if blockName=="DECAY": - if theParam.splitlines()[0].split()[0]=="DECAY": + if theParam.splitlines()[0].split()[0].upper()=="DECAY": #specifying the full decay block for newline in theParam.splitlines(): newcard.write(newline+'\n') @@ -2429,78 +2440,17 @@ def run_card_consistency_check(isNLO=False,process_dir='.'): mglog.info('Finished checking run card - All OK!') - -def hack_gridpack_script(): - reweight_card = get_reweight_card(process_dir=MADGRAPH_GRIDPACK_LOCATION) - - need_to_add_rwgt=reweight_card is not None - - run_card_dict=getDictFromCard(get_default_runcard(process_dir=MADGRAPH_GRIDPACK_LOCATION),lowercase=True) - - systematics_program=None - if settingIsTrue(run_card_dict['use_syst']): - systematics_program='systematics' - if checkSettingExists('systematics_program',run_card_dict): - if checkSetting('systematics_program','systematics',run_card_dict): - systematics_program='systematics' - if checkSetting('systematics_program','syscalc',run_card_dict): - systematics_program='syscalc' - if checkSetting('systematics_program','none',run_card_dict): - systematics_program=None - need_to_add_syst=systematics_program is not None - - systematics_arguments='' - if checkSettingExists('systematics_arguments',run_card_dict): - sys_dict=MadGraphControl.MadGraphSystematicsUtils.parse_systematics_arguments(run_card_dict['systematics_arguments']) - for s in sys_dict: - systematics_arguments+=' --'+s+'='+sys_dict[s] - - # add systematics calculation and reweighting to run.sh - runscript=MADGRAPH_GRIDPACK_LOCATION+'/bin/run.sh' - oldscript = open(runscript,'r') - newscript = open(runscript+'.tmp','w') - # in older MG versions the gridpack is run with the command below - gridrun_line_old='./bin/gridrun $num_events $seed' - syst_line_old='' - reweight_line_old='./bin/madevent reweight '+MADGRAPH_RUN_NAME+' -f\n' - # in new versions it is run like this - gridrun_line_new='${DIR}/bin/gridrun $num_events $seed $gran' - syst_line_new='' - reweight_line_new='${DIR}/bin/madevent reweight '+MADGRAPH_RUN_NAME+' -f\n' - - for line in oldscript: - if (need_to_add_rwgt or need_to_add_syst) and gridrun_line_old in line: - newscript.write(line) - # run systematics - if need_to_add_syst: - newscript.write(syst_line_old) - need_to_add_syst=False - # reweight - if need_to_add_rwgt: - newscript.write(reweight_line_old) - need_to_add_rwgt=False - elif (need_to_add_rwgt or need_to_add_syst) and gridrun_line_new in line: - newscript.write(line) - # run systematics - if need_to_add_syst: - newscript.write(syst_line_new) - need_to_add_syst=False - # reweight - if need_to_add_rwgt: - newscript.write(reweight_line_new) - need_to_add_rwgt=False - else: - newscript.write(line) - oldscript.close() - newscript.close() - mglog.info('created '+runscript+'.tmp') - - if reweight_card and need_to_add_rwgt: - raise RuntimeError('Could not add reweighting to gridpack script: '+runscript+' maybe line to generate events changed') - shutil.move(runscript+'.tmp',runscript) - st = os.stat(runscript) - os.chmod(runscript, st.st_mode | stat.S_IEXEC) - +def add_reweighting(run_name,reweight_card=None,process_dir=MADGRAPH_GRIDPACK_LOCATION): + mglog.info('Running reweighting module on existing events') + if reweight_card is not None: + mglog.info('Copying new reweight card from '+reweight_card) + shutil.move(reweight_card,process_dir+'/Cards/reweight_card.dat') + reweight_cmd='{}/bin/madevent reweight {} -f'.format(process_dir,run_name) + global MADGRAPH_CATCH_ERRORS + reweight = stack_subprocess([python]+reweight_cmd.split(),stdin=subprocess.PIPE,stderr=subprocess.PIPE if MADGRAPH_CATCH_ERRORS else None) + (out,err) = reweight.communicate() + error_check(err) + mglog.info('Finished reweighting') def check_reset_proc_number(opts): if 'ATHENA_PROC_NUMBER' in os.environ and int(os.environ['ATHENA_PROC_NUMBER'])>0: diff --git a/Generators/PowhegControl/share/example/processes/t_sch/mc.PhPy8EG_A14NNPDF23_t_sch_example.py b/Generators/PowhegControl/share/example/processes/t_sch/mc.PhPy8EG_A14NNPDF23_t_sch_example.py index f3a39709aef4720eac40eb1b72d1bbe4b523550c..93a656f8bfc3b58acacd5eab8854e2b07407ed90 100644 --- a/Generators/PowhegControl/share/example/processes/t_sch/mc.PhPy8EG_A14NNPDF23_t_sch_example.py +++ b/Generators/PowhegControl/share/example/processes/t_sch/mc.PhPy8EG_A14NNPDF23_t_sch_example.py @@ -28,3 +28,5 @@ PowhegConfig.generate() #-------------------------------------------------------------- include("Pythia8_i/Pythia8_A14_NNPDF23LO_EvtGen_Common.py") include("Pythia8_i/Pythia8_Powheg_Main31.py") +# Setting the appropriate number of final state particles for the main31 routine +genSeq.Pythia8.Commands += [ 'Powheg:NFinal = 2' ] diff --git a/Generators/PowhegControl/share/example/processes/t_tch_4FS/mc.PhPy8EG_A14NNPDF23_t_tch_4FS_example.py b/Generators/PowhegControl/share/example/processes/t_tch_4FS/mc.PhPy8EG_A14NNPDF23_t_tch_4FS_example.py index a466a085df3ab26ce77412ccd52d351dbb395d13..8b33117c23dc5597592de8f0088b55dad821e054 100644 --- a/Generators/PowhegControl/share/example/processes/t_tch_4FS/mc.PhPy8EG_A14NNPDF23_t_tch_4FS_example.py +++ b/Generators/PowhegControl/share/example/processes/t_tch_4FS/mc.PhPy8EG_A14NNPDF23_t_tch_4FS_example.py @@ -29,3 +29,5 @@ PowhegConfig.generate() #-------------------------------------------------------------- include("Pythia8_i/Pythia8_A14_NNPDF23LO_EvtGen_Common.py") include("Pythia8_i/Pythia8_Powheg_Main31.py") +# Setting the appropriate number of final state particles for the main31 routine +genSeq.Pythia8.Commands += [ 'Powheg:NFinal = 3' ] diff --git a/Generators/PowhegControl/share/example/processes/tt/mc.PhPy8EG_A14NNPDF23_tt_example.py b/Generators/PowhegControl/share/example/processes/tt/mc.PhPy8EG_A14NNPDF23_tt_example.py index ad0abea696c18738c75fc6cf505783e97b016cf2..d10e707c2dda2d5d378127b3d9a505c3d899a86c 100644 --- a/Generators/PowhegControl/share/example/processes/tt/mc.PhPy8EG_A14NNPDF23_tt_example.py +++ b/Generators/PowhegControl/share/example/processes/tt/mc.PhPy8EG_A14NNPDF23_tt_example.py @@ -28,3 +28,5 @@ PowhegConfig.generate() #-------------------------------------------------------------- include("Pythia8_i/Pythia8_A14_NNPDF23LO_EvtGen_Common.py") include("Pythia8_i/Pythia8_Powheg_Main31.py") +# Setting the appropriate number of final state particles for the main31 routine +genSeq.Pythia8.Commands += [ 'Powheg:NFinal = 2' ] diff --git a/Generators/PowhegControl/share/example/processes/ttH/mc.PhPy8EG_A14NNPDF23_ttH_example.py b/Generators/PowhegControl/share/example/processes/ttH/mc.PhPy8EG_A14NNPDF23_ttH_example.py index 7108ea6eec889e14ec71c97d75df94029a79f0fc..864e0e94c9b35e75d8ed79c8198f532bd8a70d1c 100644 --- a/Generators/PowhegControl/share/example/processes/ttH/mc.PhPy8EG_A14NNPDF23_ttH_example.py +++ b/Generators/PowhegControl/share/example/processes/ttH/mc.PhPy8EG_A14NNPDF23_ttH_example.py @@ -28,3 +28,5 @@ PowhegConfig.generate() #-------------------------------------------------------------- include("Pythia8_i/Pythia8_A14_NNPDF23LO_EvtGen_Common.py") include("Pythia8_i/Pythia8_Powheg_Main31.py") +# Setting the appropriate number of final state particles for the main31 routine +genSeq.Pythia8.Commands += [ 'Powheg:NFinal = 3' ] diff --git a/Generators/PowhegControl/share/example/processes/ttbb/mc.PhPy8EG_A14NNPDF23_ttbb_example.py b/Generators/PowhegControl/share/example/processes/ttbb/mc.PhPy8EG_A14NNPDF23_ttbb_example.py index 62eeee6be24301236726654bb0bad0b77f49de1d..05b363569b2bc833affa7c00da34e24e1333211b 100644 --- a/Generators/PowhegControl/share/example/processes/ttbb/mc.PhPy8EG_A14NNPDF23_ttbb_example.py +++ b/Generators/PowhegControl/share/example/processes/ttbb/mc.PhPy8EG_A14NNPDF23_ttbb_example.py @@ -28,3 +28,5 @@ PowhegConfig.generate() #-------------------------------------------------------------- include("Pythia8_i/Pythia8_A14_NNPDF23LO_EvtGen_Common.py") include("Pythia8_i/Pythia8_Powheg_Main31.py") +# Setting the appropriate number of final state particles for the main31 routine +genSeq.Pythia8.Commands += [ 'Powheg:NFinal = 4' ] diff --git a/Generators/PowhegControl/share/example/processes/ttj/mc.PhPy8EG_A14NNPDF23_ttj_example.py b/Generators/PowhegControl/share/example/processes/ttj/mc.PhPy8EG_A14NNPDF23_ttj_example.py index 75013d9b0e2ef178709e6f09e20cf364080ab4c0..fe2b6e9625ccc293dd09e4993261a9d4a1c801bf 100644 --- a/Generators/PowhegControl/share/example/processes/ttj/mc.PhPy8EG_A14NNPDF23_ttj_example.py +++ b/Generators/PowhegControl/share/example/processes/ttj/mc.PhPy8EG_A14NNPDF23_ttj_example.py @@ -28,3 +28,5 @@ PowhegConfig.generate() #-------------------------------------------------------------- include("Pythia8_i/Pythia8_A14_NNPDF23LO_EvtGen_Common.py") include("Pythia8_i/Pythia8_Powheg_Main31.py") +# Setting the appropriate number of final state particles for the main31 routine +genSeq.Pythia8.Commands += [ 'Powheg:NFinal = 3' ] diff --git a/Generators/PowhegControl/share/example/processes/ttj_MiNNLO/mc.PhPy8EG_A14NNPDF23_ttj_MiNNLO_example.py b/Generators/PowhegControl/share/example/processes/ttj_MiNNLO/mc.PhPy8EG_A14NNPDF23_ttj_MiNNLO_example.py index 813e8a918137ea1c59523ff2b8a5b24365029a6f..f107ad4f349e138085d00b0a0eae83f3fa763fd8 100644 --- a/Generators/PowhegControl/share/example/processes/ttj_MiNNLO/mc.PhPy8EG_A14NNPDF23_ttj_MiNNLO_example.py +++ b/Generators/PowhegControl/share/example/processes/ttj_MiNNLO/mc.PhPy8EG_A14NNPDF23_ttj_MiNNLO_example.py @@ -43,3 +43,5 @@ PowhegConfig.generate() #-------------------------------------------------------------- include("Pythia8_i/Pythia8_A14_NNPDF23LO_EvtGen_Common.py") include("Pythia8_i/Pythia8_Powheg_Main31.py") +# Setting the appropriate number of final state particles for the main31 routine +genSeq.Pythia8.Commands += [ 'Powheg:NFinal = 3' ] diff --git a/Generators/PowhegControl/share/example/ttWm_EW/mc.PhPy8EG_A14NNPDF23_ttWm_EW_example.py b/Generators/PowhegControl/share/example/ttWm_EW/mc.PhPy8EG_A14NNPDF23_ttWm_EW_example.py deleted file mode 100644 index ed80b961591b5e65288a3dbef5e168c8abcd30a4..0000000000000000000000000000000000000000 --- a/Generators/PowhegControl/share/example/ttWm_EW/mc.PhPy8EG_A14NNPDF23_ttWm_EW_example.py +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration - -#-------------------------------------------------------------- -# EVGEN configuration -#-------------------------------------------------------------- -evgenConfig.description = "POWHEG+Pythia8 top pair plus W boson production with A14 NNPDF2.3 tune." -evgenConfig.keywords = ["SM", "top"] -evgenConfig.contact = ["stefan.richter@cern.ch"] - -# -------------------------------------------------------------- -# Load ATLAS defaults for the Powheg ttbb process -# -------------------------------------------------------------- -include("PowhegControl/PowhegControl_ttWm_EW_Common.py") - -# -------------------------------------------------------------- -# Generate events -# -------------------------------------------------------------- -PowhegConfig.generate() - -#-------------------------------------------------------------- -# Pythia8 showering with the A14 NNPDF2.3 tune -#-------------------------------------------------------------- -include("Pythia8_i/Pythia8_A14_NNPDF23LO_EvtGen_Common.py") -include("Pythia8_i/Pythia8_Powheg.py") diff --git a/Generators/PowhegControl/share/example/ttWm_QCD/mc.PhPy8EG_A14NNPDF23_ttWm_QCD_example.py b/Generators/PowhegControl/share/example/ttWm_QCD/mc.PhPy8EG_A14NNPDF23_ttWm_QCD_example.py deleted file mode 100644 index 2c0a0296897de7d70b387acce30933ad17cce6d6..0000000000000000000000000000000000000000 --- a/Generators/PowhegControl/share/example/ttWm_QCD/mc.PhPy8EG_A14NNPDF23_ttWm_QCD_example.py +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration - -#-------------------------------------------------------------- -# EVGEN configuration -#-------------------------------------------------------------- -evgenConfig.description = "POWHEG+Pythia8 top pair plus W boson production with A14 NNPDF2.3 tune." -evgenConfig.keywords = ["SM", "top"] -evgenConfig.contact = ["stefan.richter@cern.ch"] - -# -------------------------------------------------------------- -# Load ATLAS defaults for the Powheg ttbb process -# -------------------------------------------------------------- -include("PowhegControl/PowhegControl_ttWm_QCD_Common.py") - -# -------------------------------------------------------------- -# Generate events -# -------------------------------------------------------------- -PowhegConfig.generate() - -#-------------------------------------------------------------- -# Pythia8 showering with the A14 NNPDF2.3 tune -#-------------------------------------------------------------- -include("Pythia8_i/Pythia8_A14_NNPDF23LO_EvtGen_Common.py") -include("Pythia8_i/Pythia8_Powheg.py") diff --git a/Generators/PowhegControl/share/example/ttWp_EW/mc.PhPy8EG_A14NNPDF23_ttWp_EW_example.py b/Generators/PowhegControl/share/example/ttWp_EW/mc.PhPy8EG_A14NNPDF23_ttWp_EW_example.py deleted file mode 100644 index 8d63aef436479eee70caa67b6428398005ee2e91..0000000000000000000000000000000000000000 --- a/Generators/PowhegControl/share/example/ttWp_EW/mc.PhPy8EG_A14NNPDF23_ttWp_EW_example.py +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration - -#-------------------------------------------------------------- -# EVGEN configuration -#-------------------------------------------------------------- -evgenConfig.description = "POWHEG+Pythia8 top pair plus W boson production with A14 NNPDF2.3 tune." -evgenConfig.keywords = ["SM", "top"] -evgenConfig.contact = ["stefan.richter@cern.ch"] - -# -------------------------------------------------------------- -# Load ATLAS defaults for the Powheg ttbb process -# -------------------------------------------------------------- -include("PowhegControl/PowhegControl_ttWp_EW_Common.py") - -# -------------------------------------------------------------- -# Generate events -# -------------------------------------------------------------- -PowhegConfig.generate() - -#-------------------------------------------------------------- -# Pythia8 showering with the A14 NNPDF2.3 tune -#-------------------------------------------------------------- -include("Pythia8_i/Pythia8_A14_NNPDF23LO_EvtGen_Common.py") -include("Pythia8_i/Pythia8_Powheg.py") diff --git a/Generators/PowhegControl/share/example/ttWp_QCD/mc.PhPy8EG_A14NNPDF23_ttWp_QCD_example.py b/Generators/PowhegControl/share/example/ttWp_QCD/mc.PhPy8EG_A14NNPDF23_ttWp_QCD_example.py deleted file mode 100644 index c5f0238a0e3acf8cce28c702e177085a5d183832..0000000000000000000000000000000000000000 --- a/Generators/PowhegControl/share/example/ttWp_QCD/mc.PhPy8EG_A14NNPDF23_ttWp_QCD_example.py +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration - -#-------------------------------------------------------------- -# EVGEN configuration -#-------------------------------------------------------------- -evgenConfig.description = "POWHEG+Pythia8 top pair plus W boson production with A14 NNPDF2.3 tune." -evgenConfig.keywords = ["SM", "top"] -evgenConfig.contact = ["stefan.richter@cern.ch"] - -# -------------------------------------------------------------- -# Load ATLAS defaults for the Powheg ttbb process -# -------------------------------------------------------------- -include("PowhegControl/PowhegControl_ttWp_QCD_Common.py") - -# -------------------------------------------------------------- -# Generate events -# -------------------------------------------------------------- -PowhegConfig.generate() - -#-------------------------------------------------------------- -# Pythia8 showering with the A14 NNPDF2.3 tune -#-------------------------------------------------------------- -include("Pythia8_i/Pythia8_A14_NNPDF23LO_EvtGen_Common.py") -include("Pythia8_i/Pythia8_Powheg.py") diff --git a/Generators/QGSJet_i/CMakeLists.txt b/Generators/QGSJet_i/CMakeLists.txt index de4c7a3784754aec1644c3de792feddb7cefe365..abddcc331fce6f97c74a2d6b1c8e69ccd2acfb60 100644 --- a/Generators/QGSJet_i/CMakeLists.txt +++ b/Generators/QGSJet_i/CMakeLists.txt @@ -1,5 +1,8 @@ # Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration +# Minimum CMake requirement for the package. +cmake_minimum_required( VERSION 3.21 ) + # Declare the package name: atlas_subdir( QGSJet_i ) @@ -18,24 +21,33 @@ atlas_add_library( QGSJet_iLib src/Rangen.F PUBLIC_HEADERS QGSJet_i INCLUDE_DIRS ${CRMC_INCLUDE_DIRS} - PRIVATE_INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} + PRIVATE_INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS} LINK_LIBRARIES ${CRMC_LIBRARIES} GeneratorModulesLib PRIVATE_LINK_LIBRARIES ${CLHEP_LIBRARIES} AtlasHepMCLib AtlasHepMCfioLib AthenaKernel GaudiKernel TruthUtils ) atlas_add_component( QGSJet_i src/components/*.cxx - INCLUDE_DIRS ${CRMC_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} + INCLUDE_DIRS ${CRMC_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} LINK_LIBRARIES ${CRMC_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib AtlasHepMCfioLib GeneratorModulesLib AthenaKernel GaudiKernel TruthUtils QGSJet_iLib ) # Install files from the package: -# atlas_install_joboptions( share/common/*.py ) atlas_install_runtime( share/file/qgsjet_crmc.param ) -atlas_install_runtime( ${CRMC_LCGROOT}/tabs/sectnu-II-04 - ${CRMC_LCGROOT}/tabs/qgsdat-II-04.lzma ) - +# Install files from Crmc. +foreach( _file "sectnu-II-04" "qgsdat-II-04.lzma" ) + find_file( _datFile "${_file}" + PATHS "${CRMC_LCGROOT}" + PATH_SUFFIXES "tabs" "share/crmc" + NO_CACHE ) + if( _datFile ) + atlas_install_runtime( "${_datFile}" ) + else() + message( WARNING "Could not find data file \"${_file}\"" ) + endif() +endforeach() + +# Set up the runtime environment for the package. set( QGSJetEnvironment_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE PATH "Location of QGSJetEnvironment.cmake" ) find_package( QGSJetEnvironment ) - diff --git a/HLT/Event/ByteStreamEmonSvc/CMakeLists.txt b/HLT/Event/ByteStreamEmonSvc/CMakeLists.txt index 635714d00484d43be0b6b2ff38209178310094f9..e72b388a2348b2fb143e7e18a060b81a6e4e3d7a 100644 --- a/HLT/Event/ByteStreamEmonSvc/CMakeLists.txt +++ b/HLT/Event/ByteStreamEmonSvc/CMakeLists.txt @@ -6,7 +6,7 @@ atlas_subdir( ByteStreamEmonSvc ) # External dependencies: -find_package( Boost COMPONENTS filesystem thread system ) +find_package( Boost COMPONENTS filesystem thread system unit_test_framework ) find_package( tdaq COMPONENTS emon ohroot owl is omniORB4 omnithread oh ) # Component(s) in the package: @@ -18,3 +18,11 @@ atlas_add_component( ByteStreamEmonSvc # Install files from the package: atlas_install_joboptions( share/*.py ) atlas_install_python_modules( python/*.py ) + +atlas_add_test( + test_extract_histogram_tag + SOURCES test/test_extract_histogram_tag.cxx src/extract_histogram_tag.cxx + POST_EXEC_SCRIPT nopost.sh + INCLUDE_DIRS ${Boost_INCLUDE_DIRS} + LINK_LIBRARIES Boost::unit_test_framework +) diff --git a/HLT/Event/ByteStreamEmonSvc/src/ByteStreamEmonInputSvc.cxx b/HLT/Event/ByteStreamEmonSvc/src/ByteStreamEmonInputSvc.cxx index 742bf7bd13b812f172e361fd27a542b4427d5213..a26b728476a7ed93e81165f4e1cd171b852acad5 100644 --- a/HLT/Event/ByteStreamEmonSvc/src/ByteStreamEmonInputSvc.cxx +++ b/HLT/Event/ByteStreamEmonSvc/src/ByteStreamEmonInputSvc.cxx @@ -28,6 +28,7 @@ #include "ByteStreamCnvSvcBase/ByteStreamAddress.h" #include "CxxUtils/checker_macros.h" #include "PersistentDataModel/DataHeader.h" +#include "./extract_histogram_tag.h" #include <cstdlib> #include <csignal> @@ -536,7 +537,8 @@ void ByteStreamEmonInputSvc::check_publish() TH1 *h = nullptr; if(m_histSvc->getHist(name, h)) { // might throw... - m_provider->publish(*h, name); + auto name_tag = detail::extract_histogram_tag(name); + m_provider->publish(*h, name_tag.first, name_tag.second); }; } for(const std::string& name : m_histSvc->getEfficiencies()) { @@ -559,8 +561,9 @@ void ByteStreamEmonInputSvc::check_publish() p = create2DProfile(h); } // might throw... - m_provider->publish(*p, name); - //m_provider->publish(*h, name); + auto name_tag = detail::extract_histogram_tag(name); + m_provider->publish(*p, name_tag.first, name_tag.second); + //m_provider->publish(*h, name_tag.first, name_tag.second); } // tdaq doesn't currently support publishing efficiencies, will change in the future }; } diff --git a/HLT/Event/ByteStreamEmonSvc/src/extract_histogram_tag.cxx b/HLT/Event/ByteStreamEmonSvc/src/extract_histogram_tag.cxx new file mode 100644 index 0000000000000000000000000000000000000000..2eda057efbdf9a93d00fa8bfe36e6154669f409e --- /dev/null +++ b/HLT/Event/ByteStreamEmonSvc/src/extract_histogram_tag.cxx @@ -0,0 +1,39 @@ + +#include "./extract_histogram_tag.h" + +#include <regex> + +namespace { + +// Regular expressions for per-LBN histogram names used over time +std::regex const lbRegex_run2("^/?run_\\d+/lb_(\\d+)(/.+)$"); +std::regex const lbRegex_run3("^(.+)_LB((\\d+)|\\d+_(\\d+))$"); + +} + +namespace detail { + +std::pair<std::string, int> extract_histogram_tag(const std::string& histo_name) +{ + std::smatch what; + if (std::regex_match(histo_name, what, ::lbRegex_run2)) { + try { + int tag = std::stoi(what.str(1)); + return std::make_pair(what[2], tag); + } catch(std::exception &ex) { + // should not happen but be defensive and just ignore it + } + } + if (std::regex_match(histo_name, what, ::lbRegex_run3)) { + std::string const tagStr = what[3].length() > 0 ? what.str(3) : what.str(4); + try { + int tag = std::stoi(tagStr); + return std::make_pair(what[1], tag); + } catch(std::exception &ex) { + // should not happen but be defensive and just ignore it + } + } + return std::make_pair(histo_name, -1); +} + +} // namespace detail diff --git a/HLT/Event/ByteStreamEmonSvc/src/extract_histogram_tag.h b/HLT/Event/ByteStreamEmonSvc/src/extract_histogram_tag.h new file mode 100644 index 0000000000000000000000000000000000000000..05038b200314e5d1e1d9d3c1451c683703bba8a8 --- /dev/null +++ b/HLT/Event/ByteStreamEmonSvc/src/extract_histogram_tag.h @@ -0,0 +1,21 @@ +/* + Copyright (C) 2021 CERN for the benefit of the ATLAS collaboration +*/ + +#include <string> +#include <utility> + +namespace detail { + +/** + * Extract tag/LB number from per-LBN histogram name. + * + * This method supports naming conventions used in run2 and run3. It returns a + * histogram hame without LB number in it and a tag (LBN) extracted from the + * name. If histogram name does not have LBN in it then the name is returned + * without any change, and tag is set to -1. + */ +std::pair<std::string, int> extract_histogram_tag(const std::string& histo_name); + + +} // namespace detail diff --git a/HLT/Event/ByteStreamEmonSvc/test/test_extract_histogram_tag.cxx b/HLT/Event/ByteStreamEmonSvc/test/test_extract_histogram_tag.cxx new file mode 100644 index 0000000000000000000000000000000000000000..6a1f9edeefc7eff339592750583f2300ac5d0beb --- /dev/null +++ b/HLT/Event/ByteStreamEmonSvc/test/test_extract_histogram_tag.cxx @@ -0,0 +1,98 @@ + +#define BOOST_TEST_MODULE test_extract_histogram_tag +#define BOOST_TEST_DYN_LINK +#include <boost/test/unit_test.hpp> + +#include "../src/extract_histogram_tag.h" + + +using detail::extract_histogram_tag; + + +BOOST_AUTO_TEST_CASE(test_stripTag_nolbn) +{ + // test case for when histo name does not have LBN in it + + std::pair<std::string, int> result; + + // path and tag are not set is stripTag() returns false + result = extract_histogram_tag("name"); + BOOST_TEST(result.second == -1); + + result = extract_histogram_tag("/EXPERT/name"); + BOOST_TEST(result.second == -1); + + result = extract_histogram_tag("/LB/EXPERT/name"); + BOOST_TEST(result.second == -1); +} + +BOOST_AUTO_TEST_CASE(test_stripTag_lbn_run2) +{ + // test case for run2 LBN convention + + std::pair<std::string, int> result; + + result = extract_histogram_tag("/run_0/lb_1/name"); + BOOST_TEST(result.first == "/name"); + BOOST_TEST(result.second == 1); + + result = extract_histogram_tag("/run_100/lb_999/EXPERT/name"); + BOOST_TEST(result.first == "/EXPERT/name"); + BOOST_TEST(result.second == 999); + + result = extract_histogram_tag("/run_999/lb_123456789/LB/EXPERT/name"); + BOOST_TEST(result.first == "/LB/EXPERT/name"); + BOOST_TEST(result.second == 123456789); + + // some non-matching cases + result = extract_histogram_tag("/run_X/lb_1/LB/EXPERT/name"); + BOOST_TEST(result.second == -1); + + result = extract_histogram_tag("/run_1/lb_Y/LB/EXPERT/name"); + BOOST_TEST(result.second == -1); + + result = extract_histogram_tag("/run_X/lb_Y/LB/EXPERT/name"); + BOOST_TEST(result.second == -1); + + result = extract_histogram_tag("/run_1/lb_-1/LB/EXPERT/name"); + BOOST_TEST(result.second == -1); +} + +BOOST_AUTO_TEST_CASE(test_stripTag_lbn_run3) +{ + // test case for run3 LBN convention + + std::pair<std::string, int> result; + + result = extract_histogram_tag("name_LB1"); + BOOST_TEST(result.first == "name"); + BOOST_TEST(result.second == 1); + + result = extract_histogram_tag("name_LB1_10"); + BOOST_TEST(result.first == "name"); + BOOST_TEST(result.second == 10); + + result = extract_histogram_tag("/EXPERT/name_LB999"); + BOOST_TEST(result.first == "/EXPERT/name"); + BOOST_TEST(result.second == 999); + + result = extract_histogram_tag("/LB/EXPERT/name_LB999_1001"); + BOOST_TEST(result.first == "/LB/EXPERT/name"); + BOOST_TEST(result.second == 1001); + + // some non-matching cases + result = extract_histogram_tag("/LB/EXPERT/name_LBN"); + BOOST_TEST(result.second == -1); + + result = extract_histogram_tag("/LB/EXPERT/name_LBN_100"); + BOOST_TEST(result.second == -1); + + result = extract_histogram_tag("/LB/EXPERT/name_LB1_N"); + BOOST_TEST(result.second == -1); + + result = extract_histogram_tag("/LB/EXPERT/name_LB-1"); + BOOST_TEST(result.second == -1); + + result = extract_histogram_tag("/LB/EXPERT/nameLB1"); + BOOST_TEST(result.second == -1); +} diff --git a/HLT/Trigger/TrigControl/TrigCommon/bin/athenaHLT.py b/HLT/Trigger/TrigControl/TrigCommon/bin/athenaHLT.py index 1ecd35b322687ef2d8eb338a4ee6639537a7de06..2a09df8a935c6013568c806c97803918c32ca87b 100755 --- a/HLT/Trigger/TrigControl/TrigCommon/bin/athenaHLT.py +++ b/HLT/Trigger/TrigControl/TrigCommon/bin/athenaHLT.py @@ -47,6 +47,11 @@ import six # threads when forking (see ATR-21890, ATDBOPS-115) os.environ["CORAL_ORA_NO_OCI_THREADED"] = "1" +# Add possible paths for IS schema files to TDAQ_DB_PATH: +for p in reversed(os.environ.get("DATAPATH","").split(os.pathsep)): + if p.rstrip('/').endswith('/share'): + os.environ["TDAQ_DB_PATH"] = os.path.join(p,'schema') + os.pathsep + os.environ["TDAQ_DB_PATH"] + from TrigCommon import AthHLT from AthenaCommon.Logging import logging log = logging.getLogger('athenaHLT') @@ -229,22 +234,24 @@ def HLTMPPy_cfgdict(args): 'save_options': None, 'solenoid_current': 7730, 'toroid_current': 20400, + 'schema_files': ['Larg.LArNoiseBurstCandidates.is.schema.xml'], 'with_infrastructure': args.oh_monitoring } - cdict['monitoring'] = { - 'module': 'monsvcis', - 'library': 'MonSvcInfoService', - 'ISInterval': 10, - 'ISRegex': '.*', - 'ISServer': '${TDAQ_IS_SERVER=DF}', - 'ISSlots': 1, - 'OHInterval': args.oh_interval, - 'OHInclude': '.*', - 'OHExclude': '', - 'OHServerName': 'HLT-Histogramming', - 'OHSlots': 5 - } + if args.oh_monitoring: + cdict['monitoring'] = { + 'module': 'monsvcis', + 'library': 'MonSvcInfoService', + 'ISInterval': 10, + 'ISRegex': '.*', + 'ISServer': '${TDAQ_IS_SERVER=DF}', + 'ISSlots': 1, + 'OHInterval': args.oh_interval, + 'OHInclude': '.*', + 'OHExclude': '', + 'OHServerName': 'HLT-Histogramming', + 'OHSlots': 5 + } cdict['trigger'] = { 'library': ['TrigPSC'], diff --git a/HLT/Trigger/TrigControl/TrigCommon/python/AthHLT.py b/HLT/Trigger/TrigControl/TrigCommon/python/AthHLT.py index 10f0a8cb9b4e6a210b5f596b4ce67be29d9bca37..400a48907cbdbbf30925f3600cde31a8af10e7e7 100644 --- a/HLT/Trigger/TrigControl/TrigCommon/python/AthHLT.py +++ b/HLT/Trigger/TrigControl/TrigCommon/python/AthHLT.py @@ -1,11 +1,12 @@ -# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration # # Utilities used in athenaHLT.py # -from PyUtils.Decorators import memoize from AthenaCommon.Logging import logging log = logging.getLogger('athenaHLT') +from functools import cache + class CondDB: _run2 = 236108 def __init__(self, run): @@ -21,7 +22,7 @@ class CondDB: else: return '/TDAQ/RunCtrl/SOR_Params' -@memoize +@cache def get_sor_params(run_number): import pickle cool_cache = 'AthHLT.sor.pkl' @@ -62,7 +63,7 @@ def get_sor_params(run_number): return d -@memoize +@cache def get_trigconf_keys(run_number): """Read HLT keys from COOL""" diff --git a/HLT/Trigger/TrigControl/TrigCommon/share/athenaHLT_jo_noopts.ref b/HLT/Trigger/TrigControl/TrigCommon/share/athenaHLT_jo_noopts.ref index 5ad570db8a0cec6e659b6ff639aa94df24d1da50..663ffd488adacb16f9956e4f445083531367b462 100644 --- a/HLT/Trigger/TrigControl/TrigCommon/share/athenaHLT_jo_noopts.ref +++ b/HLT/Trigger/TrigControl/TrigCommon/share/athenaHLT_jo_noopts.ref @@ -24,49 +24,7 @@ <library>TrigPSC</library> </HLTImplementationLibraries> <HardTimeout>3600000</HardTimeout> - <InfoService> - <HLTMonInfoImpl> - <ConfigurationRules> - <ConfigurationRuleBundle> - <Rules> - <ConfigurationRule> - <ExcludeFilter /> - <IncludeFilter>.*</IncludeFilter> - <Name>Dumm</Name> - <Parameters> - <OHPublishingParameters> - <NumberOfSlots>5</NumberOfSlots> - <OHServer>${TDAQ_OH_SERVER=HLT-Histogramming}</OHServer> - <PublishInterval>5</PublishInterval> - <ROOTProvider>${TDAQ_APPLICATION_NAME}</ROOTProvider> - <UID>HltpuOHPublishingParameters</UID> - </OHPublishingParameters> - </Parameters> - <UID>HltpuOHRule</UID> - </ConfigurationRule> - <ConfigurationRule> - <ExcludeFilter /> - <IncludeFilter>.*</IncludeFilter> - <Name>DummDumm</Name> - <Parameters> - <ISPublishingParameters> - <ISServer>${TDAQ_IS_SERVER=DF}</ISServer> - <NumberOfSlots>1</NumberOfSlots> - <PublishInterval>10</PublishInterval> - <UID>HltpuISPublishingParameters</UID> - </ISPublishingParameters> - </Parameters> - <UID>HltpuISRule</UID> - </ConfigurationRule> - </Rules> - <UID>HltpuConfigurationRuleBundle</UID> - </ConfigurationRuleBundle> - </ConfigurationRules> - <UID>hltMonSvc</UID> - <library>MonSvcInfoService</library> - </HLTMonInfoImpl> - </InfoService> - <InfoServiceLibrary>MonSvcInfoService</InfoServiceLibrary> + <InfoServiceLibrary /> <UID>HLTMPPy</UID> <childLogName>athenaHLT:</childLogName> <dontPublishIS>1</dontPublishIS> diff --git a/HLT/Trigger/TrigControl/TrigExamples/CMakeLists.txt b/HLT/Trigger/TrigControl/TrigExamples/CMakeLists.txt index 0d8452ce60176cb089f080846c9edddb3701efe3..a0c4ddf0e27abb86a35af6780d04a347e9549e0f 100644 --- a/HLT/Trigger/TrigControl/TrigExamples/CMakeLists.txt +++ b/HLT/Trigger/TrigControl/TrigExamples/CMakeLists.txt @@ -3,11 +3,15 @@ # Declare the package name: atlas_subdir( TrigExamples ) +# External dependencies: +find_package( tdaq-common COMPONENTS hltinterface ) + # Component(s) in the package: atlas_add_component( TrigExamples src/*.cxx src/components/*.cxx - PRIVATE_LINK_LIBRARIES GaudiKernel AthenaBaseComps + INCLUDE_DIRS ${TDAQ-COMMON_INCLUDE_DIRS} + LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} GaudiKernel AthenaBaseComps AthenaKernel ByteStreamCnvSvcBaseLib DecisionHandlingLib TrigCompositeUtilsLib TrigPartialEventBuildingLib ) diff --git a/HLT/Trigger/TrigControl/TrigExamples/share/TrigExISPublishing.py b/HLT/Trigger/TrigControl/TrigExamples/share/TrigExISPublishing.py new file mode 100644 index 0000000000000000000000000000000000000000..b59e066003d3a55612827d5d7313a5556a481507 --- /dev/null +++ b/HLT/Trigger/TrigControl/TrigExamples/share/TrigExISPublishing.py @@ -0,0 +1,16 @@ +# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration + +# Testing job options for IS publication. +# +# If you want to inspect the IS content during or after execution, +# run `athenaHLT` in interactive mode (-i) and then launch `is_monitor`: +# +# > export TDAQ_IPC_INIT_REF=file:${PWD}/ipc_init.ref +# > is_monitor +# + +from TrigExamples.TrigExamplesConf import TrigExISPublishing + +from AthenaCommon.AlgSequence import AlgSequence +topSequence = AlgSequence() +topSequence += TrigExISPublishing(OutputLevel = DEBUG) diff --git a/HLT/Trigger/TrigControl/TrigExamples/src/TrigExISPublishing.cxx b/HLT/Trigger/TrigControl/TrigExamples/src/TrigExISPublishing.cxx new file mode 100644 index 0000000000000000000000000000000000000000..a8b5a1061eef2730262b3a1ceb2754436ae9d819 --- /dev/null +++ b/HLT/Trigger/TrigControl/TrigExamples/src/TrigExISPublishing.cxx @@ -0,0 +1,63 @@ +/* + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration +*/ + +#include "hltinterface/ContainerFactory.h" +#include "hltinterface/IInfoRegister.h" + +#include "TrigExISPublishing.h" + +#include <vector> + +TrigExISPublishing::TrigExISPublishing(const std::string& name, ISvcLocator* svcLoc) : + AthReentrantAlgorithm(name, svcLoc) +{} + +StatusCode TrigExISPublishing::initialize() +{ + // construct the LAr noise burst container and register it + auto cfact = hltinterface::ContainerFactory::getInstance(); + if (cfact) { + try { + const std::string ISname = "LArISInfo_NoiseBurstAlg"; + const std::string IStype = "LArNoiseBurstCandidates"; + m_IsObject = cfact->constructContainer(ISname, IStype); + m_evntPos = cfact->addIntVector(m_IsObject, "Flag", + hltinterface::GenericHLTContainer::LASTVALUE); + m_timeTagPos = cfact->addIntVector(m_IsObject, "TimeStamp", + hltinterface::GenericHLTContainer::LASTVALUE); + ATH_MSG_DEBUG("Registering container in IS with name /HLTObjects/" << ISname); + hltinterface::IInfoRegister::instance()->registerObject("/HLTObjects/", m_IsObject); + } + catch (std::exception& ex) { + ATH_MSG_ERROR("Cannot publish to IS: " << ex.what()); + } + } + else { + ATH_MSG_INFO("IS publishing not available"); + } + + return StatusCode::SUCCESS; +} + +StatusCode TrigExISPublishing::execute(const EventContext& ctx) const +{ + if (m_IsObject) { + boost::property_tree::ptree event_tree; + event_tree.put("eventNumber", ctx.eventID().event_number()); + event_tree.put("LBNumber", ctx.eventID().lumi_block()); + try { + hltinterface::IInfoRegister::instance()->beginEvent(event_tree); + + m_IsObject->appendField(m_evntPos, std::vector<long>{0}); + m_IsObject->appendField(m_timeTagPos, std::vector<long>{(long int)ctx.eventID().time_stamp()}); + + hltinterface::IInfoRegister::instance()->endEvent(event_tree); + } + catch (const std::exception& ex) { + ATH_MSG_INFO("Caught exception during IS publication: " << ex.what()); + } + } + + return StatusCode::SUCCESS; +} diff --git a/HLT/Trigger/TrigControl/TrigExamples/src/TrigExISPublishing.h b/HLT/Trigger/TrigControl/TrigExamples/src/TrigExISPublishing.h new file mode 100644 index 0000000000000000000000000000000000000000..0be6089a7df2d97ba72de315dc74e05b67377f73 --- /dev/null +++ b/HLT/Trigger/TrigControl/TrigExamples/src/TrigExISPublishing.h @@ -0,0 +1,33 @@ +/* + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef TRIGEXPARTIALEB_TRIGEXISPUBLISHING_H +#define TRIGEXPARTIALEB_TRIGEXISPUBLISHING_H + +#include "AthenaBaseComps/AthReentrantAlgorithm.h" + +namespace hltinterface{ + class GenericHLTContainer; +} + +/** + * IS Publishing test algorithm + * + * Demonstrate IS publishing using the LAr noise burst schema. + **/ +class TrigExISPublishing : public AthReentrantAlgorithm { +public: + TrigExISPublishing(const std::string& name, ISvcLocator* svcLoc); + + virtual StatusCode initialize() override; + virtual StatusCode execute(const EventContext& ctx) const override; + +private: + std::shared_ptr<hltinterface::GenericHLTContainer> m_IsObject; + + size_t m_evntPos{0}; + size_t m_timeTagPos{0}; +}; + +#endif diff --git a/HLT/Trigger/TrigControl/TrigExamples/src/components/TrigExPartialEB_entries.cxx b/HLT/Trigger/TrigControl/TrigExamples/src/components/TrigExamples_entries.cxx similarity index 66% rename from HLT/Trigger/TrigControl/TrigExamples/src/components/TrigExPartialEB_entries.cxx rename to HLT/Trigger/TrigControl/TrigExamples/src/components/TrigExamples_entries.cxx index a5c3b6f5474a25ef721f26f8c942ed43882b922a..4df69459db74a6802804824b78eacbf95064badf 100644 --- a/HLT/Trigger/TrigControl/TrigExamples/src/components/TrigExPartialEB_entries.cxx +++ b/HLT/Trigger/TrigControl/TrigExamples/src/components/TrigExamples_entries.cxx @@ -1,5 +1,7 @@ #include "../MTCalibPebHypoAlg.h" #include "../MTCalibPebHypoTool.h" +#include "../TrigExISPublishing.h" DECLARE_COMPONENT( MTCalibPebHypoAlg ) DECLARE_COMPONENT( MTCalibPebHypoTool ) +DECLARE_COMPONENT( TrigExISPublishing ) diff --git a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRodDecoder.cxx b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRodDecoder.cxx index c436ee95d48fbcbd2c2e23a754a8a0a3d737dcd6..3617db496ba7a34f0323e35fdc048675e7000267 100644 --- a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRodDecoder.cxx +++ b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRodDecoder.cxx @@ -10,7 +10,6 @@ #include "PixelByteStreamModuleMask.h" #include "ByteStreamData/RawEvent.h" #include "eformat/SourceIdentifier.h" -#include "PixelConditionsData/PixelByteStreamErrors.h" #include "xAODEventInfo/EventInfo.h" #include <fstream> @@ -109,6 +108,26 @@ StatusCode PixelRodDecoder::finalize() { return StatusCode::SUCCESS; } +void PixelRodDecoder::propagateROBErrorsToModules(const PixelCablingCondData *pixCabling, + uint32_t robId, + std::array<uint64_t, PixelRodDecoder::ERROR_CONTAINER_MAX> &bsErrWord, + IDCInDetBSErrContainer& decodingErrors, + PixelByteStreamErrors::PixelErrorsEnum error_code, + const char *error_description) const { + assert( pixCabling); + const std::deque<Identifier> offlineIdList = pixCabling->find_entry_offlineList(robId); + for (const Identifier& id: offlineIdList) { + IdentifierHash idHash = m_pixel_id->wafer_hash(id); + PixelByteStreamErrors::addError(bsErrWord[static_cast<int>(idHash)],error_code); + } + ATH_MSG_DEBUG("ROB status word for robid 0x"<< std::hex << robId << std::dec <<" indicates " << error_description << "."); + assert( bsErrWord.size() <= decodingErrors.maxSize() ); + for (size_t i=0; i<static_cast<size_t>(bsErrWord.size()); i++) { + if (bsErrWord[i]>0) { + decodingErrors.setOrDrop(i,bsErrWord[i]); + } + } +} //---------------------------------------------------------------------------------------------------- fillCixollection StatusCode PixelRodDecoder::fillCollection( const ROBFragment *robFrag, IPixelRDO_Container* rdoIdc, IDCInDetBSErrContainer& decodingErrors, std::vector<IdentifierHash>* vecHash) const { @@ -149,35 +168,21 @@ StatusCode PixelRodDecoder::fillCollection( const ROBFragment *robFrag, IPixelRD Definition of the status words in a ROB fragment header is found in https://twiki.cern.ch/twiki/bin/view/Atlas/ROBINFragmentErrors#Definition_of_the_first_status_e */ - if (((*rob_status) >> 27) & 0x1) { - const std::deque<Identifier> offlineIdList = pixCabling->find_entry_offlineList(robId); - for (const Identifier& id: offlineIdList) { - IdentifierHash idHash = m_pixel_id->wafer_hash(id); - PixelByteStreamErrors::addError(bsErrWord[static_cast<int>(idHash)],PixelByteStreamErrors::TruncatedROB); - } - ATH_MSG_DEBUG("ROB status word for robid 0x"<< std::hex << robId << std::dec <<" indicates data truncation."); - assert( bsErrWord.size() <= decodingErrors.maxSize() ); - for (size_t i=0; i<static_cast<size_t>(bsErrWord.size()); i++) { - if (bsErrWord[i]>0) { - decodingErrors.setOrDrop(i,bsErrWord[i]); - } - } - return StatusCode::RECOVERABLE; + if ((*rob_status) & (0x1 << 27)) { + propagateROBErrorsToModules(pixCabling.cptr(),robId,bsErrWord,decodingErrors,PixelByteStreamErrors::TruncatedROB, "data truncation"); + return StatusCode::RECOVERABLE; } - if (((*rob_status) >> 31) & 0x1) { - const std::deque<Identifier> offlineIdList = pixCabling->find_entry_offlineList(robId); - for (const Identifier& id: offlineIdList) { - IdentifierHash idHash = m_pixel_id->wafer_hash(id); - PixelByteStreamErrors::addError(bsErrWord[static_cast<int>(idHash)],PixelByteStreamErrors::MaskedROB); - } - ATH_MSG_DEBUG( "ROB status word for robid 0x"<< std::hex << robId<< std::dec <<" indicates resource was masked off."); - assert( bsErrWord.size() <= decodingErrors.maxSize() ); - for (size_t i=0; i<static_cast<size_t>(bsErrWord.size()); i++) { - if (bsErrWord[i]>0) { - decodingErrors.setOrDrop(i,bsErrWord[i]); - } - } - return StatusCode::RECOVERABLE; + if ((*rob_status) & (0x1 << 31)) { + propagateROBErrorsToModules(pixCabling.cptr(),robId,bsErrWord,decodingErrors,PixelByteStreamErrors::MaskedROB, "resource was masked off"); + return StatusCode::RECOVERABLE; + } + // in case the ROB fragment has a seemingly invalid size check the fragment and reject it if the check is not passed. + // Note: there are usable ROB fragments (i.e. ROB fragments which contribute pixel hits to tracks) which do not pass the check, so + // rejecting all fragments which do not pass the test would reject also seemingly "good" data. + if (robFrag->rod_ndata() > robFrag->payload_size_word() && !robFrag->check_rod_noex(robFrag->rod_version() >> 16)) { + propagateROBErrorsToModules(pixCabling.cptr(),robId,bsErrWord,decodingErrors,PixelByteStreamErrors::TruncatedROB, + " invalid ROD fragment, invalid payload size"); + return StatusCode::RECOVERABLE; } } } @@ -533,6 +538,10 @@ StatusCode PixelRodDecoder::fillCollection( const ROBFragment *robFrag, IPixelRD // computing the FE number on the silicon wafer for IBL ( mFE is = 0 for IBL 3D and the lower-eta FE on the planar sensor, // while is = 1 for the higher-eta FE on the planar sensor) mFE = getLocalFEI4(fe_IBLheader, onlineId); + if (m_pixelReadout->getModuleType(pixCabling->find_entry_onoff(onlineId))==InDetDD::PixelModuleType::IBL_3D) { + mFE = 0; + } + } // end of the if (isIBLModule || isDBMModule) else { // Pixel Hit Case diff --git a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRodDecoder.h b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRodDecoder.h index a0e66419c67c6485e40fa3a51c92c16bf4b693dd..3503badf6f902413271653b9878a18d713869475 100644 --- a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRodDecoder.h +++ b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRodDecoder.h @@ -15,6 +15,7 @@ #include "PixelConditionsData/PixelCablingCondData.h" #include "PixelConditionsData/PixelHitDiscCnfgData.h" #include "PixelReadoutGeometry/IPixelReadoutManager.h" +#include "PixelConditionsData/PixelByteStreamErrors.h" #include "StoreGate/ReadCondHandleKey.h" #include <atomic> class PixelID; @@ -161,6 +162,14 @@ class PixelRodDecoder : virtual public IPixelRodDecoder, public AthAlgTool { //!< get local FEI4 unsigned int getLocalFEI4(const uint32_t fe, const uint64_t onlineId) const; + + //!< in case of invalid ROB fragments set corresponding error flags in all linked modules. + void propagateROBErrorsToModules(const PixelCablingCondData *pixCabling, + uint32_t robId, + std::array<uint64_t, PixelRodDecoder::ERROR_CONTAINER_MAX> &bsErrWord, + IDCInDetBSErrContainer& decodingErrors, + PixelByteStreamErrors::PixelErrorsEnum error_code, + const char *error_description) const; }; bool diff --git a/InnerDetector/InDetExample/InDetRecExample/share/InDetMonitoringPixel.py b/InnerDetector/InDetExample/InDetRecExample/share/InDetMonitoringPixel.py index b19c9d90f8dc5c5f494dc75f669dfa244ed902bf..8640bb2a15b69ed9fe7ed44362712d8424465806 100644 --- a/InnerDetector/InDetExample/InDetRecExample/share/InDetMonitoringPixel.py +++ b/InnerDetector/InDetExample/InDetRecExample/share/InDetMonitoringPixel.py @@ -24,15 +24,18 @@ from PixelMonitoring.PixelAthErrorMonAlgCfg import PixelAthErrorMonAlgCfg from InDetRecExample.InDetKeys import InDetKeys from InDetRecExample import TrackingCommon -if forceOnline : athenaCommonFlags.isOnline = True -kwargsHitMonAlg = { 'doOnline' : True if athenaCommonFlags.isOnline() else False, #Histograms for online (GlobalMonitoring) running - 'doLumiBlock' : False if athenaCommonFlags.isOnline() else True, #Turn on/off histograms stored every 1(20) lumi block(s) +if forceOnline : + isOnline = True +else: + isOnline = athenaCommonFlags.isOnline() +kwargsHitMonAlg = { 'doOnline' : isOnline, #Histograms for online (GlobalMonitoring) running + 'doLumiBlock' : not isOnline, #Turn on/off histograms stored every 1(20) lumi block(s) 'doFEPlots' : True, #Turn on/off per FE-I3 histograms 'RDOName' : InDetKeys.PixelRDOs() } -kwargsClusMonAlg = { 'doOnline' : True if athenaCommonFlags.isOnline() else False, #Histograms for online (GlobalMonitoring) running - 'doLumiBlock' : False if athenaCommonFlags.isOnline() else True, #Turn on/off histograms stored every 1(20) lumi block(s) +kwargsClusMonAlg = { 'doOnline' : isOnline, #Histograms for online (GlobalMonitoring) running + 'doLumiBlock' : not isOnline, #Turn on/off histograms stored every 1(20) lumi block(s) 'doLowOccupancy' : InDetFlags.doCosmics(), #Setting up 1D histogram ranges and binnings, if False, high occupancy i.e. collisions settings will be used 'doHeavyIonMon' : InDetFlags.doHeavyIon(), #Setting up 1D histogram ranges and binnings for heavy ions 'doFEPlots' : True, #Turn on/off per FE-I3 histograms @@ -40,11 +43,9 @@ kwargsClusMonAlg = { 'doOnline' : True if athenaCommonFlags.isOnline() el 'TrackName' : InDetKeys.Tracks() } -kwargsErrMonAlg = { 'doOnline' : True if athenaCommonFlags.isOnline() else False, #Histograms for online (GlobalMonitoring) running - 'doLumiBlock' : False if athenaCommonFlags.isOnline() else True #Turn on/off histograms stored every 1(20) lumi block(s) +kwargsErrMonAlg = { 'doOnline' : isOnline, #Histograms for online (GlobalMonitoring) running + 'doLumiBlock' : not isOnline #Turn on/off histograms stored every 1(20) lumi block(s) } -if forceOnline : athenaCommonFlags.isOnline = False - from AthenaMonitoring.DQMonFlags import DQMonFlags from AthenaMonitoring import AthMonitorCfgHelperOld diff --git a/InnerDetector/InDetMonitoring/PixelMonitoring/python/PixelAthClusterMonAlgCfg.py b/InnerDetector/InDetMonitoring/PixelMonitoring/python/PixelAthClusterMonAlgCfg.py index dab6103f7594231a440148e51c7210f853921e4c..01d787472cf2fd66ccfbc05b8cd5d6c0a8cab81b 100644 --- a/InnerDetector/InDetMonitoring/PixelMonitoring/python/PixelAthClusterMonAlgCfg.py +++ b/InnerDetector/InDetMonitoring/PixelMonitoring/python/PixelAthClusterMonAlgCfg.py @@ -34,8 +34,9 @@ def PixelAthClusterMonAlgCfg(helper, alg, **kwargs): title = 'Modules Status (0=Active+Good, 1=Active+Bad, 2=Inactive)' define2DProfHist(helper, alg, histoGroupName, title, path, type='TProfile2D') - title = 'Modules Status Reset (0=Active+Good, 1=Active+Bad, 2=Inactive)' - define2DProfHist(helper, alg, histoGroupName, title, path, type='TProfile2D', zmin=0, zmax=2, opt='kLBNHistoryDepth=2', histname='MapOfModulesStatusMon') + if doOnline: + title = 'Modules Status (0=Active+Good, 1=Active+Bad, 2=Inactive) reset every 2 LBs' + define2DProfHist(helper, alg, histoGroupName, title, path, type='TProfile2D', zmin=0, zmax=2, opt='kLBNHistoryDepth=2', histname='MapOfModulesStatusMon') if doFEPlots: histoGroupName = 'MapOfFEsStatus' @@ -173,11 +174,11 @@ def PixelAthClusterMonAlgCfg(helper, alg, **kwargs): if forceOnline: athenaCommonFlags.isOnline = False histoGroupName = 'HolesRatio5min' - title = 'Holes per track reset every 5 min' + title = 'Holes per track reset every 5 LBs' define2DProfHist(helper, alg, 'HolesRatio', title, path, type='TProfile2D', zmin=0, zmax=1.1, opt='kLBNHistoryDepth=5', histname=histoGroupName) histoGroupName = 'MissHitsRatio5min' - title = 'Hole+Outlier per track reset every 5 min' + title = 'Hole+Outlier per track reset every 5 LBs' define2DProfHist(helper, alg, 'MissHitsRatio', title, path, type='TProfile2D', zmin=0, zmax=1.1, opt='kLBNHistoryDepth=5', histname=histoGroupName) varName = 'trkdataread_err;ReadingTrackDataErr' @@ -314,7 +315,7 @@ def PixelAthClusterMonAlgCfg(helper, alg, **kwargs): if doOnline: histoGroupName = addOnTrackTxt('ClusterMapMon', ontrack) - title = addOnTrackTxt('Cluster map for monitoring', ontrack, True) + title = addOnTrackTxt('Cluster map reset every 2 LBs', ontrack, True) define2DProfHist(helper, alg, histoGroupName, title, pathGroup, type='TH2D', zmin=0, zmax=1e4, opt='kLBNHistoryDepth=2') #FIXME zmax value w/ high stat ### @@ -332,8 +333,13 @@ def PixelAthClusterMonAlgCfg(helper, alg, **kwargs): define2DProfHist(helper, alg, histoGroupName, title, pathGroup, type='TH2D') if ontrack: histoGroupName = addOnTrackTxt('ClusterOccupancyPP0', ontrack) - title = addOnTrackTxt('Average per module(FE) cluster occupancy reset every 5 min', ontrack, True) - definePP0Histos(helper, alg, histoGroupName, title, pathGroup, opt='kLBNHistoryDepth=5') + if doOnline: + title = addOnTrackTxt('Average per module(FE) cluster occupancy per PP0 reset every 5 LBs', ontrack, True) + definePP0Histos(helper, alg, histoGroupName, title, pathGroup, opt='kLBNHistoryDepth=5') + else: + title = addOnTrackTxt('Average per module(FE) cluster occupancy per PP0', ontrack, True) + definePP0Histos(helper, alg, histoGroupName, title, pathGroup) + if doFEPlots: histoGroupName = addOnTrackTxt('ClusterFEOccupancy', ontrack) diff --git a/InnerDetector/InDetMonitoring/PixelMonitoring/python/PixelAthHitMonAlgCfg.py b/InnerDetector/InDetMonitoring/PixelMonitoring/python/PixelAthHitMonAlgCfg.py index 0392131572536540e75dc5fcddb91fbcc6c5ec8d..3eb255678393e65f0cf1cb512de8df0fe5774d86 100644 --- a/InnerDetector/InDetMonitoring/PixelMonitoring/python/PixelAthHitMonAlgCfg.py +++ b/InnerDetector/InDetMonitoring/PixelMonitoring/python/PixelAthHitMonAlgCfg.py @@ -114,13 +114,20 @@ def PixelAthHitMonAlgCfg(helper, alg, **kwargs): type='TProfile', path=pathGroup, title=title, xbins=bcidbinsx, xmin=-0.5, xmax=-0.5+bcidbinsx) - histoGroupName = 'HitOccupancyPP0' - title = 'Average per module(FE) hit occupancy reset every 5 min' - definePP0Histos(helper, alg, histoGroupName, title, path=pathGroup, opt='kLBNHistoryDepth=5') - - histoGroupName ='OccupancyPerPixelEvent' - title = '#hits / pixel / event' - define2DProfHist(helper, alg, histoGroupName, title, path=pathGroup, type='TProfile2D', zmin=0, zmax=1.0, opt='kLBNHistoryDepth=2') + if doOnline: + histoGroupName = 'HitOccupancyPP0' + title = 'Average per module(FE) hit occupancy per PP0 reset every 5 LBs' + definePP0Histos(helper, alg, histoGroupName, title, path=pathGroup, opt='kLBNHistoryDepth=5') + histoGroupName ='OccupancyPerPixelEvent' + title = '#hits / pixel / event reset every 2 LBs' + define2DProfHist(helper, alg, histoGroupName, title, path=pathGroup, type='TProfile2D', zmin=0, zmax=1.0, opt='kLBNHistoryDepth=2') + else: + histoGroupName = 'HitOccupancyPP0' + title = 'Average per module(FE) hit occupancy per PP0' + definePP0Histos(helper, alg, histoGroupName, title, path=pathGroup) + histoGroupName ='OccupancyPerPixelEvent' + title = '#hits / pixel / event' + define2DProfHist(helper, alg, histoGroupName, title, path=pathGroup, type='TProfile2D', zmin=0, zmax=1.0) ### ### begin hit timing diff --git a/InnerDetector/InDetMonitoring/PixelMonitoring/python/PixelMonitoringConfig.py b/InnerDetector/InDetMonitoring/PixelMonitoring/python/PixelMonitoringConfig.py index 38d5df82fea85dfa0a82cfe590c55fd2808db790..a851454434c74c9e06df3b175fe4f798573997c0 100644 --- a/InnerDetector/InDetMonitoring/PixelMonitoring/python/PixelMonitoringConfig.py +++ b/InnerDetector/InDetMonitoring/PixelMonitoring/python/PixelMonitoringConfig.py @@ -10,15 +10,18 @@ def PixelMonitoringConfig(flags): from InDetRecExample.InDetJobProperties import InDetFlags # run on RAW only if flags.DQ.Environment in ('online', 'tier0', 'tier0Raw'): - if forceOnline : flags.Common.isOnline = True - kwargsHitMonAlg = { 'doOnline' : flags.Common.isOnline, #Histograms for online (GlobalMonitoring) running - 'doLumiBlock' : not flags.Common.isOnline, #Turn on/off histograms stored every 1(20) lumi block(s) + if forceOnline: + isOnline = True + else: + isOnline = flags.Common.isOnline + kwargsHitMonAlg = { 'doOnline' : isOnline, #Histograms for online (GlobalMonitoring) running + 'doLumiBlock' : not isOnline, #Turn on/off histograms stored every 1(20) lumi block(s) 'doFEPlots' : True, #Turn on/off per FE-I3 histograms 'RDOName' : InDetKeys.PixelRDOs() #'PixelRDOs' } - kwargsClusMonAlg = { 'doOnline' : flags.Common.isOnline, #Histograms for online (GlobalMonitoring) running - 'doLumiBlock' : not flags.Common.isOnline, #Turn on/off histograms stored every 1(20) lumi block(s) + kwargsClusMonAlg = { 'doOnline' : isOnline, #Histograms for online (GlobalMonitoring) running + 'doLumiBlock' : not isOnline, #Turn on/off histograms stored every 1(20) lumi block(s) 'doLowOccupancy' : InDetFlags.doCosmics(), #Setting up 1D histogram ranges and binnings, if False, high occupancy i.e. collisions settings will be used 'doHeavyIonMon' : InDetFlags.doHeavyIon(), #Setting up 1D histogram ranges and binnings for heavy ions 'doFEPlots' : True, #Turn on/off per FE-I3 histograms @@ -26,10 +29,9 @@ def PixelMonitoringConfig(flags): 'TrackName' : InDetKeys.Tracks() #'Tracks' } - kwargsErrMonAlg = { 'doOnline' : flags.Common.isOnline, #Histograms for online (GlobalMonitoring) running - 'doLumiBlock' : not flags.Common.isOnline #Turn on/off histograms stored every 1(20) lumi block(s) + kwargsErrMonAlg = { 'doOnline' : isOnline, #Histograms for online (GlobalMonitoring) running + 'doLumiBlock' : not isOnline #Turn on/off histograms stored every 1(20) lumi block(s) } - if forceOnline : flags.Common.isOnline = False from AthenaMonitoring import AthMonitorCfgHelper helper = AthMonitorCfgHelper(flags, "NewPixelMonitoring") diff --git a/InnerDetector/InDetMonitoring/TRTMonitoringRun3/python/TRTMonitoringRun3ESD_Alg.py b/InnerDetector/InDetMonitoring/TRTMonitoringRun3/python/TRTMonitoringRun3ESD_Alg.py index 97f98bae4978bdb3dd1a05a0b0cf1a4032125c2e..2232280a3ad2a3a13ee9f6ba560c340e3beafa08 100644 --- a/InnerDetector/InDetMonitoring/TRTMonitoringRun3/python/TRTMonitoringRun3ESD_Alg.py +++ b/InnerDetector/InDetMonitoring/TRTMonitoringRun3/python/TRTMonitoringRun3ESD_Alg.py @@ -56,7 +56,7 @@ def TRTMonitoringRun3ESD_AlgConfig(inputFlags): distToStraw = 0.4 nPhiBins = 360 minTRTHits = 10 - maxLumiblock = 720 + maxLumiblock = 3000 for ibe in range(2): oss_distance = distToStraw @@ -126,18 +126,17 @@ def TRTMonitoringRun3ESD_AlgConfig(inputFlags): shiftTrackGroup.defineHistogram('TimeResidual_noTubeHits_B_Ar;hTimeResidual_noTubeHits_Ar',type='TH1F',title='Time Residuals for Argon Straws{0} (no tube hits);Time Residual (ns);Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=200,xmin=-20,xmax=20,duration='run') shiftTrackGroup.defineHistogram('WireToTrkPosition_B_Ar;hWireToTrkPosition_Ar',type='TH1F',title='Track-to-Wire Distance for Argon{0};Track-to-Wire Distance (mm);Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=100,xmin=-5,xmax=5,duration='run') - shiftTrackGroup.defineHistogram('Residual_B;hResidual_Xe',type='TH1F',title='Residuals for Xenon Straws{0};Hit-to-Track Distance (mm);Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=200,xmin=-2.5,xmax=2.5,duration='lowStat') - shiftTrackGroup.defineHistogram('Residual_B;hResidual_Xe',type='TH1F',title='Residuals for Xenon Straws{0};Hit-to-Track Distance (mm);Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=200,xmin=-2.5,xmax=2.5,duration='run') - shiftTrackGroup.defineHistogram('Residual_noTubeHits_B;hResidual_noTubeHits_Xe',type='TH1F',title='Residuals for Xenon Straws{0} (no tube hits);Hit-to-Track Distance (mm);Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=200,xmin=-2.5,xmax=2.5,duration='lowStat') - shiftTrackGroup.defineHistogram('Residual_noTubeHits_B;hResidual_noTubeHits_Xe',type='TH1F',title='Residuals for Xenon Straws{0} (no tube hits);Hit-to-Track Distance (mm);Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=200,xmin=-2.5,xmax=2.5,duration='run') - shiftTrackGroup.defineHistogram('Residual_B_20GeV;hResidual_Xe_20GeV',type='TH1F',title='Residuals for Xenon Straws{0} (After 20GeV pT cut);Hit-to-Track Distance (mm);Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=200,xmin=-2.5,xmax=2.5,duration='run') - shiftTrackGroup.defineHistogram('Residual_noTubeHits_B_20GeV;hResidual_noTubeHits_Xe_20GeV',type='TH1F',title='Residuals for Xenon Straws{0} (After 20GeV pT cut, no tube hits);Hit-to-Track Distance (mm);Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=200,xmin=-2.5,xmax=2.5,duration='run') + shiftTrackGroup.defineHistogram('Residual_B;hResidual',type='TH1F',title='Residuals for Xenon Straws{0};Hit-to-Track Distance (mm);Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=200,xmin=-2.5,xmax=2.5,duration='lowStat') + shiftTrackGroup.defineHistogram('Residual_B;hResidual',type='TH1F',title='Residuals for Xenon Straws{0};Hit-to-Track Distance (mm);Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=200,xmin=-2.5,xmax=2.5,duration='run') + shiftTrackGroup.defineHistogram('Residual_noTubeHits_B;hResidual_noTubeHits',type='TH1F',title='Residuals for Xenon Straws{0} (no tube hits);Hit-to-Track Distance (mm);Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=200,xmin=-2.5,xmax=2.5,duration='lowStat') + shiftTrackGroup.defineHistogram('Residual_noTubeHits_B;hResidual_noTubeHits',type='TH1F',title='Residuals for Xenon Straws{0} (no tube hits);Hit-to-Track Distance (mm);Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=200,xmin=-2.5,xmax=2.5,duration='run') + shiftTrackGroup.defineHistogram('Residual_B_20GeV;hResidual_20GeV',type='TH1F',title='Residuals for Xenon Straws{0} (After 20GeV pT cut);Hit-to-Track Distance (mm);Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=200,xmin=-2.5,xmax=2.5,duration='run') + shiftTrackGroup.defineHistogram('Residual_noTubeHits_B_20GeV;hResidual_noTubeHits_20GeV',type='TH1F',title='Residuals for Xenon Straws{0} (After 20GeV pT cut, no tube hits);Hit-to-Track Distance (mm);Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=200,xmin=-2.5,xmax=2.5,duration='run') shiftTrackGroup.defineHistogram('TimeResidual_B;hTimeResidual',type='TH1F',title='Time Residuals for Xenon Straws{0};Time Residual (ns);Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=200,xmin=-20,xmax=20,duration='run') shiftTrackGroup.defineHistogram('TimeResidual_noTubeHits_B;hTimeResidual_noTubeHits',type='TH1F',title='Time Residuals for Xenon Straws{0} (no tube hits);Time Residual (ns);Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=200,xmin=-20,xmax=20,duration='run') shiftTrackGroup.defineHistogram('WireToTrkPosition_B;hWireToTrkPosition',type='TH1F',title='Track-to-Wire Distance for Xenon{0};Track-to-Wire Distance (mm);Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=100,xmin=-5,xmax=5,duration='run') shiftTrackGroup.defineHistogram('AvgTroTDetPhi_B_x,AvgTroTDetPhi_B_y;hAvgTroTDetPhi',type='TProfile',title='Avg. Trailing Edge on Track vs #phi (2D) for Xenon{0};#phi (deg);Trailing Edge (ns)'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=nPhiBins,xmin=0,xmax=360,duration='run') - shiftTrackGroup.defineHistogram('NTrksperLB_x,NTrksperLB_y;hNTrksperLB',type='TProfile',title='Avg. Number of Reconstructed Tracks per Event{0};Luminosity Block;Number of Tracks'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=maxLumiblock,xmin=-0.5,xmax=maxLumiblock-0.5,duration='run') - #CAN_REBIN(hNTrksperLB); + shiftTrackGroup.defineHistogram('NTrksperLB_x,NTrksperLB_y;hNTrksperLB',type='TProfile',title='Avg. Number of Reconstructed Tracks per Event{0};Luminosity Block;Number of Tracks'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=maxLumiblock+1,xmin=-0.5,xmax=maxLumiblock+0.5,duration='run') elif ibe == 1: shiftTrackGroup.defineHistogram('Pull_Biased_EndCap;hPull_Biased_EndCap',type='TH1F',title='Biased Track Pulls for EndCap Hits;Pulls;Entries',path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=200,xmin=-2.5,xmax=2.5,duration='run') @@ -150,12 +149,12 @@ def TRTMonitoringRun3ESD_AlgConfig(inputFlags): shiftTrackEndcapGroup.defineHistogram('TronTDist_E;hTronTDist_{0}'.format(sideId[iside]),type='TH1F',title='Trailing Edge Distribution on Track for Xenon Straws{0};Trailing Edge (ns);Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=26,xmin=-0.5,xmax=80.75,duration='run') shiftTrackEndcapGroup.defineHistogram('DriftTimeonTrkDist_E;hDriftTimeonTrkDist_{0}'.format(sideId[iside]),type='TH1F',title='Drift Time Distribution on Track for Xenon Straws{0};Drift Time (ns);Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=32,xmin=0,xmax=100,duration='run') shiftTrackEndcapGroup.defineHistogram('NumTrksDetPhi_E;hNumTrksDetPhi_{0}'.format(sideId[iside]),type='TH1F',title='Number of Reconstructed Tracks vs #phi (2D){0};#phi (deg);Number of Tracks'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=60,xmin=0,xmax=360,duration='run') - shiftTrackEndcapGroup.defineHistogram('Residual_E;hResidual_Xe_{0}'.format(sideId[iside]),type='TH1F',title='Residuals for Xenon Straws{0};Hit-to-Track Distance (mm);Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=200,xmin=-2.5,xmax=2.5,duration='lowStat') - shiftTrackEndcapGroup.defineHistogram('Residual_E;hResidual_Xe_{0}'.format(sideId[iside]),type='TH1F',title='Residuals for Xenon Straws{0};Hit-to-Track Distance (mm);Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=200,xmin=-2.5,xmax=2.5,duration='run') - shiftTrackEndcapGroup.defineHistogram('Residual_noTubeHits_E;hResidual_noTubeHits_Xe_{0}'.format(sideId[iside]),type='TH1F',title='Residuals for Xenon Straws{0} (no tube hits);Hit-to-Track Distance (mm);Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=200,xmin=-2.5,xmax=2.5,duration='lowStat') - shiftTrackEndcapGroup.defineHistogram('Residual_noTubeHits_E;hResidual_noTubeHits_Xe_{0}'.format(sideId[iside]),type='TH1F',title='Residuals for Xenon Straws{0} (no tube hits);Hit-to-Track Distance (mm);Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=200,xmin=-2.5,xmax=2.5,duration='run') - shiftTrackEndcapGroup.defineHistogram('Residual_E_20GeV;hResidual_Xe_{0}_20GeV'.format(sideId[iside]),type='TH1F',title='Residuals for Xenon Straws{0} (After 20GeV pT cut);Hit-to-Track Distance (mm);Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=200,xmin=-2.5,xmax=2.5,duration='run') - shiftTrackEndcapGroup.defineHistogram('Residual_noTubeHits_E_20GeV;hResidual_noTubeHits_Xe_{0}_20GeV'.format(sideId[iside]),type='TH1F',title='Residuals for Xenon Straws{0} (After 20GeV pT cut, no tube hits);Hit-to-Track Distance (mm);Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=200,xmin=-2.5,xmax=2.5,duration='run') + shiftTrackEndcapGroup.defineHistogram('Residual_E;hResidual_{0}'.format(sideId[iside]),type='TH1F',title='Residuals for Xenon Straws{0};Hit-to-Track Distance (mm);Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=200,xmin=-2.5,xmax=2.5,duration='lowStat') + shiftTrackEndcapGroup.defineHistogram('Residual_E;hResidual_{0}'.format(sideId[iside]),type='TH1F',title='Residuals for Xenon Straws{0};Hit-to-Track Distance (mm);Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=200,xmin=-2.5,xmax=2.5,duration='run') + shiftTrackEndcapGroup.defineHistogram('Residual_noTubeHits_E;hResidual_noTubeHits_{0}'.format(sideId[iside]),type='TH1F',title='Residuals for Xenon Straws{0} (no tube hits);Hit-to-Track Distance (mm);Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=200,xmin=-2.5,xmax=2.5,duration='lowStat') + shiftTrackEndcapGroup.defineHistogram('Residual_noTubeHits_E;hResidual_noTubeHits_{0}'.format(sideId[iside]),type='TH1F',title='Residuals for Xenon Straws{0} (no tube hits);Hit-to-Track Distance (mm);Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=200,xmin=-2.5,xmax=2.5,duration='run') + shiftTrackEndcapGroup.defineHistogram('Residual_E_20GeV;hResidual_{0}_20GeV'.format(sideId[iside]),type='TH1F',title='Residuals for Xenon Straws{0} (After 20GeV pT cut);Hit-to-Track Distance (mm);Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=200,xmin=-2.5,xmax=2.5,duration='run') + shiftTrackEndcapGroup.defineHistogram('Residual_noTubeHits_E_20GeV;hResidual_noTubeHits_{0}_20GeV'.format(sideId[iside]),type='TH1F',title='Residuals for Xenon Straws{0} (After 20GeV pT cut, no tube hits);Hit-to-Track Distance (mm);Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=200,xmin=-2.5,xmax=2.5,duration='run') shiftTrackEndcapGroup.defineHistogram('TimeResidual_E;hTimeResidual_{0}'.format(sideId[iside]),type='TH1F',title='Time Residuals for Xenon Straws{0};Time Residual (ns);Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=200,xmin=-20,xmax=20,duration='run') shiftTrackEndcapGroup.defineHistogram('TimeResidual_noTubeHits_E;hTimeResidual_noTubeHits_{0}'.format(sideId[iside]),type='TH1F',title='Time Residuals for Xenon Straws{0} (no tube hits);Time Residual (ns);Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=200,xmin=-20,xmax=20,duration='run') @@ -175,8 +174,7 @@ def TRTMonitoringRun3ESD_AlgConfig(inputFlags): shiftTrackEndcapGroup.defineHistogram('WireToTrkPosition_E;hWireToTrkPosition_{0}'.format(sideId[iside]),type='TH1F',title='Track-to-Wire Distance for Xenon{0};Track-to-Wire Distance (mm);Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=100,xmin=-5,xmax=5,duration='run') shiftTrackEndcapGroup.defineHistogram('AvgTroTDetPhi_E_x,AvgTroTDetPhi_E_y;hAvgTroTDetPhi_{0}'.format(sideId[iside]),type='TProfile',title='Avg. Trailing Edge on Track vs #phi (2D) for Xenon{0};#phi (deg);Trailing Edge (ns)'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=nPhiBins,xmin=0,xmax=360,duration='run') - shiftTrackEndcapGroup.defineHistogram('NTrksperLB_x,NTrksperLB_y;hNTrksperLB_{0}'.format(sideId[iside]),type='TProfile',title='Avg. Number of Reconstructed Tracks per Even{0};Luminosity Block;Number of Tracks'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=maxLumiblock,xmin=-0.5,xmax=maxLumiblock-0.5,duration='run') - #CAN_REBIN(hNTrksperLB_[iside]); + shiftTrackEndcapGroup.defineHistogram('NTrksperLB_x,NTrksperLB_y;hNTrksperLB_{0}'.format(sideId[iside]),type='TProfile',title='Avg. Number of Reconstructed Tracks per Even{0};Luminosity Block;Number of Tracks'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=maxLumiblock+1,xmin=-0.5,xmax=maxLumiblock+0.5,duration='run') #Initialize Aging plots for iL in range(5): @@ -232,8 +230,8 @@ if __name__ == '__main__': # Set the Athena configuration flags from AthenaConfiguration.AllConfigFlags import ConfigFlags - nightly = '/afs/cern.ch/work/n/nbelyaev/public/' - file = 'data16_13TeV.00358031.physics_Main.recon.AOD.Athena.21.0.78.f961/ESD.pool.root' + nightly = '/afs/cern.ch/work/n/nbelyaev/public/Datafiles/' + file = 'data18_13TeV.00349944.physics_Main.daq.ESD._lb0244._f1138._0001.root' ConfigFlags.Input.Files = [nightly+file] ConfigFlags.Input.isMC = False ConfigFlags.Output.HISTFileName = 'TRTMonitoringRun3_ToolOutput.root' @@ -246,7 +244,6 @@ if __name__ == '__main__': ConfigFlags.lock() # Initialize configuration object, add accumulator, merge, and run. - from AthenaConfiguration.MainServicesConfig import MainServicesCfg from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg from AthenaCommon.AppMgr import ServiceMgr diff --git a/InnerDetector/InDetMonitoring/TRTMonitoringRun3/python/TRTMonitoringRun3RAW_Alg.py b/InnerDetector/InDetMonitoring/TRTMonitoringRun3/python/TRTMonitoringRun3RAW_Alg.py index 9a69bb1565bf0f3c2546c36a7c1128d6fb3537a9..394ffb603e7698f437c5ed9787c73bf62921b465 100644 --- a/InnerDetector/InDetMonitoring/TRTMonitoringRun3/python/TRTMonitoringRun3RAW_Alg.py +++ b/InnerDetector/InDetMonitoring/TRTMonitoringRun3/python/TRTMonitoringRun3RAW_Alg.py @@ -55,8 +55,8 @@ def TRTMonitoringRun3RAW_AlgConfig(inputFlags): algTRTMonitoringRun3RAW.trt_hole_search=TRTHoleSearch() - maxLumiBlockSummary = 200 - maxLumiBlockShift = 720 + maxLumiBlockSummary = 3000 + maxLumiBlockShift = 3000 numberOfBarrelStacks = 32 distToStraw = 0.4 numberOfStacks = (32, 32) @@ -95,7 +95,6 @@ def TRTMonitoringRun3RAW_AlgConfig(inputFlags): rdoStackGroup.defineHistogram('strawNumber,HitAWMapS_passed;hHitAWMapS',cutmask='HitAWMapS_cut',type='TProfile',title='LL in Time Window: Straws;Straw Number in Stack;Probability',path=oss,xbins=strawMax[ibe],xmin=0,xmax=strawMax[ibe]) rdoStackGroup.defineHistogram('strawNumber,HitAMapS_passed;hHitAMapS',cutmask='HitAMapS_cut',type='TProfile',title='Any LL Bit: Straws;Straw Number in Stack;Probability',path=oss,xbins=strawMax[ibe],xmin=0,xmax=strawMax[ibe]) rdoStackGroup.defineHistogram('strawNumber;unscaled_hHitAMapS',cutmask='HitAMapS_cut',type='TH1F',title='Any LL Bit: Straws;Straw Number in Stack;Probability',path=oss,xbins=strawMax[ibe],xmin=0,xmax=strawMax[ibe]) - rdoStackGroup.defineHistogram('StrawOcc,StrawOcc_passed;hOccupancyS',type='TProfile',title='Straw Occupancy Distribution: Straws;Occupancy;Number of Straws',path=oss,xbins=201,xmin=0,xmax=1.005) rdoStackGroup.defineHistogram('strawNumber,HitToTMapS_y;hHitToTMapS',type='TProfile',title='Mean ToT: Straws;Straw Number in Stack;Time (ns)',path=oss,xbins=strawMax[ibe],xmin=0,xmax=strawMax[ibe]) rdoStackGroup.defineHistogram('strawNumber,HitToTMapS_y;hHitToTLongMapS',cutmask='HitToTLong_cut',type='TProfile',title='Mean ToT for Straws with ToT > LongToTCut: Straws;Straw Number in Stack;Time (ns)',path=oss,xbins=strawMax[ibe],xmin=0,xmax=strawMax[ibe]) rdoStackGroup.defineHistogram('strawNumber,HitTrMapS_y;hHitToTLongTrMapS',cutmask='HitToTLong_cut',type='TProfile',title='Mean Trailing Edge for Straws with ToT > LongToTCut: Straws;Straw Number in Stack;Time (ns)',path=oss,xbins=strawMax[ibe],xmin=0,xmax=strawMax[ibe]) @@ -109,7 +108,6 @@ def TRTMonitoringRun3RAW_AlgConfig(inputFlags): rdoStackGroup.defineHistogram('chipNumber,HitAWMapC_passed;hHitAWMapC',cutmask='HitAWMapC_cut',type='TProfile',title='LL in Time Window: Chips;Chip Number in Stack;Probability',path=oss,xbins=iChipMax[ibe],xmin=0,xmax=iChipMax[ibe]) rdoStackGroup.defineHistogram('chipNumber,HitAMapC_passed;hHitAMapC',cutmask='HitAMapC_cut',type='TProfile',title='Any LL Bit: Chips;Chip Number in Stack;Probability',path=oss,xbins=iChipMax[ibe],xmin=0,xmax=iChipMax[ibe]) rdoStackGroup.defineHistogram('chipNumber;unscaled_hHitAMapC',cutmask='HitAMapC_cut',type='TH1F',title='Any LL Bit: Chips;Chip Number in Stack;Probability',path=oss,xbins=iChipMax[ibe],xmin=0,xmax=iChipMax[ibe]) - rdoStackGroup.defineHistogram('OccupancyC;hOccupancyC',type='TH1F',title='Chip Occupancy Distribution;Occupancy;Number of Chips',path=oss,xbins=201,xmin=0,xmax=1.005) rdoStackGroup.defineHistogram('chipNumber,HitToTMapC_y;hHitToTMapC',type='TProfile',title='Mean ToT: Chips;Chip Number in Stack;Time (ns)',path=oss,xbins=iChipMax[ibe],xmin=0,xmax=iChipMax[ibe]) rdoStackGroup.defineHistogram('chipNumber,HitHMapC_passed;hHitHMapC',cutmask='HitHMapC_cut',type='TProfile',title='Any HL Bit: Chips;Chip Number in Stack;Probability',path=oss,xbins=iChipMax[ibe],xmin=0,xmax=iChipMax[ibe]) rdoStackGroup.defineHistogram('chipNumber,HitHWMapC_passed;hHitHWMapC',cutmask='HitHWMapC_cut',type='TProfile',title='HL in Time Window: Chips;Chip Number in Stack;Probability',path=oss,xbins=iChipMax[ibe],xmin=0,xmax=iChipMax[ibe]) @@ -125,10 +123,8 @@ def TRTMonitoringRun3RAW_AlgConfig(inputFlags): regionTag = ' (' + beId[ibe] + sideId[iside] + ')' rdoShiftSmryRebinnedGroup = helper.addGroup(algTRTMonitoringRun3RAW,'RDOShiftSmryRebinnedHistograms{0}{1}'.format(ibe,iside)) rdoShiftSmryRebinnedGroup.defineHistogram('ChipBSErrorsVsLB_x,ChipBSErrorsVsLB_y;hChipBSErrorsVsLB_{0}{1}'.format(beId[ibe],sideId[iside]),type='TProfile',title='Chip Bytestream Errors vs LB{0};Luminosity Block;Fraction of Chips with Errors'.format(regionTag),path='TRT/Shift/Summary',xbins=maxLumiBlockSummary + 1,xmin=-0.5,xmax=maxLumiBlockSummary + 0.5) - #CAN_REBIN(m_hChipBSErrorsVsLB[ibe][iside]); rdoShiftSmryRebinnedGroup.defineHistogram('RobBSErrorsVsLB_x,RobBSErrorsVsLB_y;hRobBSErrorsVsLB_{0}{1}'.format(beId[ibe],sideId[iside]),type='TProfile',title='Rob Bytestream Errors vs LB{0};Luminosity Block;Fraction of RODs with Errors'.format(regionTag),path='TRT/Shift/Summary',xbins=maxLumiBlockSummary + 1,xmin=-0.5,xmax=maxLumiBlockSummary + 0.5) - #CAN_REBIN(m_hRobBSErrorsVsLB[ibe][iside]); - + # Barrel/Endcap Histograms for ibe in range(2): regionTag = ' (' + barrelOrEndcap[ibe] + ')' @@ -156,7 +152,7 @@ def TRTMonitoringRun3RAW_AlgConfig(inputFlags): effGroup = helper.addGroup(algTRTMonitoringRun3RAW,'TRTEfficiencyHistograms') effGroup.defineHistogram('Efficiency_eta_passed,Efficiency_eta;hEfficiency_eta',type='TProfile',title='Efficiency vs #eta;#eta;Efficiency',path='TRT/Efficiency',xbins=50,xmin=-2.8,xmax=2.8) effGroup.defineHistogram('Efficiency_phi_passed,Efficiency_phi;hEfficiency_phi',type='TProfile',title='Efficiency vs #phi;#phi (deg);Efficiency',path='TRT/Efficiency',xbins=50,xmin=-3.2,xmax=3.2) - effGroup.defineHistogram('Efficiency_pt_passed,Efficiency_pt;hEfficiency_pt',type='TProfile',title='Efficiency vs pT;pT (GeV);Efficiency',path='TRT/Efficiency',xbins=50,xmin=0,xmax=10) + effGroup.defineHistogram('Efficiency_pt_passed,Efficiency_pt;hEfficiency_pt',type='TProfile',title='Efficiency vs pT;pT (GeV);Efficiency',path='TRT/Efficiency',xbins=250,xmin=0,xmax=50) effGroup.defineHistogram('Efficiency_z0_passed,Efficiency_z0;hEfficiency_z0',type='TProfile',title='Efficiency vs z0;z0;Efficiency',path='TRT/Efficiency',xbins=50,xmin=-200,xmax=200) effGroup.defineHistogram('EfficiencyBarrel_locR,EfficiencyBarrel_locR_passed;hEfficiencyBarrel_locR',type='TProfile',title='Efficiency vs Track-to-Wire Distance for Xenon Straws (Barrel);Track-to-Wire Distance (mm);Efficiency',path='TRT/Efficiency',xbins=50,xmin=-2.5,xmax=2.5) effGroup.defineHistogram('EfficiencyBarrel_locR_Ar,EfficiencyBarrel_locR_Ar_passed;hEfficiencyBarrel_locR_Ar',type='TProfile',title='Efficiency vs Track-to-Wire Distance for Argon Straws (Barrel);Track-to-Wire Distance (mm);Efficiency',path='TRT/Efficiency',xbins=50,xmin=-2.5,xmax=2.5) @@ -235,7 +231,7 @@ def TRTMonitoringRun3RAW_AlgConfig(inputFlags): shiftTrackGroup.defineHistogram('NumSwLLWoT_B;hNumSwLLWoT',type='TH1F',title='Number of Straws with Hits on Track in Time Window{0};Number of LL Hits per Track;Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=150,xmin=0,xmax=150) shiftTrackGroup.defineHistogram('HLhitOnTrack_B;hHLhitOnTrack',type='TH1F',title='Number of HL Hits per Reconstructed Track{0};Number of HL Hits per Track;Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=50,xmin=0,xmax=50) shiftTrackGroup.defineHistogram('HtoLRatioOnTrack_B;hHtoLRatioOnTrack',type='TH1F',title='HL/LL Ratio per Reconstructed Track for All{0};HL/LL Ratio;Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=50,xmin=0,xmax=1) - shiftTrackGroup.defineHistogram('HitWonTMap_B;hHitWonTMap',type='TH1F',title='Leading Edge in Time Window per Reconstructed Track{0};Straw Number;Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=strawMax[0],xmin=0,xmax=strawMax[0]) + shiftTrackGroup.defineHistogram('strawNumber,HitWonTMap_B_y;hHitWonTMap',type='TProfile',title='Leading Edge in Time Window per Reconstructed Track{0};Straw Number;Norm. Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=strawMax[0],xmin=0,xmax=strawMax[0]) shiftTrackGroup.defineHistogram('StrawEffDetPhi_B_passed,StrawEffDetPhi_B;hStrawEffDetPhi',type='TProfile',title='Straw Efficiency on Track with {0} mm Cut vs #phi(2D){1};Stack;Avg. Straw Efficiency'.format(distance,regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=32,xmin=0,xmax=32) elif ibe == 1: for iside in range(2): @@ -246,7 +242,7 @@ def TRTMonitoringRun3RAW_AlgConfig(inputFlags): shiftTrackEndcapGroup.defineHistogram('NumSwLLWoT_E;hNumSwLLWoT_{0}'.format(sideId[iside]),type='TH1F',title='Number of Straws with Hits on Track in Time Window{0};Number of LL Hits per Track;Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=150,xmin=0,xmax=150) shiftTrackEndcapGroup.defineHistogram('HLhitOnTrack_E;hHLhitOnTrack_{0}'.format(sideId[iside]),type='TH1F',title='Number of HL Hits per Reconstructed Track{0};Number of HL Hits per Track;Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=50,xmin=0,xmax=50) shiftTrackEndcapGroup.defineHistogram('HtoLRatioOnTrack_E;hHtoLRatioOnTrack_{0}'.format(sideId[iside]),type='TH1F',title='HL/LL Ratio per Reconstructed Track for All{0};HL/LL Ratio;Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=50,xmin=0,xmax=1) - shiftTrackEndcapGroup.defineHistogram('HitWonTMap_E;hHitWonTMap_{0}'.format(sideId[iside]),type='TH1F',title='Leading Edge in Time Window per Reconstructed Track{0};Straw Number;Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=strawMax[1],xmin=0,xmax=strawMax[1]) + shiftTrackEndcapGroup.defineHistogram('strawNumber,HitWonTMap_E_y;hHitWonTMap_{0}'.format(sideId[iside]),type='TProfile',title='Leading Edge in Time Window per Reconstructed Track{0};Straw Number;Norm. Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=strawMax[1],xmin=0,xmax=strawMax[1]) shiftTrackEndcapGroup.defineHistogram('StrawEffDetPhi_E_passed,StrawEffDetPhi_E;hStrawEffDetPhi_{0}'.format(sideId[iside]),type='TProfile',title='Straw Efficiency on Track with {0} mm Cut vs #phi(2D){1};Stack;Avg. Straw Efficiency'.format(distance,regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=32,xmin=0,xmax=32) ### Finished Booking TRT Hits Histograms ### @@ -254,14 +250,14 @@ def TRTMonitoringRun3RAW_AlgConfig(inputFlags): regionTag = ' (' + barrelOrEndcap[ibe] + ')' if ibe == 0: rdoShiftRebinnedBarrelGroup = helper.addGroup(algTRTMonitoringRun3RAW,'RDOShiftRebinnedBarrelHistograms0') - rdoShiftRebinnedBarrelGroup.defineHistogram('NHitsperLB_x,NHitsperLB_y;hNHitsperLB',type='TProfile',title='Avg. Occupancy{0};Luminosity Block;Occupancy'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=maxLumiBlockShift,xmin=-0.5,xmax=maxLumiBlockShift-0.5,duration='run') #CAN_REBIN(m_hNHitsperLB_B); - rdoShiftRebinnedBarrelGroup.defineHistogram('NHLHitsperLB_x,NHLHitsperLB_y;hNHLHitsperLB',type='TProfile',title='Avg. HL Occupancy{0};Luminosity Block;Occupancy'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=maxLumiBlockShift,xmin=-0.5,xmax=maxLumiBlockShift-0.5,duration='run') #CAN_REBIN(m_hNHLHitsperLB_B); + rdoShiftRebinnedBarrelGroup.defineHistogram('NHitsperLB_x,NHitsperLB_y;hNHitsperLB',type='TProfile',title='Avg. Occupancy{0};Luminosity Block;Occupancy'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=maxLumiBlockShift+1,xmin=-0.5,xmax=maxLumiBlockShift+0.5,duration='run') #CAN_REBIN(m_hNHitsperLB_B); + rdoShiftRebinnedBarrelGroup.defineHistogram('NHLHitsperLB_x,NHLHitsperLB_y;hNHLHitsperLB',type='TProfile',title='Avg. HL Occupancy{0};Luminosity Block;Occupancy'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=maxLumiBlockShift+1,xmin=-0.5,xmax=maxLumiBlockShift+0.5,duration='run') #CAN_REBIN(m_hNHLHitsperLB_B); elif ibe == 1: for iside in range(2): regionTag = ' (' + beId[ibe] + sideId[iside] + ')' rdoShiftRebinnedEndcapGroup = helper.addGroup(algTRTMonitoringRun3RAW,'RDOShiftRebinnedEndcapHistograms1{0}'.format(iside)) - rdoShiftRebinnedEndcapGroup.defineHistogram('NHitsperLB_x,NHitsperLB_y;hNHitsperLB_{0}'.format(sideId[iside]),type='TProfile',title='Avg. Occupancy{0};Luminosity Block;Occupancy'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=maxLumiBlockShift,xmin=-0.5,xmax=maxLumiBlockShift-0.5,duration='run') #CAN_REBIN(m_hNHitsperLB_E[iside]); - rdoShiftRebinnedEndcapGroup.defineHistogram('NHLHitsperLB_x,NHLHitsperLB_y;hNHLHitsperLB_{0}'.format(sideId[iside]),type='TProfile',title='Avg. HL Occupancy{0};Luminosity Block;Occupancy'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=maxLumiBlockShift,xmin=-0.5,xmax=maxLumiBlockShift-0.5,duration='run') #CAN_REBIN(m_hNHLHitsperLB_E[iside]); + rdoShiftRebinnedEndcapGroup.defineHistogram('NHitsperLB_x,NHitsperLB_y;hNHitsperLB_{0}'.format(sideId[iside]),type='TProfile',title='Avg. Occupancy{0};Luminosity Block;Occupancy'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=maxLumiBlockShift+1,xmin=-0.5,xmax=maxLumiBlockShift+0.5,duration='run') #CAN_REBIN(m_hNHitsperLB_E[iside]); + rdoShiftRebinnedEndcapGroup.defineHistogram('NHLHitsperLB_x,NHLHitsperLB_y;hNHLHitsperLB_{0}'.format(sideId[iside]),type='TProfile',title='Avg. HL Occupancy{0};Luminosity Block;Occupancy'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=maxLumiBlockShift+1,xmin=-0.5,xmax=maxLumiBlockShift+0.5,duration='run') #CAN_REBIN(m_hNHLHitsperLB_E[iside]); if isRun3Cfg(): diff --git a/InnerDetector/InDetMonitoring/TRTMonitoringRun3/python/TRTPostProcessing.py b/InnerDetector/InDetMonitoring/TRTMonitoringRun3/python/TRTPostProcessing.py index 94c2d45b494b2dda30ab98cd69f185670c9f4231..ba9c524f1e68d5cab6689d62c3e85cc37690de1c 100644 --- a/InnerDetector/InDetMonitoring/TRTMonitoringRun3/python/TRTPostProcessing.py +++ b/InnerDetector/InDetMonitoring/TRTMonitoringRun3/python/TRTPostProcessing.py @@ -76,4 +76,45 @@ def hHitOnTrackVsAll(inputs): rh.SetBinContent(j + 1, plot2.GetBinContent(j + 1)/(plot0.GetBinContent(j + 1)*plot1.GetBinContent(j + 1))) else: rh.SetBinContent(j + 1, 0) + return [rh] + +def hEfficiency(inputs): + import ROOT + region = inputs[0][0]['region'] + side = inputs[0][0]['side'] + if region == 'Barrel': + name = 'hEfficiencyBarrel' + str(side) + if region == 'Endcap': + name = 'hEfficiencyEndCap' + str(side) + rh = ROOT.TH1F(name, 'Straw Efficiency (' + name[11:] + ')', 500, -0.01, 1.01) + rh.GetXaxis().SetTitle('Efficiency') + rh.GetYaxis().SetTitle('Number of Straws') + for i in range(len(inputs[0][1])): + plots = [_[1][i] for _ in inputs] + for plot in plots: + for nStraw in range(plot.GetXaxis().GetNbins()): + rh.Fill(plot.GetBinContent(nStraw + 1)) + return [rh] + +def hEfficiencyIntegral(inputs): + import ROOT + region = inputs[0][0]['region'] + side = inputs[0][0]['side'] + if region == 'Barrel': + name = 'hEfficiencyBarrel' + str(side) + if region == 'Endcap': + name = 'hEfficiencyEndCap' + str(side) + rh = ROOT.TH1F(name, 'Straw Efficiency (' + name[11:] + ')', 500, -0.01, 1.01) + rh.GetXaxis().SetTitle('Efficiency') + rh.GetYaxis().SetTitle('Fraction of Straws') + for i in range(len(inputs[0][1])): + plots = [_[1][i] for _ in inputs] + for plot in plots: + for nStraw in range(plot.GetXaxis().GetNbins()): + rh.Fill(plot.GetBinContent(nStraw + 1)) + totalEntries = 0. + entries = rh.GetEntries() + for nStraw in range(rh.GetXaxis().GetNbins()): + totalEntries += rh.GetBinContent(nStraw + 1) + rh.SetBinContent(nStraw + 1, totalEntries/float(entries)) return [rh] \ No newline at end of file diff --git a/InnerDetector/InDetMonitoring/TRTMonitoringRun3/share/TRTMonitoringRun3RAW_Alg_jobOptions.py b/InnerDetector/InDetMonitoring/TRTMonitoringRun3/share/TRTMonitoringRun3RAW_Alg_jobOptions.py index 952354184492fc687c3b9a850c114cd7f244737d..808ca69861684fde15aa69767ed30297f4195ef2 100644 --- a/InnerDetector/InDetMonitoring/TRTMonitoringRun3/share/TRTMonitoringRun3RAW_Alg_jobOptions.py +++ b/InnerDetector/InDetMonitoring/TRTMonitoringRun3/share/TRTMonitoringRun3RAW_Alg_jobOptions.py @@ -12,8 +12,8 @@ from AthenaCommon.AthenaCommonFlags import athenaCommonFlags algTRTMonitoringRun3RAW.TrackSummaryTool = InDetTrackSummaryTool -maxLumiBlockSummary = 200 -maxLumiBlockShift = 720 +maxLumiBlockSummary = 3000 +maxLumiBlockShift = 3000 numberOfBarrelStacks = 32 distToStraw = 0.4 maxLumiblock = 720 @@ -53,7 +53,6 @@ for ibe in range(2): rdoStackGroup.defineHistogram('strawNumber,HitAWMapS_passed;hHitAWMapS',cutmask='HitAWMapS_cut',type='TProfile',title='LL in Time Window: Straws;Straw Number in Stack;Probability',path=oss,xbins=strawMax[ibe],xmin=0,xmax=strawMax[ibe]) rdoStackGroup.defineHistogram('strawNumber,HitAMapS_passed;hHitAMapS',cutmask='HitAMapS_cut',type='TProfile',title='Any LL Bit: Straws;Straw Number in Stack;Probability',path=oss,xbins=strawMax[ibe],xmin=0,xmax=strawMax[ibe]) rdoStackGroup.defineHistogram('strawNumber;unscaled_hHitAMapS',cutmask='HitAMapS_cut',type='TH1F',title='Any LL Bit: Straws;Straw Number in Stack;Probability',path=oss,xbins=strawMax[ibe],xmin=0,xmax=strawMax[ibe]) - rdoStackGroup.defineHistogram('StrawOcc,StrawOcc_passed;hOccupancyS',type='TProfile',title='Straw Occupancy Distribution: Straws;Occupancy;Number of Straws',path=oss,xbins=201,xmin=0,xmax=1.005) rdoStackGroup.defineHistogram('strawNumber,HitToTMapS_y;hHitToTMapS',type='TProfile',title='Mean ToT: Straws;Straw Number in Stack;Time (ns)',path=oss,xbins=strawMax[ibe],xmin=0,xmax=strawMax[ibe]) rdoStackGroup.defineHistogram('strawNumber,HitToTMapS_y;hHitToTLongMapS',cutmask='HitToTLong_cut',type='TProfile',title='Mean ToT for Straws with ToT > LongToTCut: Straws;Straw Number in Stack;Time (ns)',path=oss,xbins=strawMax[ibe],xmin=0,xmax=strawMax[ibe]) rdoStackGroup.defineHistogram('strawNumber,HitTrMapS_y;hHitToTLongTrMapS',cutmask='HitToTLong_cut',type='TProfile',title='Mean Trailing Edge for Straws with ToT > LongToTCut: Straws;Straw Number in Stack;Time (ns)',path=oss,xbins=strawMax[ibe],xmin=0,xmax=strawMax[ibe]) @@ -67,7 +66,6 @@ for ibe in range(2): rdoStackGroup.defineHistogram('chipNumber,HitAWMapC_passed;hHitAWMapC',cutmask='HitAWMapC_cut',type='TProfile',title='LL in Time Window: Chips;Chip Number in Stack;Probability',path=oss,xbins=iChipMax[ibe],xmin=0,xmax=iChipMax[ibe]) rdoStackGroup.defineHistogram('chipNumber,HitAMapC_passed;hHitAMapC',cutmask='HitAMapC_cut',type='TProfile',title='Any LL Bit: Chips;Chip Number in Stack;Probability',path=oss,xbins=iChipMax[ibe],xmin=0,xmax=iChipMax[ibe]) rdoStackGroup.defineHistogram('chipNumber;unscaled_hHitAMapC',cutmask='HitAMapC_cut',type='TH1F',title='Any LL Bit: Chips;Chip Number in Stack;Probability',path=oss,xbins=iChipMax[ibe],xmin=0,xmax=iChipMax[ibe]) - rdoStackGroup.defineHistogram('OccupancyC;hOccupancyC',type='TH1F',title='Chip Occupancy Distribution;Occupancy;Number of Chips',path=oss,xbins=201,xmin=0,xmax=1.005) rdoStackGroup.defineHistogram('chipNumber,HitToTMapC_y;hHitToTMapC',type='TProfile',title='Mean ToT: Chips;Chip Number in Stack;Time (ns)',path=oss,xbins=iChipMax[ibe],xmin=0,xmax=iChipMax[ibe]) rdoStackGroup.defineHistogram('chipNumber,HitHMapC_passed;hHitHMapC',cutmask='HitHMapC_cut',type='TProfile',title='Any HL Bit: Chips;Chip Number in Stack;Probability',path=oss,xbins=iChipMax[ibe],xmin=0,xmax=iChipMax[ibe]) rdoStackGroup.defineHistogram('chipNumber,HitHWMapC_passed;hHitHWMapC',cutmask='HitHWMapC_cut',type='TProfile',title='HL in Time Window: Chips;Chip Number in Stack;Probability',path=oss,xbins=iChipMax[ibe],xmin=0,xmax=iChipMax[ibe]) @@ -83,10 +81,8 @@ for ibe in range(2): regionTag = ' (' + beId[ibe] + sideId[iside] + ')' rdoShiftSmryRebinnedGroup = helper.addGroup(algTRTMonitoringRun3RAW,'RDOShiftSmryRebinnedHistograms{0}{1}'.format(ibe,iside)) rdoShiftSmryRebinnedGroup.defineHistogram('ChipBSErrorsVsLB_x,ChipBSErrorsVsLB_y;hChipBSErrorsVsLB_{0}{1}'.format(beId[ibe],sideId[iside]),type='TProfile',title='Chip Bytestream Errors vs LB{0};Luminosity Block;Fraction of Chips with Errors'.format(regionTag),path='TRT/Shift/Summary',xbins=maxLumiBlockSummary + 1,xmin=-0.5,xmax=maxLumiBlockSummary + 0.5) - #CAN_REBIN(m_hChipBSErrorsVsLB[ibe][iside]); rdoShiftSmryRebinnedGroup.defineHistogram('RobBSErrorsVsLB_x,RobBSErrorsVsLB_y;hRobBSErrorsVsLB_{0}{1}'.format(beId[ibe],sideId[iside]),type='TProfile',title='Rob Bytestream Errors vs LB{0};Luminosity Block;Fraction of RODs with Errors'.format(regionTag),path='TRT/Shift/Summary',xbins=maxLumiBlockSummary + 1,xmin=-0.5,xmax=maxLumiBlockSummary + 0.5) - #CAN_REBIN(m_hRobBSErrorsVsLB[ibe][iside]); - + # Barrel/Endcap Histograms for ibe in range(2): regionTag = ' (' + barrelOrEndcap[ibe] + ')' @@ -114,7 +110,7 @@ for ibe in range(2): effGroup = helper.addGroup(algTRTMonitoringRun3RAW,'TRTEfficiencyHistograms') effGroup.defineHistogram('Efficiency_eta_passed,Efficiency_eta;hEfficiency_eta',type='TProfile',title='Efficiency vs #eta;#eta;Efficiency',path='TRT/Efficiency',xbins=50,xmin=-2.8,xmax=2.8) effGroup.defineHistogram('Efficiency_phi_passed,Efficiency_phi;hEfficiency_phi',type='TProfile',title='Efficiency vs #phi;#phi (deg);Efficiency',path='TRT/Efficiency',xbins=50,xmin=-3.2,xmax=3.2) -effGroup.defineHistogram('Efficiency_pt_passed,Efficiency_pt;hEfficiency_pt',type='TProfile',title='Efficiency vs pT;pT (GeV);Efficiency',path='TRT/Efficiency',xbins=50,xmin=0,xmax=10) +effGroup.defineHistogram('Efficiency_pt_passed,Efficiency_pt;hEfficiency_pt',type='TProfile',title='Efficiency vs pT;pT (GeV);Efficiency',path='TRT/Efficiency',xbins=250,xmin=0,xmax=50) effGroup.defineHistogram('Efficiency_z0_passed,Efficiency_z0;hEfficiency_z0',type='TProfile',title='Efficiency vs z0;z0;Efficiency',path='TRT/Efficiency',xbins=50,xmin=-200,xmax=200) effGroup.defineHistogram('EfficiencyBarrel_locR,EfficiencyBarrel_locR_passed;hEfficiencyBarrel_locR',type='TProfile',title='Efficiency vs Track-to-Wire Distance for Xenon Straws (Barrel);Track-to-Wire Distance (mm);Efficiency',path='TRT/Efficiency',xbins=50,xmin=-2.5,xmax=2.5) effGroup.defineHistogram('EfficiencyBarrel_locR_Ar,EfficiencyBarrel_locR_Ar_passed;hEfficiencyBarrel_locR_Ar',type='TProfile',title='Efficiency vs Track-to-Wire Distance for Argon Straws (Barrel);Track-to-Wire Distance (mm);Efficiency',path='TRT/Efficiency',xbins=50,xmin=-2.5,xmax=2.5) @@ -193,7 +189,7 @@ for ibe in range(2): shiftTrackGroup.defineHistogram('NumSwLLWoT_B;hNumSwLLWoT',type='TH1F',title='Number of Straws with Hits on Track in Time Window{0};Number of LL Hits per Track;Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=150,xmin=0,xmax=150) shiftTrackGroup.defineHistogram('HLhitOnTrack_B;hHLhitOnTrack',type='TH1F',title='Number of HL Hits per Reconstructed Track{0};Number of HL Hits per Track;Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=50,xmin=0,xmax=50) shiftTrackGroup.defineHistogram('HtoLRatioOnTrack_B;hHtoLRatioOnTrack',type='TH1F',title='HL/LL Ratio per Reconstructed Track for All{0};HL/LL Ratio;Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=50,xmin=0,xmax=1) - shiftTrackGroup.defineHistogram('HitWonTMap_B;hHitWonTMap',type='TH1F',title='Leading Edge in Time Window per Reconstructed Track{0};Straw Number;Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=strawMax[0],xmin=0,xmax=strawMax[0]) + shiftTrackGroup.defineHistogram('strawNumber,HitWonTMap_B_y;hHitWonTMap',type='TProfile',title='Leading Edge in Time Window per Reconstructed Track{0};Straw Number;Norm. Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=strawMax[0],xmin=0,xmax=strawMax[0]) shiftTrackGroup.defineHistogram('StrawEffDetPhi_B_passed,StrawEffDetPhi_B;hStrawEffDetPhi',type='TProfile',title='Straw Efficiency on Track with {0} mm Cut vs #phi(2D){1};Stack;Avg. Straw Efficiency'.format(distance,regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=32,xmin=0,xmax=32) elif ibe == 1: for iside in range(2): @@ -204,7 +200,7 @@ for ibe in range(2): shiftTrackEndcapGroup.defineHistogram('NumSwLLWoT_E;hNumSwLLWoT_{0}'.format(sideId[iside]),type='TH1F',title='Number of Straws with Hits on Track in Time Window{0};Number of LL Hits per Track;Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=150,xmin=0,xmax=150) shiftTrackEndcapGroup.defineHistogram('HLhitOnTrack_E;hHLhitOnTrack_{0}'.format(sideId[iside]),type='TH1F',title='Number of HL Hits per Reconstructed Track{0};Number of HL Hits per Track;Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=50,xmin=0,xmax=50) shiftTrackEndcapGroup.defineHistogram('HtoLRatioOnTrack_E;hHtoLRatioOnTrack_{0}'.format(sideId[iside]),type='TH1F',title='HL/LL Ratio per Reconstructed Track for All{0};HL/LL Ratio;Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=50,xmin=0,xmax=1) - shiftTrackEndcapGroup.defineHistogram('HitWonTMap_E;hHitWonTMap_{0}'.format(sideId[iside]),type='TH1F',title='Leading Edge in Time Window per Reconstructed Track{0};Straw Number;Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=strawMax[1],xmin=0,xmax=strawMax[1]) + shiftTrackEndcapGroup.defineHistogram('strawNumber,HitWonTMap_E_y;hHitWonTMap_{0}'.format(sideId[iside]),type='TProfile',title='Leading Edge in Time Window per Reconstructed Track{0};Straw Number;Norm. Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=strawMax[1],xmin=0,xmax=strawMax[1]) shiftTrackEndcapGroup.defineHistogram('StrawEffDetPhi_E_passed,StrawEffDetPhi_E;hStrawEffDetPhi_{0}'.format(sideId[iside]),type='TProfile',title='Straw Efficiency on Track with {0} mm Cut vs #phi(2D){1};Stack;Avg. Straw Efficiency'.format(distance,regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=32,xmin=0,xmax=32) ### Finished Booking TRT Hits Histograms ### @@ -212,13 +208,13 @@ for ibe in range(2): regionTag = ' (' + barrelOrEndcap[ibe] + ')' if ibe == 0: rdoShiftRebinnedBarrelGroup = helper.addGroup(algTRTMonitoringRun3RAW,'RDOShiftRebinnedBarrelHistograms0') - rdoShiftRebinnedBarrelGroup.defineHistogram('NHitsperLB_x,NHitsperLB_y;hNHitsperLB',type='TProfile',title='Avg. Occupancy{0};Luminosity Block;Occupancy'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=maxLumiBlockShift,xmin=-0.5,xmax=maxLumiBlockShift-0.5,duration='run') #CAN_REBIN(m_hNHitsperLB_B); - rdoShiftRebinnedBarrelGroup.defineHistogram('NHLHitsperLB_x,NHLHitsperLB_y;hNHLHitsperLB',type='TProfile',title='Avg. HL Occupancy{0};Luminosity Block;Occupancy'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=maxLumiBlockShift,xmin=-0.5,xmax=maxLumiBlockShift-0.5,duration='run') #CAN_REBIN(m_hNHLHitsperLB_B); + rdoShiftRebinnedBarrelGroup.defineHistogram('NHitsperLB_x,NHitsperLB_y;hNHitsperLB',type='TProfile',title='Avg. Occupancy{0};Luminosity Block;Occupancy'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=maxLumiBlockShift+1,xmin=-0.5,xmax=maxLumiBlockShift+0.5,duration='run') #CAN_REBIN(m_hNHitsperLB_B); + rdoShiftRebinnedBarrelGroup.defineHistogram('NHLHitsperLB_x,NHLHitsperLB_y;hNHLHitsperLB',type='TProfile',title='Avg. HL Occupancy{0};Luminosity Block;Occupancy'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=maxLumiBlockShift+1,xmin=-0.5,xmax=maxLumiBlockShift+0.5,duration='run') #CAN_REBIN(m_hNHLHitsperLB_B); elif ibe == 1: for iside in range(2): regionTag = ' (' + beId[ibe] + sideId[iside] + ')' rdoShiftRebinnedEndcapGroup = helper.addGroup(algTRTMonitoringRun3RAW,'RDOShiftRebinnedEndcapHistograms1{0}'.format(iside)) - rdoShiftRebinnedEndcapGroup.defineHistogram('NHitsperLB_x,NHitsperLB_y;hNHitsperLB_{0}'.format(sideId[iside]),type='TProfile',title='Avg. Occupancy{0};Luminosity Block;Occupancy'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=maxLumiBlockShift,xmin=-0.5,xmax=maxLumiBlockShift-0.5,duration='run') #CAN_REBIN(m_hNHitsperLB_E[iside]); - rdoShiftRebinnedEndcapGroup.defineHistogram('NHLHitsperLB_x,NHLHitsperLB_y;hNHLHitsperLB_{0}'.format(sideId[iside]),type='TProfile',title='Avg. HL Occupancy{0};Luminosity Block;Occupancy'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=maxLumiBlockShift,xmin=-0.5,xmax=maxLumiBlockShift-0.5,duration='run') #CAN_REBIN(m_hNHLHitsperLB_E[iside]); + rdoShiftRebinnedEndcapGroup.defineHistogram('NHitsperLB_x,NHitsperLB_y;hNHitsperLB_{0}'.format(sideId[iside]),type='TProfile',title='Avg. Occupancy{0};Luminosity Block;Occupancy'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=maxLumiBlockShift+1,xmin=-0.5,xmax=maxLumiBlockShift+0.5,duration='run') #CAN_REBIN(m_hNHitsperLB_E[iside]); + rdoShiftRebinnedEndcapGroup.defineHistogram('NHLHitsperLB_x,NHLHitsperLB_y;hNHLHitsperLB_{0}'.format(sideId[iside]),type='TProfile',title='Avg. HL Occupancy{0};Luminosity Block;Occupancy'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=maxLumiBlockShift+1,xmin=-0.5,xmax=maxLumiBlockShift+0.5,duration='run') #CAN_REBIN(m_hNHLHitsperLB_E[iside]); topSequence += helper.result() diff --git a/InnerDetector/InDetMonitoring/TRTMonitoringRun3/src/TRTMonitoringRun3ESD_Alg.cxx b/InnerDetector/InDetMonitoring/TRTMonitoringRun3/src/TRTMonitoringRun3ESD_Alg.cxx index 40c9befda92eaa078a6c3aeca6020f871f4e6c01..c328ec2daed2fedd3bb21936e41e64dc5b53cba0 100644 --- a/InnerDetector/InDetMonitoring/TRTMonitoringRun3/src/TRTMonitoringRun3ESD_Alg.cxx +++ b/InnerDetector/InDetMonitoring/TRTMonitoringRun3/src/TRTMonitoringRun3ESD_Alg.cxx @@ -54,10 +54,10 @@ TRTMonitoringRun3ESD_Alg::TRTMonitoringRun3ESD_Alg( const std::string& name, ISv declareProperty("InDetTRTStrawStatusSummaryTool", m_sumTool); declareProperty("ITRT_CalDbTool", m_TRTCalDbTool); declareProperty("DriftFunctionTool", m_drifttool); + declareProperty("doExpert", m_doExpert = false); declareProperty("DoTracksMon", m_doTracksMon = true); declareProperty("doStraws", m_doStraws = true); declareProperty("doChips", m_doChips = true); - declareProperty("doExpert", m_doExpert = false); declareProperty("doShift", m_doShift = true); declareProperty("DistanceToStraw", m_DistToStraw = 0.4); declareProperty("min_si_hits", m_min_si_hits = 1); diff --git a/InnerDetector/InDetMonitoring/TRTMonitoringRun3/src/TRTMonitoringRun3RAW_Alg.cxx b/InnerDetector/InDetMonitoring/TRTMonitoringRun3/src/TRTMonitoringRun3RAW_Alg.cxx index 0b1ff49d79d3bdd2788ad6a4611efdef12e61b27..18174373ed55d4c727aa58d8544b3f8ec2d7c353 100644 --- a/InnerDetector/InDetMonitoring/TRTMonitoringRun3/src/TRTMonitoringRun3RAW_Alg.cxx +++ b/InnerDetector/InDetMonitoring/TRTMonitoringRun3/src/TRTMonitoringRun3RAW_Alg.cxx @@ -1593,50 +1593,46 @@ StatusCode TRTMonitoringRun3RAW_Alg::fillTRTRDOs(const TRT_RDO_Container& rdoCon // Insert here } + if (m_doShift) { + const unsigned int lumiBlock = eventInfo.lumiBlock(); + ATH_MSG_VERBOSE("This is lumiblock : " << lumiBlock); + int lastLumiBlock = -99; // ToDo - last lumiblock calculation is not correct + if ((int)lumiBlock != lastLumiBlock) { + lastLumiBlock = lumiBlock; + } + float evtLumiBlock = 1.; + float lumiBlockScale = (evtLumiBlock > 0) ? (1. / evtLumiBlock) : 0; + const float barrelConst = 1. / 105088; + const float endcapConst = 1. / 122880; + + if (m_doTracksMon && evtLumiBlock > 0) { + NHitsperLB_x = lastLumiBlock; + NHitsperLB_y = (float)nHitsperLB_B * lumiBlockScale * barrelConst; + fill("RDOShiftRebinnedBarrelHistograms0", NHitsperLB_x, NHitsperLB_y); + NHLHitsperLB_x = lastLumiBlock; + NHLHitsperLB_y = (float)nHLHitsperLB_B * lumiBlockScale * barrelConst; + fill("RDOShiftRebinnedBarrelHistograms0", NHLHitsperLB_x, NHLHitsperLB_y); - if (m_environment != Environment_t::online) { - - if (m_doShift) { - const unsigned int lumiBlock = eventInfo.lumiBlock(); - ATH_MSG_VERBOSE("This is lumiblock : " << lumiBlock); - int lastLumiBlock = -99; // ToDo - last lumiblock calculation is not correct - if ((int)lumiBlock != lastLumiBlock) { - lastLumiBlock = lumiBlock; - } - float evtLumiBlock = 1.; - float lumiBlockScale = (evtLumiBlock > 0) ? (1. / evtLumiBlock) : 0; - const float barrelConst = 1. / 105088; - const float endcapConst = 1. / 122880; - - if (m_doTracksMon && evtLumiBlock > 0) { + for (int iside = 0; iside < 2; iside++) { NHitsperLB_x = lastLumiBlock; - NHitsperLB_y = (float)nHitsperLB_B * lumiBlockScale * barrelConst; - fill("RDOShiftRebinnedBarrelHistograms0", NHitsperLB_x, NHitsperLB_y); + NHitsperLB_y = (float)nHitsperLB_E[iside] * lumiBlockScale * endcapConst; + fill("RDOShiftRebinnedEndcapHistograms1"+std::to_string(iside), NHitsperLB_x, NHitsperLB_y); NHLHitsperLB_x = lastLumiBlock; - NHLHitsperLB_y = (float)nHLHitsperLB_B * lumiBlockScale * barrelConst; - fill("RDOShiftRebinnedBarrelHistograms0", NHLHitsperLB_x, NHLHitsperLB_y); - - for (int iside = 0; iside < 2; iside++) { - NHitsperLB_x = lastLumiBlock; - NHitsperLB_y = (float)nHitsperLB_E[iside] * lumiBlockScale * endcapConst; - fill("RDOShiftRebinnedEndcapHistograms1"+std::to_string(iside), NHitsperLB_x, NHitsperLB_y); - NHLHitsperLB_x = lastLumiBlock; - NHLHitsperLB_y = (float)nHLHitsperLB_E[iside] * lumiBlockScale * endcapConst; - fill("RDOShiftRebinnedEndcapHistograms1"+std::to_string(iside), NHLHitsperLB_x, NHLHitsperLB_y); - } + NHLHitsperLB_y = (float)nHLHitsperLB_E[iside] * lumiBlockScale * endcapConst; + fill("RDOShiftRebinnedEndcapHistograms1"+std::to_string(iside), NHLHitsperLB_x, NHLHitsperLB_y); + } - nHitsperLB_B = 0; - nHLHitsperLB_B = 0; + nHitsperLB_B = 0; + nHLHitsperLB_B = 0; - for (int iside = 0; iside < 2; iside++) { - nHitsperLB_E[iside] = 0; - nHLHitsperLB_E[iside] = 0; - } + for (int iside = 0; iside < 2; iside++) { + nHitsperLB_E[iside] = 0; + nHLHitsperLB_E[iside] = 0; } } + } ATH_MSG_DEBUG("end of event and lumi block"); - } // TODO! //Get BSConversion Errors from BSConditionsServices: std::set<std::pair<uint32_t, uint32_t> > *L1IDErrorSet = m_BSSvc->getIdErrorSet(TRTByteStreamErrors::L1IDError); @@ -1930,16 +1926,16 @@ StatusCode TRTMonitoringRun3RAW_Alg::fillTRTEfficiency(const TrackCollection& co fill("TRTEfficiencyHistograms", Efficiency_z0_passed, Efficiency_z0); } + // Use hole finder to find holes on this track if (m_useHoleFinder) { - std::unique_ptr<const Trk::TrackStates> holes (m_trt_hole_finder->getHolesOnTrack(**track)); + std::unique_ptr<const Trk::TrackStates> holes (m_trt_hole_finder->getHolesOnTrack(*(*track))); if (!holes) { - ATH_MSG_WARNING("TRTTrackHoleSearchTool returned null results."); continue; } else { - for (auto it = holes->begin(); it != holes->end(); ++it) { + for (auto it = holes->begin(); it != holes->end(); ++it) { // holes->size() is always 0 for some reason if ( !((*it)->type(Trk::TrackStateOnSurface::Hole)) ) continue; const Trk::TrackParameters *track_parameters = (*it)->trackParameters(); @@ -2053,6 +2049,12 @@ StatusCode TRTMonitoringRun3RAW_Alg::fillTRTEfficiency(const TrackCollection& co } +struct straw_edge_struct { + int strawNumber; + float HitWonTMap_B_y; + float HitWonTMap_E_y; +}; + // Fill TRT Hits histograms //----------------------------------------------------------------------------------// StatusCode TRTMonitoringRun3RAW_Alg::fillTRTHits(const TrackCollection& trackCollection) const { @@ -2062,8 +2064,6 @@ StatusCode TRTMonitoringRun3RAW_Alg::fillTRTHits(const TrackCollection& trackCol // TH1F auto HLhitOnTrack_B = Monitored::Scalar<float>("HLhitOnTrack_B", 0.0); auto HLhitOnTrack_E = Monitored::Scalar<float>("HLhitOnTrack_E", 0.0); - auto HitWonTMap_B = Monitored::Scalar<float>("HitWonTMap_B", 0.0); - auto HitWonTMap_E = Monitored::Scalar<float>("HitWonTMap_E", 0.0); auto HtoLRatioOnTrack_B_Ar = Monitored::Scalar<float>("HtoLRatioOnTrack_B_Ar", 0.0); auto HtoLRatioOnTrack_B_Xe = Monitored::Scalar<float>("HtoLRatioOnTrack_B_Xe", 0.0); auto HtoLRatioOnTrack_B = Monitored::Scalar<float>("HtoLRatioOnTrack_B", 0.0); @@ -2103,6 +2103,17 @@ StatusCode TRTMonitoringRun3RAW_Alg::fillTRTHits(const TrackCollection& trackCol auto HitTronTMapC_x = Monitored::Scalar<float>("HitTronTMapC_x", 0.0); auto HitTronTMapC_y = Monitored::Scalar<float>("HitTronTMapC_y", 0.0); + // TProfile + auto HitWonTMap_B_y = Monitored::Scalar<float>("HitWonTMap_B_y", 0.0); + auto HitWonTMap_E_y = Monitored::Scalar<float>("HitWonTMap_E_y", 0.0); + + auto scale_hHitWonTMap_B = std::make_unique<short int[]>(s_Straw_max[0]); + auto scale_hHitWonTMap_E = std::make_unique<short int[][s_Straw_max[1]]>(2); + auto scale_hHitWonTMap_B_passed = std::make_unique<short int[]>(s_Straw_max[0]); + auto scale_hHitWonTMap_E_passed = std::make_unique<short int[][s_Straw_max[1]]>(2); + + std::map<int,std::vector<straw_edge_struct>> straw_edge_map; + auto p_trk = trackCollection.begin(); const Trk::Perigee *mPer = nullptr; @@ -2262,7 +2273,7 @@ StatusCode TRTMonitoringRun3RAW_Alg::fillTRTHits(const TrackCollection& trackCol } for (TSOSItBegin = TSOSItBegin0; TSOSItBegin != TSOSItEnd; ++TSOSItBegin) { - // Select a TSOS which is non-empty, measurement type and contains both drift circle and track parameters informations + // Select a TSOS which is non-empty, measurement type and contains both drift circle and track parameters informations if ((*TSOSItBegin) == 0) continue; if ( !((*TSOSItBegin)->type(Trk::TrackStateOnSurface::Measurement)) ) continue; @@ -2339,6 +2350,8 @@ StatusCode TRTMonitoringRun3RAW_Alg::fillTRTHits(const TrackCollection& trackCol StrawEffDetPhi_B_passed = phi_module; StrawEffDetPhi_B = 1.0; fill("ShiftTRTTrackHistograms"+std::to_string(ibe), StrawEffDetPhi_B_passed, StrawEffDetPhi_B); + + if (m_doStraws) scale_hHitWonTMap_B[thisStrawNumber[ibe]]++; } } else if (ibe == 1) { @@ -2349,6 +2362,8 @@ StatusCode TRTMonitoringRun3RAW_Alg::fillTRTHits(const TrackCollection& trackCol StrawEffDetPhi_E_passed = phi_module; StrawEffDetPhi_E = 1.0; fill("ShiftTRTTrackHistograms"+std::to_string(ibe)+std::to_string(iside), StrawEffDetPhi_E_passed, StrawEffDetPhi_E); + + if (m_doStraws) scale_hHitWonTMap_E[iside][thisStrawNumber[ibe]]++; } } @@ -2371,15 +2386,16 @@ StatusCode TRTMonitoringRun3RAW_Alg::fillTRTHits(const TrackCollection& trackCol StrawEffDetPhi_B_passed = phi_module; StrawEffDetPhi_B = 0.0; fill("ShiftTRTTrackHistograms"+std::to_string(ibe), StrawEffDetPhi_B_passed, StrawEffDetPhi_B); - } - if (m_doStraws && m_doShift) { + if (m_doStraws) scale_hHitWonTMap_B[thisStrawNumber[ibe]]++; } } else if (ibe == 1) { if (m_doShift) { StrawEffDetPhi_E_passed = phi_module; StrawEffDetPhi_E = 0.0; fill("ShiftTRTTrackHistograms"+std::to_string(ibe)+std::to_string(iside), StrawEffDetPhi_E_passed, StrawEffDetPhi_E); + + if (m_doStraws) scale_hHitWonTMap_E[iside][thisStrawNumber[ibe]]++; } } @@ -2442,13 +2458,17 @@ StatusCode TRTMonitoringRun3RAW_Alg::fillTRTHits(const TrackCollection& trackCol if ( (driftTimeBin < 24) && !(RawDriftCircle->lastBinHigh()) && !(RawDriftCircle->firstBinHigh()) ) { - if (m_doStraws) { + if (m_doStraws && m_doShift) { if (ibe == 0) { - HitWonTMap_B = thisStrawNumber[ibe]; - fill("ShiftTRTTrackHistograms"+std::to_string(ibe), HitWonTMap_B); + straw_edge_struct& this_struct = straw_edge_map[1].emplace_back(); // index 1 is Barrel + this_struct.strawNumber = thisStrawNumber[ibe]; + this_struct.HitWonTMap_B_y = 1.0; + scale_hHitWonTMap_B_passed[thisStrawNumber[ibe]]++; } else if (ibe == 1) { - HitWonTMap_E = thisStrawNumber[ibe]; - fill("ShiftTRTTrackHistograms"+std::to_string(ibe)+std::to_string(iside), HitWonTMap_E); + straw_edge_struct& this_struct = straw_edge_map[iside == 0 ? 2 : -2].emplace_back(); // index 2 is EA, index -2 is EC + this_struct.strawNumber = thisStrawNumber[ibe]; + this_struct.HitWonTMap_E_y = 1.0; + scale_hHitWonTMap_E_passed[iside][thisStrawNumber[ibe]]++; } } } @@ -2648,6 +2668,61 @@ StatusCode TRTMonitoringRun3RAW_Alg::fillTRTHits(const TrackCollection& trackCol } } + // Barrel straw normalization + for (int k = 0; k < s_Straw_max[0]; k++) { + try { + if (scale_hHitWonTMap_B[k] - scale_hHitWonTMap_B_passed[k] >= 0) { + for (int j = 0; j < scale_hHitWonTMap_B[k] - scale_hHitWonTMap_B_passed[k]; j++) { + if (m_doStraws) { + straw_edge_struct& this_struct = straw_edge_map[1].emplace_back(); // index 1 is Barrel + this_struct.strawNumber = k; + this_struct.HitWonTMap_B_y = 0; + } + } + } else { + ATH_MSG_ERROR("Scale value " << scale_hHitWonTMap_B[k] - scale_hHitWonTMap_B_passed[k] << + " is less than zero in scaling for Barrel, k = " << k); + } + } catch (out_of_range &e) { + ATH_MSG_ERROR("Index " << k << " out of range in scaling for Barrel"); + } + } + + // Endcap straw normalization + for (int k = 0; k < s_Straw_max[1]; k++) { + for (int iside = 0; iside < 2; iside++) { + try { + if (scale_hHitWonTMap_E[iside][k] - scale_hHitWonTMap_E_passed[iside][k] >= 0) { + for (int j = 0; j < scale_hHitWonTMap_E[iside][k] - scale_hHitWonTMap_E_passed[iside][k]; j++) { + if (m_doStraws) { + straw_edge_struct& this_struct = straw_edge_map[iside == 0 ? 2 : -2].emplace_back(); // index 2 is EA, index -2 is EC + this_struct.strawNumber = k; + this_struct.HitWonTMap_E_y = 0; + } + } + } else { + ATH_MSG_ERROR("Scale value " << scale_hHitWonTMap_E[iside][k] - scale_hHitWonTMap_E_passed[iside][k] << + " is less than zero in scaling for Endcap, iside = " << iside << ", k = " << k); + } + } catch (out_of_range &e) { + ATH_MSG_ERROR("Index " << k << " out of range in scaling for Endcap"); + } + } + } + + for (const auto& ibarrel_ecpair : straw_edge_map) { + int ibe = abs(ibarrel_ecpair.first) - 1; + int iside = ibarrel_ecpair.first > 0 ? 0 : 1; + auto strawNumber = Monitored::Collection("strawNumber", ibarrel_ecpair.second, [](const auto& s){return s.strawNumber;}); + auto HitWonTMap_B_y = Monitored::Collection("HitWonTMap_B_y", ibarrel_ecpair.second, [](const auto& s){return s.HitWonTMap_B_y;}); + auto HitWonTMap_E_y = Monitored::Collection("HitWonTMap_E_y", ibarrel_ecpair.second, [](const auto& s){return s.HitWonTMap_E_y;}); + if (ibe == 0) { + fill("ShiftTRTTrackHistograms0", strawNumber, HitWonTMap_B_y); + } else if (ibe == 1) { + fill("ShiftTRTTrackHistograms1"+std::to_string(iside), strawNumber, HitWonTMap_E_y); + } + } + return StatusCode::SUCCESS; } diff --git a/InnerDetector/InDetRecAlgs/SiSpacePointFormation/python/InDetOnlineMonitor.py b/InnerDetector/InDetRecAlgs/SiSpacePointFormation/python/InDetOnlineMonitor.py index 2a6916ce434a4cef20699d04ec959758096ab49b..43ed43e711293ca802dff6744de8131fe3d0f5d3 100644 --- a/InnerDetector/InDetRecAlgs/SiSpacePointFormation/python/InDetOnlineMonitor.py +++ b/InnerDetector/InDetRecAlgs/SiSpacePointFormation/python/InDetOnlineMonitor.py @@ -3,8 +3,8 @@ from AthenaMonitoringKernel.GenericMonitoringTool import GenericMonitoringTool def InDetMonitoringTool(): newMonTool = GenericMonitoringTool("MonTool") - newMonTool.defineHistogram('numSctClusters', type='TH1F',path='EXPERT',title="Number of SCT Clusters", xbins=50, xmin=0., xmax=100) - newMonTool.defineHistogram('numPixClusters', type='TH1F',path='EXPERT',title="Number of PIXEL Clusters", xbins=50, xmin=0., xmax=100) + newMonTool.defineHistogram('numSctSpacePoints', type='TH1F',path='EXPERT',title="Number of SCT SpacePoints", xbins=50, xmin=0., xmax=5000) + newMonTool.defineHistogram('numPixSpacePoints', type='TH1F',path='EXPERT',title="Number of PIXEL SpacePoints", xbins=50, xmin=0., xmax=5000) return newMonTool diff --git a/InnerDetector/InDetRecAlgs/SiSpacePointFormation/src/SiTrackerSpacePointFinder.cxx b/InnerDetector/InDetRecAlgs/SiSpacePointFormation/src/SiTrackerSpacePointFinder.cxx index b799bfb07877e632755312e364e088e88939d252..bc7c133580da02f4ac943e675864f889c0742909 100755 --- a/InnerDetector/InDetRecAlgs/SiSpacePointFormation/src/SiTrackerSpacePointFinder.cxx +++ b/InnerDetector/InDetRecAlgs/SiSpacePointFormation/src/SiTrackerSpacePointFinder.cxx @@ -124,10 +124,10 @@ StatusCode SiTrackerSpacePointFinder::execute (const EventContext& ctx) const const InDetDD::SiDetectorElementCollection* elements = nullptr; const SiElementPropertiesTable* properties = nullptr; - auto nReceivedClustersSCT = Monitored::Scalar<int>( "numSctClusters" , 0 ); - auto nReceivedClustersPIX = Monitored::Scalar<int>( "numPixClusters" , 0 ); + auto nReceivedSPsSCT = Monitored::Scalar<int>( "numSctSpacePoints" , 0 ); + auto nReceivedSPsPIX = Monitored::Scalar<int>( "numPixSpacePoints" , 0 ); - auto mon = Monitored::Group( m_monTool, nReceivedClustersPIX,nReceivedClustersSCT ); + auto mon = Monitored::Group( m_monTool, nReceivedSPsPIX,nReceivedSPsSCT ); if (m_selectSCTs) { SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> sctDetEle(m_SCTDetEleCollKey, ctx); @@ -211,7 +211,6 @@ StatusCode SiTrackerSpacePointFinder::execute (const EventContext& ctx) const for (; it != itend; ++it){ const SCT_ClusterCollection *colNext=&(**it); - nReceivedClustersSCT = colNext->size(); // Create SpacePointCollection IdentifierHash idHash = colNext->identifyHash(); @@ -244,6 +243,7 @@ StatusCode SiTrackerSpacePointFinder::execute (const EventContext& ctx) const return StatusCode::RECOVERABLE; } ATH_MSG_VERBOSE( size << " SpacePoints successfully added to Container !" ); + nReceivedSPsSCT += size; } } m_numberOfSCT+= sct_clcontainer->size(); @@ -269,7 +269,6 @@ StatusCode SiTrackerSpacePointFinder::execute (const EventContext& ctx) const for (; colNext != lastCol; ++colNext) { ATH_MSG_VERBOSE( "Collection num " << numColl++ ); - nReceivedClustersPIX = (*colNext)->size(); IdentifierHash idHash = (*colNext)->identifyHash(); SpacePointContainer::IDC_WriteHandle lock = spacePointContainerPixel->getWriteHandle(idHash); if(lock.OnlineAndPresentInAnotherView()){ @@ -305,6 +304,7 @@ StatusCode SiTrackerSpacePointFinder::execute (const EventContext& ctx) const } ATH_MSG_VERBOSE( size << " SpacePoints successfully added to Container !" ); + nReceivedSPsPIX += size; } } m_numberOfPixel+= pixel_clcontainer->size(); diff --git a/LArCalorimeter/LArConfiguration/python/LArElecCalibDBConfig.py b/LArCalorimeter/LArConfiguration/python/LArElecCalibDBConfig.py index f070425131c0ad221425b92ceb805c1469ff5562..691b44a9df115e9beaeaccf7855df958207eafa7 100644 --- a/LArCalorimeter/LArConfiguration/python/LArElecCalibDBConfig.py +++ b/LArCalorimeter/LArConfiguration/python/LArElecCalibDBConfig.py @@ -37,7 +37,9 @@ LArfSamplSCCondAlg = CompFactory.getComp("LArFlatConditionsAlg<LArfSamplSC> LArShapeSCCondAlg = CompFactory.getComp("LArFlatConditionsAlg<LArShapeSC>") LArPedestalSCCondAlg = CompFactory.getComp("LArFlatConditionsAlg<LArPedestalSC>") LArNoiseSCCondAlg = CompFactory.getComp("LArFlatConditionsAlg<LArNoiseSC>") +LArMinBiasSCCondAlg = CompFactory.getComp("LArFlatConditionsAlg<LArMinBiasSC>") LArAutoCorrSCCondAlg = CompFactory.getComp("LArFlatConditionsAlg<LArAutoCorrSC>") +LArPileupAverageSCCondAlg = CompFactory.getComp("LArFlatConditionsAlg<LArMinBiasAverageSC>") def LArElecCalibDbCfg(ConfigFlags,condObjs): @@ -189,8 +191,10 @@ def LArElecCalibDBMCSCCfg(ConfigFlags,folders): "uA2MeVSC":('CondAttrListCollection',"/LAR/ElecCalibMCSC/uA2MeV","LAruA2MeVSC",LAruA2MeVSCCondAlg), "fSamplSC":('CondAttrListCollection','/LAR/ElecCalibMCSC/fSampl',"LArfSamplSC",LArfSamplSCCondAlg), "ShapeSC":('CondAttrListCollection','/LAR/ElecCalibMCSC/Shape',"LArShapeSC",LArShapeSCCondAlg), + "PileupAverageSC":('CondAttrListCollection','/LAR/ElecCalibMCSC/LArPileupAverage',"LArPileupAverageSC",LArPileupAverageSCCondAlg), "PedestalSC":('CondAttrListCollection','/LAR/ElecCalibMCSC/Pedestal',"LArPedestalSC",LArPedestalSCCondAlg), "NoiseSC":('CondAttrListCollection','/LAR/ElecCalibMCSC/Noise',"LArNoiseSC",LArNoiseSCCondAlg), + "MinBiasSC":('CondAttrListCollection','/LAR/ElecCalibMCSC/MinBias',"LArMinBiasSC",LArMinBiasSCCondAlg), "AutoCorrSC":('CondAttrListCollection','/LAR/ElecCalibMCSC/AutoCorr',"LArAutoCorrSC",LArAutoCorrSCCondAlg) } diff --git a/LArCalorimeter/LArDigitization/python/LArDigitizationConfigNew.py b/LArCalorimeter/LArDigitization/python/LArDigitizationConfigNew.py index 39d35065b0da4c4433af7418c47cf56f6099c183..ff9cf2e208ca3a01d328a9114c6382e7f99fdcec 100644 --- a/LArCalorimeter/LArDigitization/python/LArDigitizationConfigNew.py +++ b/LArCalorimeter/LArDigitization/python/LArDigitizationConfigNew.py @@ -283,6 +283,10 @@ def LArTriggerDigitizationBasicCfg(flags, **kwargs): acc.addEventAlgo(LArTTL1Maker(**kwargs)) if flags.GeoModel.Run in ['RUN3']: acc.merge(LArSCL1MakerCfg(flags)) + if flags.Common.ProductionStep is not ProductionStep.PileUpPresampling: + from LArROD.LArSuperCellBuilderConfig import LArSuperCellBuilderAlgCfg,LArSuperCellBCIDAlgCfg + acc.merge(LArSuperCellBuilderAlgCfg(flags)) + acc.merge(LArSuperCellBCIDAlgCfg(flags)) return acc @@ -292,7 +296,10 @@ def LArTriggerDigitizationCfg(flags, **kwargs): acc.merge(LArOutputCfg(flags)) acc.merge(OutputStreamCfg(flags, "RDO", ["LArTTL1Container#*"])) if flags.GeoModel.Run in ['RUN3']: - acc.merge(OutputStreamCfg(flags, "RDO", ["LArDigitContainer#LArDigitSCL2"])) + if flags.Common.ProductionStep == ProductionStep.PileUpPresampling: + acc.merge(OutputStreamCfg(flags, "RDO", ["LArDigitContainer#" + flags.Overlay.BkgPrefix + "LArDigitSCL2"])) + else: + acc.merge(OutputStreamCfg(flags, "RDO", ["CaloCellContainer#SCell"])) return acc diff --git a/LArCalorimeter/LArExample/LArConditionsCommon/python/LArAlignable.py b/LArCalorimeter/LArExample/LArConditionsCommon/python/LArAlignable.py index cac079bb3ff6f3c8588af7190c4982225e1985ba..ef954d398353561e540398c5b63932ddc0298461 100755 --- a/LArCalorimeter/LArExample/LArConditionsCommon/python/LArAlignable.py +++ b/LArCalorimeter/LArExample/LArConditionsCommon/python/LArAlignable.py @@ -29,7 +29,10 @@ if activateCondAlgs: condSeq += LArAlignCondAlg("LArAlignCondAlg") from CaloAlignmentAlgs.CaloAlignmentAlgsConf import CaloAlignCondAlg condSeq += CaloAlignCondAlg("CaloAlignCondAlg") - if DetFlags.detdescr.Tile_on(): - #Calo super cell building works only if both LAr and Tile are present + # Configure Super Cell Alignment condition algorithm + # Calo super cell building works only if both LAr and Tile are present + # And we need to make sure this is a Run3 geometry layout + from AtlasGeoModel.CommonGMJobProperties import CommonGeometryFlags as commonGeoFlags + if commonGeoFlags.Run() == "RUN3" and DetFlags.detdescr.Tile_on(): from CaloAlignmentAlgs.CaloAlignmentAlgsConf import CaloSuperCellAlignCondAlg condSeq += CaloSuperCellAlignCondAlg("CaloSuperCellAlignCondAlg") diff --git a/LArCalorimeter/LArG4/LArG4EC/python/LArG4ECConfigNew.py b/LArCalorimeter/LArG4/LArG4EC/python/LArG4ECConfigNew.py index 65eb0c4a1d3e80d20a33c6fde4a13603494aa5d3..23cada82f094dc99483391f01fea0ffb0b99d6af 100644 --- a/LArCalorimeter/LArG4/LArG4EC/python/LArG4ECConfigNew.py +++ b/LArCalorimeter/LArG4/LArG4EC/python/LArG4ECConfigNew.py @@ -58,7 +58,9 @@ def EMECNegBackOuterBarretteCalibrationCalculatorCfg(ConfigFlags, name="EMECNegB return result def EMECPresamplerCalibrationCalculatorCfg(ConfigFlags, name="EMECPresamplerCalibrationCalculator", **kwargs): - return CompFactory.LArG4.EC.PresamplerCalibrationCalculator(name, **kwargs) + result = ComponentAccumulator() + result.addService(CompFactory.LArG4.EC.PresamplerCalibrationCalculator(name, **kwargs)) + return result def EndcapCryostatCalibrationCalculatorCfg(ConfigFlags, name="EndcapCryostatCalibrationCalculator", **kwargs): result = ComponentAccumulator() diff --git a/LArCalorimeter/LArG4/LArG4MiniFCAL/python/LArG4MiniFCALConfigNew.py b/LArCalorimeter/LArG4/LArG4MiniFCAL/python/LArG4MiniFCALConfigNew.py new file mode 100644 index 0000000000000000000000000000000000000000..61f9a05b58b60a5e0878f78942a9205f41a17bcb --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4MiniFCAL/python/LArG4MiniFCALConfigNew.py @@ -0,0 +1,27 @@ +# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration +from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator +from AthenaConfiguration.ComponentFactory import CompFactory +MiniFCALCalculator=CompFactory.MiniFCALCalculator +LArG4__MiniFCAL__MiniFCALCalibrationCalculator=CompFactory.LArG4.MiniFCAL.MiniFCALCalibrationCalculator + + +def MiniFCALCalibrationCalculatorCfg(ConfigFlags, name="MiniFCALCalibrationCalculator", **kwargs): + result = ComponentAccumulator() + result.addService(LArG4__MiniFCAL__MiniFCALCalibrationCalculator(name, **kwargs)) + return result + +def MiniFCALActiveCalibrationCalculatorCfg(ConfigFlags, name="MiniFCALActiveCalibrationCalculator", **kwargs): + kwargs.setdefault("GeometryType", "ACTIVE") + return MiniFCALCalibrationCalculatorCfg(ConfigFlags, name, **kwargs) + +def MiniFCALInactiveCalibrationCalculatorCfg(ConfigFlags, name="MiniFCALInactiveCalibrationCalculator", **kwargs): + kwargs.setdefault("GeometryType", "INACTIVE") + return MiniFCALCalibrationCalculatorCfg(ConfigFlags, name, **kwargs) + +def MiniFCALDeadCalibrationCalculatorCfg(ConfigFlags, name="MiniFCALDeadCalibrationCalculator", **kwargs): + kwargs.setdefault("GeometryType", "DEAD") + return MiniFCALCalibrationCalculatorCfg(ConfigFlags, name, **kwargs) + +def MiniFCALCalculatorCfg(ConfigFlags, name="MiniFCALCalculator", **kwargs): + return MiniFCALCalculator(name, **kwargs) + diff --git a/LArCalorimeter/LArG4/LArG4SD/python/LArG4SDToolConfig.py b/LArCalorimeter/LArG4/LArG4SD/python/LArG4SDToolConfig.py index d40e82ae1546cf35ada15d65d11d42be9a8cd31f..a3b269b6f06df6f4e7113a20f73f172122b28ead 100644 --- a/LArCalorimeter/LArG4/LArG4SD/python/LArG4SDToolConfig.py +++ b/LArCalorimeter/LArG4/LArG4SD/python/LArG4SDToolConfig.py @@ -17,6 +17,8 @@ LArG4__CalibrationDefaultCalculator=CompFactory.LArG4.CalibrationDefaultCalculat #to be migrated: getCalibrationDefaultCalculator, getDeadMaterialCalibrationHitMerger def LArActiveSensitiveDetectorToolCfg(ConfigFlags, name="LArActiveSensitiveDetector", **kwargs): + result = ComponentAccumulator() + ## Main configuration if ConfigFlags.GeoModel.AtlasVersion not in ["tb_LArH6_2003","tb_LArH6_2002"]: kwargs.setdefault("StacVolumes",["LArMgr::LAr::EMB::STAC"]) @@ -39,7 +41,58 @@ def LArActiveSensitiveDetectorToolCfg(ConfigFlags, name="LArActiveSensitiveDetec kwargs.setdefault("ParticleID",ConfigFlags.Sim.ParticleID) # No effect currently kwargs.setdefault("OutputCollectionNames", ["LArCalibrationHitActive"]) - return LArG4__ActiveSDTool(name, **kwargs) + + from LArG4Barrel.LArG4BarrelConfigNew import BarrelCalibrationCalculatorCfg, BarrelPresamplerCalibrationCalculatorCfg + + result.merge( BarrelPresamplerCalibrationCalculatorCfg(ConfigFlags) ) + kwargs.setdefault("EMBPSCalibrationCalculator", result.getService("BarrelPresamplerCalibrationCalculator")) + result.merge( BarrelCalibrationCalculatorCfg(ConfigFlags) ) + kwargs.setdefault("EMBCalibrationCalculator", result.getService("BarrelCalibrationCalculator")) + + from LArG4EC.LArG4ECConfigNew import EMECPosInnerWheelCalibrationCalculatorCfg, EMECNegInnerWheelCalibrationCalculatorCfg, EMECPosOuterWheelCalibrationCalculatorCfg, EMECNegOuterWheelCalibrationCalculatorCfg, EMECPosBackOuterBarretteCalibrationCalculatorCfg, EMECNegBackOuterBarretteCalibrationCalculatorCfg, EMECPresamplerCalibrationCalculatorCfg + + result.merge( EMECPosInnerWheelCalibrationCalculatorCfg(ConfigFlags) ) + kwargs.setdefault("EMECPosIWCalibrationCalculator",result.getService("EMECPosInnerWheelCalibrationCalculator")) + + result.merge( EMECNegInnerWheelCalibrationCalculatorCfg(ConfigFlags) ) + kwargs.setdefault("EMECNegIWCalibrationCalculator",result.getService("EMECNegInnerWheelCalibrationCalculator")) + + result.merge( EMECPosOuterWheelCalibrationCalculatorCfg(ConfigFlags) ) + kwargs.setdefault("EMECPosOWCalibrationCalculator",result.getService("EMECPosOuterWheelCalibrationCalculator")) + + result.merge( EMECNegOuterWheelCalibrationCalculatorCfg(ConfigFlags) ) + kwargs.setdefault("EMECNegOWCalibrationCalculator",result.getService("EMECNegOuterWheelCalibrationCalculator")) + + result.merge (EMECPresamplerCalibrationCalculatorCfg(ConfigFlags) ) + kwargs.setdefault("EMECPSCalibrationCalculator",result.getService("EMECPresamplerCalibrationCalculator")) + + result.merge( EMECPosBackOuterBarretteCalibrationCalculatorCfg(ConfigFlags) ) + kwargs.setdefault("EMECPosBOBCalibrationCalculator",result.getService("EMECPosBackOuterBarretteCalibrationCalculator")) + result.merge( EMECNegBackOuterBarretteCalibrationCalculatorCfg(ConfigFlags) ) + kwargs.setdefault("EMECNegBOBCalibrationCalculator",result.getService("EMECNegBackOuterBarretteCalibrationCalculator")) + + from LArG4HEC.LArG4HECConfigNew import HECCalibrationWheelActiveCalculatorCfg + result.merge( HECCalibrationWheelActiveCalculatorCfg(ConfigFlags)) + kwargs.setdefault("HECWActiveCalculator",result.getService("HECCalibrationWheelActiveCalculator")) + + from LArG4FCAL.LArG4FCALConfigNew import FCAL1CalibCalculatorCfg, FCAL2CalibCalculatorCfg, FCAL3CalibCalculatorCfg + + result.merge(FCAL1CalibCalculatorCfg(ConfigFlags)) + kwargs.setdefault("FCAL1CalibCalculator", result.getService("FCAL1CalibCalculator") ) + + result.merge(FCAL2CalibCalculatorCfg(ConfigFlags)) + kwargs.setdefault("FCAL2CalibCalculator", result.getService("FCAL2CalibCalculator") ) + + result.merge(FCAL3CalibCalculatorCfg(ConfigFlags)) + kwargs.setdefault("FCAL3CalibCalculator", result.getService("FCAL3CalibCalculator") ) + + + from LArG4MiniFCAL.LArG4MiniFCALConfigNew import MiniFCALActiveCalibrationCalculatorCfg + result.merge ( MiniFCALActiveCalibrationCalculatorCfg(ConfigFlags) ) + kwargs.setdefault("MiniFCALActiveCalibrationCalculator", result.getService("MiniFCALActiveCalibrationCalculator")) + + result.setPrivateTools( LArG4__ActiveSDTool(name, **kwargs)) + return result def LArDeadSensitiveDetectorToolCfg(ConfigFlags, name="LArDeadSensitiveDetector", **kwargs): ## Main configuration @@ -316,6 +369,7 @@ def LArHECSensitiveDetectorCfg(ConfigFlags, name="LArHECSensitiveDetector", **kw return result def LArInactiveSensitiveDetectorToolCfg(ConfigFlags, name="LArInactiveSensitiveDetector", **kwargs): + result = ComponentAccumulator() ## Main configuration if ConfigFlags.GeoModel.AtlasVersion not in ["tb_LArH6_2003","tb_LArH6_2002"]: kwargs.setdefault("BarrelPreVolumes",["LArMgr::LAr::Barrel::Presampler::Cathode*", @@ -404,7 +458,52 @@ def LArInactiveSensitiveDetectorToolCfg(ConfigFlags, name="LArInactiveSensitiveD kwargs.setdefault("ParticleID",ConfigFlags.Sim.ParticleID) # No effect currently kwargs.setdefault("OutputCollectionNames", ["LArCalibrationHitInactive"]) - return LArG4__InactiveSDTool(name, **kwargs) + + from LArG4Barrel.LArG4BarrelConfigNew import BarrelCalibrationCalculatorCfg, BarrelPresamplerCalibrationCalculatorCfg + + result.merge( BarrelPresamplerCalibrationCalculatorCfg(ConfigFlags) ) + kwargs.setdefault("EMBPSCalibrationCalculator", result.getService("BarrelPresamplerCalibrationCalculator")) + result.merge( BarrelCalibrationCalculatorCfg(ConfigFlags) ) + kwargs.setdefault("EMBCalibrationCalculator", result.getService("BarrelCalibrationCalculator")) + + from LArG4EC.LArG4ECConfigNew import EMECPosInnerWheelCalibrationCalculatorCfg, EMECNegInnerWheelCalibrationCalculatorCfg, EMECPosOuterWheelCalibrationCalculatorCfg, EMECNegOuterWheelCalibrationCalculatorCfg + + result.merge( EMECPosInnerWheelCalibrationCalculatorCfg(ConfigFlags) ) + kwargs.setdefault("EMECPosIWCalibrationCalculator",result.getService("EMECPosInnerWheelCalibrationCalculator")) + + result.merge( EMECNegInnerWheelCalibrationCalculatorCfg(ConfigFlags) ) + kwargs.setdefault("EMECNegIWCalibrationCalculator",result.getService("EMECNegInnerWheelCalibrationCalculator")) + + result.merge( EMECPosOuterWheelCalibrationCalculatorCfg(ConfigFlags) ) + kwargs.setdefault("EMECPosOWCalibrationCalculator",result.getService("EMECPosOuterWheelCalibrationCalculator")) + + result.merge( EMECNegOuterWheelCalibrationCalculatorCfg(ConfigFlags) ) + kwargs.setdefault("EMECNegOWCalibrationCalculator",result.getService("EMECNegOuterWheelCalibrationCalculator")) + + + from LArG4HEC.LArG4HECConfigNew import HECCalibrationWheelInactiveCalculatorCfg + result.merge( HECCalibrationWheelInactiveCalculatorCfg(ConfigFlags)) + kwargs.setdefault("HECWheelInactiveCalculator",result.getService("HECCalibrationWheelInactiveCalculator")) + + from LArG4FCAL.LArG4FCALConfigNew import FCAL1CalibCalculatorCfg, FCAL2CalibCalculatorCfg, FCAL3CalibCalculatorCfg + + result.merge(FCAL1CalibCalculatorCfg(ConfigFlags)) + kwargs.setdefault("FCAL1CalibCalculator", result.getService("FCAL1CalibCalculator") ) + + result.merge(FCAL2CalibCalculatorCfg(ConfigFlags)) + kwargs.setdefault("FCAL2CalibCalculator", result.getService("FCAL2CalibCalculator") ) + + result.merge(FCAL3CalibCalculatorCfg(ConfigFlags)) + kwargs.setdefault("FCAL3CalibCalculator", result.getService("FCAL3CalibCalculator") ) + + from LArG4MiniFCAL.LArG4MiniFCALConfigNew import MiniFCALInactiveCalibrationCalculatorCfg + result.merge(MiniFCALInactiveCalibrationCalculatorCfg(ConfigFlags)) + kwargs.setdefault("MiniFCALInactiveCalibrationCalculator", result.getService("MiniFCALInactiveCalibrationCalculator")) + + + + result.setPrivateTools( LArG4__InactiveSDTool(name, **kwargs) ) + return result def LArMiniFCALSensitiveDetectorToolCfg(ConfigFlags, name="LArMiniFCALSensitiveDetector", **kwargs): result = ComponentAccumulator() diff --git a/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/python/LArGMConfig.py b/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/python/LArGMConfig.py index 402641c9316413a0f369457de53d221fb0a50373..f3ae20e3c090bc4a50d5e772be19040860def17e 100644 --- a/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/python/LArGMConfig.py +++ b/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/python/LArGMConfig.py @@ -10,6 +10,7 @@ def LArGMCfg(configFlags): result=GeoModelCfg(configFlags) doAlignment=configFlags.LAr.doAlign + activateCondAlgs = not configFlags.GeoModel.Align.LegacyConditionsAccess tool = CompFactory.LArDetectorToolNV(ApplyAlignments=doAlignment, EnableMBTS=configFlags.Detector.GeometryMBTS) if configFlags.Common.ProductionStep != ProductionStep.Simulation and configFlags.Common.ProductionStep != ProductionStep.FastChain: @@ -32,17 +33,17 @@ def LArGMCfg(configFlags): result.merge(addFolders(configFlags,"/LAR/Align","LAR_ONL",className="DetCondKeyTrans")) result.merge(addFolders(configFlags,"/LAR/LArCellPositionShift","LAR_ONL",className="CaloRec::CaloCellPositionShift")) - if configFlags.Common.Project != 'AthSimulation': + if activateCondAlgs: result.addCondAlgo(CompFactory.LArAlignCondAlg()) result.addCondAlgo(CompFactory.CaloAlignCondAlg()) - if configFlags.Detector.GeometryTile: + if configFlags.GeoModel.Run == 'RUN3' and configFlags.Detector.GeometryTile: #Calo super cell building works only if both LAr and Tile are present result.addCondAlgo(CompFactory.CaloSuperCellAlignCondAlg()) else: # Build unalinged CaloDetDescrManager instance in the Condition Store - if configFlags.Common.Project != 'AthSimulation': + if activateCondAlgs: result.addCondAlgo(CompFactory.CaloAlignCondAlg(LArAlignmentStore="",CaloCellPositionShiftFolder="")) - if configFlags.Detector.GeometryTile: + if configFlags.GeoModel.Run == 'RUN3' and configFlags.Detector.GeometryTile: result.addCondAlgo(CompFactory.CaloSuperCellAlignCondAlg()) return result diff --git a/LArCalorimeter/LArOnlDbPrep/src/LArDSPThresholdFillInline.cxx b/LArCalorimeter/LArOnlDbPrep/src/LArDSPThresholdFillInline.cxx index 112df33d5ec20fd27e285ab4232081322156a00e..ccb5a34dfae29d79511a59dfd8f953d34bd5bf75 100644 --- a/LArCalorimeter/LArOnlDbPrep/src/LArDSPThresholdFillInline.cxx +++ b/LArCalorimeter/LArOnlDbPrep/src/LArDSPThresholdFillInline.cxx @@ -2,11 +2,10 @@ Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ -#include "LArOnlDbPrep/LArDSPThresholdFillInline.h" +#include "LArDSPThresholdFillInline.h" #include "LArIdentifier/LArOnlineID.h" #include "CaloIdentifier/CaloCell_ID.h" #include "CaloIdentifier/CaloGain.h" -#include "CaloDetDescr/CaloDetDescrManager.h" #include "CaloDetDescr/CaloDetDescrElement.h" #include "CaloConditions/CaloNoise.h" #include "GaudiKernel/ThreadLocalContext.h" @@ -67,6 +66,7 @@ StatusCode LArDSPThresholdFillInline::initialize() { ATH_CHECK( detStore()->retrieve(m_onlineID,"LArOnlineID") ); ATH_CHECK( m_cablingKey.initialize() ); + ATH_CHECK( m_caloMgrKey.initialize() ); ATH_CHECK(m_bcContKey.initialize(m_maskBadChannels)); ATH_CHECK(m_bcMask.buildBitMask(m_problemsToMask,msg())); @@ -151,11 +151,9 @@ StatusCode LArDSPThresholdFillInline::stop() { ATH_CHECK( detStore()->record(attr,m_key) ); - const CaloDetDescrManager *theCaloDDM = CaloDetDescrManager::instance(); - if(!theCaloDDM){ - ATH_MSG_ERROR ( "Failed to return CaloDetDescrManager" ); - return StatusCode::FAILURE; - } + SG::ReadCondHandle<CaloDetDescrManager> caloMgrHandle{m_caloMgrKey}; + ATH_CHECK(caloMgrHandle.isValid()); + const CaloDetDescrManager *theCaloDDM = *caloMgrHandle; ATH_MSG_INFO ( "theCaloDDM retrieved" ); SG::ReadCondHandle<LArOnOffIdMapping> cablingHdl (m_cablingKey, ctx); diff --git a/LArCalorimeter/LArOnlDbPrep/LArOnlDbPrep/LArDSPThresholdFillInline.h b/LArCalorimeter/LArOnlDbPrep/src/LArDSPThresholdFillInline.h similarity index 90% rename from LArCalorimeter/LArOnlDbPrep/LArOnlDbPrep/LArDSPThresholdFillInline.h rename to LArCalorimeter/LArOnlDbPrep/src/LArDSPThresholdFillInline.h index bc194ccec6b5c65fe92e292bbc2594ed1e023797..453a9e663b524a9f64c68dd45a3b5bbf15800f99 100644 --- a/LArCalorimeter/LArOnlDbPrep/LArOnlDbPrep/LArDSPThresholdFillInline.h +++ b/LArCalorimeter/LArOnlDbPrep/src/LArDSPThresholdFillInline.h @@ -13,6 +13,7 @@ #include "LArCabling/LArOnOffIdMapping.h" #include "StoreGate/ReadCondHandleKey.h" #include "CaloConditions/CaloNoise.h" +#include "CaloDetDescr/CaloDetDescrManager.h" class LArOnlineID; @@ -26,6 +27,8 @@ class LArDSPThresholdFillInline:public AthAlgorithm { private: SG::ReadCondHandleKey<LArOnOffIdMapping> m_cablingKey{this,"CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping object"}; + SG::ReadCondHandleKey<CaloDetDescrManager> m_caloMgrKey{this,"CaloDetDescrManager","CaloDetDescrManager","SG Key for CaloDetDescrManager in the Condition Store" }; + const LArOnlineID* m_onlineID; std::string m_nameOfSet; diff --git a/LArCalorimeter/LArOnlDbPrep/src/LArGeoWeightsFill.cxx b/LArCalorimeter/LArOnlDbPrep/src/LArGeoWeightsFill.cxx index 3b1387fb33278300e4ce7c1fbd4c28fbcdc17006..547fc68c6ebeef771dc9e8bdf2296d73b4f9060a 100644 --- a/LArCalorimeter/LArOnlDbPrep/src/LArGeoWeightsFill.cxx +++ b/LArCalorimeter/LArOnlDbPrep/src/LArGeoWeightsFill.cxx @@ -1,11 +1,10 @@ /* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ -#include "LArOnlDbPrep/LArGeoWeightsFill.h" +#include "LArGeoWeightsFill.h" #include "LArIdentifier/LArOnlineID.h" #include "CaloIdentifier/CaloCell_ID.h" -#include "CaloDetDescr/CaloDetDescrManager.h" #include "CaloDetDescr/CaloDetDescrElement.h" #include <fstream> @@ -37,6 +36,7 @@ StatusCode LArGeoWeightsFill::initialize() { ATH_MSG_DEBUG ( "start initialize()" ); ATH_CHECK( detStore()->retrieve(m_onlineID,"LArOnlineID") ); ATH_CHECK( m_cablingKey.initialize() ); + ATH_CHECK( m_caloMgrKey.initialize() ); ATH_CHECK( m_ttService.retrieve() ); return StatusCode::SUCCESS; } @@ -77,11 +77,9 @@ StatusCode LArGeoWeightsFill::stop() { ATH_CHECK( detStore()->record(attr,m_key) ); - const CaloDetDescrManager *theCaloDDM = CaloDetDescrManager::instance(); - if(!theCaloDDM){ - ATH_MSG_ERROR ( "Failed to return CaloDetDescrManager" ); - return StatusCode::FAILURE; - } + SG::ReadCondHandle<CaloDetDescrManager> caloMgrHandle{m_caloMgrKey}; + ATH_CHECK(caloMgrHandle.isValid()); + const CaloDetDescrManager *theCaloDDM = *caloMgrHandle; ATH_MSG_INFO ( "theCaloDDM retrieved" ); SG::ReadCondHandle<LArOnOffIdMapping> cablingHdl{m_cablingKey}; const LArOnOffIdMapping* cabling{*cablingHdl}; diff --git a/LArCalorimeter/LArOnlDbPrep/LArOnlDbPrep/LArGeoWeightsFill.h b/LArCalorimeter/LArOnlDbPrep/src/LArGeoWeightsFill.h similarity index 65% rename from LArCalorimeter/LArOnlDbPrep/LArOnlDbPrep/LArGeoWeightsFill.h rename to LArCalorimeter/LArOnlDbPrep/src/LArGeoWeightsFill.h index e4a4005d8f99645ec82c2bd9eb6ac4e5651bd171..8df97f251942690c531b3fc9551cd7f47fb174f6 100644 --- a/LArCalorimeter/LArOnlDbPrep/LArOnlDbPrep/LArGeoWeightsFill.h +++ b/LArCalorimeter/LArOnlDbPrep/src/LArGeoWeightsFill.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ #ifndef LARGEOWEIGHTSFILL_H @@ -10,7 +10,7 @@ #include "LArCabling/LArOnOffIdMapping.h" #include "StoreGate/ReadCondHandleKey.h" #include "CaloTriggerTool/CaloTriggerTowerService.h" - +#include "CaloDetDescr/CaloDetDescrManager.h" class StoreGateSvc; class LArOnlineID; @@ -18,12 +18,13 @@ class LArGeoWeightsFill:public AthAlgorithm { public: LArGeoWeightsFill(const std::string& name, ISvcLocator* pSvcLocator); ~LArGeoWeightsFill(); - StatusCode initialize(); - StatusCode execute() {return StatusCode::SUCCESS;} - StatusCode stop(); + virtual StatusCode initialize() override; + virtual StatusCode execute() override {return StatusCode::SUCCESS;} + virtual StatusCode stop() override; private: SG::ReadCondHandleKey<LArOnOffIdMapping> m_cablingKey{this, "OnOffMap", "LArOnOffIdMap", "SG key for mapping object"}; + SG::ReadCondHandleKey<CaloDetDescrManager> m_caloMgrKey{this,"CaloDetDescrManager","CaloDetDescrManager","SG Key for CaloDetDescrManager in the Condition Store" }; const LArOnlineID* m_onlineID; diff --git a/LArCalorimeter/LArOnlDbPrep/src/components/LArOnlDbPrep_entries.cxx b/LArCalorimeter/LArOnlDbPrep/src/components/LArOnlDbPrep_entries.cxx index 9c25b787d9b37b9b8775cf6e2dc2cabd86f10149..89f398bcd7746dd82aff4a1bc827199b12806f22 100644 --- a/LArCalorimeter/LArOnlDbPrep/src/components/LArOnlDbPrep_entries.cxx +++ b/LArCalorimeter/LArOnlDbPrep/src/components/LArOnlDbPrep_entries.cxx @@ -1,5 +1,5 @@ -#include "LArOnlDbPrep/LArDSPThresholdFillInline.h" -#include "LArOnlDbPrep/LArGeoWeightsFill.h" +#include "../LArDSPThresholdFillInline.h" +#include "../LArGeoWeightsFill.h" DECLARE_COMPONENT( LArDSPThresholdFillInline ) DECLARE_COMPONENT( LArGeoWeightsFill ) diff --git a/LArCalorimeter/LArROD/python/LArFebErrorSummaryMakerConfig.py b/LArCalorimeter/LArROD/python/LArFebErrorSummaryMakerConfig.py index 9daf99458c9942c6fbd0ba8c677411f58a093471..27bfeb0c09ded13b10f0bd43e49c939d3edc9124 100644 --- a/LArCalorimeter/LArROD/python/LArFebErrorSummaryMakerConfig.py +++ b/LArCalorimeter/LArROD/python/LArFebErrorSummaryMakerConfig.py @@ -6,8 +6,11 @@ from LArBadChannelTool.LArBadChannelConfig import LArBadFebCfg def LArFebErrorSummaryMakerCfg(configFlags): febSummaryMaker =LArFebErrorSummaryMaker() - from RecExConfig.RecFlags import rec - if int(rec.projectName()[4:6]) > 20: + projectName=configFlags.Input.ProjectName + + yearNumber=int(projectName[4:6]) + + if yearNumber > 20: febSummaryMaker.MaskFebScacStatus = [0x38680000,0x38720000] febSummaryMaker.MaskFebEvtId = [0x38680000] else: diff --git a/LArCalorimeter/LArROD/python/LArSuperCellBuilderConfig.py b/LArCalorimeter/LArROD/python/LArSuperCellBuilderConfig.py new file mode 100644 index 0000000000000000000000000000000000000000..aebc7c1a973abd67120b957f5ef09f52becc4bfb --- /dev/null +++ b/LArCalorimeter/LArROD/python/LArSuperCellBuilderConfig.py @@ -0,0 +1,51 @@ +# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration + +from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator +from AthenaConfiguration.ComponentFactory import CompFactory + + +def LArSuperCellBuilderAlgCfg(flags, **kwargs): + acc = ComponentAccumulator() + + from LArCabling.LArCablingConfig import LArOnOffIdMappingSCCfg + acc.merge(LArOnOffIdMappingSCCfg(flags)) + kwargs.setdefault("CablingKey", 'LArOnOffIdMapSC') + + from LArRecUtils.LArADC2MeVSCCondAlgConfig import LArADC2MeVSCCondAlgCfg + acc.merge(LArADC2MeVSCCondAlgCfg(flags)) + kwargs.setdefault("ADC2MeVKey", 'LArADC2MeVSC') + + requiredConditions=["ShapeSC","PedestalSC"] + from LArConfiguration.LArElecCalibDBConfig import LArElecCalibDBMCSCCfg + acc.merge(LArElecCalibDBMCSCCfg(flags,requiredConditions)) + kwargs.setdefault("ShapeKey", 'LArShapeSC') # Provided by LArFlatConditionsAlg<LArShapeSC> + kwargs.setdefault("PedestalKey", 'LArPedestalSC') # Provided by LArFlatConditionsAlg<LArPedestalSC> + + from LArRecUtils.LArRecUtilsConfig import LArOFCSCCondAlgCfg + acc.merge(LArOFCSCCondAlgCfg(flags)) + kwargs.setdefault("OFCKey", 'LArOFCSC') # Provided by LArOFCSCCondAlg + + kwargs.setdefault("CaloCellKey", 'SCellnoBCID') # Output + + kwargs.setdefault("LArDigitKey", 'LArDigitSCL2') # TODO Understand why this isn't LArDigitSCL1 + + kwargs.setdefault("useDB", False) + kwargs.setdefault("IsSuperCell", True) + kwargs.setdefault("ECutFortQ", -1024) + acc.addEventAlgo(CompFactory.LArRawChannelBuilderAlg(name="LArSuperCellBuilderAlg", **kwargs)) + return acc + + +def LArSuperCellBCIDAlgCfg(flags, name = "LArSuperCellBCIDAlgDefault", **kwargs): + acc = ComponentAccumulator() + from LArCabling.LArCablingConfig import LArOnOffIdMappingSCCfg + acc.merge(LArOnOffIdMappingSCCfg(flags)) + kwargs.setdefault("CablingKey", 'LArOnOffIdMapSC') # CHECK + from CaloRec.CaloBCIDAvgAlgSCConfig import CaloBCIDAvgAlgSCCfg + acc.merge(CaloBCIDAvgAlgSCCfg(flags)) + kwargs.setdefault("BCIDAvgKey", "StoreGateSvc+CaloBCIDAverageSC") # Provided by CaloBCIDAvgAlgSC + kwargs.setdefault("SCellContainerIn", "SCellnoBCID") # Provided by LArSuperCellBuilderAlg + kwargs.setdefault("SCellContainerOut", "SCell") # Output + acc.addEventAlgo(CompFactory.LArSuperCellBCIDAlg(name, **kwargs)) + return acc + diff --git a/LArCalorimeter/LArRecUtils/python/LArRecUtilsConfig.py b/LArCalorimeter/LArRecUtils/python/LArRecUtilsConfig.py index 7f17dd5a41b913e5503643423a25b0c232ddb5bc..d6b8bf0375d598b115aa8007be4c7bb050e7f1fc 100644 --- a/LArCalorimeter/LArRecUtils/python/LArRecUtilsConfig.py +++ b/LArCalorimeter/LArRecUtils/python/LArRecUtilsConfig.py @@ -61,6 +61,45 @@ def LArOFCCondAlgCfg (flags, name = 'LArOFCCondAlg', **kwargs): return acc +def LArOFCSCCondAlgCfg (flags, name = 'LArOFCSCCondAlg', **kwargs): + + mlog = logging.getLogger ('LArOFCSCCondAlgCfg') + mlog.info(" entering LArOFCSCCondAlgCfg") + + kwargs.setdefault ('isMC', True) + kwargs.setdefault ('isSuperCell', True) + kwargs.setdefault ('firstSample', flags.LAr.ROD.FirstSample) + kwargs.setdefault ('useHighestGainAutoCorr', flags.LAr.ROD.UseHighestGainAutoCorr) + + from LArCabling.LArCablingConfig import LArOnOffIdMappingSCCfg + acc = LArOnOffIdMappingSCCfg(flags) + kwargs.setdefault("LArOnOffIdMappingObjKey", 'LArOnOffIdMapSC') # Provided by LArOnOffMappingAlgSC + requiredConditions=["ShapeSC","PedestalSC","NoiseSC"] + from LArConfiguration.LArElecCalibDBConfig import LArElecCalibDBMCSCCfg + acc.merge(LArElecCalibDBMCSCCfg(flags,requiredConditions)) + kwargs.setdefault("LArShapeObjKey", 'LArShapeSC') # Provided by LArFlatConditionsAlg<LArShapeSC> + kwargs.setdefault("LArNoiseObjKey", 'LArNoiseSC') # Provided by LArFlatConditionsAlg<LArNoiseSC> + kwargs.setdefault("LArPedestalObjKey", 'LArPedestalSC') # Provided by LArFlatConditionsAlg<LArPedestalSC> + + acc.merge(LArAutoCorrTotalSCCondAlgCfg(flags)) + kwargs.setdefault("LArAutoCorrTotalObjKey", 'LArAutoCorrTotalSC') # Provided by LArAutoCorrTotalSCCondAlg + kwargs.setdefault("LArOFCObjKey", 'LArOFCSC') # Output + + if flags.LAr.ROD.DoOFCPileupOptimization: + if flags.LAr.ROD.NumberOfCollisions: + kwargs.setdefault('Nminbias',flags.LAr.ROD.NumberOfCollisions) + mlog.info("Setup LArOFCCOndAlg Nminbias %f ", flags.LAr.ROD.NumberOfCollisions) + else: + kwargs.setdefault('Nminbias',flags.Beam.NumberOfCollisions) + mlog.info("Setup LArOFCCOndAlg Nminbias %f ", flags.Beam.NumberOfCollisions) + else: + kwargs.setdefault('Nminbias',0.) + mlog.info(" no pileup optimization") + + acc.addCondAlgo (CompFactory.LArOFCCondAlg (name, **kwargs)) + return acc + + def LArAutoCorrTotalCondAlgCfg (flags, name = 'LArAutoCorrTotalCondAlg', **kwargs): mlog = logging.getLogger ('LArAutoCorrTotalCondAlgCfg') mlog.info(" entering LArAutoCorrTotalCondAlgCfg") @@ -95,6 +134,55 @@ def LArAutoCorrTotalCondAlgCfg (flags, name = 'LArAutoCorrTotalCondAlg', **kwarg return acc +def LArAutoCorrTotalSCCondAlgCfg (flags, name = 'LArAutoCorrTotalSCCondAlg', **kwargs): + mlog = logging.getLogger ('LArAutoCorrTotalSCCondAlgCfg') + mlog.info(" entering LArAutoCorrTotalSCCondAlgCfg") + from AthenaCommon.SystemOfUnits import ns + + acc = LArOnOffIdMappingCfg(flags) + kwargs.setdefault("LArOnOffIdMappingObjKey", 'LArOnOffIdMapSC') # Provided by LArOnOffMappingAlgSC + + from LArRecUtils.LArADC2MeVSCCondAlgConfig import LArADC2MeVSCCondAlgCfg + acc.merge(LArADC2MeVSCCondAlgCfg(flags)) + kwargs.setdefault("LArADC2MeVObjKey", 'LArADC2MeVSC') # Provided by LArADC2MeVSCCondAlg + + requiredConditons=["ShapeSC","AutoCorrSC","NoiseSC","PedestalSC","fSamplSC","MinBiasSC"] + from LArConfiguration.LArElecCalibDBConfig import LArElecCalibDBMCSCCfg + acc.merge(LArElecCalibDBMCSCCfg(flags,requiredConditons)) + kwargs.setdefault("LArShapeObjKey", 'LArShapeSC') # Provided by LArFlatConditionsAlg<LArShapeSC> + kwargs.setdefault("LArAutoCorrObjKey", 'LArAutoCorrSC')# Provided by LArFlatConditionsAlg<LArAutoCorrSC> + kwargs.setdefault("LArNoiseObjKey", 'LArNoiseSC') # Provided by LArFlatConditionsAlg<LArNoiseSC> + kwargs.setdefault("LArPedestalObjKey", 'LArPedestalSC') # Provided by LArFlatConditionsAlg<LArPedestalSC> + kwargs.setdefault("LArfSamplObjKey", 'LArfSamplSC') # Provided by LArFlatConditionsAlg<LArfSamplSC> + kwargs.setdefault("LArMinBiasObjKey", 'LArMinBiasSC') # Provided by LArFlatConditionsAlg<LArMinBiasSC> + + kwargs.setdefault("LArAutoCorrTotalObjKey", 'LArAutoCorrTotalSC') # Output + + kwargs.setdefault("isSuperCell", True) + kwargs.setdefault('Nsamples', flags.LAr.ROD.nSamples) + kwargs.setdefault('firstSample',flags.LAr.ROD.FirstSample) + mlog.info("Nsamples %d",flags.LAr.ROD.nSamples) + mlog.info("firstSample %d",flags.LAr.ROD.FirstSample) + deltaBunch = int(flags.Beam.BunchSpacing/( 25.*ns)+0.5) + mlog.info("DeltaBunch %d " , deltaBunch) + kwargs.setdefault('deltaBunch',deltaBunch) + + if flags.LAr.ROD.DoOFCPileupOptimization: + if flags.LAr.ROD.NumberOfCollisions: + kwargs.setdefault("Nminbias", flags.LAr.ROD.NumberOfCollisions) + mlog.info(" NMminBias %f", flags.LAr.ROD.NumberOfCollisions) + else: + kwargs.setdefault("Nminbias", flags.Beam.NumberOfCollisions) + mlog.info(" NMminBias %f", flags.Beam.NumberOfCollisions) + else: + kwargs.setdefault('Nminbias',0.) + mlog.info(" no pileup noise in LArAutoCorrTotal ") + + LArAutoCorrTotalCondAlg=CompFactory.LArAutoCorrTotalCondAlg + acc.addCondAlgo (LArAutoCorrTotalCondAlg (name, **kwargs)) + return acc + + def LArRoIMapCondAlgCfg (flags, name = 'LArRoIMapCondAlg', **kwargs): acc = ComponentAccumulator() diff --git a/LArCalorimeter/LArTest/LArCalibTest/python/HECNoiseD3PDMaker.py b/LArCalorimeter/LArTest/LArCalibTest/python/HECNoiseD3PDMaker.py index c1c1e66173d7715fd650e633108b7926b335d5a5..b6e166fddc4cd4ea015096b330de71971fb6b371 100644 --- a/LArCalorimeter/LArTest/LArCalibTest/python/HECNoiseD3PDMaker.py +++ b/LArCalorimeter/LArTest/LArCalibTest/python/HECNoiseD3PDMaker.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration # # D3PDMaker @@ -9,23 +9,22 @@ # from __future__ import print_function import AthenaPython.PyAthena as PyAthena -from ROOT import TFile, TTree +import ROOT from array import array -import os class HECNoiseD3PDMaker(PyAthena.Alg): def __init__ ( self, name, **kw ) : PyAthena.Alg.__init__(self,name) self.name = name self.det = None - self.ped = None + self.cond = None ## cell cuts self.MinDigitADC = kw.get('MinDigitADC', 20) self.MaxDeltaT = kw.get('MaxDeltaT', 5) self.NtupleFileName = kw.get('NtupleFileName', 'HECNoiseD3PD.root') - self.TriggerLines = kw.get('TriggerLines', ['L1_J5', - 'L1_J10', + self.TriggerLines = kw.get('TriggerLines', ['HLT_noalg_L1EM20A', + 'HLT_noalg_L1EM20C', 'L1_J12', 'L1_J30', 'L1_TAU5', @@ -51,14 +50,14 @@ class HECNoiseD3PDMaker(PyAthena.Alg): print ("TriggerLines: ", self.TriggerLines) # self.sg = PyAthena.py_svc("StoreGateSvc") - self.det = PyAthena.StoreGate.pointer("DetectorStore") + self.cond = PyAthena.py_svc('StoreGateSvc/ConditionStore') + self.det = PyAthena.py_svc("StoreGateSve/DetectorStore") self.LArOID = self.det.retrieve("LArOnlineID","LArOnlineID") - self.lcs = PyAthena.py_tool('LArCablingService') self.cdd = PyAthena.CaloDetDescrManager.instance() self.cid = self.cdd.getCaloCell_ID() self.tdt = PyAthena.py_tool('Trig::TrigDecisionTool/TrigDecisionTool') - self.ntfile = TFile(self.NtupleFileName,"RECREATE") - self.hectree = TTree("HECNoise","HECNoise") + self.ntfile = ROOT.TFile(self.NtupleFileName,"RECREATE") + self.hectree = ROOT.TTree("HECNoise","HECNoise") self.iRun = array('i',[0]) self.iEvent = array('L',[0]) self.iEventCount = array('i',[0]) @@ -129,11 +128,11 @@ class HECNoiseD3PDMaker(PyAthena.Alg): return True def execute(self): - #for some obscure reason, we need run dump before we can retrieve the flat objects using their abstract interface - garbagedump = open(os.devnull, 'w') - self.det.dump(garbagedump) - garbagedump.close() - self.ped = self.det.retrieve("ILArPedestal","Pedestal") + eid=ROOT.Gaudi.Hive.currentContext().eventID() + lcsCont = self.cond.retrieve("CondCont<LArOnOffIdMapping>","LArOnOffIdMap") + lcs=lcsCont.find(eid) + pedCont = self.cond.retrieve("CondCont<ILArPedestal>","LArPedestal") + ped=pedCont.find(eid) # filter low gain cells passedTrigger = False foundLowCell = False @@ -175,21 +174,21 @@ class HECNoiseD3PDMaker(PyAthena.Alg): pass if sigmax > self.MinDigitADC and sigmin < -self.MinDigitADC and ( (imin-imax) < self.MaxDeltaT or imin < imax): foundLowCell = True - ei = self.sg.retrieve("EventInfo","ByteStreamEventInfo") + ei = self.sg.retrieve("xAOD::EventInfo","EventInfo") cc = self.sg.retrieve("CaloCellContainer","AllCalo") - self.iRun[0] = ei.event_ID().run_number() - self.iEvent[0] = ei.event_ID().event_number() + self.iRun[0] = ei.runNumber() + self.iEvent[0] = ei.eventNumber() self.iEventCount[0] = self.iEventCount[0]+1 - self.iTime[0] = ei.event_ID().time_stamp() - self.iLB[0] = ei.event_ID().lumi_block() - self.iBCID[0] = ei.event_ID().bunch_crossing_id() + self.iTime[0] = ei.timeStamp() + self.iLB[0] = ei.lumiBlock() + self.iBCID[0] = ei.bcid() self.avgMu[0] = ei.averageInteractionsPerCrossing() self.actMu[0] = ei.actualInteractionsPerCrossing() self.iGain[0] = ld.gain() - oid = self.lcs.cnvToIdentifier(hid) + oid = lcs.cnvToIdentifier(hid) self.iOID[0] = ld.channelID().get_compact() - self.Ped[0] = self.ped.pedestal(ld.channelID(),ld.gain()) - self.PedRMS[0] = self.ped.pedestalRMS(ld.channelID(),ld.gain()) + self.Ped[0] = ped.pedestal(ld.channelID(),ld.gain()) + self.PedRMS[0] = ped.pedestalRMS(ld.channelID(),ld.gain()) self.iSide[0] = self.cid.pos_neg(oid) self.iSamp[0] = self.cid.sampling(oid) self.iReg[0] = self.cid.region(oid) diff --git a/MuonSpectrometer/MSVertexReconstruction/MSVertexTools/CMakeLists.txt b/MuonSpectrometer/MSVertexReconstruction/MSVertexTools/CMakeLists.txt index 9d53fcb496629c96a94bfb2b1c6085a0526ae40f..0c248d2f178401217bb9206f71f05ad921c18841 100644 --- a/MuonSpectrometer/MSVertexReconstruction/MSVertexTools/CMakeLists.txt +++ b/MuonSpectrometer/MSVertexReconstruction/MSVertexTools/CMakeLists.txt @@ -13,4 +13,6 @@ atlas_add_component( MSVertexTools src/*.cxx src/components/*.cxx INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaBaseComps AthenaKernel AthContainers StoreGateLib GeoPrimitives Identifier EventPrimitives xAODTracking GaudiKernel MSVertexUtils MuonReadoutGeometry MuonIdHelpersLib MuonPrepRawData TrkParameters TrkExInterfaces MSVertexToolInterfaces ) + LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaBaseComps AthenaKernel AthContainers StoreGateLib GeoPrimitives Identifier + EventPrimitives xAODTracking GaudiKernel MSVertexUtils MuonReadoutGeometry MuonIdHelpersLib MuonPrepRawData + TrkParameters TrkExInterfaces MSVertexToolInterfaces FourMomUtils) diff --git a/MuonSpectrometer/MSVertexReconstruction/MSVertexTools/src/MSVertexRecoTool.cxx b/MuonSpectrometer/MSVertexReconstruction/MSVertexTools/src/MSVertexRecoTool.cxx index af819be20a46bd23ae4f65855433aad06168a9bf..65012a4710ca907968374fa9b8a91ec040f3396d 100644 --- a/MuonSpectrometer/MSVertexReconstruction/MSVertexTools/src/MSVertexRecoTool.cxx +++ b/MuonSpectrometer/MSVertexReconstruction/MSVertexTools/src/MSVertexRecoTool.cxx @@ -12,6 +12,7 @@ #include "xAODTracking/Vertex.h" #include "xAODTracking/VertexAuxContainer.h" #include "xAODTracking/VertexContainer.h" +#include "FourMomUtils/xAODP4Helpers.h" namespace { constexpr int MAXPLANES = 100; /// Shortcut to square a number @@ -270,13 +271,7 @@ namespace Muon { int ntracks(0); for (int jcl = 0; jcl < ncluster; ++jcl) { float dEta = trkClu[icl].eta - trkClu0[jcl].eta; - float dPhi = trkClu[icl].phi - trkClu0[jcl].phi; - while (std::abs(dPhi) > M_PI) { - if (dPhi < 0) - dPhi += 2 * M_PI; - else - dPhi -= 2 * M_PI; - } + float dPhi = xAOD::P4Helpers::deltaPhi(trkClu[icl].phi , trkClu0[jcl].phi); if (std::abs(dEta) < 0.7 && std::abs(dPhi) < M_PI / 3.) { ntracks++; trkClu[icl].eta = trkClu[icl].eta - dEta / ntracks; @@ -304,15 +299,7 @@ namespace Muon { for (int jcl = 0; jcl < ncluster; ++jcl) { float dEta = std::abs(trkClu[icl].eta - trkClu0[jcl].eta); - float dPhi = trkClu[icl].phi - trkClu0[jcl].phi; - - while (std::abs(dPhi) > M_PI) { - if (dPhi < 0) - dPhi += 2 * M_PI; - else - dPhi -= 2 * M_PI; - } - + float dPhi = xAOD::P4Helpers::deltaPhi(trkClu[icl].phi , trkClu0[jcl].phi); if (dEta < 0.7 && std::abs(dPhi) < M_PI / 3.) { eta_avg += trkClu0[jcl].eta; cosPhi_avg += std::cos(trkClu0[jcl].phi); @@ -356,13 +343,7 @@ namespace Muon { std::vector<Tracklet> unusedTracks; for (std::vector<Tracklet>::iterator trkItr = tracks.begin(); trkItr != tracks.end(); ++trkItr) { float dEta = std::abs(BestCluster.eta - trkItr->globalPosition().eta()); - float dPhi = BestCluster.phi - trkItr->globalPosition().phi(); - while (std::abs(dPhi) > M_PI) { - if (dPhi < 0) - dPhi += 2 * M_PI; - else - dPhi -= 2 * M_PI; - } + float dPhi = xAOD::P4Helpers::deltaPhi(BestCluster.phi , trkItr->globalPosition().phi()); if (dEta < 0.7 && std::abs(dPhi) < M_PI / 3.) BestCluster.tracks.push_back((*trkItr)); else diff --git a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/MM_RdoToDigit.cxx b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/MM_RdoToDigit.cxx index 64f15964e1acf112909f944423d9adc1e4c3f012..96dedb32592f53753339445823f04468692399b3 100644 --- a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/MM_RdoToDigit.cxx +++ b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/MM_RdoToDigit.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ #include "MM_RdoToDigit.h" @@ -78,6 +78,7 @@ StatusCode MM_RdoToDigit::decodeMM( const Muon::MM_RawDataCollection * rdoColl, if (oldId != elementId) { MmDigitCollection * coll = nullptr; auto sc ATLAS_THREAD_SAFE = mmContainer->naughtyRetrieve(coll_hash, coll); + ATH_CHECK( sc ); if (nullptr == coll) { MmDigitCollection * newCollection = new MmDigitCollection(elementId,coll_hash); diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondAlg/CMakeLists.txt b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondAlg/CMakeLists.txt index 472f44dc999af8af4203907a859a7c440dd6ca99..aa4fa2b8b0f31d2cffc4a5810e2efcd38265cc2d 100644 --- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondAlg/CMakeLists.txt +++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondAlg/CMakeLists.txt @@ -16,7 +16,7 @@ atlas_add_library( MuonCondAlgLib PUBLIC_HEADERS MuonCondAlg INCLUDE_DIRS ${CORAL_INCLUDE_DIRS} PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${CORAL_LIBRARIES} AthenaBaseComps AthenaKernel AthenaPoolUtilities Identifier GaudiKernel MuonCondData MuonCondInterface MuonCondSvcLib CoralUtilitiesLib StoreGateLib MuonIdHelpersLib MuonReadoutGeometry MdtCalibSvcLib MdtCalibData MuonCalibITools MdtCalibUtils MuonCalibToolsLib PathResolver nlohmann_json::nlohmann_json + LINK_LIBRARIES ${CORAL_LIBRARIES} AthenaBaseComps AthenaKernel AthenaPoolUtilities Identifier GaudiKernel MuonCondData MuonCondInterface MuonCondSvcLib CoralUtilitiesLib StoreGateLib MuonIdHelpersLib MuonReadoutGeometry MdtCalibSvcLib MdtCalibData MuonCalibITools MdtCalibUtils MuonCalibToolsLib PathResolver MuonNSWCommonDecode nlohmann_json::nlohmann_json PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} EventInfo ) atlas_add_component( MuonCondAlg diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondAlg/MuonCondAlg/NswCalibDbAlg.h b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondAlg/MuonCondAlg/NswCalibDbAlg.h new file mode 100644 index 0000000000000000000000000000000000000000..e60fde706d8a776eca996e3e6e5def6413a326ec --- /dev/null +++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondAlg/MuonCondAlg/NswCalibDbAlg.h @@ -0,0 +1,81 @@ +/* + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef MUONCONDALG_NSWCALIBDBALG_H +#define MUONCONDALG_NSWCALIBDBALG_H + +// STL includes +#include <string> +#include <vector> + +// Gaudi includes +#include "GaudiKernel/ICondSvc.h" +#include "GaudiKernel/ServiceHandle.h" +#include "GaudiKernel/ToolHandle.h" + +// Athena includes +#include "AthenaBaseComps/AthReentrantAlgorithm.h" +#include "StoreGate/ReadCondHandleKey.h" +#include "StoreGate/WriteCondHandleKey.h" + +// Muon includes +#include "MuonCondData/NswCalibDbTimeChargeData.h" +#include "MuonCondData/NswCalibDbThresholdData.h" +#include "MuonIdHelpers/IMuonIdHelperSvc.h" + + +// Forward declarations +class CondAttrListCollection; + + +class NswCalibDbAlg: public AthReentrantAlgorithm{ + +public: + + using AthReentrantAlgorithm::AthReentrantAlgorithm; + virtual ~NswCalibDbAlg() = default; + virtual StatusCode initialize() override; + virtual StatusCode execute (const EventContext&) const override; + + +private: + + typedef SG::WriteCondHandleKey<NswCalibDbTimeChargeData> writeKeyTdoPdo_t; + typedef SG::WriteCondHandleKey<NswCalibDbThresholdData > writeKeyVmm_t; + typedef SG::ReadCondHandleKey<CondAttrListCollection> readKey_t; + + StatusCode loadDataCalibMm (const EventContext& ctx) const; + StatusCode loadDataCalibStgc(const EventContext& ctx) const; + + StatusCode loadTimeChargeData(const EventContext&, readKey_t, const std::string) const; + StatusCode loadThresholdData (const EventContext&, readKey_t ) const; + + bool buildChannelId(Identifier*& channelId, unsigned int elinkId, unsigned int vmm, unsigned int channel) const; + + Gaudi::Property<bool> m_isOnline{this, "isOnline", false, "This algo is being used online"}; + Gaudi::Property<bool> m_isData {this, "isData" , true , "Processing data"}; + + ServiceHandle<ICondSvc> m_condSvc{this, "CondSvc", "CondSvc"}; + ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc{this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}; + + writeKeyTdoPdo_t m_writeKey_tdopdo{this, "WriteKey_TdoPdo", "NswCalibDbTimeChargeData", "Key of output calibration data (TDOs and PDOs)" }; + writeKeyVmm_t m_writeKey_vmm {this, "WriteKey_VMM" , "NswCalibDbThresholdData" , "Key of output calibration data (VMM thresholds)"}; + + readKey_t m_readKey_data_mm_sidea_tdo {this, "ReadKey_MM_SIDEA_TDO" , "/MDT/MM/TIME/SIDEA" , "Key of input MM condition data for side A data TDO"}; + readKey_t m_readKey_data_mm_sidec_tdo {this, "ReadKey_MM_SIDEC_TDO" , "/MDT/MM/TIME/SIDEC" , "Key of input MM condition data for side C data TDO"}; + readKey_t m_readKey_data_mm_sidea_pdo {this, "ReadKey_MM_SIDEA_PDO" , "/MDT/MM/CHARGE/SIDEA" , "Key of input MM condition data for side A data PDO"}; + readKey_t m_readKey_data_mm_sidec_pdo {this, "ReadKey_MM_SIDEC_PDO" , "/MDT/MM/CHARGE/SIDEC" , "Key of input MM condition data for side C data PDO"}; + readKey_t m_readKey_data_mm_sidea_vmm {this, "ReadKey_MM_SIDEA_VMM" , "/MDT/MM/VMM/SIDEA" , "Key of input MM condition data for side A data VMM"}; + readKey_t m_readKey_data_mm_sidec_vmm {this, "ReadKey_MM_SIDEC_VMM" , "/MDT/MM/VMM/SIDEC" , "Key of input MM condition data for side C data VMM"}; + readKey_t m_readKey_data_stgc_sidea_tdo{this, "ReadKey_STGC_SIDEA_TDO", "/TGC/NSW/TIME/SIDEA" , "Key of input sTGC condition data for side A data TDO"}; + readKey_t m_readKey_data_stgc_sidec_tdo{this, "ReadKey_STGC_SIDEC_TDO", "/TGC/NSW/TIME/SIDEC" , "Key of input sTGC condition data for side C data TDO"}; + readKey_t m_readKey_data_stgc_sidea_pdo{this, "ReadKey_STGC_SIDEA_PDO", "/TGC/NSW/CHARGE/SIDEA", "Key of input sTGC condition data for side A data PDO"}; + readKey_t m_readKey_data_stgc_sidec_pdo{this, "ReadKey_STGC_SIDEC_PDO", "/TGC/NSW/CHARGE/SIDEC", "Key of input sTGC condition data for side C data PDO"}; + readKey_t m_readKey_data_stgc_sidea_vmm{this, "ReadKey_STGC_SIDEA_VMM", "/TGC/NSW/VMM/SIDEA" , "Key of input sTGC condition data for side A data VMM"}; + readKey_t m_readKey_data_stgc_sidec_vmm{this, "ReadKey_STGC_SIDEC_VMM", "/TGC/NSW/VMM/SIDEC" , "Key of input sTGC condition data for side C data VMM"}; + +}; + + +#endif diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondAlg/src/NswCalibDbAlg.cxx b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondAlg/src/NswCalibDbAlg.cxx new file mode 100644 index 0000000000000000000000000000000000000000..480e285590585a4c6d1c296cfca9301cdeec49fe --- /dev/null +++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondAlg/src/NswCalibDbAlg.cxx @@ -0,0 +1,345 @@ +/* + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration +*/ + +#include "MuonCondAlg/NswCalibDbAlg.h" + +#include "TTree.h" +#include "AthenaPoolUtilities/CondAttrListCollection.h" +#include "CoralBase/Blob.h" +#include "CoralUtilities/blobaccess.h" +#include "MuonCondData/NswCalibDbTimeChargeData.h" +#include "MuonCondData/NswCalibDbThresholdData.h" +#include "MuonNSWCommonDecode/NSWElink.h" +#include "MuonNSWCommonDecode/NSWResourceId.h" +#include "MuonNSWCommonDecode/NSWOfflineHelper.h" + + +// Initialize +StatusCode +NswCalibDbAlg::initialize(){ + + // retrievals + ATH_MSG_DEBUG( "initializing " << name() ); + ATH_CHECK(m_condSvc .retrieve()); + ATH_CHECK(m_idHelperSvc.retrieve()); + + // read keys + ATH_CHECK(m_readKey_data_mm_sidea_tdo .initialize(!m_readKey_data_mm_sidea_tdo .empty() && m_isData)); + ATH_CHECK(m_readKey_data_mm_sidec_tdo .initialize(!m_readKey_data_mm_sidec_tdo .empty() && m_isData)); + ATH_CHECK(m_readKey_data_mm_sidea_pdo .initialize(!m_readKey_data_mm_sidea_pdo .empty() && m_isData)); + ATH_CHECK(m_readKey_data_mm_sidec_pdo .initialize(!m_readKey_data_mm_sidec_pdo .empty() && m_isData)); + ATH_CHECK(m_readKey_data_mm_sidea_vmm .initialize(!m_readKey_data_mm_sidea_vmm .empty() && m_isData)); + ATH_CHECK(m_readKey_data_mm_sidec_vmm .initialize(!m_readKey_data_mm_sidec_vmm .empty() && m_isData)); + ATH_CHECK(m_readKey_data_stgc_sidea_tdo.initialize(!m_readKey_data_stgc_sidea_tdo.empty() && m_isData)); + ATH_CHECK(m_readKey_data_stgc_sidec_tdo.initialize(!m_readKey_data_stgc_sidec_tdo.empty() && m_isData)); + ATH_CHECK(m_readKey_data_stgc_sidea_pdo.initialize(!m_readKey_data_stgc_sidea_pdo.empty() && m_isData)); + ATH_CHECK(m_readKey_data_stgc_sidec_pdo.initialize(!m_readKey_data_stgc_sidec_pdo.empty() && m_isData)); + ATH_CHECK(m_readKey_data_stgc_sidea_vmm.initialize(!m_readKey_data_stgc_sidea_vmm.empty() && m_isData)); + ATH_CHECK(m_readKey_data_stgc_sidec_vmm.initialize(!m_readKey_data_stgc_sidec_vmm.empty() && m_isData)); + + // write keys + ATH_CHECK(m_writeKey_tdopdo.initialize()); + ATH_CHECK(m_writeKey_vmm .initialize()); + + // register write handles + if(m_condSvc->regHandle(this, m_writeKey_tdopdo).isFailure()) { + ATH_MSG_FATAL("Unable to register WriteCondHandle " << m_writeKey_tdopdo.fullKey() << " with CondSvc"); + return StatusCode::FAILURE; + } + if(m_condSvc->regHandle(this, m_writeKey_vmm ).isFailure()) { + ATH_MSG_FATAL("Unable to register WriteCondHandle " << m_writeKey_vmm .fullKey() << " with CondSvc"); + return StatusCode::FAILURE; + } + + return StatusCode::SUCCESS; +} + + +// execute +StatusCode +NswCalibDbAlg::execute(const EventContext& ctx) const { + + ATH_MSG_DEBUG( "execute " << name() ); + + // nothing to do when online + if(m_isOnline) { + ATH_MSG_DEBUG( "IsOnline is set to True; nothing to do!" ); + return StatusCode::SUCCESS; + } + + // retrieving data (for future: add calls to separate methods here, if any) + if(m_isData) { + ATH_CHECK(loadDataCalibMm (ctx)); + ATH_CHECK(loadDataCalibStgc(ctx)); + } + else { + // keep for now: place to drop MC-only methods, if any + } + + + // return + return StatusCode::SUCCESS; +} + + +// loadDataCalibMm +StatusCode +NswCalibDbAlg::loadDataCalibMm(const EventContext& ctx) const{ + + if(loadTimeChargeData(ctx, m_readKey_data_mm_sidea_tdo, "TDO").isFailure()) return StatusCode::FAILURE; + if(loadTimeChargeData(ctx, m_readKey_data_mm_sidec_tdo, "TDO").isFailure()) return StatusCode::FAILURE; + if(loadTimeChargeData(ctx, m_readKey_data_mm_sidea_pdo, "PDO").isFailure()) return StatusCode::FAILURE; + if(loadTimeChargeData(ctx, m_readKey_data_mm_sidec_pdo, "PDO").isFailure()) return StatusCode::FAILURE; + if(loadThresholdData (ctx, m_readKey_data_mm_sidea_vmm ).isFailure()) return StatusCode::FAILURE; + if(loadThresholdData (ctx, m_readKey_data_mm_sidec_vmm ).isFailure()) return StatusCode::FAILURE; + return StatusCode::SUCCESS; +} + + +// loadDataPdo +StatusCode +NswCalibDbAlg::loadDataCalibStgc(const EventContext& ctx) const { + if(loadTimeChargeData(ctx, m_readKey_data_stgc_sidea_tdo, "TDO").isFailure()) return StatusCode::FAILURE; + if(loadTimeChargeData(ctx, m_readKey_data_stgc_sidec_tdo, "TDO").isFailure()) return StatusCode::FAILURE; + if(loadTimeChargeData(ctx, m_readKey_data_stgc_sidea_pdo, "PDO").isFailure()) return StatusCode::FAILURE; + if(loadTimeChargeData(ctx, m_readKey_data_stgc_sidec_pdo, "PDO").isFailure()) return StatusCode::FAILURE; + if(loadThresholdData (ctx, m_readKey_data_stgc_sidea_vmm ).isFailure()) return StatusCode::FAILURE; + if(loadThresholdData (ctx, m_readKey_data_stgc_sidec_vmm ).isFailure()) return StatusCode::FAILURE; + return StatusCode::SUCCESS; +} + + +// loadThresholdData +StatusCode +NswCalibDbAlg::loadThresholdData(const EventContext& ctx, readKey_t readKey) const { + + // set up write handle + SG::WriteCondHandle<NswCalibDbThresholdData> writeHandle{m_writeKey_vmm, ctx}; + if (writeHandle.isValid()) { + ATH_MSG_DEBUG("CondHandle " << writeHandle.fullKey() << " is already valid." + << " In theory this should not be called, but may happen" + << " if multiple concurrent events are being processed out of order."); + return StatusCode::SUCCESS; + } + std::unique_ptr<NswCalibDbThresholdData> writeCdo{std::make_unique<NswCalibDbThresholdData>(m_idHelperSvc->mmIdHelper(), m_idHelperSvc->stgcIdHelper())}; + + // set up read handle + SG::ReadCondHandle<CondAttrListCollection> readHandle{readKey, ctx}; + const CondAttrListCollection* readCdo{*readHandle}; + if(readCdo==0){ + ATH_MSG_ERROR("Null pointer to the read conditions object"); + return StatusCode::FAILURE; + } + writeHandle.addDependency(readHandle); + ATH_MSG_DEBUG("Size of CondAttrListCollection " << readHandle.fullKey() << " readCdo->size()= " << readCdo->size()); + ATH_MSG_DEBUG("Range of input is " << readHandle.getRange() << ", range of output is " << writeHandle.getRange()); + + // iterate through data + CondAttrListCollection::const_iterator itr; + unsigned int nObjs = 0; + for(itr = readCdo->begin(); itr != readCdo->end(); ++itr) { + + // retrieve blob + const coral::AttributeList& atr = itr->second; + if(atr["data"].specification().type() != typeid(coral::Blob)) { + ATH_MSG_FATAL( "Data column is not of type blob!" ); + return StatusCode::FAILURE; + } + coral::Blob blob = atr["data"].data<coral::Blob>(); + TTree* tree = nullptr; + if(!CoralUtilities::readBlobAsTTree(blob, tree)) { + ATH_MSG_FATAL( "Cannot retrieve data from coral blob!" ); + return StatusCode::FAILURE; + } + + // parse tree + unsigned int elinkId; + unsigned int vmm; + unsigned int channel; + float threshold; + + tree->SetBranchAddress("vmm" , &vmm ); + tree->SetBranchAddress("channel" , &channel ); + tree->SetBranchAddress("elinkId" , &elinkId ); + tree->SetBranchAddress("threshold" , &threshold ); + + // loop over channels + unsigned int nChns = 0; + for(unsigned int iEvt=0; iEvt<tree->GetEntries(); ++iEvt){ + tree->GetEntry(iEvt); + Identifier* channelId = nullptr; + if(!buildChannelId(channelId, elinkId, vmm, channel)){ + ATH_MSG_WARNING("Could not find valid channelId for elink "<<elinkId); + continue; + } + writeCdo->setData(channelId, threshold); + ++nChns; + } + ATH_MSG_VERBOSE("Retrieved data for "<<nChns<<" channels."); + ++nObjs; + } + ATH_MSG_VERBOSE("Retrieved data for "<<nObjs<<" objects."); + + // insert/write data + if (writeHandle.record(std::move(writeCdo)).isFailure()) { + ATH_MSG_FATAL("Could not record NswCalibDbTimeChargeData " << writeHandle.key() + << " with EventRange " << writeHandle.getRange() + << " into Conditions Store"); + return StatusCode::FAILURE; + } + ATH_MSG_DEBUG("Recorded new " << writeHandle.key() << " with range " << writeHandle.getRange() << " into Conditions Store"); + + return StatusCode::SUCCESS; +} + + + +// loadTimeChargeData +StatusCode +NswCalibDbAlg::loadTimeChargeData(const EventContext& ctx, readKey_t readKey, const std::string type) const { + + // set up write handle + SG::WriteCondHandle<NswCalibDbTimeChargeData> writeHandle{m_writeKey_tdopdo, ctx}; + if (writeHandle.isValid()) { + ATH_MSG_DEBUG("CondHandle " << writeHandle.fullKey() << " is already valid." + << " In theory this should not be called, but may happen" + << " if multiple concurrent events are being processed out of order."); + return StatusCode::SUCCESS; + } + std::unique_ptr<NswCalibDbTimeChargeData> writeCdo{std::make_unique<NswCalibDbTimeChargeData>(m_idHelperSvc->mmIdHelper(), m_idHelperSvc->stgcIdHelper())}; + + // set up read handle + SG::ReadCondHandle<CondAttrListCollection> readHandle{readKey, ctx}; + const CondAttrListCollection* readCdo{*readHandle}; + if(readCdo==0){ + ATH_MSG_ERROR("Null pointer to the read conditions object"); + return StatusCode::FAILURE; + } + writeHandle.addDependency(readHandle); + ATH_MSG_DEBUG("Size of CondAttrListCollection " << readHandle.fullKey() << " readCdo->size()= " << readCdo->size()); + ATH_MSG_DEBUG("Range of input is " << readHandle.getRange() << ", range of output is " << writeHandle.getRange()); + + // iterate through data + CondAttrListCollection::const_iterator itr; + unsigned int nObjs = 0; + for(itr = readCdo->begin(); itr != readCdo->end(); ++itr) { + + // retrieve blob + const coral::AttributeList& atr = itr->second; + if(atr["data"].specification().type() != typeid(coral::Blob)) { + ATH_MSG_FATAL( "Data column is not of type blob!" ); + return StatusCode::FAILURE; + } + coral::Blob blob = atr["data"].data<coral::Blob>(); + TTree* tree = nullptr; + if(!CoralUtilities::readBlobAsTTree(blob, tree)) { + ATH_MSG_FATAL( "Cannot retrieve data from coral blob!" ); + return StatusCode::FAILURE; + } + + // parse tree + unsigned int elinkId; + unsigned int vmm; + unsigned int channel; + float slope; + float slopeError; + float intercept; + float interceptError; + float chi2; + float prob; + + tree->SetBranchAddress("vmm" , &vmm ); + tree->SetBranchAddress("channel" , &channel ); + tree->SetBranchAddress("elinkId" , &elinkId ); + tree->SetBranchAddress("slope" , &slope ); + tree->SetBranchAddress("slopeError" , &slopeError ); + tree->SetBranchAddress("intercept" , &intercept ); + tree->SetBranchAddress("interceptError", &interceptError); + tree->SetBranchAddress("chi2" , &chi2 ); + tree->SetBranchAddress("prob" , &prob ); + + // loop over channels + unsigned int nChns = 0; + for(unsigned int iEvt=0; iEvt<tree->GetEntries(); ++iEvt){ + tree->GetEntry(iEvt); + Identifier* channelId = nullptr; + if(!buildChannelId(channelId, elinkId, vmm, channel)){ + ATH_MSG_WARNING("Could not find valid channelId for elink "<<elinkId); + continue; + } + writeCdo->setData(type, channelId, slope, slopeError, intercept, interceptError); + ++nChns; + } + ATH_MSG_VERBOSE("Retrieved data for "<<nChns<<" channels."); + ++nObjs; + } + ATH_MSG_VERBOSE("Retrieved data for "<<nObjs<<" objects."); + + // insert/write data + if (writeHandle.record(std::move(writeCdo)).isFailure()) { + ATH_MSG_FATAL("Could not record NswCalibDbTimeChargeData " << writeHandle.key() + << " with EventRange " << writeHandle.getRange() + << " into Conditions Store"); + return StatusCode::FAILURE; + } + ATH_MSG_DEBUG("Recorded new " << writeHandle.key() << " with range " << writeHandle.getRange() << " into Conditions Store"); + + return StatusCode::SUCCESS; +} + + +// buildChannelId +bool +NswCalibDbAlg::buildChannelId(Identifier*& channelId, unsigned int elinkId, unsigned int vmm, unsigned int channel) const { + + // build NSWOfflineHelper + Muon::nsw::NSWResourceId* resId = new Muon::nsw::NSWResourceId((uint32_t) elinkId); + Muon::nsw::helper::NSWOfflineHelper helper(resId, vmm, channel); + + std::string stationName; + if(resId->detId () < eformat::MUON_STGC_ENDCAP_C_SIDE) + stationName = resId->is_large_station () ? "MML" : "MMS"; + else + stationName = resId->is_large_station () ? "STL" : "STS"; + + int8_t stationEta = resId->station_eta (); + uint8_t stationPhi = resId->station_phi (); + uint8_t multiLayer = resId->multi_layer (); + uint8_t gasGap = resId->gas_gap (); + + uint8_t channelType = helper.channel_type (); + uint16_t channelNumber = helper.channel_number(); + + /* keep for debugging + std::cout << "Station name=" << stationName + << " Station eta=" << static_cast <int> (stationEta) + << " Station phi=" << static_cast <unsigned int> (stationPhi) + << " Multilayer=" << static_cast <unsigned int> (multiLayer) + << " Gas gap=" << static_cast <unsigned int> (gasGap) + << " Channel type=" << static_cast <unsigned int> (channelType) + << " Channel Number=" << channelNumber << std::endl; + */ + + // MM + if(resId->detId () < eformat::MUON_STGC_ENDCAP_C_SIDE){ + Identifier chnlId = m_idHelperSvc->mmIdHelper().channelID(stationName, static_cast<int>(stationEta), static_cast<int>(stationPhi), static_cast<int>(multiLayer), static_cast<int>(gasGap), static_cast<int>(channelNumber)); + if(!chnlId.is_valid()){ + ATH_MSG_WARNING("Could not extract valid channelId for MM elink "<<elinkId); + return false; + } + channelId = &chnlId; + } + // sTGC + else{ + Identifier chnlId = m_idHelperSvc->stgcIdHelper().channelID(stationName, static_cast<int>(stationEta), static_cast<int>(stationPhi), static_cast<int>(multiLayer), static_cast<int>(gasGap), static_cast<int>(channelType), static_cast<int>(channelNumber)); + if(!chnlId.is_valid()){ + ATH_MSG_WARNING("Could not extract valid channelId for STGC elink "<<elinkId); + return false; + } + channelId = &chnlId; + } + + return true; +} + diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondAlg/src/components/MuonCondAlg_entries.cxx b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondAlg/src/components/MuonCondAlg_entries.cxx index c698b1ac83bb9a1adffd807d722d1eaf223a6899..93288bf7a146f5998d3e5c3ed68d794b9e5d927f 100644 --- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondAlg/src/components/MuonCondAlg_entries.cxx +++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondAlg/src/components/MuonCondAlg_entries.cxx @@ -7,6 +7,7 @@ #include "MuonCondAlg/RpcCondDbAlg.h" #include "MuonCondAlg/TgcCondDbAlg.h" #include "MuonCondAlg/TgcDigitASDposCondAlg.h" +#include "MuonCondAlg/NswCalibDbAlg.h" DECLARE_COMPONENT(CscCondDbAlg) DECLARE_COMPONENT(MdtCondDbAlg) @@ -17,3 +18,4 @@ DECLARE_COMPONENT(MuonAlignmentCondAlg) DECLARE_COMPONENT(MdtCalibDbAlg) DECLARE_COMPONENT(MdtCalibFormatAlgTest) DECLARE_COMPONENT(TgcDigitASDposCondAlg) +DECLARE_COMPONENT(NswCalibDbAlg) diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondData/MuonCondData/NswCalibDbThresholdData.h b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondData/MuonCondData/NswCalibDbThresholdData.h new file mode 100644 index 0000000000000000000000000000000000000000..3e029658f6fdf899344591fd1e6dd2ab558f23b3 --- /dev/null +++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondData/MuonCondData/NswCalibDbThresholdData.h @@ -0,0 +1,52 @@ +/* + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef MUONCONDDATA_NSWCALIBDBTHRESHOLDDATA_H +#define MUONCONDDATA_NSWCALIBDBTHRESHOLDDATA_H + +// STL includes +#include <vector> + +// Athena includes +#include "AthenaKernel/CondCont.h" +#include "AthenaKernel/BaseInfo.h" + +// Forward declarations +class Identifier; +class MmIdHelper; +class sTgcIdHelper; + + +class NswCalibDbThresholdData { + + friend class NswCalibDbAlg; + +public: + + NswCalibDbThresholdData(const MmIdHelper&, const sTgcIdHelper&); + virtual ~NswCalibDbThresholdData() = default; + + // setting functions + void setData(const Identifier*, const double); + + // retrieval functions + std::vector<Identifier> getChannelIds(const std::string="", const std::string="") const; + bool getThreshold (const Identifier* , double& ) const; + + +private: + + // containers + std::map<unsigned long long, std::vector<double> > m_data{}; + + // ID helpers + const MmIdHelper& m_mmIdHelper; + const sTgcIdHelper& m_stgcIdHelper; + +}; + +CLASS_DEF( NswCalibDbThresholdData , 108292495 , 1 ) +CLASS_DEF( CondCont<NswCalibDbThresholdData> , 169109811 , 1 ) + +#endif diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondData/MuonCondData/NswCalibDbTimeChargeData.h b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondData/MuonCondData/NswCalibDbTimeChargeData.h new file mode 100644 index 0000000000000000000000000000000000000000..eef06e712e2bfb70b3949ecd619b7f610cc6a20a --- /dev/null +++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondData/MuonCondData/NswCalibDbTimeChargeData.h @@ -0,0 +1,55 @@ +/* + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef MUONCONDDATA_NSWCALIBDBTIMECHARGEDATA_H +#define MUONCONDDATA_NSWCALIBDBTIMECHARGEDATA_H + +// STL includes +#include <vector> + +// Athena includes +#include "AthenaKernel/CondCont.h" +#include "AthenaKernel/BaseInfo.h" + +// Forward declarations +class Identifier; +class MmIdHelper; +class sTgcIdHelper; + + +class NswCalibDbTimeChargeData { + + friend class NswCalibDbAlg; + +public: + + NswCalibDbTimeChargeData(const MmIdHelper&, const sTgcIdHelper&); + virtual ~NswCalibDbTimeChargeData() = default; + + // setting functions + void setData (const std::string, const Identifier*, const double, const double, const double, const double); + + // retrieval functions + std::vector<Identifier> getChannelIds (const std::string, const std::string="", const std::string="") const; + bool getSlope (const std::string, const Identifier*, double&) const; + bool getSlopeError (const std::string, const Identifier*, double&) const; + bool getIntercept (const std::string, const Identifier*, double&) const; + bool getInterceptError(const std::string, const Identifier*, double&) const; + + +private: + + // containers + std::map<std::string, std::map<unsigned long long, std::vector<double> > > m_data{}; + + // ID helpers + const MmIdHelper& m_mmIdHelper; + const sTgcIdHelper& m_stgcIdHelper; + +}; + +CLASS_DEF( NswCalibDbTimeChargeData , 120842040 , 1 ) +CLASS_DEF( CondCont<NswCalibDbTimeChargeData> , 217895024 , 1 ) + +#endif diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondData/src/NswCalibDbThresholdData.cxx b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondData/src/NswCalibDbThresholdData.cxx new file mode 100644 index 0000000000000000000000000000000000000000..1ecbdf0af79a44a69775b655db52b1f8b5f16a9a --- /dev/null +++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondData/src/NswCalibDbThresholdData.cxx @@ -0,0 +1,69 @@ +/* + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration +*/ + +#include "MuonCondData/NswCalibDbThresholdData.h" +#include "MuonIdHelpers/MmIdHelper.h" +#include "MuonIdHelpers/sTgcIdHelper.h" +#include "Identifier/Identifier.h" + + +// general functions --------------------------------- +NswCalibDbThresholdData::NswCalibDbThresholdData(const MmIdHelper& mmIdHelper, const sTgcIdHelper& stgcIdHelper): + m_mmIdHelper(mmIdHelper), + m_stgcIdHelper(stgcIdHelper) +{ +} + + +// setting functions --------------------------------- + +// setData +void +NswCalibDbThresholdData::setData(const Identifier* chnlId, const double threshold) { + unsigned long long channelId = chnlId->get_compact(); + if(m_data.find(channelId) != m_data.end()) return; + std::vector<double> empty; // storing as vector is not optimal, but keep for now in case we'll add more data in the future + m_data[channelId] = empty; + m_data[channelId].push_back(threshold); +} + + + +// retrieval functions ------------------------------- + +// getChannelIds +std::vector<Identifier> +NswCalibDbThresholdData::getChannelIds(const std::string tech, const std::string side) const { + std::vector<Identifier> chnls; + std::vector<Identifier> keys; + std::map<unsigned long long, std::vector<double> >::const_iterator it; + for(it=m_data.begin(); it!=m_data.end(); it++){ + Identifier id(it->first); + keys.push_back(id); + } + if(tech=="" && side=="") return keys; + for(unsigned int i=0; i<keys.size(); ++i){ + int tec = m_mmIdHelper.technology(keys[i]); + int eta = m_mmIdHelper.stationEta(keys[i]); + if(strcmp(tech.c_str(), "STGC")==0 && tec!=4) continue; + if(strcmp(tech.c_str(), "MM" )==0 && tec!=5) continue; + if(strcmp(side.c_str(), "A" )==0 && eta<=0) continue; + if(strcmp(side.c_str(), "C" )==0 && eta>=0) continue; + chnls.push_back(keys[i]); + } + return chnls; +} + +// getThreshold +bool +NswCalibDbThresholdData::getThreshold(const Identifier* chnlId, double& threshold) const { + unsigned long long channelId = chnlId->get_compact(); + if(m_data.find(channelId) == m_data.end()) return false; + if(m_data.at(channelId).size() != 1 ) return false; + threshold = m_data.at(channelId).at(0); + return true; +} + + + diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondData/src/NswCalibDbTimeChargeData.cxx b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondData/src/NswCalibDbTimeChargeData.cxx new file mode 100644 index 0000000000000000000000000000000000000000..6233f39ddb471828d5dbc6bc5e0433ab479f0a03 --- /dev/null +++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondData/src/NswCalibDbTimeChargeData.cxx @@ -0,0 +1,116 @@ +/* + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration +*/ + +#include "MuonCondData/NswCalibDbTimeChargeData.h" +#include "MuonIdHelpers/IMuonIdHelperSvc.h" +#include "Identifier/Identifier.h" + + +// general functions --------------------------------- +NswCalibDbTimeChargeData::NswCalibDbTimeChargeData(const MmIdHelper& mmIdHelper, const sTgcIdHelper& stgcIdHelper): + m_mmIdHelper(mmIdHelper), + m_stgcIdHelper(stgcIdHelper) +{ +} + + +// setting functions --------------------------------- + +// setData +void +NswCalibDbTimeChargeData::setData(const std::string type, const Identifier* chnlId, const double slope, const double slopeError, const double intercept, const double interceptError) { + if(type!="TDO" && type!="PDO") return; + if(m_data.find(type) == m_data.end()){ + std::map<unsigned long long, std::vector<double> > empty; + m_data[type] = empty; + } + unsigned long long channelId = chnlId->get_compact(); + if(m_data[type].find(channelId) != m_data[type].end()) return; + std::vector<double> empty; + m_data[type][channelId] = empty; + m_data[type][channelId].push_back(slope ); + m_data[type][channelId].push_back(slopeError ); + m_data[type][channelId].push_back(intercept ); + m_data[type][channelId].push_back(interceptError); +} + + + +// retrieval functions ------------------------------- + +// getChannelIds +std::vector<Identifier> +NswCalibDbTimeChargeData::getChannelIds(const std::string type, const std::string tech, const std::string side) const { + std::vector<Identifier> chnls; + if(type!="TDO" && type!="PDO") return chnls; + if(m_data.find(type) == m_data.end()) return chnls; + std::vector<Identifier> keys; + std::map<unsigned long long, std::vector<double> >::const_iterator it; + for(it=m_data.at(type).begin(); it!=m_data.at(type).end(); it++){ + Identifier id(it->first); + keys.push_back(id); + } + if(tech=="" && side=="") return keys; + for(unsigned int i=0; i<keys.size(); ++i){ + int tec = m_mmIdHelper.technology(keys[i]); + int eta = m_mmIdHelper.stationEta(keys[i]); + if(strcmp(tech.c_str(), "STGC")==0 && tec!=4) continue; + if(strcmp(tech.c_str(), "MM" )==0 && tec!=5) continue; + if(strcmp(side.c_str(), "A" )==0 && eta<=0) continue; + if(strcmp(side.c_str(), "C" )==0 && eta>=0) continue; + chnls.push_back(keys[i]); + } + return chnls; +} + +// getSlope +bool +NswCalibDbTimeChargeData::getSlope(const std::string type, const Identifier* chnlId, double& slope) const { + if(type!="TDO" && type!="PDO") return false; + if(m_data.find(type) == m_data.end()) return false; + unsigned long long channelId = chnlId->get_compact(); + if(m_data.at(type).find(channelId) == m_data.at(type).end()) return false; + if(m_data.at(type).at(channelId).size() != 4 ) return false; + slope = m_data.at(type).at(channelId).at(0); + return true; +} + +// getSlopeError +bool +NswCalibDbTimeChargeData::getSlopeError(const std::string type, const Identifier* chnlId, double& slopeError) const { + if(type!="TDO" && type!="PDO") return false; + if(m_data.find(type) == m_data.end()) return false; + unsigned long long channelId = chnlId->get_compact(); + if(m_data.at(type).find(channelId) == m_data.at(type).end()) return false; + if(m_data.at(type).at(channelId).size() != 4 ) return false; + slopeError = m_data.at(type).at(channelId).at(1); + return true; +} + +// getIntercept +bool +NswCalibDbTimeChargeData::getIntercept(const std::string type, const Identifier* chnlId, double& intercept) const { + if(type!="TDO" && type!="PDO") return false; + if(m_data.find(type) == m_data.end()) return false; + unsigned long long channelId = chnlId->get_compact(); + if(m_data.at(type).find(channelId) == m_data.at(type).end()) return false; + if(m_data.at(type).at(channelId).size() != 4 ) return false; + intercept = m_data.at(type).at(channelId).at(2); + return true; +} + +// getInterceptError +bool +NswCalibDbTimeChargeData::getInterceptError(const std::string type, const Identifier* chnlId, double& interceptError) const { + if(type!="TDO" && type!="PDO") return false; + if(m_data.find(type) == m_data.end()) return false; + unsigned long long channelId = chnlId->get_compact(); + if(m_data.at(type).find(channelId) == m_data.at(type).end()) return false; + if(m_data.at(type).at(channelId).size() != 4 ) return false; + interceptError = m_data.at(type).at(channelId).at(3); + return true; +} + + + diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTest/CMakeLists.txt b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTest/CMakeLists.txt index 31522128c83a162ca485c65654b8a179a737bcd0..ddb8d954095c749e72ffafbdb193bedf1f47f0c2 100644 --- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTest/CMakeLists.txt +++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTest/CMakeLists.txt @@ -12,7 +12,7 @@ find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread ) atlas_add_component( MuonCondTest src/*.cxx INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaBaseComps GaudiKernel MuonCondInterface MuonCondSvcLib MuonReadoutGeometry Identifier ) + LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaBaseComps GaudiKernel MuonCondInterface MuonCondData MuonCondSvcLib CoralUtilitiesLib MuonReadoutGeometry Identifier ) # Install files from the package: atlas_install_headers( MuonCondTest ) diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTest/MuonCondTest/NswCondTestAlg.h b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTest/MuonCondTest/NswCondTestAlg.h new file mode 100644 index 0000000000000000000000000000000000000000..a0cf2b006df59eb0a27f28319411332c847a14ea --- /dev/null +++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTest/MuonCondTest/NswCondTestAlg.h @@ -0,0 +1,46 @@ +/* + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef NswCondTestAlg_H +#define NswCondTestAlg_H + +//STL +#include <string> +#include <chrono> + +//Athena +#include "GaudiKernel/ServiceHandle.h" +#include "AthenaBaseComps/AthReentrantAlgorithm.h" +#include "StoreGate/ReadCondHandleKey.h" +#include "MuonCondData/NswCalibDbTimeChargeData.h" +#include "MuonCondData/NswCalibDbThresholdData.h" + + +//Forward declarations +class ISvcLocator; +class StatusCode; + + +class NswCondTestAlg : public AthReentrantAlgorithm { + +public: + NswCondTestAlg(const std::string &name, ISvcLocator *pSvcLocator) ; + virtual ~NswCondTestAlg() override; + + virtual StatusCode initialize() override; + virtual StatusCode execute(const EventContext&) const override; + virtual StatusCode finalize() override; + +private: + StatusCode retrieveTdoPdo(const EventContext&, std::string, std::string, std::string, std::chrono::duration<double>&) const; + StatusCode retrieveVmm(const EventContext&, std::string, std::string, std::chrono::duration<double>&) const; + std::string timestamp() const; + + SG::ReadCondHandleKey<NswCalibDbTimeChargeData> m_readKey_tdopdo{this, "ReadKey_tdopdo", "NswCalibDbTimeChargeData", "Key of NswCalibDbTimeChargeData object containing calibration data (TDOs and PDOs)" }; + SG::ReadCondHandleKey<NswCalibDbThresholdData > m_readKey_vmm {this, "ReadKey_vmm" , "NswCalibDbThresholdData" , "Key of NswCalibDbThresholdData object containing calibration data (VMM thresholds)" }; + + +}; //end of class + +#endif diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTest/share/NswCondAlgTest.py b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTest/share/NswCondAlgTest.py new file mode 100644 index 0000000000000000000000000000000000000000..5f931155364c4bd2281320d2a83363a50c65198d --- /dev/null +++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTest/share/NswCondAlgTest.py @@ -0,0 +1,153 @@ +# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration + +run = "datatest" ## "mc" or "dataR1" or "dataR2" + +from AthenaCommon.GlobalFlags import GlobalFlags, globalflags +if run == "datatest": + globalflags.DetGeo.set_Value_and_Lock('atlas') + globalflags.DataSource.set_Value_and_Lock('data') + #globalflags.DatabaseInstance.set_Value_and_Lock("OFLP200") + globalflags.DatabaseInstance.set_Value_and_Lock("CONDBR2") + +from AthenaCommon.JobProperties import jobproperties + +# GeoModel is needed to make a test build of the volumes - in case of bugs it crashes +include("MuonGeoModel/MuonGeoModel_MinimalSetup.py") +# after the above include, GeoModelSvc should be setup, now use a recent layout to start from +GeoModelSvc.AtlasVersion='ATLAS-R3S-2021-01-00-02' +# since we have chosen a symmetric NSW layout and we execute this jobOptions file outside of a +# standard job transform, set the MuonDetectorTool and DetDescrCnvSvc properties by hand +GeoModelSvc.DetectorTools[ "MuonDetectorTool" ].HasCSC = False +GeoModelSvc.DetectorTools[ "MuonDetectorTool" ].HasSTgc = True +GeoModelSvc.DetectorTools[ "MuonDetectorTool" ].HasMM = True +if hasattr(svcMgr,'DetDescrCnvSvc'): + svcMgr.DetDescrCnvSvc.HasCSC=False + svcMgr.DetDescrCnvSvc.HasSTgc=True + svcMgr.DetDescrCnvSvc.HasMM=True + + +#-------------------------------------------------------------- +# Setup Athena +#-------------------------------------------------------------- + +from AthenaCommon.AppMgr import ToolSvc +from AthenaCommon.AlgSequence import AlgSequence +import AthenaCommon.AtlasUnixStandardJob + +from AthenaCommon.AppMgr import ServiceMgr,athCondSeq +import AthenaPoolCnvSvc.ReadAthenaPool +ServiceMgr.EventSelector.InputCollections = ["/afs/cern.ch/work/c/cheidegg/ec/AthenaDev/test.HITS.pool.root"] + +# use auditors +from GaudiCommonSvc.GaudiCommonSvcConf import AuditorSvc + +ServiceMgr += AuditorSvc() +theAuditorSvc = ServiceMgr.AuditorSvc +theAuditorSvc.Auditors += [ "ChronoAuditor"] +theAuditorSvc.Auditors += [ "MemStatAuditor" ] +theApp.AuditAlgorithms=True + +from AthenaCommon.AlgSequence import AlgSequence + +job = AlgSequence() + + + + +##-------------------------------------------------------------- +## Data Base Services +##-------------------------------------------------------------- + +from AthenaCommon.AlgSequence import AthSequencer + +condSequence = AthSequencer("AthCondSeq") + +# Conditions Service for reading conditions data in serial and MT Athena +from IOVSvc.IOVSvcConf import CondSvc +svcMgr += CondSvc() + +# Conditions data access infrastructure for serial and MT Athena +from IOVSvc.IOVSvcConf import CondInputLoader +condSequence += CondInputLoader( "CondInputLoader") + +import StoreGate.StoreGateConf as StoreGateConf +svcMgr += StoreGateConf.StoreGateSvc("ConditionStore") + +from IOVDbSvc.CondDB import conddb + + +if run=="datatest": + print("fooooooo") + svcMgr.IOVDbSvc.DBInstance="CONDBR2" + print(svcMgr.IOVDbSvc.DBInstance) + + #conddb.addFolderWithTag("", "<dbConnection>oracle://INT8R;schema=ATLAS_COOLOFL_MDT;dbname=CONDBR2;user=ATLAS_COOLOFL_MDT_W;password=do5cM5Gmcfl0BbdKo3Myz_jAd04z</dbConnection>/MDT/MM/TIME/SIDEA" , "MmTdoSideA-Rnd-TEST",className='CondAttrListCollection') + #conddb.addFolderWithTag("", "<dbConnection>oracle://INT8R;schema=ATLAS_COOLOFL_MDT;dbname=CONDBR2;user=ATLAS_COOLOFL_MDT_W;password=do5cM5Gmcfl0BbdKo3Myz_jAd04z</dbConnection>/MDT/MM/TIME/SIDEC" , "MmTdoSideC-Rnd-TEST",className='CondAttrListCollection') + #conddb.addFolderWithTag("", "<dbConnection>oracle://INT8R;schema=ATLAS_COOLOFL_MDT;dbname=CONDBR2;user=ATLAS_COOLOFL_MDT_W;password=do5cM5Gmcfl0BbdKo3Myz_jAd04z</dbConnection>/MDT/MM/CHARGE/SIDEA" , "MmPdoSideA-Rnd-TEST",className='CondAttrListCollection') + #conddb.addFolderWithTag("", "<dbConnection>oracle://INT8R;schema=ATLAS_COOLOFL_MDT;dbname=CONDBR2;user=ATLAS_COOLOFL_MDT_W;password=do5cM5Gmcfl0BbdKo3Myz_jAd04z</dbConnection>/MDT/MM/CHARGE/SIDEC" , "MmPdoSideC-Rnd-TEST",className='CondAttrListCollection') + #conddb.addFolderWithTag("", "<dbConnection>oracle://INT8R;schema=ATLAS_COOLOFL_MDT;dbname=CONDBR2;user=ATLAS_COOLOFL_MDT_W;password=do5cM5Gmcfl0BbdKo3Myz_jAd04z</dbConnection>/MDT/MM/VMM/SIDEA" , "MmVmmSideA-Rnd-TEST",className='CondAttrListCollection') + #conddb.addFolderWithTag("", "<dbConnection>oracle://INT8R;schema=ATLAS_COOLOFL_MDT;dbname=CONDBR2;user=ATLAS_COOLOFL_MDT_W;password=do5cM5Gmcfl0BbdKo3Myz_jAd04z</dbConnection>/MDT/MM/VMM/SIDEC" , "MmVmmSideC-Rnd-TEST",className='CondAttrListCollection') + + #conddb.addFolderWithTag("", "<dbConnection>oracle://INT8R;schema=ATLAS_COOLOFL_TGC;dbname=CONDBR2;user=ATLAS_COOLOFL_TGC_W;password=do5cM5Gmcfl0BbdKo3Myz_jAd04z</dbConnection>/TGC/NSW/TIME/SIDEA" , "sTgcTdoSideA-Rnd-TEST",className='CondAttrListCollection') + #conddb.addFolderWithTag("", "<dbConnection>oracle://INT8R;schema=ATLAS_COOLOFL_TGC;dbname=CONDBR2;user=ATLAS_COOLOFL_TGC_W;password=do5cM5Gmcfl0BbdKo3Myz_jAd04z</dbConnection>/TGC/NSW/TIME/SIDEC" , "sTgcTdoSideC-Rnd-TEST",className='CondAttrListCollection') + #conddb.addFolderWithTag("", "<dbConnection>oracle://INT8R;schema=ATLAS_COOLOFL_TGC;dbname=CONDBR2;user=ATLAS_COOLOFL_TGC_W;password=do5cM5Gmcfl0BbdKo3Myz_jAd04z</dbConnection>/TGC/NSW/CHARGE/SIDEA", "sTgcPdoSideA-Rnd-TEST",className='CondAttrListCollection') + #conddb.addFolderWithTag("", "<dbConnection>oracle://INT8R;schema=ATLAS_COOLOFL_TGC;dbname=CONDBR2;user=ATLAS_COOLOFL_TGC_W;password=do5cM5Gmcfl0BbdKo3Myz_jAd04z</dbConnection>/TGC/NSW/CHARGE/SIDEC", "sTgcPdoSideC-Rnd-TEST",className='CondAttrListCollection') + #conddb.addFolderWithTag("", "<dbConnection>oracle://INT8R;schema=ATLAS_COOLOFL_TGC;dbname=CONDBR2;user=ATLAS_COOLOFL_TGC_W;password=do5cM5Gmcfl0BbdKo3Myz_jAd04z</dbConnection>/TGC/NSW/VMM/SIDEA" , "sTgcVmmSideA-Rnd-TEST",className='CondAttrListCollection') + #conddb.addFolderWithTag("", "<dbConnection>oracle://INT8R;schema=ATLAS_COOLOFL_TGC;dbname=CONDBR2;user=ATLAS_COOLOFL_TGC_W;password=do5cM5Gmcfl0BbdKo3Myz_jAd04z</dbConnection>/TGC/NSW/VMM/SIDEC" , "sTgcVmmSideC-Rnd-TEST",className='CondAttrListCollection') + + conddb.addFolderWithTag("MDT_OFL", "/MDT/MM/TIME/SIDEA" , "MmTdoSideA-Rnd-TEST" , forceData=True, className='CondAttrListCollection'); + conddb.addFolderWithTag("MDT_OFL", "/MDT/MM/TIME/SIDEC" , "MmTdoSideC-Rnd-TEST" , forceData=True, className='CondAttrListCollection'); + conddb.addFolderWithTag("MDT_OFL", "/MDT/MM/CHARGE/SIDEA" , "MmPdoSideA-Rnd-TEST" , forceData=True, className='CondAttrListCollection'); + conddb.addFolderWithTag("MDT_OFL", "/MDT/MM/CHARGE/SIDEC" , "MmPdoSideC-Rnd-TEST" , forceData=True, className='CondAttrListCollection'); + conddb.addFolderWithTag("MDT_OFL", "/MDT/MM/VMM/SIDEA" , "MmVmmSideA-Rnd-TEST" , forceData=True, className='CondAttrListCollection'); + conddb.addFolderWithTag("MDT_OFL", "/MDT/MM/VMM/SIDEC" , "MmVmmSideC-Rnd-TEST" , forceData=True, className='CondAttrListCollection'); + conddb.addFolderWithTag("TGC_OFL", "/TGC/NSW/TIME/SIDEA" , "sTgcTdoSideA-Rnd-TEST", forceData=True, className='CondAttrListCollection'); + conddb.addFolderWithTag("TGC_OFL", "/TGC/NSW/TIME/SIDEC" , "sTgcTdoSideC-Rnd-TEST", forceData=True, className='CondAttrListCollection'); + conddb.addFolderWithTag("TGC_OFL", "/TGC/NSW/CHARGE/SIDEA", "sTgcPdoSideA-Rnd-TEST", forceData=True, className='CondAttrListCollection'); + conddb.addFolderWithTag("TGC_OFL", "/TGC/NSW/CHARGE/SIDEC", "sTgcPdoSideC-Rnd-TEST", forceData=True, className='CondAttrListCollection'); + conddb.addFolderWithTag("TGC_OFL", "/TGC/NSW/VMM/SIDEA" , "sTgcPdoSideA-Rnd-TEST", forceData=True, className='CondAttrListCollection'); + conddb.addFolderWithTag("TGC_OFL", "/TGC/NSW/VMM/SIDEC" , "sTgcPdoSideC-Rnd-TEST", forceData=True, className='CondAttrListCollection'); + + + + + +##-------------------------------------------------------------- +## NEW Data Base Algorithms +##-------------------------------------------------------------- + +from MuonCondAlg.MuonCondAlgConf import NswCalibDbAlg +alg = NswCalibDbAlg("NswCalibDbAlg") +alg.OutputLevel = VERBOSE +alg.isOnline = False +alg.isData = True + +if "mc" in run: + alg.isData = False + +condSequence += alg + + + +##-------------------------------------------------------------- +## NEW Test Algorithm +##-------------------------------------------------------------- +from MuonCondTest.MuonCondTestConf import NswCondTestAlg +job += NswCondTestAlg() + + + +##-------------------------------------------------------------- +## General Stuff +##-------------------------------------------------------------- +import AthenaCommon.AtlasUnixGeneratorJob + +ServiceMgr.EventSelector.RunNumber = 138460 #1204110576 seconds epoch +import time, calendar +#time in seconds , now +ServiceMgr.EventSelector.InitialTimeStamp = calendar.timegm(time.gmtime()) +#ServiceMgr.EventSelector.InitialTimeStamp = 594682#found valid in db browser? +theApp.EvtMax = 2 + +ServiceMgr.MessageSvc.Format = "% F%40W%S%7W%R%T %0W%M" +ServiceMgr.MessageSvc.OutputLevel = VERBOSE diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTest/src/MuonCondTest_entries.cxx b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTest/src/MuonCondTest_entries.cxx index d997e466a17d7bb11bf5a187f9c0316f20b05713..daaa97d03ffde491f45d75f966ebe9f86e6e17d4 100644 --- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTest/src/MuonCondTest_entries.cxx +++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTest/src/MuonCondTest_entries.cxx @@ -8,6 +8,7 @@ #include "MuonCondTest/CSCConditionsTestAlgMT.h" #include "MuonCondTest/RPCStatusTestAlg.h" #include "MuonCondTest/MuonConditionsHistoSummary.h" +#include "MuonCondTest/NswCondTestAlg.h" DECLARE_COMPONENT( AlignCondAthTest ) DECLARE_COMPONENT( MuonConditionsTestAlg ) @@ -16,3 +17,4 @@ DECLARE_COMPONENT( MDTConditionsTestAlgMT ) DECLARE_COMPONENT( CSCConditionsTestAlgMT ) DECLARE_COMPONENT( RPCStatusTestAlg ) DECLARE_COMPONENT( MuonConditionsHistoSummary ) +DECLARE_COMPONENT( NswCondTestAlg ) diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTest/src/NswCondTestAlg.cxx b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTest/src/NswCondTestAlg.cxx new file mode 100644 index 0000000000000000000000000000000000000000..3f43d95d1cf6b5a9b52a29999eee5eca4032fb80 --- /dev/null +++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTest/src/NswCondTestAlg.cxx @@ -0,0 +1,212 @@ +/* + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration +*/ + +#include "MuonCondTest/NswCondTestAlg.h" + +//STL +#include <stdio.h> +#include <iostream> +#include <ctime> +#include <sstream> +#include "vector" +#include <boost/date_time/posix_time/posix_time.hpp> + +//Gaudi and Athena +#include "GaudiKernel/StatusCode.h" +#include "AthenaKernel/IOVInfiniteRange.h" +#include "CoralBase/Blob.h" +#include "CoralUtilities/blobaccess.h" +#include "Identifier/Identifier.h" + + +// constructor +NswCondTestAlg::NswCondTestAlg(const std::string& name, ISvcLocator* pSvcLocator ) : + AthReentrantAlgorithm( name, pSvcLocator ){ +} + +// destructor +NswCondTestAlg::~NswCondTestAlg(){ + ATH_MSG_VERBOSE( "Calling destructor" ); +} + +// initialize +StatusCode +NswCondTestAlg::initialize(){ + ATH_MSG_INFO("Calling initialize"); + ATH_CHECK(m_readKey_tdopdo.initialize()); + ATH_CHECK(m_readKey_vmm .initialize()); + return StatusCode::SUCCESS; +} + +// execute +StatusCode +NswCondTestAlg::execute(const EventContext& ctx) const { + ATH_MSG_INFO("Calling execute"); + + // setup parameters + std::chrono::duration<double> retrieving_MM_TDO_A; + std::chrono::duration<double> retrieving_MM_TDO_C; + std::chrono::duration<double> retrieving_MM_PDO_A; + std::chrono::duration<double> retrieving_MM_PDO_C; + std::chrono::duration<double> retrieving_MM_VMM_A; + std::chrono::duration<double> retrieving_MM_VMM_C; + std::chrono::duration<double> retrieving_STGC_TDO_A; + std::chrono::duration<double> retrieving_STGC_TDO_C; + std::chrono::duration<double> retrieving_STGC_PDO_A; + std::chrono::duration<double> retrieving_STGC_PDO_C; + std::chrono::duration<double> retrieving_STGC_VMM_A; + std::chrono::duration<double> retrieving_STGC_VMM_C; + + // retrieve all folders + if(!retrieveTdoPdo(ctx, "TDO", "MM" , "A", retrieving_MM_TDO_A ).isSuccess()) return StatusCode::FAILURE; + if(!retrieveTdoPdo(ctx, "TDO", "MM" , "C", retrieving_MM_TDO_C ).isSuccess()) return StatusCode::FAILURE; + if(!retrieveTdoPdo(ctx, "PDO", "MM" , "A", retrieving_MM_PDO_A ).isSuccess()) return StatusCode::FAILURE; + if(!retrieveTdoPdo(ctx, "PDO", "MM" , "C", retrieving_MM_PDO_C ).isSuccess()) return StatusCode::FAILURE; + if(!retrieveVmm (ctx, "MM" , "A", retrieving_MM_VMM_A ).isSuccess()) return StatusCode::FAILURE; + if(!retrieveVmm (ctx, "MM" , "C", retrieving_MM_VMM_C ).isSuccess()) return StatusCode::FAILURE; + if(!retrieveTdoPdo(ctx, "TDO", "STGC", "A", retrieving_STGC_TDO_A).isSuccess()) return StatusCode::FAILURE; + if(!retrieveTdoPdo(ctx, "TDO", "STGC", "C", retrieving_STGC_TDO_C).isSuccess()) return StatusCode::FAILURE; + if(!retrieveTdoPdo(ctx, "PDO", "STGC", "A", retrieving_STGC_PDO_A).isSuccess()) return StatusCode::FAILURE; + if(!retrieveTdoPdo(ctx, "PDO", "STGC", "C", retrieving_STGC_PDO_C).isSuccess()) return StatusCode::FAILURE; + if(!retrieveVmm (ctx, "STGC", "A", retrieving_STGC_VMM_A).isSuccess()) return StatusCode::FAILURE; + if(!retrieveVmm (ctx, "STGC", "C", retrieving_STGC_VMM_C).isSuccess()) return StatusCode::FAILURE; + + // postprocess + ATH_MSG_INFO("Retrieving time for (MM , TDO, Side A) = " << (std::chrono::duration_cast<std::chrono::microseconds>(retrieving_MM_TDO_A ).count()*1.0) << "s "); + ATH_MSG_INFO("Retrieving time for (MM , TDO, Side C) = " << (std::chrono::duration_cast<std::chrono::microseconds>(retrieving_MM_TDO_C ).count()*1.0) << "s "); + ATH_MSG_INFO("Retrieving time for (MM , PDO, Side A) = " << (std::chrono::duration_cast<std::chrono::microseconds>(retrieving_MM_PDO_A ).count()*1.0) << "s "); + ATH_MSG_INFO("Retrieving time for (MM , PDO, Side C) = " << (std::chrono::duration_cast<std::chrono::microseconds>(retrieving_MM_PDO_C ).count()*1.0) << "s "); + ATH_MSG_INFO("Retrieving time for (MM , VMM, Side A) = " << (std::chrono::duration_cast<std::chrono::microseconds>(retrieving_MM_VMM_A ).count()*1.0) << "s "); + ATH_MSG_INFO("Retrieving time for (MM , VMM, Side C) = " << (std::chrono::duration_cast<std::chrono::microseconds>(retrieving_MM_VMM_C ).count()*1.0) << "s "); + ATH_MSG_INFO("Retrieving time for (STGC, TDO, Side A) = " << (std::chrono::duration_cast<std::chrono::microseconds>(retrieving_STGC_TDO_A).count()*1.0) << "s "); + ATH_MSG_INFO("Retrieving time for (STGC, TDO, Side C) = " << (std::chrono::duration_cast<std::chrono::microseconds>(retrieving_STGC_TDO_C).count()*1.0) << "s "); + ATH_MSG_INFO("Retrieving time for (STGC, PDO, Side A) = " << (std::chrono::duration_cast<std::chrono::microseconds>(retrieving_STGC_PDO_A).count()*1.0) << "s "); + ATH_MSG_INFO("Retrieving time for (STGC, PDO, Side C) = " << (std::chrono::duration_cast<std::chrono::microseconds>(retrieving_STGC_PDO_C).count()*1.0) << "s "); + ATH_MSG_INFO("Retrieving time for (STGC, VMM, Side A) = " << (std::chrono::duration_cast<std::chrono::microseconds>(retrieving_STGC_VMM_A).count()*1.0) << "s "); + ATH_MSG_INFO("Retrieving time for (STGC, VMM, Side C) = " << (std::chrono::duration_cast<std::chrono::microseconds>(retrieving_STGC_VMM_C).count()*1.0) << "s "); + + ATH_MSG_INFO("MADE IT TO THE END!!"); + return StatusCode::SUCCESS; +} + +// finalize +StatusCode +NswCondTestAlg::finalize(){ + ATH_MSG_INFO("Calling finalize"); + return StatusCode::SUCCESS; +} + + +// retrieveTdoPdo +StatusCode +NswCondTestAlg::retrieveTdoPdo(const EventContext& ctx, std::string data, std::string tech, std::string side, std::chrono::duration<double>& timer) const { + + ATH_MSG_INFO("Starting with "<<data<<" data for "<<tech<<" and "<<side<<" at "<<timestamp()); + auto start1 = std::chrono::high_resolution_clock::now(); + + // Start with an infinte range and narrow it down as needed + EventIDRange rangeW = IOVInfiniteRange::infiniteMixed(); + + // Retrieve Data Object + SG::ReadCondHandle<NswCalibDbTimeChargeData> readHandle{m_readKey_tdopdo, ctx}; + const NswCalibDbTimeChargeData* readCdo{*readHandle}; +// std::unique_ptr<NswCalibDbTimeChargeData> writeCdo{std::make_unique<NswCalibDbTimeChargeData>(m_idHelperSvc->mmIdHelper())}; + if(readCdo==0){ + ATH_MSG_ERROR("Null pointer to the read conditions object"); + return StatusCode::FAILURE; + } + + EventIDRange range; + if(!readHandle.range(range)) { + ATH_MSG_ERROR("Failed to retrieve validity range for " << readHandle.key()); + return StatusCode::FAILURE; + } + + // Intersect validity range of this obj with the validity of already-loaded objs + rangeW = EventIDRange::intersect(range, rangeW); + + // retrieve all channels + std::vector<Identifier> channelIds = readCdo->getChannelIds(data, tech, side); + ATH_MSG_INFO("Found data for "<<channelIds.size()<<" channels!"); + + // retrieve data for the first channel + if(channelIds.size()>0){ + Identifier channel = channelIds[0]; + ATH_MSG_INFO("Checking channel 0 (Id = "<<channel.get_compact()<<")"); + + double slope; readCdo->getSlope (data, &channel, slope); + double error; readCdo->getSlopeError(data, &channel, error); + ATH_MSG_INFO("slope = "<<slope<<" (error="<<error<<")"); + + double intercept; readCdo->getIntercept (data, &channel, intercept); + double interror ; readCdo->getInterceptError(data, &channel, interror ); + ATH_MSG_INFO("intercept = "<<intercept<<" (error="<<interror<<")"); + } + + auto end1 = std::chrono::high_resolution_clock::now(); + timer += end1-start1; + ATH_MSG_INFO("Ending at "<<timestamp()); + return StatusCode::SUCCESS; +} + +// retrieveVmm +StatusCode +NswCondTestAlg::retrieveVmm(const EventContext& ctx, std::string tech, std::string side, std::chrono::duration<double>& timer) const { + + ATH_MSG_INFO("Starting with VMM data for "<<tech<<" and "<<side<<" at "<<timestamp()); + auto start1 = std::chrono::high_resolution_clock::now(); + + // Start with an infinte range and narrow it down as needed + EventIDRange rangeW = IOVInfiniteRange::infiniteMixed(); + + // Retrieve Data Object + SG::ReadCondHandle<NswCalibDbThresholdData> readHandle{m_readKey_vmm, ctx}; + const NswCalibDbThresholdData* readCdo{*readHandle}; + if(readCdo==0){ + ATH_MSG_ERROR("Null pointer to the read conditions object"); + return StatusCode::FAILURE; + } + + EventIDRange range; + if(!readHandle.range(range)) { + ATH_MSG_ERROR("Failed to retrieve validity range for " << readHandle.key()); + return StatusCode::FAILURE; + } + + // Intersect validity range of this obj with the validity of already-loaded objs + rangeW = EventIDRange::intersect(range, rangeW); + + // retrieve all channels + std::vector<Identifier> channelIds = readCdo->getChannelIds(tech, side); + ATH_MSG_INFO("Found data for "<<channelIds.size()<<" channels!"); + + // retrieve data for the first channel + if(channelIds.size()>0){ + Identifier channel = channelIds[0]; + ATH_MSG_INFO("Checking channel 0 (Id = "<<channel.get_compact()<<")"); + + double threshold; readCdo->getThreshold(&channel, threshold); + ATH_MSG_INFO("threshold = "<<threshold); + } + + auto end1 = std::chrono::high_resolution_clock::now(); + timer += end1-start1; + ATH_MSG_INFO("Ending at "<<timestamp()); + return StatusCode::SUCCESS; +} + +std::string +NswCondTestAlg::timestamp() const { + const boost::posix_time::ptime now = boost::posix_time::microsec_clock::local_time(); + const boost::posix_time::time_duration td = now.time_of_day(); + const long hours = td.hours(); + const long minutes = td.minutes(); + const long seconds = td.seconds(); + const long milliseconds = td.total_milliseconds() - ((hours * 3600 + minutes * 60 + seconds) * 1000); + char buf[40]; + sprintf(buf, "%02ld:%02ld:%02ld.%03ld", hours, minutes, seconds, milliseconds); + return buf; +} + + diff --git a/MuonSpectrometer/MuonConfig/python/MuonCondAlgConfig.py b/MuonSpectrometer/MuonConfig/python/MuonCondAlgConfig.py index 2ca1f30d06c0b69ef8b9fdb2b8dae384fe43c0db..b957a73db9352497bf4223dafbeb2d9677e4f14e 100644 --- a/MuonSpectrometer/MuonConfig/python/MuonCondAlgConfig.py +++ b/MuonSpectrometer/MuonConfig/python/MuonCondAlgConfig.py @@ -154,3 +154,27 @@ def TgcDigitASDposCondAlgCfg(flags): result.addCondAlgo(CompFactory.TgcDigitASDposCondAlg()) result.merge(addFolders(flags, ["/TGC/DIGIT/ASDPOS"] , detDb="TGC_OFL", className="CondAttrListCollection")) return result + +def NswCalibDbAlgCfg(flags, **kwargs): + result = ComponentAccumulator() + if flags.Common.isOnline: + return result ## avoid adding algo to the component accumulator + if flags.Input.isMC: + kwargs['isData' ] = False + kwargs['isOnline'] = False + else: + kwargs['isData' ] = True + kwargs['isOnline'] = True if flags.Common.isOnline else False + folders = ["/MDT/MM/TIME/SIDEA" , "/MDT/MM/CHARGE/SIDEA" , "/MDT/MM/VMM/SIDEA" , \ + "/MDT/MM/TIME/SIDEC" , "/MDT/MM/CHARGE/SIDEC" , "/MDT/MM/VMM/SIDEC" ] + scheme = "MDT_OFL" + result.merge( addFolders(flags, folders , detDb=scheme, className='CondAttrListCollection') ) + folders = ["/TGC/NSW/TIME/SIDEA", "/TGC/NSW/CHARGE/SIDEA", "/TGC/NSW/VMM/SIDEA", \ + "/TGC/NSW/TIME/SIDEC", "/TGC/NSW/CHARGE/SIDEC", "/TGC/NSW/VMM/SIDEC"] + scheme = "TGC_OFL" + result.merge( addFolders(flags, folders , detDb=scheme, className='CondAttrListCollection') ) + alg = CompFactory.NswCalibDbAlg(**kwargs) + result.addCondAlgo(alg) + return result + + diff --git a/MuonSpectrometer/MuonDigitization/sTGC_Digitization/sTGC_Digitization/sTgcDigitMaker.h b/MuonSpectrometer/MuonDigitization/sTGC_Digitization/sTGC_Digitization/sTgcDigitMaker.h index 186509f54164c41c66954bb669a994d6ba16a162..5db0f2ace53d2377e2959f7a8cf3f635145254c6 100644 --- a/MuonSpectrometer/MuonDigitization/sTGC_Digitization/sTGC_Digitization/sTgcDigitMaker.h +++ b/MuonSpectrometer/MuonDigitization/sTGC_Digitization/sTGC_Digitization/sTgcDigitMaker.h @@ -83,7 +83,6 @@ class sTgcDigitMaker : public AthMessaging { double lowEdge; // low side of the interval in ns double kParameter; double thetaParameter; - double mostProbableTime; }; /** @@ -144,6 +143,8 @@ class sTgcDigitMaker : public AthMessaging { /** Find the gamma pdf parameters of a given distance */ GammaParameter getGammaParameter(double distance) const; + /** Get the most probable time of arrival */ + double getMostProbableArrivalTime(double distance) const; /** Energy threshold value for each chamber */ double m_energyThreshold[N_STATIONNAME][N_STATIONETA][N_STATIONPHI][N_MULTIPLET][N_GASGAP][N_CHANNELTYPE]{}; @@ -166,6 +167,8 @@ class sTgcDigitMaker : public AthMessaging { // Parameters of the gamma pdf required for determining digit time std::vector<GammaParameter> m_gammaParameter; + // 4th-order polymonial describing the most probable time as function of the distance of closest approach + std::vector<double> m_mostProbableArrivalTime; // Time offset to add to Strip timing std::vector<double> m_timeOffsetStrip; diff --git a/MuonSpectrometer/MuonDigitization/sTGC_Digitization/share/sTGC_Digitization_timeArrival.dat b/MuonSpectrometer/MuonDigitization/sTGC_Digitization/share/sTGC_Digitization_timeArrival.dat index 21db68524e9ef95c4ffafa7f82e016001eba4485..598864e505bc87ffa336a77201f4eeae641e74b7 100644 --- a/MuonSpectrometer/MuonDigitization/sTGC_Digitization/share/sTGC_Digitization_timeArrival.dat +++ b/MuonSpectrometer/MuonDigitization/sTGC_Digitization/share/sTGC_Digitization_timeArrival.dat @@ -3,37 +3,47 @@ # Time of arrival is obtained from Garfield simulation. It is parametrized as # a function of the distance of closest approach, i.e. the shortest distance # from a particle's trajectory to the nearest wire. -# The approach is the following: dividing the Garfield data into 9 intervals -# of 0.1 mm (distance of closest approach), then fit the time distribution in -# each interval. +# The approach is the following: dividing the Garfield data into 11 intervals, +# then fit the time distribution in each interval. # # In each interval, the time of arrival distribution can be described by a # gamma distribution with three parameters: # - the usual k and theta parameters, and -# - t0--the shift from zero. +# - t0, which is the earliest time of arrival for the interval and also the +# only parameter that varies with the distance of closest approach. # The gamma probability distribution function is: # P(t) = 1 / (\Gamma(k) * {\theta}^k) * (t - t0)^{k-1} * exp(-(t - t0) / {\theta}) -# where t is the time of arrival to be selected and t0 is the earliest time of -# arrival allowed. +# where t is the time of arrival to be selected. # -# The current implementation in Athena use the parameters k and theta, and the -# most probable value (peak of the gamma pdf) instead of t0. First, a gamma -# random number generator is launched to choose a time, say a value val, then -# it is shifted by the best-fitted most probable value minus (k-1)*theta. The -# best-fitted most probable value (mpv) already includes t0, while the product -# (k-1)*theta gives the most probable value of the gamma pdf begining at origin. -# In other word, t0 = mpv - (k-1)*theta and the resulting time of arrival is -# given by +# The current implementation in Athena uses the parameters k and theta, and the +# most probable value of time instead of t0. First, a gamma random number +# generator is launched to choose a time, say a value val, then it is shifted +# by the best-fitted most probable value minus (k-1)*theta. The best-fitted +# most probable value (mpv) already includes t0, while the product (k-1)*theta +# gives the most probable value of a gamma pdf begining at origin. +# In other word, t0 = mpv - (k-1)*theta for the intervals considered, except for +# the 1st interval (distance less than 0.050mm) where both t0 and mpv are +# set to zero nanosecond. Also, mpv is parametrized as a 4th-order polymonial +# in order to get a continuous time of arrival as a function of distance. +# So the resulting time of arrival is given by # time = val + (mpv - (k-1) * theta). # # Below are the parameters to be read. Line starting with '#' is not read. -# keyword low_edge[mm] k theta mpv[ns] -bin 0.0 1.000 0.833 0.0 -bin 0.1 2.342 0.455 0.899 -bin 0.2 3.474 0.391 2.220 -bin 0.3 4.153 0.376 3.733 -bin 0.4 5.778 0.321 5.441 -bin 0.5 5.046 0.364 7.186 -bin 0.6 5.981 0.392 9.300 -bin 0.7 5.771 0.533 11.997 -bin 0.8 3.068 1.488 16.095 +# IMPORTANT: the intervals must be sorted in ascending order of low_edge. +# keyword low_edge[mm] k theta +bin 0.00 0.500 1.460 +bin 0.05 3.236 0.335 +bin 0.15 7.270 0.219 +bin 0.25 8.406 0.236 +bin 0.35 10.809 0.223 +bin 0.45 8.017 0.267 +bin 0.55 5.859 0.366 +bin 0.65 8.973 0.290 +bin 0.75 9.319 0.290 +bin 0.80 6.282 0.517 +bin 0.85 4.680 1.044 + +# Most probable time is described using a 4th-order polymonial +# mpv(d) = p0 + p1 * d + p2 * d^2 + p3 * d^3 + p4 * d^4 +# keyword p0 p1 p2 p3 p4 +mpv 0.106 -2.031 71.36 -128.2 87.16 diff --git a/MuonSpectrometer/MuonDigitization/sTGC_Digitization/src/sTgcDigitMaker.cxx b/MuonSpectrometer/MuonDigitization/sTGC_Digitization/src/sTgcDigitMaker.cxx index 0aabb85c363424da0b89d71a781d13d2a2571702..0313ba7796c7cd07c5567884f9633fc1ea27e4fc 100644 --- a/MuonSpectrometer/MuonDigitization/sTGC_Digitization/src/sTgcDigitMaker.cxx +++ b/MuonSpectrometer/MuonDigitization/sTGC_Digitization/src/sTgcDigitMaker.cxx @@ -231,33 +231,55 @@ std::unique_ptr<sTgcDigitCollection> sTgcDigitMaker::executeDigi(const sTGCSimHi // Distance should be in the range [0, 0.9] mm, unless particle passes through // the wire plane near the edges double wire_pitch = detEl->wirePitch(); - if ((dist_wire > -9.) && (std::abs(dist_wire) > (wire_pitch / 2))) { - ATH_MSG_DEBUG("Distance to the nearest wire (" << std::abs(dist_wire) << ") is greater than expected."); + // Absolute value of the distance + double abs_dist_wire = std::abs(dist_wire); + if ((dist_wire > -9.) && (abs_dist_wire > (wire_pitch / 2))) { + ATH_MSG_DEBUG("Distance to the nearest wire (" << abs_dist_wire << ") is greater than expected."); + } + + // Do not digitize hits that are too far from the nearest wire + if (abs_dist_wire > wire_pitch) { + return nullptr; } // Get the gamma pdf parameters associated with the distance of closest approach. - GammaParameter gamma_par = getGammaParameter(std::abs(dist_wire)); + //GammaParameter gamma_par = getGammaParameter(abs_dist_wire); + double par_kappa = (getGammaParameter(abs_dist_wire)).kParameter; + double par_theta = (getGammaParameter(abs_dist_wire)).thetaParameter; + double most_prob_time = getMostProbableArrivalTime(abs_dist_wire); // Compute the most probable value of the gamma pdf - double gamma_mpv = (gamma_par.kParameter - 1) * gamma_par.thetaParameter; - // If the most probable value is near zero, then ensure it is zero - if ((gamma_par.mostProbableTime) < 0.1) {gamma_mpv = 0.;} - double t0_par = gamma_par.mostProbableTime - gamma_mpv; + double gamma_mpv = (par_kappa - 1) * par_theta; + // If the most probable value is less than zero, then set it to zero + if (gamma_mpv < 0.) {gamma_mpv = 0.;} + double t0_par = most_prob_time - gamma_mpv; // Digit time follows a gamma distribution, so a value val is - // chosen using a gamma random generator then shifted by t0 + // chosen using a gamma random generator then is shifted by t0 // to account for drift time. // Note: CLHEP::RandGamma takes the parameters k and lambda, // where lambda = 1 / theta. - double digit_time = t0_par + CLHEP::RandGamma::shoot(rndmEngine, gamma_par.kParameter, 1/gamma_par.thetaParameter); - if (digit_time < 0.0) { - // Ensure the digit time is positive - digit_time = -1.0 * digit_time; + double digit_time = t0_par + CLHEP::RandGamma::shoot(rndmEngine, par_kappa, 1/par_theta); + + // Sometimes, digit_time is negative because t0_par can be negative. + // In such case, discard the negative value and shoot RandGamma for another value. + // However, if that has already been done many times then set digit_time to zero + // in order to avoid runaway loop. + const int shoot_limit = 4; + int shoot_counter = 0; + while (digit_time < 0.) { + if (shoot_counter > shoot_limit) { + digit_time = 0.; + break; + } + digit_time = t0_par + CLHEP::RandGamma::shoot(rndmEngine, par_kappa, 1/par_theta); + ++shoot_counter; } + ATH_MSG_DEBUG("sTgcDigitMaker distance = " << dist_wire << ", time = " << digit_time - << ", k parameter = " << gamma_par.kParameter - << ", theta parameter = " << gamma_par.thetaParameter - << ", most probable time = " << gamma_par.mostProbableTime); + << ", k parameter = " << par_kappa + << ", theta parameter = " << par_theta + << ", most probable time = " << most_prob_time); //// HV efficiency correction if (m_doEfficiencyCorrection){ @@ -1167,9 +1189,12 @@ StatusCode sTgcDigitMaker::readFileOfTimeArrival() { std::istringstream iss(line); iss >> key; if (key.compare("bin") == 0) { - iss >> param.lowEdge >> param.kParameter >> param.thetaParameter >> param.mostProbableTime; + iss >> param.lowEdge >> param.kParameter >> param.thetaParameter; m_gammaParameter.push_back(param); - } + } else if (key.compare("mpv") == 0) { + double mpt; + while (iss >> mpt) {m_mostProbableArrivalTime.push_back(mpt);} + } } // Close the file @@ -1182,12 +1207,12 @@ sTgcDigitMaker::GammaParameter sTgcDigitMaker::getGammaParameter(double distance double d = distance; if (d < 0.) { - ATH_MSG_WARNING("getGammaParameter: expecting a positive distance, but got negative value: " << d - << ". Proceed to the calculation with the absolute value."); + ATH_MSG_WARNING("getGammaParameter: expecting a positive distance, but got a negative value: " << d + << ". Proceed to the calculation using its absolute value."); d = -1.0 * d; } - // Find the parameters assuming the container is sorted + // Find the parameters assuming the container is sorted in ascending order of 'lowEdge' int index{-1}; for (auto& par: m_gammaParameter) { if (distance < par.lowEdge) { @@ -1198,6 +1223,25 @@ sTgcDigitMaker::GammaParameter sTgcDigitMaker::getGammaParameter(double distance return m_gammaParameter.at(index); } +//+++++++++++++++++++++++++++++++++++++++++++++++ +double sTgcDigitMaker::getMostProbableArrivalTime(double distance) const { + + double d = distance; + if (d < 0.) { + ATH_MSG_WARNING("getMostProbableArrivalTime: expecting a positive distance, but got a negative value: " << d + << ". Proceed to the calculation using its absolute value."); + d = -1.0 * d; + } + + double mpt = m_mostProbableArrivalTime.at(0) + + m_mostProbableArrivalTime.at(1) * d + + m_mostProbableArrivalTime.at(2) * d * d + + m_mostProbableArrivalTime.at(3) * d * d * d + + m_mostProbableArrivalTime.at(4) * d * d * d * d; + return mpt; +} + +//+++++++++++++++++++++++++++++++++++++++++++++++ StatusCode sTgcDigitMaker::readFileOfTimeOffsetStrip() { // Verify the file sTGC_Digitization_timeOffsetStrip.dat exists const std::string file_name = "sTGC_Digitization_timeOffsetStrip.dat"; @@ -1242,6 +1286,7 @@ StatusCode sTgcDigitMaker::readFileOfTimeOffsetStrip() { return StatusCode::SUCCESS; } +//+++++++++++++++++++++++++++++++++++++++++++++++ double sTgcDigitMaker::getTimeOffsetStrip(int neighbor_index) const { if ((!m_timeOffsetStrip.empty()) && (neighbor_index >= 0)) { // Return the last element if out of range diff --git a/MuonSpectrometer/MuonRDO/MuonRDO/NSW_TrigRawData.h b/MuonSpectrometer/MuonRDO/MuonRDO/NSW_TrigRawData.h index c57f39fbe55893c15000cc12e1e07aab2b7608cf..14a2e65e52c9a360c4a22abb7f570e39fea38944 100644 --- a/MuonSpectrometer/MuonRDO/MuonRDO/NSW_TrigRawData.h +++ b/MuonSpectrometer/MuonRDO/MuonRDO/NSW_TrigRawData.h @@ -18,15 +18,18 @@ class NSW_TrigRawData : public DataVector<Muon::NSW_TrigRawDataSegment> NSW_TrigRawData(); NSW_TrigRawData(uint16_t sectorId, uint16_t bcId); + NSW_TrigRawData(uint16_t sectorId, char sectorSide, uint16_t bcId); ~NSW_TrigRawData() { }; uint16_t sectorId() {return m_sectorId;} + char sectorSide() {return m_sectorSide;} uint16_t bcId() {return m_bcId;} private: uint16_t m_sectorId; + char m_sectorSide; uint16_t m_bcId; }; @@ -35,7 +38,3 @@ class NSW_TrigRawData : public DataVector<Muon::NSW_TrigRawDataSegment> CLASS_DEF(Muon::NSW_TrigRawData,140250087,1) #endif /// NSW_TRIGRAWDATA_H - - - - diff --git a/MuonSpectrometer/MuonRDO/src/NSW_TrigRawData.cxx b/MuonSpectrometer/MuonRDO/src/NSW_TrigRawData.cxx index 79e3454565dbc3ba1c19116572c8e4084f6b2444..0fa3ca6bce31a755f09eeb31bf1d53f6eec9b4c7 100644 --- a/MuonSpectrometer/MuonRDO/src/NSW_TrigRawData.cxx +++ b/MuonSpectrometer/MuonRDO/src/NSW_TrigRawData.cxx @@ -7,6 +7,7 @@ Muon::NSW_TrigRawData::NSW_TrigRawData() : DataVector<Muon::NSW_TrigRawDataSegment>(), m_sectorId(0), + m_sectorSide('-'), m_bcId(0) { @@ -15,6 +16,16 @@ Muon::NSW_TrigRawData::NSW_TrigRawData() : Muon::NSW_TrigRawData::NSW_TrigRawData(uint16_t sectorId, uint16_t bcId) : DataVector<Muon::NSW_TrigRawDataSegment>(), m_sectorId(sectorId), + m_sectorSide('-'), + m_bcId(bcId) +{ + +} + +Muon::NSW_TrigRawData::NSW_TrigRawData(uint16_t sectorId, char sectorSide, uint16_t bcId) : + DataVector<Muon::NSW_TrigRawDataSegment>(), + m_sectorId(sectorId), + m_sectorSide(sectorSide), m_bcId(bcId) { diff --git a/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonCombinePatternTools/MuonCombinePatternTools/MuonCombinePatternTool.h b/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonCombinePatternTools/MuonCombinePatternTools/MuonCombinePatternTool.h index fbdcf9582e805adb22e28b4f90eceffb7d5a49a1..9724608d35fdd3ae6ce05872a5cba2e46b00586c 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonCombinePatternTools/MuonCombinePatternTools/MuonCombinePatternTool.h +++ b/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonCombinePatternTools/MuonCombinePatternTools/MuonCombinePatternTool.h @@ -16,15 +16,15 @@ class MuonCombinePatternTool : public AthAlgTool, virtual public Muon::IMuonCombinePatternTool { private: struct ChamberInfo { - ChamberInfo() : neta(0), nphi(0), ninside(0), noutside(0), ninsidePat(0), noutsidePat(0), phiMin(1e9), phiMax(-1e9) {} - int neta; - int nphi; - int ninside; - int noutside; - int ninsidePat; - int noutsidePat; - double phiMin; - double phiMax; + ChamberInfo() = default; + int neta{0}; + int nphi{0}; + int ninside{0}; + int noutside{0}; + int ninsidePat{0}; + int noutsidePat{0}; + double phiMin{FLT_MAX}; + double phiMax{-FLT_MAX}; }; typedef std::map<Identifier, ChamberInfo> IdChMap; typedef IdChMap::iterator IdChIt; @@ -106,7 +106,7 @@ private: /** calculate new track parameters of match (only for cosmics!) returns [r0, * phi, rz0, theta]*/ - double* updateParametersForCosmics(const Muon::MuonPrdPattern* phipattern, const Muon::MuonPrdPattern* etapattern) const; + std::array<double,4> updateParametersForCosmics(const Muon::MuonPrdPattern* phipattern, const Muon::MuonPrdPattern* etapattern) const; /** calculate phi and r0 for cosmic patterns, phi estimate needs to be given */ @@ -119,7 +119,7 @@ private: /** update patterns based on new track parameters (used only for cosmics) * builds 2 new prd patterns */ static std::pair<const Muon::MuonPrdPattern*, const Muon::MuonPrdPattern*> updatePatternsForCosmics( - const Muon::MuonPrdPattern* phipattern, const Muon::MuonPrdPattern* etapattern, const double* new_pars); + const Muon::MuonPrdPattern* phipattern, const Muon::MuonPrdPattern* etapattern, const std::array<double,4>& new_pars); /** calculates global position of prd */ static const Amg::Vector3D& globalPrdPos(const Trk::PrepRawData* prd); @@ -129,7 +129,7 @@ private: void addCandidate( const Muon::MuonPrdPattern* etapattern, const Muon::MuonPrdPattern* phipattern, std::vector<std::pair<const Muon::MuonPrdPattern*, const Muon::MuonPrdPattern*>>& candidates, bool add_asspattern, - std::vector<const Muon::MuonPrdPattern*>& patternsToDelete, + std::vector<std::unique_ptr<const Muon::MuonPrdPattern>>& patternsToDelete, const std::map<const Trk::PrepRawData*, std::set<const Trk::PrepRawData*, Muon::IdentifierPrdLess>>* phiEtaHitAssMap) const; /** clean candidates from subsets or duplicates */ diff --git a/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonCombinePatternTools/src/MuonCombinePatternTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonCombinePatternTools/src/MuonCombinePatternTool.cxx index d7f1bba5e943c2ec9a8aef483f8409a3369f5c67..ec25828dab2513fef2d897c8de0e2f3aeec32f91 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonCombinePatternTools/src/MuonCombinePatternTool.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonCombinePatternTools/src/MuonCombinePatternTool.cxx @@ -13,14 +13,14 @@ #include "MuonReadoutGeometry/MuonDetectorManager.h" #include "TrkParameters/TrackParameters.h" #include "TrkSurfaces/Surface.h" // should not be included - +namespace{ double rotatePhi(double phi, double rotationFraction) { // check whether we rotate to a large value than pi, if so add additional // rotation by -2pi if (phi + rotationFraction * M_PI > M_PI) return phi + (rotationFraction - 2.) * M_PI; return phi + rotationFraction * M_PI; } - +} MuonCombinePatternTool::MuonCombinePatternTool(const std::string& type, const std::string& name, const IInterface* parent) : AthAlgTool(type, name, parent), m_maximum_xydistance(3500), @@ -56,7 +56,7 @@ MuonPrdPatternCollection* MuonCombinePatternTool::combineEtaPhiPatterns( /** phi eta association map, eta prds are key*/ const std::map<const Trk::PrepRawData*, std::set<const Trk::PrepRawData*, Muon::IdentifierPrdLess>>* phiEtaHitAssMap) const { bool myDebug = false; - std::vector<const Muon::MuonPrdPattern*> patternsToDelete; + std::vector<std::unique_ptr<const Muon::MuonPrdPattern>> patternsToDelete; std::vector<std::pair<const Muon::MuonPrdPattern*, const Muon::MuonPrdPattern*>> candidates; // vector of etapatterns (key) and phipatterns (value), that are // candidates for combining. Both etapatterns and phipatterns @@ -154,7 +154,7 @@ MuonPrdPatternCollection* MuonCombinePatternTool::combineEtaPhiPatterns( if (m_use_cosmics) { // new information: update parameters - double* new_pars = updateParametersForCosmics(phipattern, etapattern); + std::array<double,4> new_pars = updateParametersForCosmics(phipattern, etapattern); r0 = new_pars[0]; phi = new_pars[1]; scphi = CxxUtils::sincos(phi); @@ -163,7 +163,6 @@ MuonPrdPatternCollection* MuonCombinePatternTool::combineEtaPhiPatterns( rz0 = new_pars[2]; phipattern_x = r0 * scphi.sn; phipattern_y = r0 * scphi.cs; - delete[] new_pars; } else { @@ -197,23 +196,19 @@ MuonPrdPatternCollection* MuonCombinePatternTool::combineEtaPhiPatterns( for (unsigned int phihitid = 0; phihitid < phipattern->numberOfContainedPrds(); phihitid++) { const Trk::PrepRawData* prd = phipattern->prd(phihitid); const Amg::Vector3D& globalposhit = globalPrdPos(prd); - const double hitx = globalposhit.x(); - const double hity = globalposhit.y(); - const double hitz = globalposhit.z(); - double radius_hit = std::sqrt(hitx * hitx + hity * hity); - double dotprodradius = sctheta.apply(radius_hit, hitz); // (radius_hit) * sctheta.sn + hitz * sctheta.cs; + double radius_hit = globalposhit.perp(); + double dotprodradius = sctheta.apply(radius_hit, globalposhit[Amg::z]); // (radius_hit) * sctheta.sn + hitz * sctheta.cs; ATH_MSG_VERBOSE("combine hit: " << m_idHelperSvc->toString(prd->identify()) << " dotprod: " << dotprodradius); if (dotprodradius >= 0 || m_use_cosmics) // should be on { double residu_distance_mm = 1000000.; if (m_use_cosmics) { - const double perp = scphi.apply(hity, hitx); // hitx*scphi.cs + hity*scphi.sn; + const double perp = scphi.apply(globalposhit[Amg::y], globalposhit[Amg::x]); // hitx*scphi.cs + hity*scphi.sn; - residu_distance_mm = MuonHoughMathUtils::signedDistanceToLine(hitz, perp, rz0, theta); + residu_distance_mm = MuonHoughMathUtils::signedDistanceToLine(globalposhit[Amg::z], perp, rz0, theta); } else { - residu_distance_mm = - MuonHoughMathUtils::signedDistanceCurvedToHit(pattern_z0, theta, invcurvature, hitx, hity, hitz); + residu_distance_mm = MuonHoughMathUtils::signedDistanceCurvedToHit(pattern_z0, theta, invcurvature, globalposhit); } double distancetoline = std::abs(residu_distance_mm); @@ -513,14 +508,14 @@ MuonPrdPatternCollection* MuonCombinePatternTool::combineEtaPhiPatterns( // for cosmics keep track of best candidate, possible eff loss when phi // patterns are split if (m_use_cosmics) { - double new_pars[4] = {r0, phi, pattern_z0, theta}; + std::array<double,4> new_pars{r0, phi, pattern_z0, theta}; std::pair<const Muon::MuonPrdPattern*, const Muon::MuonPrdPattern*> updatedpatterns = updatePatternsForCosmics(phipattern, etapattern, new_pars); phipattern = updatedpatterns.first; etapattern = updatedpatterns.second; - patternsToDelete.push_back(updatedpatterns.first); - patternsToDelete.push_back(updatedpatterns.second); + patternsToDelete.emplace_back(updatedpatterns.first); + patternsToDelete.emplace_back(updatedpatterns.second); ATH_MSG_DEBUG(" Combination accepted with cosmic selection "); } else if (useTightAssociation) { ATH_MSG_DEBUG(" Tight association, cleaning patterns"); @@ -553,8 +548,8 @@ MuonPrdPatternCollection* MuonCombinePatternTool::combineEtaPhiPatterns( if (chPos->second.neta == 0) continue; phiPat->addPrd(prd); } - patternsToDelete.push_back(etaPat); - patternsToDelete.push_back(phiPat); + patternsToDelete.emplace_back(etaPat); + patternsToDelete.emplace_back(phiPat); phipattern = phiPat; etapattern = etaPat; } @@ -625,7 +620,7 @@ MuonPrdPatternCollection* MuonCombinePatternTool::combineEtaPhiPatterns( assphipattern = nullptr; } else { // these associated phi patterns should be deleted at end of routine: - patternsToDelete.push_back(assphipattern); + patternsToDelete.emplace_back(assphipattern); ATH_MSG_DEBUG("Candidate FOUND eta " << etalevel << " and associated phipattern "); @@ -635,15 +630,14 @@ MuonPrdPatternCollection* MuonCombinePatternTool::combineEtaPhiPatterns( if (msgLvl(MSG::VERBOSE)) printPattern(assphipattern); if (m_use_cosmics) { - double* new_pars = updateParametersForCosmics(assphipattern, etapattern); + std::array<double,4> new_pars = updateParametersForCosmics(assphipattern, etapattern); std::pair<const Muon::MuonPrdPattern*, const Muon::MuonPrdPattern*> updatedpatterns = updatePatternsForCosmics(assphipattern, etapattern, new_pars); assphipattern = updatedpatterns.first; etapattern = updatedpatterns.second; - patternsToDelete.push_back(updatedpatterns.first); - patternsToDelete.push_back(updatedpatterns.second); - delete[] new_pars; + patternsToDelete.emplace_back(updatedpatterns.first); + patternsToDelete.emplace_back(updatedpatterns.second); } ATH_MSG_DEBUG(" adding eta pattern with recalculated associated phi pattern "); @@ -671,13 +665,6 @@ MuonPrdPatternCollection* MuonCombinePatternTool::combineEtaPhiPatterns( MuonPrdPatternCollection* combinedpatterns = makeCombinedPatterns(candidates); - // delete associated and split patterns: - std::vector<const Muon::MuonPrdPattern*>::iterator it = patternsToDelete.begin(); - for (; it != patternsToDelete.end(); ++it) { delete (*it); } - - // release memory: - std::vector<const Muon::MuonPrdPattern*>().swap(patternsToDelete); - return combinedpatterns; } // combineEtaPhiPatterns @@ -962,8 +949,7 @@ std::vector<std::pair<Muon::MuonPrdPattern*, Muon::MuonPrdPattern*>> MuonCombine << " phi: " << etapattern1->globalDirection().phi()); ATH_MSG_DEBUG(" split pattern2 theta: " << etapattern2->globalDirection().theta() << " phi: " << etapattern2->globalDirection().phi()); - std::vector<double> splitpoint = - MuonHoughMathUtils::shortestPointOfLineToOrigin(globalpos.x(), globalpos.y(), globalpos.z(), phi, theta); + Amg::Vector3D splitpoint = MuonHoughMathUtils::shortestPointOfLineToOrigin(globalpos, phi, theta); ATH_MSG_DEBUG(" splitpoint, x: " << splitpoint[0] << " y: " << splitpoint[1] << " z: " << splitpoint[2]); } @@ -1033,11 +1019,7 @@ std::vector<std::pair<Muon::MuonPrdPattern*, Muon::MuonPrdPattern*>> MuonCombine // calculate intersection with pattern and calorimeter cylinder (r0=4000, // c0=6000) if there is one, then track will be split - const double x_0 = patternpos.x(); - const double y_0 = patternpos.y(); - const double z_0 = patternpos.z(); - - bool intersect = MuonHoughMathUtils::lineThroughCylinder(x_0, y_0, z_0, phi, theta, MuonHough::radius_cylinder, MuonHough::z_cylinder); + bool intersect = MuonHoughMathUtils::lineThroughCylinder(patternpos, phi, theta, MuonHough::radius_cylinder, MuonHough::z_cylinder); if (!intersect) { // no split ATH_MSG_DEBUG("Pattern not through calorimeter -> do not split "); @@ -1077,32 +1059,17 @@ Muon::MuonPrdPattern* MuonCombinePatternTool::cleanupCombinedPattern(Muon::MuonP for (unsigned int hitid = 0; hitid < combinedpattern->numberOfContainedPrds(); hitid++) { const Trk::PrepRawData* prd = combinedpattern->prd(hitid); const Amg::Vector3D& globalposhit = globalPrdPos(prd); - const double hitx = globalposhit.x(); - const double hity = globalposhit.y(); - const double hitz = globalposhit.z(); - + double r0 = MuonHoughMathUtils::signedDistanceOfLineToOrigin2D(posx, posy, phipattern); - double distance_xy = MuonHoughMathUtils::distanceToLine(hitx, hity, r0, phipattern); - // double distance_rz =1000000.; - // if (m_use_cosmics == true) - // { - // double radius_hit = std::sqrt(hitx*hitx+hity*hity); - double radius_pattern = std::sqrt(posx * posx + posy * posy); - double z0 = posz - radius_pattern * scthetapattern.cs / scthetapattern.sn; - // double rz0 = z0*std::sin(thetapattern); - // distance_rz = -rz0 + std::sin(thetapattern) * hitz - - // std::cos(thetapattern) * radius_hit; + double distance_xy = MuonHoughMathUtils::distanceToLine(globalposhit[Amg::x], globalposhit[Amg::y], r0, phipattern); - // } - // else - // { - double distance_rz = MuonHoughMathUtils::signedDistanceCurvedToHit(z0, thetapattern, invcurvature, hitx, hity, hitz); - // } + double radius_pattern = globalposhit.perp(); + double z0 = posz - radius_pattern * scthetapattern.cs / scthetapattern.sn; - double scale = std::sqrt(hitx * hitx + hity * hity + hitz * hitz) / 7000.; - if (scale < 1) scale = 1.; + double distance_rz = MuonHoughMathUtils::signedDistanceCurvedToHit(z0, thetapattern, invcurvature, globalposhit); - ATH_MSG_VERBOSE("hit: " << hitx << " " << hity << " " << hitz); + const double scale = std::max(1., globalposhit.mag() / 7000.); + ATH_MSG_VERBOSE("hit: " << globalposhit); ATH_MSG_VERBOSE("CLEAN distancetopattern: " << " dist xy " << distance_xy << " dist rz " << distance_rz << " scale: " << scale); if (std::abs(distance_xy) < scale * m_maximum_xydistance && std::abs(distance_rz) < m_maximum_rzdistance) { @@ -1157,7 +1124,6 @@ Muon::MuonPrdPattern* MuonCombinePatternTool::makeAssPhiPattern( phihits.push_back(*set_it); if (check_already_on_pattern) { hits.insert(*set_it); } ATH_MSG_VERBOSE("Associated Phi Hit Added to Pattern"); - // hits_added = true; } } } @@ -1174,10 +1140,7 @@ Muon::MuonPrdPattern* MuonCombinePatternTool::makeAssPhiPattern( } else { for (; vec_it != phihits.end(); ++vec_it) { const Amg::Vector3D& globalposhit = globalPrdPos(*vec_it); - const double hitx = globalposhit.x(); - const double hity = globalposhit.y(); - const double phihit = std::atan2(hity, hitx); - CxxUtils::sincos scphihit(phihit); + CxxUtils::sincos scphihit(globalposhit.phi()); sin_phi += scphihit.sn; cos_phi += scphihit.cs; } @@ -1212,7 +1175,7 @@ Muon::MuonPrdPattern* MuonCombinePatternTool::makeAssPhiPattern( return phipatternclean; } -double* MuonCombinePatternTool::updateParametersForCosmics(const Muon::MuonPrdPattern* phipattern, +std::array<double,4> MuonCombinePatternTool::updateParametersForCosmics(const Muon::MuonPrdPattern* phipattern, const Muon::MuonPrdPattern* etapattern) const { // method returns r0, phi, rz0, theta @@ -1225,7 +1188,7 @@ double* MuonCombinePatternTool::updateParametersForCosmics(const Muon::MuonPrdPa const Amg::Vector3D& phiglobalpos = phipattern->globalPosition(); const Amg::Vector3D& phiglobaldir = phipattern->globalDirection(); - double* old_pars = new double[4]; + std::array<double,4> old_pars{0}; old_pars[0] = MuonHoughMathUtils::signedDistanceOfLineToOrigin2D(phiglobalpos.x(), phiglobalpos.y(), phiglobaldir.phi()); old_pars[1] = phiglobaldir.phi(); @@ -1259,7 +1222,7 @@ double* MuonCombinePatternTool::updateParametersForCosmics(const Muon::MuonPrdPa double av_radii = 0.; double av_z = 0.; - for (unsigned int i = 0; i < etasize; i++) { + for (unsigned int i = 0; i < etasize; ++i) { const Trk::PrepRawData* prd = etapattern->prd(i); const Amg::Vector3D& globalposhit = globalPrdPos(prd); av_radii += scphi.apply(globalposhit.y(), @@ -1276,13 +1239,10 @@ double* MuonCombinePatternTool::updateParametersForCosmics(const Muon::MuonPrdPa for (unsigned int i = 0; i < etasize; i++) { const Trk::PrepRawData* prd = etapattern->prd(i); const Amg::Vector3D& globalposhit = globalPrdPos(prd); - - double hitx = globalposhit.x(); - double hity = globalposhit.y(); - double hitz = globalposhit.z(); - double radius = scphi.apply(hity, hitx); // hitx*scphi.cs + hity*scphi.sn; + + double radius = scphi.apply(globalposhit[Amg::y], globalposhit[Amg::x]); // hitx*scphi.cs + hity*scphi.sn; double r_offset = radius - av_radii; - double z_offset = hitz - av_z; + double z_offset = globalposhit[Amg::z] - av_z; double weight = r_offset * r_offset + z_offset * z_offset; int sign = 1; if (r_offset * std::cos(theta_orig) + z_offset * std::sin(theta_orig) < 0) { sign = -1; } @@ -1305,12 +1265,7 @@ double* MuonCombinePatternTool::updateParametersForCosmics(const Muon::MuonPrdPa // const double rz0 = sctheta.apply(av_z,-av_radii); // (av_z * sctheta.sn) - // av_radii * sctheta.cs; - double* new_pars = new double[4]; - - new_pars[0] = r0; - new_pars[1] = phi; - new_pars[2] = rz0; - new_pars[3] = theta; + std::array<double,4> new_pars {r0,phi,rz0,theta}; ATH_MSG_DEBUG("updated parameters: r0: " << new_pars[0] << " phi: " << new_pars[1] << " rz0: " << new_pars[2] << " theta: " << new_pars[3]); @@ -1321,37 +1276,30 @@ double* MuonCombinePatternTool::updateParametersForCosmics(const Muon::MuonPrdPa for (unsigned int i = 0; i < phisize; i++) { const Trk::PrepRawData* prd = phipattern->prd(i); const Amg::Vector3D& globalposhit = globalPrdPos(prd); - double hitx = globalposhit.x(); - double hity = globalposhit.y(); - double distance = MuonHoughMathUtils::signedDistanceToLine(hitx, hity, r0, phi); + double distance = MuonHoughMathUtils::signedDistanceToLine(globalposhit[Amg::x], globalposhit[Amg::y], r0, phi); ATH_MSG_VERBOSE("distance to updated parameters in xy: " << distance); - distance = MuonHoughMathUtils::signedDistanceToLine(hitx, hity, old_pars[0], old_pars[1]); + distance = MuonHoughMathUtils::signedDistanceToLine(globalposhit[Amg::x], globalposhit[Amg::y], old_pars[0], old_pars[1]); ATH_MSG_VERBOSE("old distance phi hit: " << distance); } for (unsigned int i = 0; i < etasize; i++) { const Trk::PrepRawData* prd = etapattern->prd(i); const Amg::Vector3D& globalposhit = globalPrdPos(prd); - double hitx = globalposhit.x(); - double hity = globalposhit.y(); - double distance = MuonHoughMathUtils::signedDistanceToLine(hitx, hity, r0, phi); + double distance = MuonHoughMathUtils::signedDistanceToLine(globalposhit[Amg::x], globalposhit[Amg::y], r0, phi); ATH_MSG_VERBOSE("distance to updated parameters in xy: " << distance); - distance = MuonHoughMathUtils::signedDistanceToLine(hitx, hity, old_pars[0], old_pars[1]); + distance = MuonHoughMathUtils::signedDistanceToLine(globalposhit[Amg::x], globalposhit[Amg::y], old_pars[0], old_pars[1]); ATH_MSG_VERBOSE("old distance eta hit: " << distance); } - for (unsigned int i = 0; i < etasize; i++) { + for (unsigned int i = 0; i < etasize; ++i) { const Trk::PrepRawData* prd = etapattern->prd(i); const Amg::Vector3D& globalposhit = globalPrdPos(prd); - double hitz = globalposhit.z(); - double perp = scphi.apply(globalposhit.y(), - globalposhit.x()); // globalposhit.x()*scphi.cs + globalposhit.y()*scphi.sn; - double distance = MuonHoughMathUtils::signedDistanceToLine(hitz, perp, rz0, theta); + double perp = scphi.apply(globalposhit[Amg::y], + globalposhit[Amg::x]); // globalposhit.x()*scphi.cs + globalposhit.y()*scphi.sn; + double distance = MuonHoughMathUtils::signedDistanceToLine(globalposhit[Amg::z], perp, rz0, theta); ATH_MSG_VERBOSE("distance to updated parameters in Rz: " << distance); - distance = MuonHoughMathUtils::signedDistanceToLine(hitz, perp, old_pars[2], old_pars[3]); + distance = MuonHoughMathUtils::signedDistanceToLine(globalposhit[Amg::z], perp, old_pars[2], old_pars[3]); ATH_MSG_VERBOSE("old distance: " << distance); } } - - delete[] old_pars; return new_pars; } @@ -1387,7 +1335,7 @@ std::pair<double, double> MuonCombinePatternTool::calculateR0Phi(const Muon::Muo // from MuonHoughPattern::updateParametersRPhi (partial code duplication.. :( // ) - double sum_etax = 0., sum_etay = 0., sum_phix = 0., sum_phiy = 0.; + double sum_etax{0.}, sum_etay{0.}, sum_phix{0.}, sum_phiy{0.}; // calculate average point @@ -1412,22 +1360,17 @@ std::pair<double, double> MuonCombinePatternTool::calculateR0Phi(const Muon::Muo // calculate weighted sum: - double sumx = 0.; - double sumy = 0.; + double sumx {0.}, sumy {0.}; // keep track of extreme points - double x_min = 0., x_max = 0.; - double y_min = 0., y_max = 0.; - double lever_min = 0., lever_max = 0.; + double x_min {0.}, x_max {0.}, y_min {0.}, y_max {0.}, lever_min {0.}, lever_max{0.}; for (unsigned int i = 0; i < etasize; i++) { const Trk::PrepRawData* prd = etapattern->prd(i); const Amg::Vector3D& globalposhit = globalPrdPos(prd); - double hitx = globalposhit.x(); - double hity = globalposhit.y(); - double x_offset = hitx - av_x; - double y_offset = hity - av_y; + double x_offset = globalposhit[Amg::x] - av_x; + double y_offset = globalposhit[Amg::y] - av_y; double height_squared = x_offset * x_offset + y_offset * y_offset; double weight = height_squared * eta_error_inv2; int sign = 1; @@ -1437,22 +1380,20 @@ std::pair<double, double> MuonCombinePatternTool::calculateR0Phi(const Muon::Muo if (sign == 1 && height_squared > lever_max) { lever_max = height_squared; - x_max = hitx; - y_max = hity; + x_max = globalposhit[Amg::x]; + y_max = globalposhit[Amg::y]; } else if (sign == -1 && height_squared > lever_min) { lever_min = height_squared; - x_min = hitx; - y_min = hity; + x_min = globalposhit[Amg::x]; + y_min = globalposhit[Amg::y]; } } for (unsigned int i = 0; i < phisize; i++) { const Trk::PrepRawData* prd = phipattern->prd(i); const Amg::Vector3D& globalposhit = globalPrdPos(prd); - double hitx = globalposhit.x(); - double hity = globalposhit.y(); - double x_offset = hitx - av_x; - double y_offset = hity - av_y; + double x_offset = globalposhit[Amg::x] - av_x; + double y_offset = globalposhit[Amg::y] - av_y; double height_squared = x_offset * x_offset + y_offset * y_offset; double weight = height_squared * phi_error_inv2; int sign = 1; @@ -1462,12 +1403,12 @@ std::pair<double, double> MuonCombinePatternTool::calculateR0Phi(const Muon::Muo if (sign == 1 && height_squared > lever_max) { lever_max = height_squared; - x_max = hitx; - y_max = hity; + x_max = globalposhit[Amg::x]; + y_max = globalposhit[Amg::y]; } else if (sign == -1 && height_squared > lever_min) { lever_min = height_squared; - x_min = hitx; - y_min = hity; + x_min = globalposhit[Amg::x]; + y_min = globalposhit[Amg::y]; } } @@ -1481,8 +1422,7 @@ std::pair<double, double> MuonCombinePatternTool::calculateR0Phi(const Muon::Muo } // lever arm has to be larger than 2 m, else no update: - - if (std::sqrt((x_max - x_min) * (x_max - x_min) + (y_max - y_min) * (y_max - y_min)) < 2000) { + if (std::hypot(x_max - x_min , y_max - y_min) < 2000) { ATH_MSG_VERBOSE("lever arm too small: av_x : " << std::sqrt((x_max - x_min) * (x_max - x_min) + (y_max - y_min) * (y_max - y_min)) << " x_max: " << x_max << " x_min: " << x_min << " y_max: " << y_max << " y_min: " << y_min); @@ -1529,13 +1469,8 @@ double MuonCombinePatternTool::calculateRz0(const Muon::MuonPrdPattern* pattern, for (unsigned int i = 0; i < nhits; i++) { const Trk::PrepRawData* prd = pattern->prd(i); const Amg::Vector3D& poshit = globalPrdPos(prd); - const double hitx = poshit.x(); - const double hity = poshit.y(); - const double hitz = poshit.z(); - const double hitr = sqrt(hitx * hitx + hity * hity); - // hitx*scphi.cs + hity*scphi.sn == sin theta * t - int sign = (hitx * scphi.cs + hity * scphi.sn > 0) ? 1 : -1; - rz0 += hitz * sctheta.sn - sign * sctheta.cs * hitr; + int sign = (poshit[Amg::x] * scphi.cs + poshit[Amg::y] * scphi.sn > 0) ? 1 : -1; + rz0 += poshit[Amg::z] * sctheta.sn - sign * sctheta.cs * poshit.perp(); } if (nhits > 0) rz0 /= nhits; @@ -1543,7 +1478,7 @@ double MuonCombinePatternTool::calculateRz0(const Muon::MuonPrdPattern* pattern, } std::pair<const Muon::MuonPrdPattern*, const Muon::MuonPrdPattern*> MuonCombinePatternTool::updatePatternsForCosmics( - const Muon::MuonPrdPattern* phipattern, const Muon::MuonPrdPattern* etapattern, const double* new_pars) { + const Muon::MuonPrdPattern* phipattern, const Muon::MuonPrdPattern* etapattern, const std::array<double,4>& new_pars) { double phi = new_pars[1]; double theta = new_pars[3]; @@ -1776,7 +1711,7 @@ void MuonCombinePatternTool::printPattern(const Muon::MuonPrdPattern* muonpatter const Muon::MuonPrdPattern* MuonCombinePatternTool::updatePhiPattern(const Muon::MuonPrdPattern* phipattern, std::vector<const Trk::PrepRawData*> missedphihits) const { - Muon::MuonPrdPattern* updatedphipattern = new Muon::MuonPrdPattern(phipattern->globalPosition(), phipattern->globalDirection()); + std::unique_ptr<Muon::MuonPrdPattern> updatedphipattern = std::make_unique< Muon::MuonPrdPattern>(phipattern->globalPosition(), phipattern->globalDirection()); for (unsigned int phihitnr = 0; phihitnr < phipattern->numberOfContainedPrds(); phihitnr++) { updatedphipattern->addPrd(phipattern->prd(phihitnr)); // ATH_MSG_DEBUG(" prd: " << phipattern->prd(phihitnr) ); @@ -1790,11 +1725,8 @@ const Muon::MuonPrdPattern* MuonCombinePatternTool::updatePhiPattern(const Muon: // clean updated phi pattern: - const Muon::MuonPrdPattern* cleanUpdatedPhipattern = cleanPhiPattern(updatedphipattern); - delete updatedphipattern; - - return cleanUpdatedPhipattern; -} + return cleanPhiPattern(updatedphipattern.get()); + } Muon::MuonPrdPattern* MuonCombinePatternTool::cleanPhiPattern(const Muon::MuonPrdPattern* phipattern) const { const Amg::Vector3D& olddir = phipattern->globalDirection(); @@ -1810,7 +1742,7 @@ Muon::MuonPrdPattern* MuonCombinePatternTool::cleanPhiPattern(const Muon::MuonPr } // need internal class to be able to remove hits fast - MuonHoughPattern* newpattern = new MuonHoughPattern(MuonHough::hough_xy, true); // patterns owns hits + std::unique_ptr<MuonHoughPattern> newpattern = std::make_unique< MuonHoughPattern>(MuonHough::hough_xy, true); // patterns owns hits for (unsigned int phihitnr = 0; phihitnr < size; phihitnr++) { newpattern->addHit(new MuonHoughHit(phipattern->prd(phihitnr))); } newpattern->updateParametersRPhi(m_use_cosmics); double phi = newpattern->getEPhi(); @@ -1818,8 +1750,8 @@ Muon::MuonPrdPattern* MuonCombinePatternTool::cleanPhiPattern(const Muon::MuonPr CxxUtils::sincos scphi(phi); - const int number_of_iterations = 4; - double cutvalues[number_of_iterations] = {1000., 500., 250., 125.}; + constexpr int number_of_iterations = 4; + std::array<double,number_of_iterations> cutvalues {1000., 500., 250., 125.}; if (m_use_cosmics) { cutvalues[0] = 5000.; @@ -1886,15 +1818,13 @@ Muon::MuonPrdPattern* MuonCombinePatternTool::cleanPhiPattern(const Muon::MuonPr for (unsigned int i = 0; i < newpattern->size(); i++) { cleanpattern->addPrd(newpattern->getPrd(i)); } - delete newpattern; // remaining MuonHoughHits are deleted as well - return cleanpattern; } void MuonCombinePatternTool::addCandidate( const Muon::MuonPrdPattern* etapattern, const Muon::MuonPrdPattern* phipattern, std::vector<std::pair<const Muon::MuonPrdPattern*, const Muon::MuonPrdPattern*>>& candidates, bool add_asspattern, - std::vector<const Muon::MuonPrdPattern*>& patternsToDelete, + std::vector<std::unique_ptr<const Muon::MuonPrdPattern>>& patternsToDelete, const std::map<const Trk::PrepRawData*, std::set<const Trk::PrepRawData*, Muon::IdentifierPrdLess>>* phiEtaHitAssMap) const { if (!m_use_cosmics || !m_splitpatterns) { candidates.emplace_back(etapattern, phipattern); @@ -1918,8 +1848,8 @@ void MuonCombinePatternTool::addCandidate( candidates.emplace_back(splitpatterns[i].second, splitpatterns[i].first); // these associated phi patterns should be deleted at end of routine: - patternsToDelete.push_back(splitpatterns[i].first); - patternsToDelete.push_back(splitpatterns[i].second); + patternsToDelete.emplace_back(splitpatterns[i].first); + patternsToDelete.emplace_back(splitpatterns[i].second); } } } @@ -1937,7 +1867,7 @@ void MuonCombinePatternTool::addCandidate( // update parameters: - double* new_pars = updateParametersForCosmics(assphipattern, etapattern); + std::array<double,4> new_pars = updateParametersForCosmics(assphipattern, etapattern); std::pair<const Muon::MuonPrdPattern*, const Muon::MuonPrdPattern*> updatedpatterns = updatePatternsForCosmics(assphipattern, etapattern, new_pars); delete assphipattern; @@ -1945,10 +1875,9 @@ void MuonCombinePatternTool::addCandidate( assphipattern = updatedpatterns.first; etapattern = updatedpatterns.second; - patternsToDelete.push_back(updatedpatterns.first); - patternsToDelete.push_back(updatedpatterns.second); - delete[] new_pars; - + patternsToDelete.emplace_back(updatedpatterns.first); + patternsToDelete.emplace_back(updatedpatterns.second); + std::vector<std::pair<Muon::MuonPrdPattern*, Muon::MuonPrdPattern*>> splitpatterns_ass = splitPatternsCylinder(assphipattern, etapattern); @@ -1967,8 +1896,8 @@ void MuonCombinePatternTool::addCandidate( // these associated phi patterns should be deleted at end of // routine: - patternsToDelete.push_back(splitpatterns_ass[i].first); - patternsToDelete.push_back(splitpatterns_ass[i].second); + patternsToDelete.emplace_back(splitpatterns_ass[i].first); + patternsToDelete.emplace_back(splitpatterns_ass[i].second); } } } diff --git a/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/CMakeLists.txt b/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/CMakeLists.txt index e4ea4e173a016bdb08890858f89af16ae210c0d8..7693b39555f523c1c426b551924ea63a01e0a84d 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/CMakeLists.txt +++ b/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/CMakeLists.txt @@ -15,7 +15,7 @@ atlas_add_library( MuonHoughPatternToolsLib INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} PRIVATE_INCLUDE_DIRS LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaBaseComps GeoPrimitives GaudiKernel MuonDetDescrUtils MuonHoughPatternEvent MuonPattern MuonPrepRawData MuonSegment MuonRecToolInterfaces MuonLayerHough TrkDriftCircleMath MuonIdHelpersLib MuonClusterizationLib MuonRecHelperToolsLib StoreGateLib - PRIVATE_LINK_LIBRARIES AtlasHepMCLib CxxUtils EventPrimitives xAODMuon xAODTruth MuonReadoutGeometry MuonRIO_OnTrack TrkSurfaces TrkTruthData ) + PRIVATE_LINK_LIBRARIES AtlasHepMCLib CxxUtils EventPrimitives xAODMuon xAODTruth MuonReadoutGeometry MuonRIO_OnTrack TrkSurfaces TrkTruthData FourMomUtils) atlas_add_component( MuonHoughPatternTools src/components/*.cxx diff --git a/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/MuonHoughPatternTools/MuonHoughPatternFinderTool.h b/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/MuonHoughPatternTools/MuonHoughPatternFinderTool.h index 9c61547289fdc49bf9fc110f9c6f026a5fdf6f1c..4181502687689f6b4bbd824d08e2f496684ec871 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/MuonHoughPatternTools/MuonHoughPatternFinderTool.h +++ b/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/MuonHoughPatternTools/MuonHoughPatternFinderTool.h @@ -1,10 +1,13 @@ /* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ #ifndef MUONHOUGHPATTERNALGS_MUONHOUGHPATTERNFINDERTOOL_H #define MUONHOUGHPATTERNALGS_MUONHOUGHPATTERNFINDERTOOL_H +#include <TFile.h> +#include <TH1.h> + #include <iostream> #include <string> #include <vector> @@ -12,19 +15,16 @@ #include "AthenaBaseComps/AthAlgTool.h" #include "GaudiKernel/ServiceHandle.h" #include "GaudiKernel/ToolHandle.h" -#include "MuonHoughPatternTools/IMuonHoughPatternTool.h" #include "MuonIdHelpers/IMuonIdHelperSvc.h" #include "MuonPattern/MuonPatternCollection.h" #include "MuonPattern/MuonPatternCombinationCollection.h" #include "MuonRecHelperTools/MuonEDMPrinterTool.h" #include "MuonRecToolInterfaces/IMuonCombinePatternTool.h" #include "MuonRecToolInterfaces/IMuonHoughPatternFinderTool.h" +#include "MuonRecToolInterfaces/IMuonHoughPatternTool.h" #include "MuonSegment/MuonSegmentCombinationCollection.h" #include "TrkDriftCircleMath/DriftCircle.h" -class TH1F; -class TFile; - class MuonHoughHitContainer; namespace Muon { @@ -35,7 +35,7 @@ namespace Muon { MuonHoughPatternFinderTool(const std::string&, const std::string&, const IInterface*); /** destructor */ - virtual ~MuonHoughPatternFinderTool() = default; + virtual ~MuonHoughPatternFinderTool(); /** initialize */ virtual StatusCode initialize(); @@ -47,19 +47,23 @@ namespace Muon { std::pair<std::unique_ptr<MuonPatternCombinationCollection>, std::unique_ptr<Muon::HoughDataPerSectorVec>> find( const std::vector<const MdtPrepDataCollection*>& mdtCols, const std::vector<const CscPrepDataCollection*>& cscCols, const std::vector<const TgcPrepDataCollection*>& tgcCols, const std::vector<const RpcPrepDataCollection*>& rpcCols, - const MuonSegmentCombinationCollection* cscSegmentCombis, const EventContext& ctx) const; + const MuonSegmentCombinationCollection* cscSegmentCombis, const EventContext& ctx) const override; + + std::pair<std::unique_ptr<MuonPatternCombinationCollection>, std::unique_ptr<HoughDataPerSectorVec>> find( + const MdtPrepDataContainer* mdtCont, const CscPrepDataContainer* cscCols, const TgcPrepDataContainer* tgcCont, + const RpcPrepDataContainer* rpcCont, const sTgcPrepDataContainer* stgcCont, const MMPrepDataContainer* mmCont, + const EventContext& ctx) const override; private: + template <class T> std::vector<const T*> stdVec(const MuonPrepDataContainer<T>* cont) const; + /** retrieves all hits and converts them into internal EDM */ - const MuonHoughHitContainer* getAllHits( + std::unique_ptr<MuonHoughHitContainer> getAllHits( const std::vector<const MdtPrepDataCollection*>& mdtCols, const std::vector<const CscPrepDataCollection*>& cscCols, const std::vector<const TgcPrepDataCollection*>& tgcCols, const std::vector<const RpcPrepDataCollection*>& rpcCols, const MuonSegmentCombinationCollection* cscSegmentCombis, std::map<int, std::vector<std::pair<int, int>>>& rpcmdtstationmap, std::map<int, std::vector<std::pair<int, int>>>& tgcmdtstationmap, - std::map<const Trk::PrepRawData*, std::set<const Trk::PrepRawData*, Muon::IdentifierPrdLess>>* phietahitassociation) const; - - /** possibility to skip events, nothing implemented */ - static bool cut(); + std::map<const Trk::PrepRawData*, std::set<const Trk::PrepRawData*, Muon::IdentifierPrdLess>>& phietahitassociation) const; /** analyse hits */ MuonPatternCombinationCollection* analyse( @@ -70,28 +74,27 @@ namespace Muon { private: /** record patterncollection to storegate or deletes collection when * m_recordAllOutput is false */ - void record(MuonPrdPatternCollection* patCol, const SG::WriteHandleKey<MuonPrdPatternCollection>& key, + void record(std::unique_ptr<MuonPrdPatternCollection>& patCol, const SG::WriteHandleKey<MuonPrdPatternCollection>& key, const EventContext& ctx) const; /** convert and add rpc preprawdata collection (1 chamber) */ void addRpcCollection( - Muon::RpcPrepDataCollection::const_iterator cit_begin, Muon::RpcPrepDataCollection::const_iterator cit_end, - MuonHoughHitContainer* hitcontainer, std::map<int, std::vector<std::pair<int, int>>>& rpcmdtstationmap, - std::map<const Trk::PrepRawData*, std::set<const Trk::PrepRawData*, Muon::IdentifierPrdLess>>* phietahitassociation) const; + const RpcPrepDataCollection* rpc_coll, MuonHoughHitContainer& hitcontainer, + std::map<int, std::vector<std::pair<int, int>>>& rpcmdtstationmap, + std::map<const Trk::PrepRawData*, std::set<const Trk::PrepRawData*, Muon::IdentifierPrdLess>>& phietahitassociation) const; /** convert and add mdt preprawdata collection (1 chamber) */ - void addMdtCollection(Muon::MdtPrepDataCollection::const_iterator cit_begin, Muon::MdtPrepDataCollection::const_iterator cit_end, - MuonHoughHitContainer* hitcontainer, std::map<int, std::vector<std::pair<int, int>>>& rpcmdtstationmap, + void addMdtCollection(const MdtPrepDataCollection* mdt_coll, MuonHoughHitContainer& hitcontainer, + std::map<int, std::vector<std::pair<int, int>>>& rpcmdtstationmap, std::map<int, std::vector<std::pair<int, int>>>& tgcmdtstationmap) const; /** convert and add csc preprawdata collection (1 chamber) */ void addCscCollection( - Muon::CscPrepDataCollection::const_iterator cit_begin, Muon::CscPrepDataCollection::const_iterator cit_end, - MuonHoughHitContainer* hitcontainer, - std::map<const Trk::PrepRawData*, std::set<const Trk::PrepRawData*, Muon::IdentifierPrdLess>>* phietahitassociation) const; + const CscPrepDataCollection* csc_coll, MuonHoughHitContainer& hitcontainer, + std::map<const Trk::PrepRawData*, std::set<const Trk::PrepRawData*, Muon::IdentifierPrdLess>>& phietahitassociation) const; /** convert and add tgc preprawdata collection (1 chamber) */ void addTgcCollection( - Muon::TgcPrepDataCollection::const_iterator cit_begin, Muon::TgcPrepDataCollection::const_iterator cit_end, - MuonHoughHitContainer* hitcontainer, std::map<int, std::vector<std::pair<int, int>>>& tgcmdtstationmap, - std::map<const Trk::PrepRawData*, std::set<const Trk::PrepRawData*, Muon::IdentifierPrdLess>>* phietahitassociation) const; + const Muon::TgcPrepDataCollection*, MuonHoughHitContainer& hitcontainer, + std::map<int, std::vector<std::pair<int, int>>>& tgcmdtstationmap, + std::map<const Trk::PrepRawData*, std::set<const Trk::PrepRawData*, Muon::IdentifierPrdLess>>& phietahitassociation) const; /** finds best segment for given driftcircle vector (nl1/2 = number of dc's in * ml 1 and 2, angledif is difference between angle of segment and @@ -172,18 +175,18 @@ namespace Muon { /** histogram file for studies on weighting (only in use, when m_use_histos is * true) */ - TFile* m_file{}; + std::unique_ptr<TFile> m_file{}; /** all hits histograms for studies on weighting (only in use, when * m_use_histos is true) */ - TH1F* m_weighthistogram{}; + std::unique_ptr<TH1> m_weighthistogram{}; /** mdt histogram */ - TH1F* m_weighthistogrammdt{}; + std::unique_ptr<TH1> m_weighthistogrammdt{}; /** rpc histogram */ - TH1F* m_weighthistogramrpc{}; + std::unique_ptr<TH1> m_weighthistogramrpc{}; /** tgc histogram */ - TH1F* m_weighthistogramtgc{}; + std::unique_ptr<TH1> m_weighthistogramtgc{}; /** csc histogram */ - TH1F* m_weighthistogramcsc{}; + std::unique_ptr<TH1> m_weighthistogramcsc{}; SG::WriteHandleKey<MuonPrdPatternCollection> m_CosmicPhiPatternsKey{this, "CosmicPhiKey", "CosmicPhiPatterns"}; SG::WriteHandleKey<MuonPrdPatternCollection> m_CosmicEtaPatternsKey{this, "CosmicEtaPatterns", "CosmicEtaPatterns"}; diff --git a/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/MuonHoughPatternTools/MuonHoughPatternTool.h b/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/MuonHoughPatternTools/MuonHoughPatternTool.h index 8d2fe48117ac453c4e9926df503640924323118e..e683dc4d323dfc08d533fe053351ca938ac763ec 100755 --- a/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/MuonHoughPatternTools/MuonHoughPatternTool.h +++ b/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/MuonHoughPatternTools/MuonHoughPatternTool.h @@ -5,14 +5,15 @@ #ifndef MUONHOUGHPATTERNTOOLS_MUONHOUGHPATTERNTOOL_H #define MUONHOUGHPATTERNTOOLS_MUONHOUGHPATTERNTOOL_H +#include <TFile.h> +#include <TH2.h> + #include "AthenaBaseComps/AthAlgTool.h" #include "MuonHoughPatternEvent/MuonHoughMathUtils.h" -#include "MuonHoughPatternTools/IMuonHoughPatternTool.h" +#include "MuonRecToolInterfaces/IMuonHoughPatternTool.h" class MuonHoughTransformSteering; class MuonHoughTransformer; -class TFile; -class TH2F; class MuonHoughPatternTool : virtual public IMuonHoughPatternTool, public AthAlgTool { public: @@ -22,34 +23,32 @@ public: virtual ~MuonHoughPatternTool() = default; /** method that builds the patterns */ - virtual void makePatterns(const MuonHoughHitContainer* hitcontainer, MuonHoughPatternContainerShip& houghpatterns) const; + virtual void makePatterns(const MuonHoughHitContainer& hitcontainer, MuonHoughPatternContainerShip& houghpatterns) const override; /** initiates private members */ - virtual StatusCode initialize(); + virtual StatusCode initialize() override; /** deletes private members */ - virtual StatusCode finalize(); + virtual StatusCode finalize() override; /** returns phipattern container in EDM */ - virtual MuonPrdPatternCollection* getPhiMuonPatterns(MuonHoughPatternContainerShip& houghpatterns) const; + virtual std::unique_ptr<MuonPrdPatternCollection> getPhiMuonPatterns(MuonHoughPatternContainerShip& houghpatterns) const override; /** returns etapattern container in EDM */ - virtual MuonPrdPatternCollection* getEtaMuonPatterns(MuonHoughPatternContainerShip& houghpatterns) const; + virtual std::unique_ptr<MuonPrdPatternCollection> getEtaMuonPatterns(MuonHoughPatternContainerShip& houghpatterns) const override; - /** resets houpattern vector, called once per event from FinderTool*/ - void reset(MuonHoughPatternContainerShip& houghpattern) const; /** creates houghpatterns, called from FinderTool */ MuonHoughPatternContainerShip emptyHoughPattern() const; private: /** method that builds the patterns */ - virtual void makePatterns(int id_number, double weightmdt, const MuonHoughHitContainer* event, - MuonHoughPatternContainerShip& houghpatterns) const; + void makePatterns(int id_number, double weightmdt, const MuonHoughHitContainer& event, + MuonHoughPatternContainerShip& houghpatterns) const; /** returns curvedpattern container in EDM */ - MuonPrdPatternCollection* getCurvedMuonPatterns(MuonHoughPatternContainerShip& houghpatterns) const; + std::unique_ptr<MuonPrdPatternCollection> getCurvedMuonPatterns(MuonHoughPatternContainerShip& houghpatterns) const; /** reset association flag of hits in m_event */ - static void resetAssociation(const MuonHoughHitContainer* event); + static void resetAssociation(const MuonHoughHitContainer& event); /** reduces Detector sizes for Hough Histograms to find patterns from muons from the Interaction Point (default on) */ void useIPMuons(); @@ -70,41 +69,38 @@ private: * @param[in] event_to_analyse The hitcontainer which will be associated to the pattern * @param[in] houghtransform The HoughTransform */ - bool analyseHisto(int id_number, int level, const MuonHoughHitContainer* event_to_analyse, MuonHoughTransformSteering* houghtransform, - MuonHoughPatternContainerShip& houghpatterns) const; - - /** method to analyse the pattern build, currently nothing implemented */ - void analyseTrack(int id_number, const MuonHoughHitContainer* event_to_analyse, MuonHoughTransformSteering* houghtransform) const; + bool analyseHisto(int id_number, int level, const std::unique_ptr<MuonHoughHitContainer>& event_to_analyse, + std::unique_ptr<MuonHoughTransformSteering>& houghtransform, MuonHoughPatternContainerShip& houghpatterns) const; /** returns if there are hits left */ - static bool hitsLeft(const MuonHoughHitContainer* event); + static bool hitsLeft(const MuonHoughHitContainer& event); /** returns number of hits left (unused) */ - int numberOfHits(const MuonHoughHitContainer* event) const; + int numberOfHits(const MuonHoughHitContainer& event) const; /** checks if hit is already in one of the found houghpatterns (unused) */ bool hitInHoughPattern(MuonHoughHit* hit, const MuonHoughPatternContainer& houghpattern) const; /** returns a hitcontainer with hits not yet used in pattern */ - static MuonHoughHitContainer* hitsNotInPattern(const MuonHoughHitContainer* event, int id_number); + static std::unique_ptr<MuonHoughHitContainer> hitsNotInPattern(const MuonHoughHitContainer& event, int id_number); /** rescales hits per iteration to reduce number of patterns when already some have been found */ - void weightRescaling(const MuonHoughHitContainer* event, int id_number, int level) const; + void weightRescaling(const MuonHoughHitContainer& event, int id_number, int level) const; /** calculates new weights based on rejection factor (1-origweight) and number of hits in event, only done for MDTs */ - void calculateWeights(const MuonHoughHitContainer* event, double weightmdt) const; + void calculateWeights(const MuonHoughHitContainer& event, double weightmdt) const; /** returns number of hits that are in both hough patterns */ - int overlapHoughPatterns(const MuonHoughPattern* houghpattern1, const MuonHoughPattern* houghpattern2) const; + int overlapHoughPatterns(const MuonHoughPattern& houghpattern1, const MuonHoughPattern& houghpattern2) const; /** selects the hitcontainer to be used for filling the histograms */ - MuonHoughHitContainer* whichEventHough(int id, const MuonHoughHitContainer* event, double weightmdt) const; + std::unique_ptr<MuonHoughHitContainer> whichEventHough(int id, const MuonHoughHitContainer& event, double weightmdt) const; /** selects the hitcontainer to be used to associate to the maxima */ - MuonHoughHitContainer* whichEventAssociation(int id, const MuonHoughHitContainer* event) const; + std::unique_ptr<MuonHoughHitContainer> whichEventAssociation(int id, const MuonHoughHitContainer& event) const; /** returns the Houghtransform for the id */ - MuonHoughTransformSteering* whichHoughTransform(int id) const; + std::unique_ptr<MuonHoughTransformSteering> whichHoughTransform(int id) const; /** returns the maximum iteration, not in use */ std::vector<int> maxLevelHoughPattern(const MuonHoughPatternContainerShip& houghpattern) const; @@ -117,15 +113,17 @@ private: void transformCoordsMaximum(std::pair<double, double>& coordsmaximum, double r0_true) const; /** converts hough pattern to EDM eta patterns */ - Muon::MuonPrdPattern* houghPatternToEtaPattern(MuonHoughPattern* houghpattern) const; + std::unique_ptr<Muon::MuonPrdPattern> houghPatternToEtaPattern(const MuonHoughPattern& houghpattern) const; /** converts hough pattern to EDM phi patterns */ - Muon::MuonPrdPattern* houghPatternToPhiPattern(MuonHoughPattern* houghpattern) const; + std::unique_ptr<Muon::MuonPrdPattern> houghPatternToPhiPattern(const MuonHoughPattern& houghpattern) const; /** converts and combines two hough patterns to one EDM phi pattern */ - Muon::MuonPrdPattern* houghPatternsToOneEtaPattern(MuonHoughPattern* houghpattern1, MuonHoughPattern* houghpattern2) const; + std::unique_ptr<Muon::MuonPrdPattern> houghPatternsToOneEtaPattern(const MuonHoughPattern& houghpattern1, + const MuonHoughPattern& houghpattern2) const; /** converts and combines two hough patterns to one EDM phi pattern */ - Muon::MuonPrdPattern* houghPatternsToOnePhiPattern(MuonHoughPattern* houghpattern1, MuonHoughPattern* houghpattern2) const; + std::unique_ptr<Muon::MuonPrdPattern> houghPatternsToOnePhiPattern(const MuonHoughPattern& houghpattern1, + const MuonHoughPattern& houghpattern2) const; /** converts hough pattern to EDM phi patterns and cleans it from outliers */ - Muon::MuonPrdPattern* houghPatternToCleanPhiPattern(MuonHoughPattern* houghpattern) const; + std::unique_ptr<Muon::MuonPrdPattern> houghPatternToCleanPhiPattern(MuonHoughPattern& houghpattern) const; /** returns minimum number of hits a hough pattern can contain */ unsigned int getThresholdHoughPattern(int id_number) const; @@ -133,13 +131,13 @@ private: double getThresholdHisto(int id_number) const; /** calculates the mdt weight cut value */ - void setWeightMdtCutValue(const MuonHoughHitContainer* event, double& weightmdt) const; + void setWeightMdtCutValue(const MuonHoughHitContainer& event, double& weightmdt) const; /** hit through weight cut? */ bool hitThroughCut(MuonHoughHit* hit, double weightmdt) const; /** pointer to the file name for the hough histograms */ - TFile* m_file{}; + std::unique_ptr<TFile> m_file; /** object for use of mathematical formulas for trackmodels */ MuonHoughMathUtils m_muonhoughmathutils; @@ -157,7 +155,7 @@ private: Gaudi::Property<bool> m_use_curvedhough{this, "UseCurvedHough", true}; /** number of hough transforms currently supported (7) */ - int m_number_of_ids; + int m_number_of_ids{7}; /** number of iterations (5) */ Gaudi::Property<int> m_number_of_maxima{this, "NumberOfMaximaPerIterations", 5}; @@ -165,9 +163,9 @@ private: /** use rpc phi strips in phi-patterns (true) */ // const bool m_use_rpc_measures_phi; /** use rpc eta strips in eta-patterns (true) */ - const bool m_use_rpc_measures_eta; + static constexpr bool m_use_rpc_measures_eta{true}; /** use interaction point constraint (true) */ - bool m_use_ip; + bool m_use_ip{false}; /** minimal size for a phi pattern (1) */ Gaudi::Property<unsigned int> m_thresholdpattern_xyz{this, "SetThresholdPatternRPhi", 1}; @@ -177,85 +175,82 @@ private: // hittosegment association: /** distance hits are associated with pattern in mm */ - const double m_maximum_residu_mm; + static constexpr double m_maximum_residu_mm{500.}; /** distance hits are associated with pattern in mm for cosmics */ - const double m_maximum_residu_mm_cosmics; + static constexpr double m_maximum_residu_mm_cosmics{2000.}; /** distance hits are associated with pattern in degrees */ - const double m_maximum_residu_angle; + static constexpr double m_maximum_residu_angle{3.}; /** // number of maximum iterations over houghtransform */ - const int m_maximum_level; - + static constexpr int m_maximum_level{5}; // for hough_correction: - /** use hough correction * to correct the maximum found in rz-plane slightly as there is a bias in the houghtransform */ // const bool m_use_hough_correction; /** constant 1 for z for hough correction */ - const double m_z_cor_constant; + static constexpr double m_z_cor_constant{-10000.}; /** constant 2 for z for hough correction */ - const double m_z_cor_constant2; + static constexpr double m_z_cor_constant2{6000.}; /** constant 1 for theta for hough correction */ - const double m_theta_cor_constant; + static constexpr double m_theta_cor_constant{-0.042}; /** constant 2 for theta for hough correction */ - const double m_theta_cor_constant2; + static constexpr double m_theta_cor_constant2{4000.}; // detectorsizes: /** acceptancy of patterns in xy (phi) in mm */ - double m_detectorsize_xy; + double m_detectorsize_xy{0.}; /** acceptancy of patterns in yz (not used) in mm */ - double m_detectorsize_yz; + double m_detectorsize_yz{0.}; /** acceptancy of patterns in rz (eta) in mm */ - double m_detectorsize_rz; - + double m_detectorsize_rz{0.}; /** size of full detector in xy (phi) in mm, used as acceptancy for cosmics */ - const double m_detectorsize_xy_full; + static constexpr double m_detectorsize_xy_full{15000.}; /** size of full detector in yz (not used) in mm, used as acceptancy for cosmics */ - const double m_detectorsize_yz_full; + static constexpr double m_detectorsize_yz_full{25000.}; /** size of full detector in rz (eta) in mm, used as acceptancy for cosmics */ - const double m_detectorsize_rz_full; + static constexpr double m_detectorsize_rz_full{27750.}; /** acceptancy of patterns for ip in xy (phi) in mm */ - const double m_detectorsize_xy_ip; + static constexpr double m_detectorsize_xy_ip{600.}; /** acceptancy of patterns for ip in yz (not used) in mm */ - const double m_detectorsize_yz_ip; + static constexpr double m_detectorsize_yz_ip{1000.}; /** acceptancy of patterns for ip in rz (eta) in mm */ - const double m_detectorsize_rz_ip; + static constexpr double m_detectorsize_rz_ip{1500.}; /** max range of angle in xyz in degrees (360) */ - const double m_detectorsize_angle_xyz; + static constexpr double m_detectorsize_angle_xyz{360.}; /** max range of angle in rz in degrees (180) */ - const double m_detectorsize_angle_rz; + static constexpr double m_detectorsize_angle_rz{180.}; /** max range of 1/sqrt(curvature) for curved transform, corresponds to 0.02 ~ 2,5m ~ 1.6GeV */ // const double m_detectorsize_inv_sqrt_curvature; // properties of histograms: /** bin width for xy */ - const double m_stepsize_xy; + static constexpr double m_stepsize_xy{75.}; /** bin width for yz */ - const double m_stepsize_yz; + static constexpr double m_stepsize_yz{250.}; /** bin width for rz */ - const double m_stepsize_rz; + static constexpr double m_stepsize_rz{75.}; /** bin width for xy cosmics */ - const double m_stepsize_xy_cosmics; + static constexpr double m_stepsize_xy_cosmics{150.}; /** bin width for rzcosmics */ - const double m_stepsize_rz_cosmics; + static constexpr double m_stepsize_rz_cosmics{150.}; /** bin width for angle in xyz */ - const double m_stepsize_per_angle_xyz; + static constexpr double m_stepsize_per_angle_xyz{0.25}; /** bin width for angle in rz */ - const double m_stepsize_per_angle_rz; + static constexpr double m_stepsize_per_angle_rz{0.25}; /** bin width for angle in xy cosmics */ - const double m_stepsize_per_angle_xy_cosmics; + static constexpr double m_stepsize_per_angle_xy_cosmics{1.}; /** bin width for angle in rzcosmics */ - const double m_stepsize_per_angle_rz_cosmics; + static constexpr double m_stepsize_per_angle_rz_cosmics{2.}; /** bin width for 1/sqrt(curvature) */ // const double m_stepsize_per_inv_sqrt_curvature; /** new curved properties */ - const int m_nbins_curved; + static constexpr int m_nbins_curved{160}; /** weight_cut for hits in hough */ Gaudi::Property<bool> m_weightcut{this, "ApplyWeightCut", true}; @@ -277,7 +272,7 @@ private: /** number of sectors (different regions in which patterns can be found in the same iteration) in rz */ Gaudi::Property<int> m_number_of_sectors_rz{this, "SetNumberOfSectorsREta", 16}; /** number of sectors (different regions in which patterns can be found in the same iteration) in rzcosmics */ - int m_number_of_sectors_rz_cosmics; + int m_number_of_sectors_rz_cosmics{12}; /** output level (range 0-10) (default 0) */ Gaudi::Property<int> m_printlevel{this, "Printlevel", 0}; diff --git a/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/MuonHoughPatternTools/MuonLayerHoughTool.h b/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/MuonHoughPatternTools/MuonLayerHoughTool.h index 9f3ecfa2386e9f3c306a90647cdff23ee2e6c099..89f221e126da96e5cfaefc3f1eec23e35e54eb12 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/MuonHoughPatternTools/MuonLayerHoughTool.h +++ b/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/MuonHoughPatternTools/MuonLayerHoughTool.h @@ -8,13 +8,13 @@ #include <set> #include "AthenaBaseComps/AthAlgTool.h" +#include "FourMomUtils/xAODP4Helpers.h" #include "GaudiKernel/ServiceHandle.h" #include "GaudiKernel/ToolHandle.h" #include "GeoPrimitives/GeoPrimitives.h" #include "MuonClusterization/RpcHitClustering.h" #include "MuonClusterization/TgcHitClustering.h" #include "MuonDetDescrUtils/MuonSectorMapping.h" -#include "MuonHoughPatternTools/HoughDataPerSec.h" #include "MuonIdHelpers/IMuonIdHelperSvc.h" #include "MuonLayerHough/HitNtuple.h" #include "MuonLayerHough/MuonLayerHough.h" @@ -26,18 +26,17 @@ #include "MuonPrepRawData/MuonPrepDataContainer.h" #include "MuonPrepRawData/sTgcPrepDataContainer.h" #include "MuonRecHelperTools/MuonEDMPrinterTool.h" +#include "MuonRecToolInterfaces/HoughDataPerSec.h" #include "MuonRecToolInterfaces/IMuonHoughPatternFinderTool.h" +#include "TFile.h" +#include "TTree.h" #include "TrkTruthData/PRD_MultiTruthCollection.h" #include "xAODMuon/MuonSegmentContainer.h" #include "xAODTruth/TruthParticleContainer.h" - namespace Trk { class PrepRawData; } -class TFile; -class TTree; - namespace MuonGM { class MuonDetectorManager; } @@ -45,8 +44,6 @@ namespace MuonHough { class HitDebugInfo; } -static const InterfaceID IID_MuonLayerHoughTool("Muon::MuonLayerHoughTool", 1, 0); - namespace Muon { class MuonLayerHoughTool : virtual public IMuonHoughPatternFinderTool, public AthAlgTool { @@ -54,14 +51,12 @@ namespace Muon { typedef std::vector<IdentifierHash> HashVec; typedef std::vector<HashVec> RegionHashVec; typedef std::vector<RegionHashVec> TechnologyRegionHashVec; - typedef RegionHashVec::const_iterator RegionHashVecCit; struct CollectionsPerSector { int sector; TechnologyRegionHashVec technologyRegionHashVecs; }; typedef std::vector<CollectionsPerSector> CollectionsPerSectorVec; - typedef CollectionsPerSectorVec::const_iterator CollectionsPerSectorCit; typedef HoughDataPerSec::HitVec HitVec; typedef HoughDataPerSec::RegionHitVec RegionHitVec; @@ -75,18 +70,15 @@ namespace Muon { typedef HoughDataPerSec HoughDataPerSector; - typedef Muon::HoughDataPerSectorVec HoughDataPerSectorVec; + using HoughDataPerSectorVec = Muon::HoughDataPerSectorVec; class Road { public: - Road(MuonHough::MuonLayerHough::Maximum& seed_) : - neighbouringRegion(MuonStationIndex::DetectorRegionUnknown), neighbouringSector(-1), seed(&seed_) { - add(seed); - } - Road() : neighbouringRegion(MuonStationIndex::DetectorRegionUnknown), neighbouringSector(-1), seed(0) {} - MuonStationIndex::DetectorRegionIndex neighbouringRegion; - int neighbouringSector; - MuonHough::MuonLayerHough::Maximum* seed; + Road(MuonHough::MuonLayerHough::Maximum& seed_) : seed(&seed_) { add(seed); } + Road() = default; + MuonStationIndex::DetectorRegionIndex neighbouringRegion{MuonStationIndex::DetectorRegionUnknown}; + int neighbouringSector{-1}; + MuonHough::MuonLayerHough::Maximum* seed{nullptr}; void add(MuonHough::MuonLayerHough::Maximum* max) { maxima.push_back(max); maximumSet.insert(max); @@ -105,17 +97,14 @@ namespace Muon { /** Destructor */ virtual ~MuonLayerHoughTool() = default; - /** @brief access to tool interface */ - static const InterfaceID& interfaceID() { return IID_MuonLayerHoughTool; } - virtual StatusCode initialize() override; virtual StatusCode finalize() override; - std::pair<std::unique_ptr<MuonPatternCombinationCollection>, std::unique_ptr<HoughDataPerSectorVec>> analyse( + virtual std::pair<std::unique_ptr<MuonPatternCombinationCollection>, std::unique_ptr<HoughDataPerSectorVec>> find( const MdtPrepDataContainer* mdtCont, const CscPrepDataContainer* cscCols, const TgcPrepDataContainer* tgcCont, const RpcPrepDataContainer* rpcCont, const sTgcPrepDataContainer* stgcCont, const MMPrepDataContainer* mmCont, - const EventContext& ctx) const; + const EventContext& ctx) const override; /** find patterns for a give set of MuonPrepData collections + optionally CSC segment combinations */ virtual std::pair<std::unique_ptr<MuonPatternCombinationCollection>, std::unique_ptr<HoughDataPerSectorVec>> find( @@ -147,18 +136,23 @@ namespace Muon { std::pair<std::unique_ptr<MuonPatternCombinationCollection>, std::unique_ptr<HoughDataPerSectorVec>> analyse(State& state) const; - void fillHitsPerSector(std::set<Identifier>& truthHits, std::vector<std::unique_ptr<TgcHitClusteringObj>>& tgcClusteringObjs, - const CollectionsPerSector& hashes, const MdtPrepDataContainer* mdtCont, - const CscPrepDataContainer* /*cscCont*/, const TgcPrepDataContainer* tgcCont, - const RpcPrepDataContainer* rpcCont, const sTgcPrepDataContainer* stgcCont, - const MMPrepDataContainer* mmCont, HoughDataPerSector& houghData) const; + void fillHitsPerSector(const EventContext& ctx, State& state, const int sector, const CollectionsPerSector& hashes, + const MdtPrepDataContainer* mdtCont, const CscPrepDataContainer* cscCont, + const TgcPrepDataContainer* tgcCont, const RpcPrepDataContainer* rpcCont, + const sTgcPrepDataContainer* stgcCont, const MMPrepDataContainer* mmCont) const; - void fill(std::set<Identifier>& truthHits, const MdtPrepDataCollection& mdts, HitVec& hits) const; - void fill(std::set<Identifier>& truthHits, std::vector<std::unique_ptr<TgcHitClusteringObj>>& tgcClusteringObjs, - const TgcPrepDataCollection& tgcs, HitVec& hits, PhiHitVec& phiHits, int sector) const; - void fill(std::set<Identifier>& truthHits, const RpcPrepDataCollection& rpcs, HitVec& hits, PhiHitVec& phiHits) const; - void fill(std::set<Identifier>& truthHits, const MMPrepDataCollection& mdts, HitVec& hits) const; - void fill(std::set<Identifier>& truthHits, const sTgcPrepDataCollection& stgcs, HitVec& hits, PhiHitVec& phiHits, int sector) const; + void fill(const EventContext& ctx, std::set<Identifier>& truthHits, const MdtPrepDataCollection& mdts, HitVec& hits) const; + void fill(const EventContext& ctx, std::set<Identifier>& truthHits, + std::vector<std::unique_ptr<TgcHitClusteringObj>>& tgcClusteringObjs, const TgcPrepDataCollection& tgcs, HitVec& hits, + PhiHitVec& phiHits, int sector) const; + void fill(const EventContext& ctx, std::set<Identifier>& truthHits, const RpcPrepDataCollection& rpcs, HitVec& hits, + PhiHitVec& phiHits) const; + void fill(const EventContext& ctx, std::set<Identifier>& truthHits, const MMPrepDataCollection& mdts, HitVec& hits) const; + void fill(const EventContext& ctx, std::set<Identifier>& truthHits, const sTgcPrepDataCollection& stgcs, HitVec& hits, + PhiHitVec& phiHits, int sector) const; + + void fill(const EventContext& ctx, std::set<Identifier>& truthHits, const CscPrepDataCollection& cscs, HitVec& hits, + PhiHitVec& phiHits) const; bool findMaxima(std::set<Identifier>& truthHits, std::set<Identifier>& foundTruthHits, MaximumVec& seedMaxima, MuonHough::MuonLayerHough& hough, HitVec& hits, MaximumVec& maxima) const; @@ -209,10 +203,10 @@ namespace Muon { std::vector<MuonHough::MuonLayerHoughSelector> m_selectors; std::vector<MuonHough::MuonLayerHoughSelector> m_selectorsLoose; Gaudi::Property<bool> m_doNtuple{this, "DoNtuple", false}; - TFile* m_file{}; - TTree* m_tree{}; - mutable MuonHough::HitNtuple* m_ntuple - ATLAS_THREAD_SAFE = {}; // Marked as thread-safe because it's disabled when running multi-threaded + std::unique_ptr<TFile> m_file{}; + std::unique_ptr<TTree> m_tree{}; + mutable std::unique_ptr<MuonHough::HitNtuple> m_ntuple + ATLAS_THREAD_SAFE{}; // Marked as thread-safe because it's disabled when running multi-threaded SG::ReadHandleKeyArray<PRD_MultiTruthCollection> m_truthNames{this, "TruthNames", {}}; SG::ReadHandleKey<xAOD::TruthParticleContainer> m_MuonTruthParticlesKey{this, "MuonTruthParticlesKey", "MuonTruthParticles"}; @@ -227,9 +221,8 @@ namespace Muon { true}; // if true, do parabolic; if false, do linear extrapolation Gaudi::Property<float> m_extrapolationDistance{this, "ExtrapolationDistance", 1500.}; // default value is 1500 Gaudi::Property<bool> m_addSectors{this, "AddSectors", false}; // default false - - unsigned int m_ntechnologies; - std::map<unsigned int, unsigned int> m_techToTruthNameIdx; // mapping the muon technology to the index of the m_truthNames vector + unsigned int m_ntechnologies{UINT_MAX}; + std::map<unsigned int, unsigned int> m_techToTruthNameIdx{}; // mapping the muon technology to the index of the m_truthNames vector CollectionsPerSectorVec m_collectionsPerSector; MuonSectorMapping m_sectorMapping; diff --git a/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/src/MuonHoughPatternFinderTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/src/MuonHoughPatternFinderTool.cxx index 92be4046268dcb2a7e00c4002b659c2c29d3286a..c2ed20693ebf7cc09f288f6120939411681f058c 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/src/MuonHoughPatternFinderTool.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/src/MuonHoughPatternFinderTool.cxx @@ -33,15 +33,15 @@ namespace Muon { AthAlgTool(t, n, p), m_weight_csc_on_segment(2.) { declareInterface<IMuonHoughPatternFinderTool>(this); } - + MuonHoughPatternFinderTool::~MuonHoughPatternFinderTool() = default; StatusCode MuonHoughPatternFinderTool::initialize() { - if (m_use_histos == true) { - m_file = new TFile("Hough_histos.root", "RECREATE"); - m_weighthistogram = new TH1F("weighthisto", "weighthisto", 100, -0.5, 2); - m_weighthistogrammdt = new TH1F("weighthistomdt", "weighthistomdt", 100, -0.3, 2.2); - m_weighthistogramrpc = new TH1F("weighthistorpc", "weighthistorpc", 100, -0.3, 2.2); - m_weighthistogramcsc = new TH1F("weighthistocsc", "weighthistocsc", 100, -0.3, 2.2); - m_weighthistogramtgc = new TH1F("weighthistotgc", "weighthistotgc", 100, -0.3, 2.2); + if (m_use_histos) { + m_file = std::make_unique<TFile>("Hough_histos.root", "RECREATE"); + m_weighthistogram = std::make_unique<TH1F>("weighthisto", "weighthisto", 100, -0.5, 2); + m_weighthistogrammdt = std::make_unique<TH1F>("weighthistomdt", "weighthistomdt", 100, -0.3, 2.2); + m_weighthistogramrpc = std::make_unique<TH1F>("weighthistorpc", "weighthistorpc", 100, -0.3, 2.2); + m_weighthistogramcsc = std::make_unique<TH1F>("weighthistocsc", "weighthistocsc", 100, -0.3, 2.2); + m_weighthistogramtgc = std::make_unique<TH1F>("weighthistotgc", "weighthistotgc", 100, -0.3, 2.2); } ATH_MSG_VERBOSE("MuonHoughPatternFinderTool::Initializing"); @@ -67,6 +67,24 @@ namespace Muon { return StatusCode::SUCCESS; } + template <class T> std::vector<const T*> MuonHoughPatternFinderTool::stdVec(const MuonPrepDataContainer<T>* cont) const { + std::vector<const T*> vec; + if (cont) { + vec.reserve(cont->size()); + for (const auto& ele : *cont) { vec.push_back(ele); } + } + return vec; + } + std::pair<std::unique_ptr<MuonPatternCombinationCollection>, std::unique_ptr<HoughDataPerSectorVec>> MuonHoughPatternFinderTool::find( + const MdtPrepDataContainer* mdtCont, const CscPrepDataContainer* cscCont, const TgcPrepDataContainer* tgcCont, + const RpcPrepDataContainer* rpcCont, const sTgcPrepDataContainer* stgcCont, const MMPrepDataContainer* mmCont, + const EventContext& ctx) const { + if (stgcCont || mmCont) { + ATH_MSG_FATAL("NSW is not yet implemented in this tool"); + return std::make_pair(std::make_unique<MuonPatternCombinationCollection>(), std::make_unique<HoughDataPerSectorVec>()); + } + return find(stdVec(mdtCont), stdVec(cscCont), stdVec(tgcCont), stdVec(rpcCont), nullptr, ctx); + } std::pair<std::unique_ptr<MuonPatternCombinationCollection>, std::unique_ptr<Muon::HoughDataPerSectorVec>> MuonHoughPatternFinderTool::find(const std::vector<const MdtPrepDataCollection*>& mdtCols, const std::vector<const CscPrepDataCollection*>& cscCols, @@ -87,8 +105,8 @@ namespace Muon { std::make_unique<std::map<const Trk::PrepRawData*, std::set<const Trk::PrepRawData*, Muon::IdentifierPrdLess>>>(); // read event_data: - const MuonHoughHitContainer* hitcontainer = getAllHits(mdtCols, cscCols, tgcCols, rpcCols, cscSegmentCombis, rpcmdtstationmap, - tgcmdtstationmap, phietahitassociation.get()); + std::unique_ptr<MuonHoughHitContainer> hitcontainer{ + getAllHits(mdtCols, cscCols, tgcCols, rpcCols, cscSegmentCombis, rpcmdtstationmap, tgcmdtstationmap, *phietahitassociation)}; // analyse data std::unique_ptr<MuonPatternCombinationCollection> patCombiCol; if (hitcontainer) { @@ -96,9 +114,6 @@ namespace Muon { } else { ATH_MSG_INFO(" No hit container created! "); } - // clear hit container - delete hitcontainer; - hitcontainer = nullptr; // ensure we always output a collection if (!patCombiCol) { @@ -107,7 +122,7 @@ namespace Muon { } // summary - if (m_summary == true || this->msgLvl(MSG::DEBUG)) { + if (m_summary || msgLvl(MSG::DEBUG)) { if (patCombiCol->empty()) ATH_MSG_DEBUG(" summarizing output: Combined pattern combination empty"); else @@ -129,13 +144,17 @@ namespace Muon { } StatusCode MuonHoughPatternFinderTool::finalize() { - if (m_use_histos == true) { - m_file->Write(); - m_file->Close(); - ATH_MSG_DEBUG("MuonHoughPatternFinderTool:: delete rootfile"); - delete m_file; - m_file = nullptr; - ATH_MSG_DEBUG("MuonHoughPatternFinderTool::delete Histogram: "); + if (m_use_histos) { + auto save_histo = [this](std::unique_ptr<TH1>& h_ptr) { + if (!h_ptr) return; + m_file->WriteObject(h_ptr.get(), h_ptr->GetName()); + h_ptr.reset(); + }; + save_histo(m_weighthistogram); + save_histo(m_weighthistogrammdt); + save_histo(m_weighthistogramrpc); + save_histo(m_weighthistogramcsc); + save_histo(m_weighthistogramtgc); } ATH_MSG_VERBOSE("finalize()"); @@ -152,12 +171,12 @@ namespace Muon { MuonHoughPatternContainerShip houghpattern = m_muonHoughPatternTool->emptyHoughPattern(); // pass through hitcontainer (better still: preprawdata and only after make // internal hitcontainer) - m_muonHoughPatternTool->makePatterns(&hitcontainer, houghpattern); + m_muonHoughPatternTool->makePatterns(hitcontainer, houghpattern); - MuonPrdPatternCollection* phipatterns = m_muonHoughPatternTool->getPhiMuonPatterns(houghpattern); - MuonPrdPatternCollection* etapatterns = m_muonHoughPatternTool->getEtaMuonPatterns(houghpattern); + std::unique_ptr<MuonPrdPatternCollection> phipatterns{m_muonHoughPatternTool->getPhiMuonPatterns(houghpattern)}; + std::unique_ptr<MuonPrdPatternCollection> etapatterns{m_muonHoughPatternTool->getEtaMuonPatterns(houghpattern)}; - if (m_summary == true || this->msgLvl(MSG::DEBUG)) { + if (m_summary || msgLvl(MSG::DEBUG)) { if (phipatterns->empty()) ATH_MSG_DEBUG(" summarizing input: Phi pattern combination empty"); else @@ -171,19 +190,20 @@ namespace Muon { ATH_MSG_DEBUG("writePatterns"); ATH_MSG_DEBUG("size: phi: " << phipatterns->size() << " eta: " << etapatterns->size()); - MuonPrdPatternCollection* combinedpatterns = nullptr; + std::unique_ptr<MuonPrdPatternCollection> combinedpatterns; MuonPatternCombinationCollection* patterncombinations = nullptr; // make + write muonpatterncombinations if (!etapatterns->empty()) { - combinedpatterns = m_muonCombinePatternTool->combineEtaPhiPatterns(phipatterns, etapatterns, phietahitassociation); + combinedpatterns.reset( + m_muonCombinePatternTool->combineEtaPhiPatterns(phipatterns.get(), etapatterns.get(), phietahitassociation)); } if (combinedpatterns) { - patterncombinations = m_muonCombinePatternTool->makePatternCombinations(combinedpatterns); + patterncombinations = m_muonCombinePatternTool->makePatternCombinations(combinedpatterns.get()); } else { ATH_MSG_DEBUG("No combined patterns, creating dummy."); - combinedpatterns = new MuonPrdPatternCollection(); + combinedpatterns = std::make_unique<MuonPrdPatternCollection>(); } record(phipatterns, m_CosmicPhiPatternsKey, ctx); @@ -191,31 +211,27 @@ namespace Muon { record(combinedpatterns, m_COMBINED_PATTERNSKey, ctx); /** empty and clear the houghpattern vectors */ - m_muonHoughPatternTool->reset(houghpattern); + houghpattern.clear(); return patterncombinations; } - const MuonHoughHitContainer* MuonHoughPatternFinderTool::getAllHits( + std::unique_ptr<MuonHoughHitContainer> MuonHoughPatternFinderTool::getAllHits( const std::vector<const MdtPrepDataCollection*>& mdtCols, const std::vector<const CscPrepDataCollection*>& cscCols, const std::vector<const TgcPrepDataCollection*>& tgcCols, const std::vector<const RpcPrepDataCollection*>& rpcCols, const MuonSegmentCombinationCollection* cscSegmentCombis, std::map<int, std::vector<std::pair<int, int>>>& rpcmdtstationmap, std::map<int, std::vector<std::pair<int, int>>>& tgcmdtstationmap, - std::map<const Trk::PrepRawData*, std::set<const Trk::PrepRawData*, Muon::IdentifierPrdLess>>* phietahitassociation) const { + std::map<const Trk::PrepRawData*, std::set<const Trk::PrepRawData*, Muon::IdentifierPrdLess>>& phietahitassociation) const { ATH_MSG_VERBOSE("getAllHits()"); - MuonHoughHitContainer* hitcontainer = new MuonHoughHitContainer; + std::unique_ptr<MuonHoughHitContainer> hitcontainer = std::make_unique<MuonHoughHitContainer>(); // reserve space for 5000 hits (arbitrary), this should gain some cpu/memory // for background, but will lose for lower occupancy. If anyone knows a way to // predict the number of muon hits, I'd like to hear it. hitcontainer->reserve(5000); - bool use_csc_segments = cscSegmentCombis != nullptr; - - if (use_csc_segments && m_use_csc == true) { - // m_csc_segments = cscSegmentCombis; - MuonSegmentCombinationCollection::const_iterator msc = cscSegmentCombis->begin(); - MuonSegmentCombinationCollection::const_iterator msc_end = cscSegmentCombis->end(); + const bool use_csc_segments = (cscSegmentCombis != nullptr); + if (use_csc_segments && m_use_csc) { std::set<Identifier> csc_set; // set to make sure every csc hit is only // passed to hitcontainer once std::pair<std::set<Identifier>::iterator, bool> csc_pair; @@ -234,24 +250,22 @@ namespace Muon { layer_ids.reserve(400); // two loops needed as number of hits per layer needs to be known - - for (; msc != msc_end; ++msc) { - ATH_MSG_VERBOSE("CSC combo segments loop, segmentcombo " << (*msc)); - for (unsigned int ss = 0; ss < (*msc)->numberOfStations(); ss++) { - Muon::MuonSegmentCombination::SegmentVec* segmentsInCombo = (*msc)->stationSegments(ss); - - Muon::MuonSegmentCombination::SegmentVec::iterator ms = segmentsInCombo->begin(); - Muon::MuonSegmentCombination::SegmentVec::iterator ms_end = segmentsInCombo->end(); - - for (; ms != ms_end; ++ms) { - ATH_MSG_VERBOSE("CSC segments loop, segment: " << (*ms).get()); + for (const Muon::MuonSegmentCombination* msc : *cscSegmentCombis) { + ATH_MSG_VERBOSE("CSC combo segments loop, segmentcombo " << msc); + for (unsigned int ss = 0; ss < msc->numberOfStations(); ++ss) { + for (const std::unique_ptr<MuonSegment>& ms : *msc->stationSegments(ss)) { + if (!ms) { + ATH_MSG_DEBUG("Segment has been already skimmed"); + continue; + } + ATH_MSG_VERBOSE("CSC segments loop, segment: " << ms.get()); std::set<const Trk::PrepRawData*, Muon::IdentifierPrdLess> phi_set; std::vector<const Trk::PrepRawData*> eta_vector; std::pair<std::set<const Trk::PrepRawData*, Muon::IdentifierPrdLess>::iterator, bool> phi_pair; - int nRoTs = (*ms)->numberOfContainedROTs(); + int nRoTs = ms->numberOfContainedROTs(); for (int i = 0; i < nRoTs; ++i) { - const Muon::CscClusterOnTrack* cscOnSeg = dynamic_cast<const Muon::CscClusterOnTrack*>((*ms)->rioOnTrack(i)); + const Muon::CscClusterOnTrack* cscOnSeg = dynamic_cast<const Muon::CscClusterOnTrack*>(ms->rioOnTrack(i)); if (!cscOnSeg) { ATH_MSG_INFO("Dynamic cast to CscClusterOnTrack failed!"); continue; @@ -291,8 +305,7 @@ namespace Muon { // add hit association from segment to map: if (!phi_set.empty()) { ATH_MSG_VERBOSE("Number of Phi Csc hits in segment: " << phi_set.size()); - std::vector<const Trk::PrepRawData*>::iterator vec_it = eta_vector.begin(); - for (; vec_it != eta_vector.end(); ++vec_it) { phietahitassociation->insert(std::make_pair(*vec_it, phi_set)); } + for (const Trk::PrepRawData* prd : eta_vector) { phietahitassociation.insert(std::make_pair(prd, phi_set)); } } } } @@ -301,11 +314,7 @@ namespace Muon { for (unsigned int i = 0; i < csc_rots.size(); i++) { const Muon::CscPrepData* prd = csc_prds[i]; - const Amg::Vector3D globalpos = csc_rots[i]->globalPosition(); - double hitx = globalpos.x(); - double hity = globalpos.y(); - double hitz = globalpos.z(); - + const Amg::Vector3D& globalpos = csc_rots[i]->globalPosition(); bool channel_type = m_idHelperSvc->cscIdHelper().measuresPhi(csc_rots[i]->identify()); double weight = 0.; @@ -315,10 +324,10 @@ namespace Muon { } ATH_MSG_DEBUG(m_printer->print(*prd) << " weight " << weight); - MuonHoughHit* hit = new MuonHoughHit(hitx, hity, hitz, channel_type, MuonHough::CSC, 1., weight, prd); + MuonHoughHit* hit = new MuonHoughHit(globalpos, channel_type, MuonHough::CSC, 1., weight, prd); hitcontainer->addHit(hit); - if (m_use_histos == true) { + if (m_use_histos) { m_weighthistogram->Fill(weight); m_weighthistogramcsc->Fill(weight); } @@ -327,62 +336,45 @@ namespace Muon { // taken and modified from // DetectorDescription/GeoModel/HitDisplay/src/HitDisplaySystem.cxx - if (m_use_rpc == true) { - std::vector<const RpcPrepDataCollection*>::const_iterator it = rpcCols.begin(); - std::vector<const RpcPrepDataCollection*>::const_iterator it_end = rpcCols.end(); - for (; it != it_end; ++it) { - Muon::RpcPrepDataCollection::const_iterator cit_begin = (*it)->begin(); - Muon::RpcPrepDataCollection::const_iterator cit_end = (*it)->end(); - addRpcCollection(cit_begin, cit_end, hitcontainer, rpcmdtstationmap, phietahitassociation); + if (m_use_rpc) { + for (const RpcPrepDataCollection* rpc_coll : rpcCols) { + addRpcCollection(rpc_coll, *hitcontainer, rpcmdtstationmap, phietahitassociation); } } - if (m_use_tgc == true) { - std::vector<const TgcPrepDataCollection*>::const_iterator it = tgcCols.begin(); - std::vector<const TgcPrepDataCollection*>::const_iterator it_end = tgcCols.end(); - for (; it != it_end; ++it) { - Muon::TgcPrepDataCollection::const_iterator cit_begin = (*it)->begin(); - Muon::TgcPrepDataCollection::const_iterator cit_end = (*it)->end(); - addTgcCollection(cit_begin, cit_end, hitcontainer, tgcmdtstationmap, phietahitassociation); + if (m_use_tgc) { + for (const TgcPrepDataCollection* tgc_coll : tgcCols) { + addTgcCollection(tgc_coll, *hitcontainer, tgcmdtstationmap, phietahitassociation); } } - if (m_use_mdt == true) { - std::vector<const MdtPrepDataCollection*>::const_iterator it = mdtCols.begin(); - std::vector<const MdtPrepDataCollection*>::const_iterator it_end = mdtCols.end(); - for (; it != it_end; ++it) { - Muon::MdtPrepDataCollection::const_iterator cit_begin = (*it)->begin(); - Muon::MdtPrepDataCollection::const_iterator cit_end = (*it)->end(); - addMdtCollection(cit_begin, cit_end, hitcontainer, rpcmdtstationmap, tgcmdtstationmap); + if (m_use_mdt) { + for (const MdtPrepDataCollection* prep_coll : mdtCols) { + addMdtCollection(prep_coll, *hitcontainer, rpcmdtstationmap, tgcmdtstationmap); } } - if (m_use_csc == true && !use_csc_segments) { - std::vector<const CscPrepDataCollection*>::const_iterator it = cscCols.begin(); - std::vector<const CscPrepDataCollection*>::const_iterator it_end = cscCols.end(); - for (; it != it_end; ++it) { - Muon::CscPrepDataCollection::const_iterator cit_begin = (*it)->begin(); - Muon::CscPrepDataCollection::const_iterator cit_end = (*it)->end(); - addCscCollection(cit_begin, cit_end, hitcontainer, phietahitassociation); - } + if (m_use_csc && !use_csc_segments) { + for (const CscPrepDataCollection* csc_coll : cscCols) { addCscCollection(csc_coll, *hitcontainer, phietahitassociation); } } - ATH_MSG_VERBOSE("MuonHoughPatternFinderTool::getAllHits() saving " << hitcontainer->size() << " converted hits"); - - for (unsigned int i = 0; i < hitcontainer->size(); i++) { - ATH_MSG_VERBOSE(" hit " << hitcontainer->getHit(i)->getWhichDetector() << " (" << hitcontainer->getHit(i)->getHitx() << "," - << hitcontainer->getHit(i)->getHity() << "," << hitcontainer->getHit(i)->getHitz() << ") " - << " weight: " << hitcontainer->getHit(i)->getWeight() - << " measures phi: " << hitcontainer->getHit(i)->getMeasuresPhi()); + if (msgLevel(MSG::VERBOSE)) { + ATH_MSG_VERBOSE("MuonHoughPatternFinderTool::getAllHits() saving " << hitcontainer->size() << " converted hits"); + for (unsigned int i = 0; i < hitcontainer->size(); i++) { + ATH_MSG_VERBOSE(" hit " << hitcontainer->getHit(i)->getWhichDetector() << " (" << hitcontainer->getHit(i)->getHitx() << "," + << hitcontainer->getHit(i)->getHity() << "," << hitcontainer->getHit(i)->getHitz() << ") " + << " weight: " << hitcontainer->getHit(i)->getWeight() + << " measures phi: " << hitcontainer->getHit(i)->getMeasuresPhi()); + } } - ATH_MSG_VERBOSE("MuonHoughPatternFinderTool::getAllHits() saving " << phietahitassociation->size() << "associated hits "); + ATH_MSG_VERBOSE("MuonHoughPatternFinderTool::getAllHits() saving " << phietahitassociation.size() << "associated hits "); return hitcontainer; } // getAllHits - void MuonHoughPatternFinderTool::record(MuonPrdPatternCollection* patCol, const SG::WriteHandleKey<MuonPrdPatternCollection>& key, - const EventContext& ctx) const { + void MuonHoughPatternFinderTool::record(std::unique_ptr<MuonPrdPatternCollection>& patCol, + const SG::WriteHandleKey<MuonPrdPatternCollection>& key, const EventContext& ctx) const { if (!patCol) { ATH_MSG_WARNING("Zero pointer, could not save patterns!!! "); return; @@ -391,12 +383,11 @@ namespace Muon { // check whether we are writing patterns to storegate, if not delete pattern if (!m_recordAllOutput) { ATH_MSG_DEBUG("Deleted patterns: " << patCol->size() << " at " << key.key()); - // since patCol Datavector, it owns (by defaults its elements) - delete patCol; + } else { SG::WriteHandle<MuonPrdPatternCollection> handle(key, ctx); - StatusCode sc = handle.record(std::unique_ptr<MuonPrdPatternCollection>(patCol)); + StatusCode sc = handle.record(std::move(patCol)); if (sc.isFailure()) { ATH_MSG_WARNING("Could not save patterns at " << key.key()); } else { @@ -404,19 +395,15 @@ namespace Muon { } } } - - bool MuonHoughPatternFinderTool::cut() { return 1 != 0; } - void MuonHoughPatternFinderTool::addRpcCollection( - Muon::RpcPrepDataCollection::const_iterator cit_begin, Muon::RpcPrepDataCollection::const_iterator cit_end, - MuonHoughHitContainer* hitcontainer, std::map<int, std::vector<std::pair<int, int>>>& rpcmdtstationmap, - std::map<const Trk::PrepRawData*, std::set<const Trk::PrepRawData*, Muon::IdentifierPrdLess>>* phietahitassociation) const { - if (cit_begin == cit_end) return; - Muon::RpcPrepDataCollection::const_iterator cit = cit_begin; + const RpcPrepDataCollection* rpc_coll, MuonHoughHitContainer& hitcontainer, + std::map<int, std::vector<std::pair<int, int>>>& rpcmdtstationmap, + std::map<const Trk::PrepRawData*, std::set<const Trk::PrepRawData*, Muon::IdentifierPrdLess>>& phietahitassociation) const { + if (rpc_coll->size() == 0) return; std::map<int, int> number_of_hits_per_layer; std::set<int> layers; // different layer definition between the two!! - int size_begin = hitcontainer->size(); + int size_begin = hitcontainer.size(); if (m_hit_reweights) // reweight hits, according to Peter's new algorithm { @@ -424,8 +411,7 @@ namespace Muon { 2); // filled strips, to determine whether it was no noise rpc hit // (confirmation of ((neighbouring) layer)) - for (; cit != cit_end; ++cit) { - const Muon::RpcPrepData* prd = *cit; + for (const Muon::RpcPrepData* prd : *rpc_coll) { const bool channel_type = m_idHelperSvc->rpcIdHelper().measuresPhi(prd->identify()); const Identifier id = prd->identify(); int strip = m_idHelperSvc->rpcIdHelper().strip(id); // strip between 1 and 99!! @@ -434,9 +420,7 @@ namespace Muon { strips[strip + 1] += 0.5; strips[strip - 1] += 0.5; } - cit = cit_begin; - for (; cit != cit_end; ++cit) { - const Muon::RpcPrepData* prd = *cit; + for (const Muon::RpcPrepData* prd : *rpc_coll) { Identifier id = prd->identify(); const bool channel_type = m_idHelperSvc->rpcIdHelper().measuresPhi(prd->identify()); int strip = m_idHelperSvc->rpcIdHelper().strip(id); // strip between 1 and 99!! @@ -468,17 +452,9 @@ namespace Muon { std::map<const Identifier, std::set<const Trk::PrepRawData*, Muon::IdentifierPrdLess>>::iterator gg_it; std::pair<std::set<const Trk::PrepRawData*, Muon::IdentifierPrdLess>::iterator, bool> gg_insert; - cit = cit_begin; - - for (; cit != cit_end; ++cit) { - const Muon::RpcPrepData* prd = *cit; - - const Amg::Vector3D globalpos = prd->globalPosition(); + for (const Muon::RpcPrepData* prd : *rpc_coll) { + const Amg::Vector3D& globalpos = prd->globalPosition(); const Identifier id = prd->identify(); - const double hitx = globalpos.x(); - const double hity = globalpos.y(); - const double hitz = globalpos.z(); - const bool channel_type = m_idHelperSvc->rpcIdHelper().measuresPhi(id); // gasgapmap @@ -488,9 +464,7 @@ namespace Muon { const Identifier gasGapId = m_idHelperSvc->gasGapId(id); gg_it = gasgapphimap.find(gasGapId); if (gg_it == gasgapphimap.end()) { // gasgapid not yet in map - std::set<const Trk::PrepRawData*, Muon::IdentifierPrdLess> hitset; - hitset.insert(prd); - gasgapphimap.insert(std::make_pair(gasGapId, hitset)); + gasgapphimap[gasGapId] = {prd}; } else { // gasgapid already in set gg_insert = (*gg_it).second.insert(prd); if (!gg_insert.second) { ATH_MSG_DEBUG("WARNING::RPC hit already in set? "); } @@ -526,55 +500,50 @@ namespace Muon { } } } - MuonHoughHit* hit = new MuonHoughHit(hitx, hity, hitz, channel_type, MuonHough::RPC, prob, weight, prd); - hitcontainer->addHit(hit); + MuonHoughHit* hit = new MuonHoughHit(globalpos, channel_type, MuonHough::RPC, prob, weight, prd); + hitcontainer.addHit(hit); ATH_MSG_DEBUG(m_printer->print(*prd) << " NEW weight " << weight); - if (m_use_histos == true) { + if (m_use_histos) { m_weighthistogram->Fill(weight); m_weighthistogramrpc->Fill(weight); } } - int size_end = hitcontainer->size(); + int size_end = hitcontainer.size(); - updateRpcMdtStationMap((*cit_begin)->identify(), size_begin, size_end, rpcmdtstationmap); + updateRpcMdtStationMap((*rpc_coll->begin())->identify(), size_begin, size_end, rpcmdtstationmap); // extract preprawdata from gasgapmap // might not be fastest way (filling // immidiately saves this second loop) - cit = cit_begin; - - for (; cit != cit_end; ++cit) { - const Muon::RpcPrepData* prd = *cit; + for (const Muon::RpcPrepData* prd : *rpc_coll) { const Identifier id = prd->identify(); if (!m_idHelperSvc->rpcIdHelper().measuresPhi(id)) { // eta hit const Identifier gasGapId = m_idHelperSvc->gasGapId(id); gg_it = gasgapphimap.find(gasGapId); - if (gg_it != gasgapphimap.end()) { phietahitassociation->insert(std::make_pair(prd, (*gg_it).second)); } + if (gg_it != gasgapphimap.end()) { phietahitassociation.insert(std::make_pair(prd, (*gg_it).second)); } } } } void MuonHoughPatternFinderTool::addTgcCollection( - Muon::TgcPrepDataCollection::const_iterator cit_begin, Muon::TgcPrepDataCollection::const_iterator cit_end, - MuonHoughHitContainer* hitcontainer, std::map<int, std::vector<std::pair<int, int>>>& tgcmdtstationmap, - std::map<const Trk::PrepRawData*, std::set<const Trk::PrepRawData*, Muon::IdentifierPrdLess>>* phietahitassociation) const { - if (cit_begin == cit_end) return; - Muon::TgcPrepDataCollection::const_iterator cit = cit_begin; + const Muon::TgcPrepDataCollection* tgc_coll, MuonHoughHitContainer& hitcontainer, + std::map<int, std::vector<std::pair<int, int>>>& tgcmdtstationmap, + std::map<const Trk::PrepRawData*, std::set<const Trk::PrepRawData*, Muon::IdentifierPrdLess>>& phietahitassociation) const { + if (tgc_coll->size() == 0) return; std::map<int, int> number_of_hits_per_layer; std::set<int> layers; // different layer definition between the two!! - int size_begin = hitcontainer->size(); + int size_begin = hitcontainer.size(); if (m_hit_reweights) { std::vector<double> channels(2 * m_idHelperSvc->tgcIdHelper().channelMax() + 2); // filled strips, to determine whether it was no noise rpc hit // (confirmation of ((neighbouring) layer)) - for (; cit != cit_end; ++cit) { - const Muon::TgcPrepData* prd = *cit; + for (const Muon::TgcPrepData* prd : *tgc_coll) { Identifier id = prd->identify(); bool channel_type = m_idHelperSvc->tgcIdHelper().isStrip(id); // like measuresPhi() int channel = m_idHelperSvc->tgcIdHelper().channel(id); // between 1 and 135! @@ -583,9 +552,7 @@ namespace Muon { channels[channel + 1] += 0.55; channels[channel - 1] += 0.55; } - cit = cit_begin; - for (; cit != cit_end; ++cit) { - const Muon::TgcPrepData* prd = *cit; + for (const Muon::TgcPrepData* prd : *tgc_coll) { const Identifier id = prd->identify(); const bool channel_type = m_idHelperSvc->tgcIdHelper().isStrip(id); // like measuresPhi() int channel = m_idHelperSvc->tgcIdHelper().channel(id); // between 1 and 135! @@ -611,32 +578,24 @@ namespace Muon { std::map<const Identifier, std::set<const Trk::PrepRawData*, Muon::IdentifierPrdLess>>::iterator gg_it; std::pair<std::set<const Trk::PrepRawData*, Muon::IdentifierPrdLess>::iterator, bool> gg_insert; - cit = cit_begin; - for (; cit != cit_end; ++cit) { - const Muon::TgcPrepData* prd = *cit; - Amg::Vector3D globalpos = prd->globalPosition(); + for (const Muon::TgcPrepData* prd : *tgc_coll) { + const Amg::Vector3D& globalpos = prd->globalPosition(); Identifier id = prd->identify(); - double hitx = globalpos.x(); - double hity = globalpos.y(); - double hitz = globalpos.z(); - bool channel_type = m_idHelperSvc->tgcIdHelper().isStrip(id); // like measuresPhi() - int big_number = 250000; + constexpr double big_number = 250000; - if (std::isnan(hitx) || std::abs(hitx) > big_number || std::abs(hity) > big_number || - std::abs(hitz) > big_number) // to avoid crashing with TGC hits + if (std::isnan(globalpos[Amg::x]) || std::abs(globalpos[Amg::y]) > big_number || std::abs(globalpos[Amg::y]) > big_number || + std::abs(globalpos[Amg::z]) > big_number) // to avoid crashing with TGC hits { - ATH_MSG_WARNING("TGC hit not physical: hitx: " << hitx << " hity: " << hity << " hitz: " << hitz); + ATH_MSG_WARNING("TGC hit not physical: hitx: " << globalpos); } else { if (channel_type) // phi hit { const Identifier gasGapId = m_idHelperSvc->gasGapId(id); gg_it = gasgapphimap.find(gasGapId); if (gg_it == gasgapphimap.end()) { // gasgapid not yet in map - std::set<const Trk::PrepRawData*, Muon::IdentifierPrdLess> hitset; - hitset.insert(prd); - gasgapphimap.insert(std::make_pair(gasGapId, hitset)); + gasgapphimap[gasGapId] = {prd}; } else { // gasgapid already in set gg_insert = (*gg_it).second.insert(prd); if (!gg_insert.second) { ATH_MSG_DEBUG("WARNING::TGC hit already in set? "); } @@ -644,7 +603,7 @@ namespace Muon { } double weight = 1.; double prob = 1.; - if (m_hit_reweights == true) { + if (m_hit_reweights) { if (layers.size() <= 1) { weight = 0.; prob = 0.; @@ -662,49 +621,44 @@ namespace Muon { } } } - MuonHoughHit* hit = new MuonHoughHit(hitx, hity, hitz, channel_type, MuonHough::TGC, prob, weight, + MuonHoughHit* hit = new MuonHoughHit(globalpos, channel_type, MuonHough::TGC, prob, weight, prd); // getPrd - hitcontainer->addHit(hit); + hitcontainer.addHit(hit); ATH_MSG_DEBUG(m_printer->print(*prd) << " NEW weight " << weight); - if (m_use_histos == true) { + if (m_use_histos) { m_weighthistogram->Fill(weight); m_weighthistogramtgc->Fill(weight); } } } - int size_end = hitcontainer->size(); - updateTgcMdtStationMap((*cit_begin)->identify(), size_begin, size_end, tgcmdtstationmap); + int size_end = hitcontainer.size(); + updateTgcMdtStationMap((*tgc_coll->begin())->identify(), size_begin, size_end, tgcmdtstationmap); // extract preprawdata from gasgapmap // might not be fastest way (filling // immidiately saves this second loop) - cit = cit_begin; - - for (; cit != cit_end; ++cit) { - const Muon::TgcPrepData* prd = *cit; + for (const Muon::TgcPrepData* prd : *tgc_coll) { const Identifier id = prd->identify(); if (!static_cast<bool>(m_idHelperSvc->tgcIdHelper().isStrip(id))) { // eta hit - const Identifier gasGapId = m_idHelperSvc->gasGapId(id); - gg_it = gasgapphimap.find(gasGapId); - if (gg_it != gasgapphimap.end()) { phietahitassociation->insert(std::make_pair(prd, (*gg_it).second)); } + if (gg_it != gasgapphimap.end()) { phietahitassociation.insert(std::make_pair(prd, (*gg_it).second)); } } } } - void MuonHoughPatternFinderTool::addMdtCollection(Muon::MdtPrepDataCollection::const_iterator cit_begin, - Muon::MdtPrepDataCollection::const_iterator cit_end, - MuonHoughHitContainer* hitcontainer, + void MuonHoughPatternFinderTool::addMdtCollection(const MdtPrepDataCollection* mdt_coll, MuonHoughHitContainer& hitcontainer, std::map<int, std::vector<std::pair<int, int>>>& rpcmdtstationmap, std::map<int, std::vector<std::pair<int, int>>>& tgcmdtstationmap) const { - if (cit_begin == cit_end) return; - - const int size = std::distance(cit_begin, cit_end); - - if (m_showerskip == true) { - const Muon::MdtPrepData* mdt = (*cit_begin); + const int size = mdt_coll->size(); + if (!size) return; + + auto new_mdt_hit = [](const Muon::MdtPrepData* mdt_hit, double prob, double weight) { + return new MuonHoughHit(mdt_hit->globalPosition(), false /*measures_phi*/, MuonHough::MDT, prob, weight, mdt_hit); // getPrd + }; + if (m_showerskip) { + const Muon::MdtPrepData* mdt = (*mdt_coll->begin()); const MuonGM::MdtReadoutElement* detEl = mdt->detectorElement(); unsigned int channels = 2 * detEl->getNLayers() * detEl->getNtubesperlayer(); // Factor 2 for number of multilayers, should // be changed when only 1 detector element per @@ -722,24 +676,12 @@ namespace Muon { ATH_MSG_DEBUG("Chamber skipped! Too high occupancy (>" << m_showerskipperc << "%): " << occupancy << " association to pattern still possible"); - Muon::MdtPrepDataCollection::const_iterator cit = cit_begin; - for (; cit != cit_end; ++cit) // first - { - const Muon::MdtPrepData* mdt = (*cit); + for (const MdtPrepData* mdt_hit : *mdt_coll) { + if (m_mdt_tdc_cut && mdt_hit->status() != Muon::MdtStatusDriftTime) continue; - if (m_mdt_tdc_cut == true && mdt->status() != Muon::MdtStatusDriftTime) continue; - - if ((m_mdt_adc_cut == true && (mdt->adc() > m_mdt_adc_min)) || m_mdt_adc_cut == false) { - Identifier id = mdt->identify(); - const Trk::Surface& surface = mdt->detectorElement()->surface(id); - const Amg::Vector3D& globalpos = surface.center(); - double hitx = globalpos.x(); - double hity = globalpos.y(); - double hitz = globalpos.z(); - - MuonHoughHit* hit = new MuonHoughHit(hitx, hity, hitz, false, MuonHough::MDT, 0., 0., mdt); // getPrd - ATH_MSG_DEBUG(m_printer->print(*mdt)); - hitcontainer->addHit(hit); + if ((m_mdt_adc_cut && (mdt_hit->adc() > m_mdt_adc_min)) || !m_mdt_adc_cut) { + ATH_MSG_DEBUG(m_printer->print(*mdt_hit)); + hitcontainer.addHit(new_mdt_hit(mdt_hit, 0., 0.)); } } return; @@ -750,9 +692,6 @@ namespace Muon { std::map<int, int> number_of_hots_per_layer; // number of trigger confirmed or hits on segment // within layer (key) - std::vector<double> hitx; - std::vector<double> hity; - std::vector<double> hitz; std::vector<double> radius; std::vector<double> errradius; std::vector<double> weights; @@ -769,9 +708,6 @@ namespace Muon { std::vector<int> layers; std::vector<const Muon::MdtPrepData*> prd; - hitx.reserve(size); - hity.reserve(size); - hitz.reserve(size); radius.reserve(size); errradius.reserve(size); weights.reserve(size); @@ -789,22 +725,15 @@ namespace Muon { std::vector<double> tubecount(m_idHelperSvc->mdtIdHelper().tubeMax() + 2); - Muon::MdtPrepDataCollection::const_iterator cit = cit_begin; - for (; cit != cit_end; ++cit) // first + for (const Muon::MdtPrepData* mdt : *mdt_coll) // first { - const Muon::MdtPrepData* mdt = (*cit); - - if (m_mdt_tdc_cut == true && mdt->status() != Muon::MdtStatusDriftTime) continue; + if (m_mdt_tdc_cut && mdt->status() != Muon::MdtStatusDriftTime) continue; - if ((m_mdt_adc_cut == true && (mdt->adc() > m_mdt_adc_min)) || m_mdt_adc_cut == false) { + if ((m_mdt_adc_cut && (mdt->adc() > m_mdt_adc_min)) || !m_mdt_adc_cut) { Identifier id = mdt->identify(); prd.push_back(mdt); - const Trk::Surface& surface = mdt->detectorElement()->surface(id); - const Amg::Vector3D& globalpos = surface.center(); - hitx.push_back(globalpos.x()); - hity.push_back(globalpos.y()); - hitz.push_back(globalpos.z()); + radius.push_back(mdt->localPosition()[0]); errradius.push_back(Amg::error(mdt->localCovariance(), 0)); weights.push_back(1.); @@ -837,29 +766,25 @@ namespace Muon { const unsigned int prdsize = prd.size(); - if (prdsize == 0) return; + if (!prdsize) return; - if (false == m_hit_reweights) { - for (unsigned int i = 0; i < prdsize; i++) { - MuonHoughHit* hit = new MuonHoughHit(hitx[i], hity[i], hitz[i], false, MuonHough::MDT, 1., 1., - prd[i]); // getPrd - ATH_MSG_DEBUG(m_printer->print(*prd[i])); - hitcontainer->addHit(hit); + if (!m_hit_reweights) { + for (const Muon::MdtPrepData* mdt_hit : prd) { + ATH_MSG_DEBUG(m_printer->print(*mdt_hit)); + hitcontainer.addHit(new_mdt_hit(mdt_hit, 1., 1.)); } return; } double tubem = *(std::max_element(tubecount.begin(), tubecount.end())); - if (tubem < 2.01) // allweights 0 - { + // allweights 0 + if (tubem < 2.01) { ATH_MSG_VERBOSE(" TOO SMALL tubem : " << tubem); - for (unsigned int i = 0; i < prdsize; i++) { - MuonHoughHit* hit = new MuonHoughHit(hitx[i], hity[i], hitz[i], false, MuonHough::MDT, 0., 0., - prd[i]); // getPrd - ATH_MSG_DEBUG(m_printer->print(*prd[i]) << " weight " << 0 << " adc: " << prd[i]->adc()); - hitcontainer->addHit(hit); - if (m_use_histos == true) { + for (const Muon::MdtPrepData* mdt_hit : prd) { + ATH_MSG_DEBUG(m_printer->print(*mdt_hit) << " weight " << 0 << " adc: " << mdt_hit->adc()); + hitcontainer.addHit(new_mdt_hit(mdt_hit, 0., 0.)); + if (m_use_histos) { m_weighthistogram->Fill(0); m_weighthistogrammdt->Fill(0); } @@ -877,27 +802,21 @@ namespace Muon { if (tubecount[tubes[i]] <= 1) prob[i] = 0; } // end hit loop i - int ml1 = 0; - int ml2 = 0; - - std::map<int, int>::iterator map_it = number_of_hits_per_layer.begin(); - for (; map_it != number_of_hits_per_layer.end(); ++map_it) { - if ((*map_it).first >= m_idHelperSvc->mdtIdHelper().tubeLayerMax()) { - ml1++; - } else { - ml2++; - } + int ml1{0}, ml2{0}; + for (const auto& map_it : number_of_hits_per_layer) { + /// Avoid unneccary branching here + const bool count_1 = map_it.first >= m_idHelperSvc->mdtIdHelper().tubeLayerMax(); + ml1 += count_1; + ml2 += !count_1; } - if (ml1 + ml2 < 2.01) // allweights = 0 - { + // allweights = 0 + if (ml1 + ml2 < 2.01) { ATH_MSG_VERBOSE(" TOO SMALL ml1 + ml2 : " << ml1 << " ml2 " << ml2); - for (unsigned int i = 0; i < prdsize; i++) { - MuonHoughHit* hit = new MuonHoughHit(hitx[i], hity[i], hitz[i], false, MuonHough::MDT, 0., 0., - prd[i]); // getPrd - ATH_MSG_DEBUG(m_printer->print(*prd[i]) << " weight " << 0); - hitcontainer->addHit(hit); - if (m_use_histos == true) { + for (const Muon::MdtPrepData* mdt_hit : prd) { + ATH_MSG_DEBUG(m_printer->print(*mdt_hit) << " weight " << 0); + hitcontainer.addHit(new_mdt_hit(mdt_hit, 0., 0.)); + if (m_use_histos) { m_weighthistogram->Fill(0); m_weighthistogrammdt->Fill(0); } @@ -909,15 +828,15 @@ namespace Muon { DCVec dcs; dcs.reserve(prdsize); - for (unsigned int i = 0; i < prdsize; i++) { + + for (unsigned int i = 0; i < prdsize; ++i) { if (prob[i] < 0.01) continue; - double global_radius = std::hypot(hitx[i], hity[i]); // global radius - const TrkDriftCircleMath::LocVec2D lpos(global_radius, - hitz[i]); // global coordinates // create identifier TrkDriftCircleMath::MdtId mdtid(barrel, multilayer[i] - 1, tubelayer[i] - 1, tubes[i] - 1); // create new DriftCircircleMath::DriftCircle::DriftState - TrkDriftCircleMath::DriftCircle dc(lpos, radius[i], errradius[i], TrkDriftCircleMath::DriftCircle::InTime, mdtid, i); + const Amg::Vector3D& globalpos = prd[i]->globalPosition(); + TrkDriftCircleMath::DriftCircle dc(TrkDriftCircleMath::LocVec2D(globalpos.perp(), globalpos.z()), radius[i], errradius[i], + TrkDriftCircleMath::DriftCircle::InTime, mdtid, i); dcs.emplace_back(std::move(dc)); } @@ -930,7 +849,7 @@ namespace Muon { if (ml1 + ml2 >= 2.1) { int removed_hits = 0; // keeps track of number of removed hits - for (unsigned int i = 0; i < sel.size(); i++) { + for (unsigned int i = 0; i < sel.size(); ++i) { if (sel[i] != 0) { unsigned int j = (unsigned int)dcs[i - removed_hits].index(); // index of position in prd vec onsegment[j] = 1; @@ -940,7 +859,7 @@ namespace Muon { // remove hit from dcs container for next iteration!! dcs.erase(dcs.begin() + i - removed_hits); - removed_hits++; + ++removed_hits; } } } else { @@ -963,23 +882,24 @@ namespace Muon { for (unsigned int i = 0; i < stationhits.size(); i++) { // rpc hit loop for (int j = stationhits[i].first; j < stationhits[i].second; j++) { - const MuonHoughHit* rpchit = hitcontainer->getHit(j); + const MuonHoughHit* rpchit = hitcontainer.getHit(j); if (rpchit->getWeight() < 0.01) continue; - const double rpcx = hitcontainer->getHitx(j); - const double rpcy = hitcontainer->getHity(j); - const double rpcz = hitcontainer->getHitz(j); - const double rpc_radius = std::sqrt(rpcx * rpcx + rpcy * rpcy); + const double rpcx = hitcontainer.getHitx(j); + const double rpcy = hitcontainer.getHity(j); + const double rpcz = hitcontainer.getHitz(j); + const double rpc_radius = std::hypot(rpcx, rpcy); const double rpc_rz_ratio = rpc_radius / rpcz; const double rpc_inv_rz_ratio = 1. / rpc_rz_ratio; for (unsigned int k = 0; k < prdsize; k++) { // Mdt hit loop double dis = 0.; + const Amg::Vector3D& globalpos = prd[k]->globalPosition(); if (barrel) { - dis = hitz[k] - std::sqrt(hitx[k] * hitx[k] + hity[k] * hity[k]) * rpc_inv_rz_ratio; + dis = globalpos[Amg::AxisDefs::z] - globalpos.perp() * rpc_inv_rz_ratio; } else { // can that happen? - dis = std::sqrt(hitx[k] * hitx[k] + hity[k] * hity[k]) - rpc_rz_ratio * hitz[k]; + dis = globalpos.perp() - rpc_rz_ratio * globalpos[Amg::AxisDefs::z]; } if (weight_trigger[k] < 0.1) { weight_trigger[k] = 1.; } @@ -1004,20 +924,20 @@ namespace Muon { for (unsigned int i = 0; i < stationhits.size(); i++) { // tgc hit loop for (int j = stationhits[i].first; j < stationhits[i].second; j++) { - const MuonHoughHit* tgchit = hitcontainer->getHit(j); + const MuonHoughHit* tgchit = hitcontainer.getHit(j); if (tgchit) { if (tgchit->getWeight() < 0.01) continue; - const double tgcx = hitcontainer->getHitx(j); - const double tgcy = hitcontainer->getHity(j); - const double tgcz = hitcontainer->getHitz(j); - const double tgc_rz_ratio = std::sqrt(tgcx * tgcx + tgcy * tgcy) / tgcz; + const double tgcx = tgchit->getHitx(); + const double tgcy = tgchit->getHity(); + const double tgcz = tgchit->getHitz(); + const double tgc_rz_ratio = std::hypot(tgcx, tgcy) / tgcz; for (unsigned int k = 0; k < prdsize; k++) { // Mdt hit loop if (weight_trigger[k] < 0.1) weight_trigger[k] = 3.; - double dis = - std::sqrt(hitx[k] * hitx[k] + hity[k] * hity[k]) - tgc_rz_ratio * hitz[k]; // only endcap extrapolation + const Amg::Vector3D& globalpos = prd[k]->globalPosition(); + double dis = globalpos.perp() - tgc_rz_ratio * globalpos[Amg::AxisDefs::z]; // only endcap extrapolation if (std::abs(dis) < 250.) { double wnew = 3.5 + (250. - std::abs(dis)) / 251.; if (wnew > weight_trigger[k]) weight_trigger[k] = wnew; @@ -1052,7 +972,7 @@ namespace Muon { } // throw away hits that are not significant // correct for several number of hits in layer: - map_it = number_of_hits_per_layer.find(layers[i]); + std::map<int, int>::const_iterator map_it = number_of_hits_per_layer.find(layers[i]); if (map_it != number_of_hits_per_layer.end()) { int layerhits = (*map_it).second; double layer_weight = 1. / (0.25 * layerhits + 0.75 * std::sqrt(layerhits)); @@ -1102,12 +1022,10 @@ namespace Muon { // and finally add hits to container: for (unsigned int i = 0; i < prdsize; i++) { - MuonHoughHit* hit = new MuonHoughHit(hitx[i], hity[i], hitz[i], false, MuonHough::MDT, prob[i], weights[i], - prd[i]); // getPrd ATH_MSG_DEBUG(m_printer->print(*prd[i]) << " trigger weight " << weight_trigger[i] << " on segment " << onsegment[i] << " psi " << psi[i] << " prob " << prob[i] << " weight " << weights[i]); - hitcontainer->addHit(hit); - if (m_use_histos == true) { + hitcontainer.addHit(new_mdt_hit(prd[i], prob[i], weights[i])); + if (m_use_histos) { m_weighthistogram->Fill(weights[i]); m_weighthistogrammdt->Fill(weights[i]); } @@ -1116,20 +1034,17 @@ namespace Muon { } void MuonHoughPatternFinderTool::addCscCollection( - Muon::CscPrepDataCollection::const_iterator cit_begin, Muon::CscPrepDataCollection::const_iterator cit_end, - MuonHoughHitContainer* hitcontainer, - std::map<const Trk::PrepRawData*, std::set<const Trk::PrepRawData*, Muon::IdentifierPrdLess>>* phietahitassociation) const { - if (cit_begin == cit_end) return; + const Muon::CscPrepDataCollection* csc_coll, MuonHoughHitContainer& hitcontainer, + std::map<const Trk::PrepRawData*, std::set<const Trk::PrepRawData*, Muon::IdentifierPrdLess>>& phietahitassociation) const { + /// For the moment deactivate the CSCs to reconcile the CI + if (true || csc_coll->size() == 0) return; std::map<int, int> number_of_hits_per_layer; if (m_hit_reweights) // reweight hits, according to Niels' and Peters new // algorithm { - Muon::CscPrepDataCollection::const_iterator cit = cit_begin; - for (; cit != cit_end; ++cit) { - const Muon::CscPrepData* prd = (*cit); + for (const Muon::CscPrepData* prd : *csc_coll) { Identifier id = prd->identify(); - - bool channel_type = m_idHelperSvc->cscIdHelper().measuresPhi(prd->identify()); + const bool channel_type = m_idHelperSvc->cscIdHelper().measuresPhi(prd->identify()); const int chamber_layer = m_idHelperSvc->cscIdHelper().chamberLayer(id); const int chamber_layer_max = m_idHelperSvc->cscIdHelper().chamberLayerMax(id); @@ -1149,15 +1064,9 @@ namespace Muon { std::map<const Identifier, std::set<const Trk::PrepRawData*, Muon::IdentifierPrdLess>>::iterator gg_it; std::pair<std::set<const Trk::PrepRawData*, Muon::IdentifierPrdLess>::iterator, bool> gg_insert; - Muon::CscPrepDataCollection::const_iterator cit = cit_begin; - for (; cit != cit_end; ++cit) { - const Muon::CscPrepData* prd = *cit; - Amg::Vector3D globalpos = prd->globalPosition(); + for (const Muon::CscPrepData* prd : *csc_coll) { + const Amg::Vector3D& globalpos = prd->globalPosition(); Identifier id = prd->identify(); - double hitx = globalpos.x(); - double hity = globalpos.y(); - double hitz = globalpos.z(); - bool channel_type = m_idHelperSvc->cscIdHelper().measuresPhi(id); if (channel_type) // phi hit @@ -1165,9 +1074,7 @@ namespace Muon { const Identifier gasGapId = m_idHelperSvc->gasGapId(id); gg_it = gasgapphimap.find(gasGapId); if (gg_it == gasgapphimap.end()) { // gasgapid not yet in map - std::set<const Trk::PrepRawData*, Muon::IdentifierPrdLess> hitset; - hitset.insert(prd); - gasgapphimap.insert(std::make_pair(gasGapId, hitset)); + gasgapphimap[gasGapId] = {prd}; } else { // gasgapid already in set gg_insert = (*gg_it).second.insert(prd); if (!gg_insert.second) { ATH_MSG_DEBUG("WARNING::CSC hit already in set? "); } @@ -1187,11 +1094,11 @@ namespace Muon { ATH_MSG_DEBUG("CSC weight: " << weight); } - MuonHoughHit* hit = new MuonHoughHit(hitx, hity, hitz, channel_type, MuonHough::CSC, 1., weight, + MuonHoughHit* hit = new MuonHoughHit(globalpos, channel_type, MuonHough::CSC, 1., weight, prd); // getPrd - hitcontainer->addHit(hit); + hitcontainer.addHit(hit); ATH_MSG_DEBUG(m_printer->print(*prd) << " weight " << weight); - if (m_use_histos == true) { + if (m_use_histos) { m_weighthistogram->Fill(weight); m_weighthistogramcsc->Fill(weight); } @@ -1199,17 +1106,13 @@ namespace Muon { // extract preprawdata from gasgapmap // might not be fastest way (filling // immidiately saves this second loop) - cit = cit_begin; - - for (; cit != cit_end; ++cit) { - const Muon::CscPrepData* prd = *cit; + for (const Muon::CscPrepData* prd : *csc_coll) { const Identifier id = prd->identify(); if (!m_idHelperSvc->cscIdHelper().measuresPhi(id)) { // eta hit const Identifier gasGapId = m_idHelperSvc->gasGapId(id); - gg_it = gasgapphimap.find(gasGapId); - if (gg_it != gasgapphimap.end()) { phietahitassociation->insert(std::make_pair(prd, (*gg_it).second)); } + if (gg_it != gasgapphimap.end()) { phietahitassociation.insert(std::make_pair(prd, (*gg_it).second)); } } } } diff --git a/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/src/MuonHoughPatternTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/src/MuonHoughPatternTool.cxx index ccb8130f83a7438b8b51f4d7e52829c675422dba..033e51e7b614d2ba78afe38966f58af623beaa3b 100755 --- a/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/src/MuonHoughPatternTool.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/src/MuonHoughPatternTool.cxx @@ -22,41 +22,7 @@ #include "TrkSurfaces/Surface.h" MuonHoughPatternTool::MuonHoughPatternTool(const std::string& type, const std::string& name, const IInterface* parent) : - AthAlgTool(type, name, parent), - m_number_of_ids(7), - // m_use_rpc_measures_phi(true), - m_use_rpc_measures_eta(true), - m_use_ip(false), - m_maximum_residu_mm(500.), - m_maximum_residu_mm_cosmics(2000.), - m_maximum_residu_angle(3.), - m_maximum_level(5), - // m_use_hough_correction(true), - m_z_cor_constant(-10000.), - m_z_cor_constant2(6000.), - m_theta_cor_constant(-0.042), - m_theta_cor_constant2(4000.), - m_detectorsize_xy_full(15000.), - m_detectorsize_yz_full(25000.), - m_detectorsize_rz_full(27750.), - m_detectorsize_xy_ip(600.), - m_detectorsize_yz_ip(1000.), - m_detectorsize_rz_ip(1500.), - m_detectorsize_angle_xyz(360.), - m_detectorsize_angle_rz(180.), - // m_detectorsize_inv_sqrt_curvature(0.015), - m_stepsize_xy(75.), - m_stepsize_yz(250.), - m_stepsize_rz(75.), - m_stepsize_xy_cosmics(150.), - m_stepsize_rz_cosmics(150.), - m_stepsize_per_angle_xyz(0.25), - m_stepsize_per_angle_rz(0.25), - m_stepsize_per_angle_xy_cosmics(1.), - m_stepsize_per_angle_rz_cosmics(2.), - // m_stepsize_per_inv_sqrt_curvature(0.001), - m_nbins_curved(160), - m_number_of_sectors_rz_cosmics(12) { + AthAlgTool(type, name, parent) { declareInterface<IMuonHoughPatternTool>(this); m_detectorsize_xy = m_detectorsize_xy_full; @@ -71,16 +37,11 @@ void MuonHoughPatternTool::useIPMuons() { m_use_ip = true; } -void MuonHoughPatternTool::makePatterns(const MuonHoughHitContainer* hitcontainer, MuonHoughPatternContainerShip& houghpattern) const { - /** the original hit container */ - const MuonHoughHitContainer* event = hitcontainer; - +void MuonHoughPatternTool::makePatterns(const MuonHoughHitContainer& hitcontainer, MuonHoughPatternContainerShip& houghpattern) const { /** skip cosmic events that have more than 1000 phi hits */ - if (m_use_cosmics == true && m_maxNumberOfPhiHits >= 0) { - int phihits = 0; - for (unsigned int hitid = 0; hitid < event->size(); hitid++) { - if (event->getMeasuresPhi(hitid) == 1) { phihits++; } - } + if (m_use_cosmics && m_maxNumberOfPhiHits >= 0) { + int phihits{0}; + for (unsigned int hitid = 0; hitid < hitcontainer.size(); ++hitid) { phihits += hitcontainer.getMeasuresPhi(hitid); } if (phihits > m_maxNumberOfPhiHits) { ATH_MSG_DEBUG("Cosmic event has more than 1000 phi hits: " << phihits << " event is not reconstructed!"); return; @@ -88,68 +49,67 @@ void MuonHoughPatternTool::makePatterns(const MuonHoughHitContainer* hitcontaine } /** value of mdt weight cut, dependent on # hits in event */ - double weightmdt = 0.0; - if (m_weightcutmdt == true) { setWeightMdtCutValue(event, weightmdt); } + double weightmdt{0.}; + if (m_weightcutmdt) { setWeightMdtCutValue(hitcontainer, weightmdt); } ATH_MSG_DEBUG("Mdt Cut Value: " << weightmdt); // reset weights, based on rejection factor and weightmdt - calculateWeights(event, weightmdt); + calculateWeights(hitcontainer, weightmdt); - ATH_MSG_VERBOSE("Event Info"); + if (msgLevel(MSG::VERBOSE)) { + ATH_MSG_VERBOSE("Event Info"); + ATH_MSG_VERBOSE("Size: " << hitcontainer.size()); - ATH_MSG_VERBOSE("Size: " << event->size()); - - for (unsigned int i = 0; i < event->size(); i++) { - ATH_MSG_VERBOSE(event->getHit(i)->getHitx() << " " << event->getHit(i)->getHity() << " " << event->getHit(i)->getHitz() << " " - << event->getHit(i)->getMeasuresPhi() << " " << event->getHit(i)->getWhichDetector() - << " " << event->getHit(i)->getProbability() << " " << event->getHit(i)->getWeight() - << " " << event->getHit(i)->getAssociated()); + for (unsigned int i = 0; i < hitcontainer.size(); ++i) { + const MuonHoughHit* hit = hitcontainer.getHit(i); + ATH_MSG_VERBOSE(hit->getHitx() << " " << hit->getHity() << " " << hit->getHitz() << " " << hit->getMeasuresPhi() << " " + << hit->getWhichDetector() << " " << hit->getProbability() << " " << hit->getWeight() << " " + << hit->getAssociated()); + } } + makePatterns(MuonHough::hough_xy, weightmdt, hitcontainer, houghpattern); - makePatterns(MuonHough::hough_xy, weightmdt, event, houghpattern); - - if (m_use_cosmics == true) { - makePatterns(MuonHough::hough_rzcosmics, weightmdt, event, houghpattern); - } else if (m_use_curvedhough == true) { - makePatterns(MuonHough::hough_curved_at_a_cylinder, weightmdt, event, houghpattern); + if (m_use_cosmics) { + makePatterns(MuonHough::hough_rzcosmics, weightmdt, hitcontainer, houghpattern); + } else if (m_use_curvedhough) { + makePatterns(MuonHough::hough_curved_at_a_cylinder, weightmdt, hitcontainer, houghpattern); } else { - makePatterns(MuonHough::hough_rz, weightmdt, event, houghpattern); + makePatterns(MuonHough::hough_rz, weightmdt, hitcontainer, houghpattern); } ATH_MSG_VERBOSE("End makePatterns "); } -void MuonHoughPatternTool::makePatterns(int id_number, double weightmdt, const MuonHoughHitContainer* event, +void MuonHoughPatternTool::makePatterns(int id_number, double weightmdt, const MuonHoughHitContainer& event, MuonHoughPatternContainerShip& houghpattern) const { ATH_MSG_DEBUG("makePatterns"); resetAssociation(event); // resets association, for hits that are already assigned to pattern in a previous hough - MuonHoughHitContainer* event_for_hough = whichEventHough(id_number, event, weightmdt); - MuonHoughHitContainer* event_for_association = whichEventAssociation(id_number, event); - - ATH_MSG_VERBOSE("Size event fill: " << event_for_hough->size()); - for (unsigned int i = 0; i < event_for_hough->size(); i++) { - ATH_MSG_VERBOSE(event_for_hough->getHit(i)->getHitx() - << " " << event_for_hough->getHit(i)->getHity() << " " << event_for_hough->getHit(i)->getHitz() << " " - << event_for_hough->getHit(i)->getMeasuresPhi() << " " << event_for_hough->getHit(i)->getWhichDetector() << " " - << event_for_hough->getHit(i)->getProbability() << " " << event_for_hough->getHit(i)->getWeight() << " " - << event_for_hough->getHit(i)->getAssociated()); - } + std::unique_ptr<MuonHoughHitContainer> event_for_hough{whichEventHough(id_number, event, weightmdt)}; + std::unique_ptr<MuonHoughHitContainer> event_for_association{whichEventAssociation(id_number, event)}; - ATH_MSG_VERBOSE("Size event association: " << event_for_association->size()); - for (unsigned int i = 0; i < event_for_association->size(); i++) { - ATH_MSG_VERBOSE(event_for_association->getHit(i)->getHitx() - << " " << event_for_association->getHit(i)->getHity() << " " << event_for_association->getHit(i)->getHitz() << " " - << event_for_association->getHit(i)->getMeasuresPhi() << " " << event_for_association->getHit(i)->getWhichDetector() - << " " << event_for_association->getHit(i)->getProbability() << " " << event_for_association->getHit(i)->getWeight() - << " " << event_for_association->getHit(i)->getAssociated()); - } + if (msgLevel(MSG::VERBOSE)) { + ATH_MSG_VERBOSE("Size event fill: " << event_for_hough->size()); + for (unsigned int i = 0; i < event_for_hough->size(); ++i) { + const MuonHoughHit* hit = event_for_hough->getHit(i); + ATH_MSG_VERBOSE(hit->getHitx() << " " << hit->getHity() << " " << hit->getHitz() << " " << hit->getMeasuresPhi() << " " + << hit->getWhichDetector() << " " << hit->getProbability() << " " << hit->getWeight() << " " + << hit->getAssociated()); + } - ATH_MSG_DEBUG("size of event: " << event_for_association->size() << " id_number: " << id_number); + ATH_MSG_VERBOSE("Size event association: " << event_for_association->size()); + for (unsigned int i = 0; i < event_for_association->size(); ++i) { + const MuonHoughHit* hit = event_for_association->getHit(i); + ATH_MSG_VERBOSE(hit->getHitx() << " " << hit->getHity() << " " << hit->getHitz() << " " << hit->getMeasuresPhi() << " " + << hit->getWhichDetector() << " " << hit->getProbability() << " " << hit->getWeight() << " " + << hit->getAssociated()); + } - MuonHoughTransformSteering* houghtransform = whichHoughTransform(id_number); // const? + ATH_MSG_DEBUG("size of event: " << event_for_association->size() << " id_number: " << id_number); + } + std::unique_ptr<MuonHoughTransformSteering> houghtransform{whichHoughTransform(id_number)}; // const? ATH_MSG_DEBUG("HoughTransform chosen"); @@ -158,7 +118,7 @@ void MuonHoughPatternTool::makePatterns(int id_number, double weightmdt, const M for (int level = 0; level < m_maximum_level; level++) { if (test_for_next_level) { ATH_MSG_DEBUG("Iteration number: " << level); - fillHistos(id_number, level, event_for_hough, houghtransform); + fillHistos(id_number, level, event_for_hough.get(), houghtransform.get()); // if( level == 0 ) fillHistos(id_number,level,event_for_hough,houghtransform); if (m_use_histos && level == 0 && id_number == MuonHough::hough_curved_at_a_cylinder) { @@ -166,11 +126,8 @@ void MuonHoughPatternTool::makePatterns(int id_number, double weightmdt, const M TDirectory* dir = gDirectory; m_file->cd(); for (int i = 0; i < histos.size(); ++i) { - TString hname = "hough_call_"; - hname += m_ncalls; - hname += "_hist_"; - hname += i; - histos.getHisto(i)->bookAndFillRootHistogram(std::string(hname))->Write(); + const std::string hname = "hough_call_" + std::to_string(m_ncalls) + "_hist_" + std::to_string(i); + histos.getHisto(i)->bookAndFillRootHistogram(hname)->Write(); } gDirectory = dir; ++m_ncalls; @@ -180,33 +137,25 @@ void MuonHoughPatternTool::makePatterns(int id_number, double weightmdt, const M test_for_next_level = analyseHisto(id_number, level, event_for_association, houghtransform, houghpattern); if (test_for_next_level) { - MuonHoughHitContainer* old_event_hough = event_for_hough; - event_for_hough = whichEventHough(id_number, old_event_hough, weightmdt); + event_for_hough = whichEventHough(id_number, *event_for_hough, weightmdt); ATH_MSG_DEBUG("New event size for transform: " << event_for_hough->size()); - delete old_event_hough; } } else { break; } } - delete event_for_hough; - delete event_for_association; - delete houghtransform; - houghtransform = nullptr; - } // id_number StatusCode MuonHoughPatternTool::initialize() { - if (m_use_histos == true) // debug histos + if (m_use_histos) // debug histos { - TString file = "HoughPattern.root"; - m_file = new TFile(file, "RECREATE"); + m_file = std::make_unique<TFile>("HoughPattern.root", "RECREATE"); } ATH_MSG_DEBUG("Use Cosmic Settings: " << m_use_cosmics); - if (m_use_cosmics == false) { + if (!m_use_cosmics) { // change histogram sizes: useIPMuons(); } @@ -231,60 +180,40 @@ StatusCode MuonHoughPatternTool::initialize() { return sc; } -void MuonHoughPatternTool::resetAssociation(const MuonHoughHitContainer* event) { - for (unsigned int i = 0; i < event->size(); i++) { - event->getHit(i)->setAssociated(false); - event->getHit(i)->setId(-1); // ugly, to be changed? +void MuonHoughPatternTool::resetAssociation(const MuonHoughHitContainer& event) { + for (unsigned int i = 0; i < event.size(); ++i) { + MuonHoughHit* hit = event.getHit(i); + hit->setAssociated(false); + hit->setId(-1); // ugly, to be changed? } } StatusCode MuonHoughPatternTool::finalize() { - StatusCode sc = StatusCode::SUCCESS; ATH_MSG_VERBOSE("finalize()"); - if (m_use_histos == true) { + if (m_use_histos) { m_file->Write(); - m_file->Close(); - delete m_file; - m_file = nullptr; + m_file.reset(); } - return sc; -} - -void MuonHoughPatternTool::reset(MuonHoughPatternContainerShip& houghpattern) const { - ATH_MSG_VERBOSE("reset()"); - - if (!houghpattern.empty()) { - for (unsigned int i = 0; i < houghpattern.size(); i++) { - for (unsigned int j = 0; j < houghpattern[i].size(); j++) { - for (unsigned int k = 0; k < houghpattern[i][j].size(); k++) { - delete houghpattern[i][j][k]; - houghpattern[i][j][k] = nullptr; - } - } - } - - houghpattern.clear(); - } + return StatusCode::SUCCESS; } MuonHoughPatternContainerShip MuonHoughPatternTool::emptyHoughPattern() const { MuonHoughPatternContainerShip houghpattern; houghpattern.reserve(m_number_of_ids); - for (int i = 0; i < m_number_of_ids; i++) { + for (int i = 0; i < m_number_of_ids; ++i) { MuonHoughPatternContainer which_segment_vector; which_segment_vector.reserve(m_maximum_level); - houghpattern.push_back(which_segment_vector); + houghpattern.emplace_back(std::move(which_segment_vector)); for (int lvl = 0; lvl < m_maximum_level; lvl++) { MuonHoughPatternCollection level_vector; level_vector.reserve(m_number_of_maxima); - houghpattern[i].push_back(level_vector); + houghpattern[i].emplace_back(std::move(level_vector)); for (int maximum_number = 0; maximum_number < m_number_of_maxima; maximum_number++) { - MuonHoughPattern* houghpattern_level = nullptr; - houghpattern[i][lvl].push_back(houghpattern_level); + houghpattern[i][lvl].emplace_back(nullptr); } // maximum_number } // maximum_level @@ -311,8 +240,8 @@ void MuonHoughPatternTool::fillHistos(int /*id_number*/, int level, const MuonHo ATH_MSG_VERBOSE("fillHistos::end of filling, now analyse histo: "); } -bool MuonHoughPatternTool::analyseHisto(int id_number, int level, const MuonHoughHitContainer* event_to_analyse, - MuonHoughTransformSteering* houghtransform, +bool MuonHoughPatternTool::analyseHisto(int id_number, int level, const std::unique_ptr<MuonHoughHitContainer>& event_to_analyse, + std::unique_ptr<MuonHoughTransformSteering>& houghtransform, MuonHoughPatternContainerShip& houghpatterns_all) const { ATH_MSG_VERBOSE("analyseHisto MuonHoughPatternTool (start)"); @@ -332,55 +261,44 @@ bool MuonHoughPatternTool::analyseHisto(int id_number, int level, const MuonHoug double maximum_residu = m_maximum_residu_mm; if (m_use_cosmics) { maximum_residu = m_maximum_residu_mm_cosmics; } MuonHoughPatternCollection houghpatterns = houghtransform->constructHoughPatterns( - event_to_analyse, maximum_residu, m_maximum_residu_angle, m_number_of_maxima, which_segment, m_printlevel); + event_to_analyse.get(), maximum_residu, m_maximum_residu_angle, m_number_of_maxima, which_segment, m_printlevel); - for (unsigned int maximum_number = 0; maximum_number < houghpatterns.size(); maximum_number++) { + for (unsigned int maximum_number = 0; maximum_number < houghpatterns.size(); ++maximum_number) { // bool which_segment = maximum_number; - MuonHoughPattern* houghpattern = houghpatterns[maximum_number]; - if (houghpattern) { - numberofmaxima = houghpattern->getMaximumHistogram(); - - houghpatterns_all[id_number][level][maximum_number] = houghpattern; - ATH_MSG_DEBUG("id_number: " << id_number << " maximum_number: " << maximum_number - << " size patternseg: " << houghpattern->size()); + std::unique_ptr<MuonHoughPattern>& houghpattern = houghpatterns[maximum_number]; + if (!houghpattern) { continue; } + numberofmaxima = houghpattern->getMaximumHistogram(); + ATH_MSG_DEBUG("id_number: " << id_number << " maximum_number: " << maximum_number << " size patternseg: " << houghpattern->size()); - if (houghpattern->empty()) { ATH_MSG_DEBUG("houghpattern==0"); } + if (houghpattern->empty()) { ATH_MSG_DEBUG("houghpattern==0"); } - // some print statements - - if (houghpattern->size() < numberofmaxima) { - ATH_MSG_DEBUG("ERROR: houghpattern smaller than maximum, id: " - << id_number << " houghpattern.size(): " << houghpattern->size() << " numberofmaxima: " << numberofmaxima); - } - - ATH_MSG_DEBUG(" level: " << level << " which_segment: " << which_segment); - if (m_printlevel >= 4) { houghpattern->printHoughPattern(); } + // some print statements + if (houghpattern->size() < numberofmaxima) { + ATH_MSG_DEBUG("ERROR: houghpattern smaller than maximum, id: " << id_number << " houghpattern.size(): " << houghpattern->size() + << " numberofmaxima: " << numberofmaxima); + } - // checks for next level / maximum + ATH_MSG_DEBUG(" level: " << level << " which_segment: " << which_segment); + if (m_printlevel >= 4) { houghpattern->printHoughPattern(); } - if (houghpattern->size() >= threshold_for_next_houghpattern) { - if (level + 1 >= m_maximum_level) { - ATH_MSG_DEBUG("possibly more levels"); - } else { - if (hitsLeft(event_to_analyse)) // any hits left - { - test_for_next_level = true; - } else { - test_for_next_level = false; - } - } - } + // checks for next level / maximum - else if (maximum_number == 0) { - ATH_MSG_DEBUG("houghpattern too small for next level : " << level << " id: " << id_number); + if (houghpattern->size() >= threshold_for_next_houghpattern) { + if (level + 1 >= m_maximum_level) { + ATH_MSG_DEBUG("possibly more levels"); + } else { + test_for_next_level = hitsLeft(*event_to_analyse); } + } else if (maximum_number == 0) { + ATH_MSG_DEBUG("houghpattern too small for next level : " << level << " id: " << id_number); + } - // print_of houghpatterns: - ATH_MSG_DEBUG("Size of HoughPatterns: " << houghpattern->size()); + // print_of houghpatterns: + ATH_MSG_DEBUG("Size of HoughPatterns: " << houghpattern->size()); + houghpatterns_all[id_number][level][maximum_number] = std::move(houghpattern); - } // check op houghpattern pointer - } // maximum_number + } // maximum_number ATH_MSG_DEBUG(" Test for next level: " << test_for_next_level); @@ -388,24 +306,19 @@ bool MuonHoughPatternTool::analyseHisto(int id_number, int level, const MuonHoug } // analyseHisto -void MuonHoughPatternTool::analyseTrack(int /*id_number*/, const MuonHoughHitContainer* /*event_to_analyse*/, - MuonHoughTransformSteering* /*houghtransform*/) const {} // analyseTrack - -bool MuonHoughPatternTool::hitsLeft(const MuonHoughHitContainer* event) { - int number_of_hits = event->size(); - for (int hitid = 0; hitid < number_of_hits; hitid++) { - if (!event->getHit(hitid)->getAssociated()) { return true; } +bool MuonHoughPatternTool::hitsLeft(const MuonHoughHitContainer& event) { + int number_of_hits = event.size(); + for (int hitid = 0; hitid < number_of_hits; ++hitid) { + if (!event.getHit(hitid)->getAssociated()) { return true; } } return false; } -int MuonHoughPatternTool::numberOfHits(const MuonHoughHitContainer* event) const { +int MuonHoughPatternTool::numberOfHits(const MuonHoughHitContainer& event) const { int number_of_hits_left = 0; - int number_of_hits = event->size(); + int number_of_hits = event.size(); - for (int hitid = 0; hitid < number_of_hits; hitid++) { - if (!event->getHit(hitid)->getAssociated()) { number_of_hits_left++; } - } + for (int hitid = 0; hitid < number_of_hits; ++hitid) { number_of_hits_left += !event.getHit(hitid)->getAssociated(); } // logically impossible --- if (number_of_hits_left <0) {ATH_MSG_WARNING("number of hits smaller than 0");} @@ -417,8 +330,8 @@ int MuonHoughPatternTool::numberOfHits(const MuonHoughHitContainer* event) const bool MuonHoughPatternTool::hitInHoughPattern(MuonHoughHit* hit, const MuonHoughPatternContainer& houghpattern) const { // checks if hit is already assigned to a houghpattern - for (unsigned int i = 0; i < houghpattern.size(); i++) { - for (unsigned int j = 0; j < houghpattern[i].size(); j++) { + for (unsigned int i = 0; i < houghpattern.size(); ++i) { + for (unsigned int j = 0; j < houghpattern[i].size(); ++j) { if (houghpattern[i][j]) { if (houghpattern[i][j]->hitInHoughPattern(hit)) { ATH_MSG_VERBOSE("Hit in hough pattern found level " << i << " max " << j << "hitid: " << hit->getId()); @@ -430,7 +343,7 @@ bool MuonHoughPatternTool::hitInHoughPattern(MuonHoughHit* hit, const MuonHoughP return false; } -void MuonHoughPatternTool::weightRescaling(const MuonHoughHitContainer* event, int id_number, int level) const { +void MuonHoughPatternTool::weightRescaling(const MuonHoughHitContainer& event, int id_number, int level) const { double weight_trigger_hits = 1.; double weight_mdt_hits = 1.; @@ -476,86 +389,89 @@ void MuonHoughPatternTool::weightRescaling(const MuonHoughHitContainer* event, i default: ATH_MSG_WARNING("no valid id (id_number)"); } - for (unsigned int i = 0; i < event->size(); i++) { - MuonHough::DetectorTechnology technology = event->getHit(i)->getDetectorId(); + for (unsigned int i = 0; i < event.size(); ++i) { + MuonHoughHit* hit = event.getHit(i); + MuonHough::DetectorTechnology technology = hit->getDetectorId(); switch (technology) { case MuonHough::CSC: case MuonHough::RPC: - case MuonHough::TGC: event->getHit(i)->setWeight(event->getHit(i)->getOrigWeight() * weight_trigger_hits); break; - case MuonHough::MDT: event->getHit(i)->setWeight(event->getHit(i)->getOrigWeight() * weight_mdt_hits); break; + case MuonHough::TGC: hit->setWeight(hit->getOrigWeight() * weight_trigger_hits); break; + case MuonHough::MDT: hit->setWeight(hit->getOrigWeight() * weight_mdt_hits); break; default: ATH_MSG_WARNING("no valid detector technology"); } } } -void MuonHoughPatternTool::calculateWeights(const MuonHoughHitContainer* event, double weightmdt) const { - if (weightmdt >= 0.5) { // else do nothing (e.g. cosmics case) - for (unsigned int i = 0; i < event->size(); i++) { - MuonHough::DetectorTechnology technology = event->getHit(i)->getDetectorId(); - if (technology == MuonHough::MDT) { - // recalculate weight, especially important for cavern background MDT events - double p_old = event->getHit(i)->getOrigWeight(); - double p_calc = 0.25 * p_old * (1. - weightmdt); - double p_new = p_calc / (p_calc + weightmdt * (1 - p_old)); - ATH_MSG_VERBOSE(" MDT probability old " << p_old << " Recalculated " << p_new); - event->getHit(i)->setWeight(p_new); - } +void MuonHoughPatternTool::calculateWeights(const MuonHoughHitContainer& event, double weightmdt) const { + if (weightmdt < 0.5) return; + // else do nothing (e.g. cosmics case) + for (unsigned int i = 0; i < event.size(); ++i) { + MuonHoughHit* hit = event.getHit(i); + MuonHough::DetectorTechnology technology = hit->getDetectorId(); + if (technology == MuonHough::MDT) { + // recalculate weight, especially important for cavern background MDT events + double p_old = hit->getOrigWeight(); + double p_calc = 0.25 * p_old * (1. - weightmdt); + double p_new = p_calc / (p_calc + weightmdt * (1 - p_old)); + ATH_MSG_VERBOSE(" MDT probability old " << p_old << " Recalculated " << p_new); + hit->setWeight(p_new); } } } -int MuonHoughPatternTool::overlapHoughPatterns(const MuonHoughPattern* houghpattern1, const MuonHoughPattern* houghpattern2) const { +int MuonHoughPatternTool::overlapHoughPatterns(const MuonHoughPattern& houghpattern1, const MuonHoughPattern& houghpattern2) const { // both vectors houghpatterns->m_hitid[] are ordered, asked is the percentage of overlap between both vectors int overlap = 0; unsigned int j = 0; - for (unsigned int i = 0; i < houghpattern1->size(); i++) { - while (j < houghpattern2->size()) { - if (houghpattern1->getHitId(i) == houghpattern2->getHitId(j)) { - overlap++; - j++; // this j cant be found again + for (unsigned int i = 0; i < houghpattern1.size(); ++i) { + while (j < houghpattern2.size()) { + if (houghpattern1.getHitId(i) == houghpattern2.getHitId(j)) { + ++overlap; + ++j; // this j cant be found again break; } - if (houghpattern1->getHitId(i) < houghpattern2->getHitId(j)) { break; } - j++; + if (houghpattern1.getHitId(i) < houghpattern2.getHitId(j)) { break; } + ++j; } } - double percentage1 = (1.0 * overlap) / houghpattern1->size(); // size() gives double - double percentage2 = (1.0 * overlap) / houghpattern2->size(); + double percentage1 = (1.0 * overlap) / houghpattern1.size(); // size() gives double + double percentage2 = (1.0 * overlap) / houghpattern2.size(); ATH_MSG_DEBUG("Percentage Overlap: " << percentage1 << " " << percentage2); return overlap; } -MuonHoughHitContainer* MuonHoughPatternTool::whichEventAssociation(int id_number, const MuonHoughHitContainer* event) const { - MuonHoughHitContainer* event_to_analyse = new MuonHoughHitContainer(false); +std::unique_ptr<MuonHoughHitContainer> MuonHoughPatternTool::whichEventAssociation(int id_number, + const MuonHoughHitContainer& event) const { + std::unique_ptr<MuonHoughHitContainer> event_to_analyse = std::make_unique<MuonHoughHitContainer>(false); switch (id_number) { case MuonHough::hough_xy: - for (unsigned int hitid = 0; hitid < event->size(); hitid++) { - MuonHoughHit* hit = event->getHit(hitid); + for (unsigned int hitid = 0; hitid < event.size(); ++hitid) { + MuonHoughHit* hit = event.getHit(hitid); if (hit->getMeasuresPhi()) { - if (m_use_csc_in_pattern == true || (m_use_csc_in_pattern == false && hit->getDetectorId() != MuonHough::CSC)) { + if (m_use_csc_in_pattern || (!m_use_csc_in_pattern && hit->getDetectorId() != MuonHough::CSC)) { event_to_analyse->addHit(hit); } } } break; case MuonHough::hough_yz: - for (unsigned int hitid = 0; hitid < event->size(); hitid++) { - MuonHoughHit* hit = event->getHit(hitid); + for (unsigned int hitid = 0; hitid < event.size(); ++hitid) { + MuonHoughHit* hit = event.getHit(hitid); event_to_analyse->addHit(hit); } break; case MuonHough::hough_rz: case MuonHough::hough_rzcosmics: case MuonHough::hough_curved_at_a_cylinder: - for (unsigned int hitid = 0; hitid < event->size(); hitid++) { - MuonHoughHit* hit = event->getHit(hitid); + for (unsigned int hitid = 0; hitid < event.size(); ++hitid) { + MuonHoughHit* hit = event.getHit(hitid); if (!hit->getMeasuresPhi()) { - if (m_use_csc_in_pattern == true || (m_use_csc_in_pattern == false && hit->getDetectorId() != MuonHough::CSC)) { + if (m_use_csc_in_pattern || (!m_use_csc_in_pattern && hit->getDetectorId() != MuonHough::CSC)) { event_to_analyse->addHit(hit); } } @@ -563,22 +479,22 @@ MuonHoughHitContainer* MuonHoughPatternTool::whichEventAssociation(int id_number break; case MuonHough::hough_rz_rpc: if (m_use_rpc_measures_eta == 1) { - for (unsigned int hitid = 0; hitid < event->size(); hitid++) { - MuonHoughHit* hit = event->getHit(hitid); + for (unsigned int hitid = 0; hitid < event.size(); ++hitid) { + MuonHoughHit* hit = event.getHit(hitid); if (hit->getDetectorId() == MuonHough::RPC) { if (!hit->getMeasuresPhi()) { event_to_analyse->addHit(hit); } } } } else { - for (unsigned int hitid = 0; hitid < event->size(); hitid++) { - MuonHoughHit* hit = event->getHit(hitid); + for (unsigned int hitid = 0; hitid < event.size(); ++hitid) { + MuonHoughHit* hit = event.getHit(hitid); if (hit->getDetectorId() == MuonHough::RPC) { event_to_analyse->addHit(hit); } } } break; case MuonHough::hough_rz_mdt: - for (unsigned int hitid = 0; hitid < event->size(); hitid++) { - MuonHoughHit* hit = event->getHit(hitid); + for (unsigned int hitid = 0; hitid < event.size(); ++hitid) { + MuonHoughHit* hit = event.getHit(hitid); if (hit->getDetectorId() == MuonHough::MDT) { event_to_analyse->addHit(hit); } } break; @@ -588,20 +504,21 @@ MuonHoughHitContainer* MuonHoughPatternTool::whichEventAssociation(int id_number return event_to_analyse; } -MuonHoughHitContainer* MuonHoughPatternTool::whichEventHough(int id_number, const MuonHoughHitContainer* event, double weightmdt) const { - ATH_MSG_DEBUG("whichEventHough::size of event: " << event->size()); - const MuonHoughHitContainer* hits_not_in_patterns = hitsNotInPattern(event, id_number); +std::unique_ptr<MuonHoughHitContainer> MuonHoughPatternTool::whichEventHough(int id_number, const MuonHoughHitContainer& event, + double weightmdt) const { + ATH_MSG_DEBUG("whichEventHough::size of event: " << event.size()); + std::unique_ptr<MuonHoughHitContainer> hits_not_in_patterns{hitsNotInPattern(event, id_number)}; ATH_MSG_DEBUG("whichEventHough::hitsNotInPattern: " << hits_not_in_patterns->size()); - MuonHoughHitContainer* event_to_analyse = new MuonHoughHitContainer(false); + std::unique_ptr<MuonHoughHitContainer> event_to_analyse = std::make_unique<MuonHoughHitContainer>(false); switch (id_number) { case MuonHough::hough_xy: - for (unsigned int hitid = 0; hitid < hits_not_in_patterns->size(); hitid++) { + for (unsigned int hitid = 0; hitid < hits_not_in_patterns->size(); ++hitid) { MuonHoughHit* hit = hits_not_in_patterns->getHit(hitid); if (hit->getMeasuresPhi() == 1) { if (hitThroughCut(hit, weightmdt)) { - if (m_use_csc_in_hough == true || (m_use_csc_in_hough == false && hit->getDetectorId() == MuonHough::CSC)) { + if (m_use_csc_in_hough || (!m_use_csc_in_hough && hit->getDetectorId() == MuonHough::CSC)) { event_to_analyse->addHit(hit); } } @@ -609,7 +526,7 @@ MuonHoughHitContainer* MuonHoughPatternTool::whichEventHough(int id_number, cons } break; case MuonHough::hough_yz: - for (unsigned int hitid = 0; hitid < hits_not_in_patterns->size(); hitid++) { + for (unsigned int hitid = 0; hitid < hits_not_in_patterns->size(); ++hitid) { MuonHoughHit* hit = hits_not_in_patterns->getHit(hitid); if (hitThroughCut(hit, weightmdt)) { event_to_analyse->addHit(hit); } } @@ -617,11 +534,11 @@ MuonHoughHitContainer* MuonHoughPatternTool::whichEventHough(int id_number, cons case MuonHough::hough_rz: case MuonHough::hough_rzcosmics: case MuonHough::hough_curved_at_a_cylinder: - for (unsigned int hitid = 0; hitid < hits_not_in_patterns->size(); hitid++) { + for (unsigned int hitid = 0; hitid < hits_not_in_patterns->size(); ++hitid) { MuonHoughHit* hit = hits_not_in_patterns->getHit(hitid); if (hitThroughCut(hit, weightmdt)) { if (hit->getMeasuresPhi() == 0) { - if (m_use_csc_in_hough == true || (m_use_csc_in_hough == false && hit->getDetectorId() == MuonHough::CSC)) { + if (m_use_csc_in_hough || (!m_use_csc_in_hough && hit->getDetectorId() == MuonHough::CSC)) { event_to_analyse->addHit(hit); } } @@ -630,14 +547,14 @@ MuonHoughHitContainer* MuonHoughPatternTool::whichEventHough(int id_number, cons break; case MuonHough::hough_rz_rpc: if (m_use_rpc_measures_eta == 1) { - for (unsigned int hitid = 0; hitid < hits_not_in_patterns->size(); hitid++) { + for (unsigned int hitid = 0; hitid < hits_not_in_patterns->size(); ++hitid) { if (hits_not_in_patterns->getDetectorId(hitid) == MuonHough::RPC) { MuonHoughHit* hit = hits_not_in_patterns->getHit(hitid); if (hit->getMeasuresPhi() == 0) { event_to_analyse->addHit(hit); } } } } else { - for (unsigned int hitid = 0; hitid < hits_not_in_patterns->size(); hitid++) { + for (unsigned int hitid = 0; hitid < hits_not_in_patterns->size(); ++hitid) { if (hits_not_in_patterns->getDetectorId(hitid) == MuonHough::RPC) { MuonHoughHit* hit = hits_not_in_patterns->getHit(hitid); event_to_analyse->addHit(hit); @@ -646,7 +563,7 @@ MuonHoughHitContainer* MuonHoughPatternTool::whichEventHough(int id_number, cons } break; case MuonHough::hough_rz_mdt: - for (unsigned int hitid = 0; hitid < hits_not_in_patterns->size(); hitid++) { + for (unsigned int hitid = 0; hitid < hits_not_in_patterns->size(); ++hitid) { if (hits_not_in_patterns->getDetectorId(hitid) == MuonHough::MDT) { MuonHoughHit* hit = hits_not_in_patterns->getHit(hitid); if (hitThroughCut(hit, weightmdt)) { event_to_analyse->addHit(hit); } @@ -656,14 +573,11 @@ MuonHoughHitContainer* MuonHoughPatternTool::whichEventHough(int id_number, cons default: ATH_MSG_WARNING(" no valid id"); } - delete hits_not_in_patterns; - hits_not_in_patterns = nullptr; - return event_to_analyse; } -MuonHoughTransformSteering* MuonHoughPatternTool::whichHoughTransform(int id_number) const { - MuonHoughTransformer* houghtransformer = nullptr; +std::unique_ptr<MuonHoughTransformSteering> MuonHoughPatternTool::whichHoughTransform(int id_number) const { + std::unique_ptr<MuonHoughTransformer> houghtransformer; int nbins = 0; int nbins_angle = 0; @@ -676,22 +590,22 @@ MuonHoughTransformSteering* MuonHoughPatternTool::whichHoughTransform(int id_num switch (id_number) { case MuonHough::hough_xy: - if (m_use_cosmics == true) { + if (m_use_cosmics) { stepsize_xy = m_stepsize_xy_cosmics; stepsize_per_angle_xy = m_stepsize_per_angle_xy_cosmics; detectorsize_angle_xy = (m_detectorsize_angle_xyz / 2.); // patterns not split for cosmics } nbins = static_cast<int>(2 * m_detectorsize_xy / stepsize_xy); nbins_angle = static_cast<int>(detectorsize_angle_xy / stepsize_per_angle_xy); - houghtransformer = new MuonHoughTransformer_xy(nbins, nbins_angle, m_detectorsize_xy, detectorsize_angle_xy, - m_thresholdhisto_xyz, m_number_of_sectors_xyz); + houghtransformer = std::make_unique<MuonHoughTransformer_xy>(nbins, nbins_angle, m_detectorsize_xy, detectorsize_angle_xy, + m_thresholdhisto_xyz, m_number_of_sectors_xyz); break; case MuonHough::hough_yz: nbins = static_cast<int>(2 * m_detectorsize_yz / m_stepsize_yz); nbins_angle = static_cast<int>(m_detectorsize_angle_xyz / m_stepsize_per_angle_xyz); - houghtransformer = new MuonHoughTransformer_yz(nbins, nbins_angle, m_detectorsize_yz, m_detectorsize_angle_xyz, - m_thresholdhisto_xyz, m_number_of_sectors_xyz); + houghtransformer = std::make_unique<MuonHoughTransformer_yz>(nbins, nbins_angle, m_detectorsize_yz, m_detectorsize_angle_xyz, + m_thresholdhisto_xyz, m_number_of_sectors_xyz); break; case MuonHough::hough_rz: @@ -699,22 +613,22 @@ MuonHoughTransformSteering* MuonHoughPatternTool::whichHoughTransform(int id_num case MuonHough::hough_rz_mdt: nbins = static_cast<int>(2 * m_detectorsize_rz / m_stepsize_rz); nbins_angle = static_cast<int>(m_detectorsize_angle_rz / m_stepsize_per_angle_rz); - houghtransformer = new MuonHoughTransformer_rz(nbins, nbins_angle, m_detectorsize_rz, m_detectorsize_angle_rz, - m_thresholdhisto_rz, m_number_of_sectors_rz); + houghtransformer = std::make_unique<MuonHoughTransformer_rz>(nbins, nbins_angle, m_detectorsize_rz, m_detectorsize_angle_rz, + m_thresholdhisto_rz, m_number_of_sectors_rz); break; case MuonHough::hough_rzcosmics: nbins = static_cast<int>(2 * m_detectorsize_rz / m_stepsize_rz_cosmics); nbins_angle = static_cast<int>(m_detectorsize_angle_rz / m_stepsize_per_angle_rz_cosmics); - houghtransformer = new MuonHoughTransformer_rzcosmics(nbins, nbins_angle, m_detectorsize_rz, m_detectorsize_angle_rz, - m_thresholdhisto_rz, m_number_of_sectors_rz_cosmics); + houghtransformer = std::make_unique<MuonHoughTransformer_rzcosmics>( + nbins, nbins_angle, m_detectorsize_rz, m_detectorsize_angle_rz, m_thresholdhisto_rz, m_number_of_sectors_rz_cosmics); break; case MuonHough::hough_curved_at_a_cylinder: nbins = m_nbins_curved; nbins_angle = static_cast<int>(m_detectorsize_angle_rz / (2 * m_stepsize_per_angle_rz)); - houghtransformer = new MuonHoughTransformer_CurvedAtACylinder(nbins, nbins_angle, detectorsize_curved, m_detectorsize_angle_rz, - m_thresholdhisto_rz, number_of_histos_rz); + houghtransformer = std::make_unique<MuonHoughTransformer_CurvedAtACylinder>( + nbins, nbins_angle, detectorsize_curved, m_detectorsize_angle_rz, m_thresholdhisto_rz, number_of_histos_rz); break; default: ATH_MSG_WARNING("no valid id"); @@ -728,12 +642,10 @@ MuonHoughTransformSteering* MuonHoughPatternTool::whichHoughTransform(int id_num ATH_MSG_DEBUG("**** histo houghtransformer: ****"); ATH_MSG_DEBUG("Id number: " << id_number); ATH_MSG_DEBUG("NBins: " << nbins << " angle: " << nbins_angle); - if (m_use_negative_weights == true) ATH_MSG_DEBUG(" Negative weights are used "); + if (m_use_negative_weights) ATH_MSG_DEBUG(" Negative weights are used "); ATH_MSG_DEBUG("IP setting: " << !m_use_cosmics); ATH_MSG_DEBUG("*********************************"); - MuonHoughTransformSteering* houghtransform = new MuonHoughTransformSteering(houghtransformer); - - return houghtransform; + return std::make_unique<MuonHoughTransformSteering>(houghtransformer); } std::vector<int> MuonHoughPatternTool::maxLevelHoughPattern(const MuonHoughPatternContainerShip& houghpattern) const // obsolete? @@ -758,7 +670,7 @@ int MuonHoughPatternTool::maxLevelHoughPattern(const MuonHoughPatternContainerSh << "maxlevel_houghpattern: " << maxlevel << " id: " << id_number); if (!houghpattern[id_number][maxlevel - 1][maximum_number]->empty()) { continu = false; } - maximum_number++; + ++maximum_number; } // number_of_maxima @@ -790,8 +702,8 @@ void MuonHoughPatternTool::transformCoordsMaximum(std::pair<double, double>& coo coordsmaximum.second = theta_rec; } // transformCoordsMaximum -MuonPrdPatternCollection* MuonHoughPatternTool::getPhiMuonPatterns(MuonHoughPatternContainerShip& houghpatterns) const { - MuonPrdPatternCollection* phipatterncollection = new MuonPrdPatternCollection(); +std::unique_ptr<MuonPrdPatternCollection> MuonHoughPatternTool::getPhiMuonPatterns(MuonHoughPatternContainerShip& houghpatterns) const { + std::unique_ptr<MuonPrdPatternCollection> phipatterncollection = std::make_unique<MuonPrdPatternCollection>(); phipatterncollection->reserve(m_maximum_level * m_number_of_maxima); MuonHoughPatternContainer& phipatterns = houghpatterns[MuonHough::hough_xy]; @@ -799,31 +711,31 @@ MuonPrdPatternCollection* MuonHoughPatternTool::getPhiMuonPatterns(MuonHoughPatt // Bookkeeping for merged or double phi pattersn std::map<MuonHoughPattern*, int> mergedpatterns; - for (unsigned int i = 0; i < phipatterns.size(); i++) { - for (unsigned int j = 0; j < phipatterns[i].size(); j++) { - MuonHoughPattern* houghpattern = phipatterns[i][j]; + for (unsigned int i = 0; i < phipatterns.size(); ++i) { + for (unsigned int j = 0; j < phipatterns[i].size(); ++j) { + std::unique_ptr<MuonHoughPattern>& houghpattern = phipatterns[i][j]; if (!houghpattern) continue; - mergedpatterns[houghpattern] = 0; + mergedpatterns[houghpattern.get()] = 0; } } // Search for identical phi patterns and remove them // and search for overlapping phi patterns and merge them for IP constraint (10-1-2008, does merging ever happen? JS) - for (unsigned int i = 0; i < phipatterns.size(); i++) { - for (unsigned int j = 0; j < phipatterns[i].size(); j++) { - MuonHoughPattern* houghpattern1 = phipatterns[i][j]; + for (unsigned int i = 0; i < phipatterns.size(); ++i) { + for (unsigned int j = 0; j < phipatterns[i].size(); ++j) { + std::unique_ptr<MuonHoughPattern>& houghpattern1 = phipatterns[i][j]; if (!houghpattern1) continue; if (phipatterns[i][j]->size() < m_thresholdpattern_xyz) continue; ATH_MSG_DEBUG(" patterns size before Merge " << phipatterns[i][j]->size()); for (unsigned int k = i; k < phipatterns.size(); k++) { for (unsigned int l = 0; l < phipatterns[k].size(); l++) { - MuonHoughPattern* houghpattern2 = phipatterns[k][l]; + std::unique_ptr<MuonHoughPattern>& houghpattern2 = phipatterns[k][l]; if (!houghpattern2) continue; if (phipatterns[k][l]->size() < m_thresholdpattern_xyz) continue; - if (houghpattern1 == houghpattern2) continue; - if (mergedpatterns[houghpattern1] == 1) continue; - if (mergedpatterns[houghpattern2] == 1) continue; + if (houghpattern1.get() == houghpattern2.get()) continue; + if (mergedpatterns[houghpattern1.get()] == 1) continue; + if (mergedpatterns[houghpattern2.get()] == 1) continue; const double phi1 = houghpattern1->getEPhi(); const double phi2 = houghpattern2->getEPhi(); CxxUtils::sincos scphi1(phi1); @@ -847,35 +759,35 @@ MuonPrdPatternCollection* MuonHoughPatternTool::getPhiMuonPatterns(MuonHoughPatt ATH_MSG_DEBUG(" patterns phi1 " << phi1 << " phi2 " << phi2 << " psi " << psi); ATH_MSG_DEBUG(" patterns the1 " << the1 << " the2 " << the2 << " chi " << chi); if (chi < 0.5 || psi < 0.5) { - int overlap = overlapHoughPatterns(houghpattern1, houghpattern2); + int overlap = overlapHoughPatterns(*houghpattern1, *houghpattern2); ATH_MSG_DEBUG(" Phi Overlap " << overlap << " size1 " << houghpattern1->size() << " size2 " << houghpattern2->size()); int ns1 = houghpattern1->size(); int ns2 = houghpattern2->size(); if (overlap <= ns1 && overlap == ns2) { ATH_MSG_DEBUG(" DROP patterns same hits "); - mergedpatterns[houghpattern2] = 1; + mergedpatterns[houghpattern2.get()] = 1; continue; } if (overlap == ns1 && overlap < ns2) { ATH_MSG_DEBUG(" DROP patterns same hits "); - mergedpatterns[houghpattern1] = 1; + mergedpatterns[houghpattern1.get()] = 1; continue; } if (m_use_ip) { // Merge and do cleaning (IP constraint) - Muon::MuonPrdPattern* muonpattern = nullptr; + std::unique_ptr<Muon::MuonPrdPattern> muonpattern; if ((overlap > 0.8 * ns1 || overlap > 0.8 * ns2) && ns1 >= ns2) { - muonpattern = houghPatternsToOnePhiPattern(phipatterns[i][j], phipatterns[k][l]); + muonpattern = houghPatternsToOnePhiPattern(*phipatterns[i][j], *phipatterns[k][l]); } if ((overlap > 0.8 * ns1 || overlap > 0.8 * ns2) && ns1 < ns2) { // Merge and do cleaning (IP constraint) - muonpattern = houghPatternsToOnePhiPattern(phipatterns[k][l], phipatterns[i][j]); + muonpattern = houghPatternsToOnePhiPattern(*phipatterns[k][l], *phipatterns[i][j]); } if (muonpattern) { - phipatterncollection->push_back(muonpattern); - mergedpatterns[houghpattern1] = 1; - mergedpatterns[houghpattern2] = 1; + phipatterncollection->push_back(std::move(muonpattern)); + mergedpatterns[houghpattern1.get()] = 1; + mergedpatterns[houghpattern2.get()] = 1; continue; } } // use IP @@ -885,26 +797,26 @@ MuonPrdPatternCollection* MuonHoughPatternTool::getPhiMuonPatterns(MuonHoughPatt } } // end i - for (unsigned int i = 0; i < phipatterns.size(); i++) { - for (unsigned int j = 0; j < phipatterns[i].size(); j++) { - MuonHoughPattern* houghpattern = phipatterns[i][j]; - if (houghpattern == nullptr) { continue; } - if (mergedpatterns[houghpattern] == 1) continue; + for (unsigned int i = 0; i < phipatterns.size(); ++i) { + for (unsigned int j = 0; j < phipatterns[i].size(); ++j) { + std::unique_ptr<MuonHoughPattern>& houghpattern = phipatterns[i][j]; + if (!houghpattern) { continue; } + if (mergedpatterns[houghpattern.get()] == 1) continue; if (!phipatterns[i][j]->empty()) { - Muon::MuonPrdPattern* muonpattern = nullptr; + std::unique_ptr<Muon::MuonPrdPattern> muonpattern; if (!m_use_ip) { - muonpattern = houghPatternToPhiPattern(phipatterns[i][j]); + muonpattern = houghPatternToPhiPattern(*phipatterns[i][j]); } else { - muonpattern = houghPatternToCleanPhiPattern(phipatterns[i][j]); + muonpattern = houghPatternToCleanPhiPattern(*phipatterns[i][j]); } - if (muonpattern != nullptr) { - phipatterncollection->push_back(muonpattern); - + if (muonpattern) { ATH_MSG_DEBUG(" Lift MuonPhiPattern size " << muonpattern->numberOfContainedPrds()); - if (msgLvl(MSG::VERBOSE)) { printPattern(muonpattern); } + if (msgLvl(MSG::VERBOSE)) { printPattern(muonpattern.get()); } + phipatterncollection->push_back(std::move(muonpattern)); + } } } @@ -913,8 +825,8 @@ MuonPrdPatternCollection* MuonHoughPatternTool::getPhiMuonPatterns(MuonHoughPatt return phipatterncollection; } -MuonPrdPatternCollection* MuonHoughPatternTool::getEtaMuonPatterns(MuonHoughPatternContainerShip& houghpatterns) const { - MuonPrdPatternCollection* etapatterncollection = new MuonPrdPatternCollection(); +std::unique_ptr<MuonPrdPatternCollection> MuonHoughPatternTool::getEtaMuonPatterns(MuonHoughPatternContainerShip& houghpatterns) const { + std::unique_ptr<MuonPrdPatternCollection> etapatterncollection = std::make_unique<MuonPrdPatternCollection>(); int maximum_number_of_patterns = m_maximum_level * m_number_of_maxima; @@ -923,7 +835,7 @@ MuonPrdPatternCollection* MuonHoughPatternTool::getEtaMuonPatterns(MuonHoughPatt etapatterncollection->reserve(maximum_number_of_patterns); int id = MuonHough::hough_rz; - if (m_use_cosmics == true) { + if (m_use_cosmics) { id = MuonHough::hough_rzcosmics; ATH_MSG_DEBUG(" GetEtaMuonPatterns Use RZ curved hough patterns "); } else if (m_use_curvedhough) { @@ -938,31 +850,31 @@ MuonPrdPatternCollection* MuonHoughPatternTool::getEtaMuonPatterns(MuonHoughPatt // Bookkeeping for merged or double eta patterns std::map<MuonHoughPattern*, int> mergedpatterns; - for (unsigned int i = 0; i < etapatterns.size(); i++) { - for (unsigned int j = 0; j < etapatterns[i].size(); j++) { - MuonHoughPattern* houghpattern = etapatterns[i][j]; + for (unsigned int i = 0; i < etapatterns.size(); ++i) { + for (unsigned int j = 0; j < etapatterns[i].size(); ++j) { + std::unique_ptr<MuonHoughPattern>& houghpattern = etapatterns[i][j]; if (!houghpattern) continue; - mergedpatterns[houghpattern] = 0; + mergedpatterns[houghpattern.get()] = 0; } } // Search for identical eta patterns and remove them // and search for overlapping eta patterns and merge them (10-1-2008, does merging ever happen? JS, yes it does!) - for (unsigned int i = 0; i < etapatterns.size(); i++) { - for (unsigned int j = 0; j < etapatterns[i].size(); j++) { - MuonHoughPattern* houghpattern1 = etapatterns[i][j]; + for (unsigned int i = 0; i < etapatterns.size(); ++i) { + for (unsigned int j = 0; j < etapatterns[i].size(); ++j) { + std::unique_ptr<MuonHoughPattern>& houghpattern1 = etapatterns[i][j]; if (!houghpattern1) continue; if (etapatterns[i][j]->size() < m_thresholdpattern_rz) continue; ATH_MSG_DEBUG(" Eta patterns size before Merge " << etapatterns[i][j]->size()); for (unsigned int k = i; k < etapatterns.size(); k++) { for (unsigned int l = 0; l < etapatterns[k].size(); l++) { - MuonHoughPattern* houghpattern2 = etapatterns[k][l]; + std::unique_ptr<MuonHoughPattern>& houghpattern2 = etapatterns[k][l]; if (!houghpattern2) continue; if (etapatterns[k][l]->size() < m_thresholdpattern_rz) continue; - if (houghpattern1 == houghpattern2) continue; - if (mergedpatterns[houghpattern1] == 1) continue; - if (mergedpatterns[houghpattern2] == 1) continue; + if (houghpattern1.get() == houghpattern2.get()) continue; + if (mergedpatterns[houghpattern1.get()] == 1) continue; + if (mergedpatterns[houghpattern2.get()] == 1) continue; // calculate if curvatures are compatible, not done for cosmics double alpha = 0.; @@ -1003,34 +915,34 @@ MuonPrdPatternCollection* MuonHoughPatternTool::getEtaMuonPatterns(MuonHoughPatt if (chi < 0.5 && psi < 0.5 && alpha < 0.05) { // 0.05 (rad) corresponds with 3 degrees per m - int overlap = overlapHoughPatterns(houghpattern1, houghpattern2); - ATH_MSG_DEBUG(" Eta Overlap " << overlap << " size1 " << houghpattern1->size() << " size2 " - << houghpattern2->size()); - int ns1 = houghpattern1->size(); - int ns2 = houghpattern2->size(); + int overlap = overlapHoughPatterns(*houghpattern1, *houghpattern2); + const int ns1 = houghpattern1->size(); + const int ns2 = houghpattern2->size(); + + ATH_MSG_DEBUG(" Eta Overlap " << overlap << " size1 " << ns1 << " size2 " << ns2); if (overlap == ns2 && overlap <= ns1) { ATH_MSG_DEBUG(" DROP patterns overlapping hits "); - mergedpatterns[houghpattern2] = 1; + mergedpatterns[houghpattern2.get()] = 1; continue; } if (overlap == ns1 && overlap < ns2) { ATH_MSG_DEBUG(" DROP patterns overlapping hits "); - mergedpatterns[houghpattern1] = 1; + mergedpatterns[houghpattern1.get()] = 1; continue; } - Muon::MuonPrdPattern* muonpattern = nullptr; + std::unique_ptr<Muon::MuonPrdPattern> muonpattern; // Look for 80% or more overlap if ((overlap > 0.8 * ns1 || overlap > 0.8 * ns2) && ns1 >= ns2) { - muonpattern = houghPatternsToOneEtaPattern(etapatterns[i][j], etapatterns[k][l]); + muonpattern = houghPatternsToOneEtaPattern(*etapatterns[i][j], *etapatterns[k][l]); } if ((overlap > 0.8 * ns1 || overlap > 0.8 * ns2) && ns1 < ns2) { - muonpattern = houghPatternsToOneEtaPattern(etapatterns[k][l], etapatterns[i][j]); + muonpattern = houghPatternsToOneEtaPattern(*etapatterns[k][l], *etapatterns[i][j]); } if (muonpattern) { - etapatterncollection->push_back(muonpattern); - mergedpatterns[houghpattern1] = 1; - mergedpatterns[houghpattern2] = 1; + etapatterncollection->push_back(std::move(muonpattern)); + mergedpatterns[houghpattern1.get()] = 1; + mergedpatterns[houghpattern2.get()] = 1; continue; } } // end angular cut @@ -1039,21 +951,18 @@ MuonPrdPatternCollection* MuonHoughPatternTool::getEtaMuonPatterns(MuonHoughPatt } } // end i - for (unsigned int i = 0; i < etapatterns.size(); i++) { - for (unsigned int j = 0; j < etapatterns[i].size(); j++) { - MuonHoughPattern* houghpattern = etapatterns[i][j]; - if (!houghpattern) { - // std::cout << " zero pointer to eta HoughPattern " << houghpattern << std::endl; - continue; - } - if (mergedpatterns[houghpattern] == 1) continue; + for (unsigned int i = 0; i < etapatterns.size(); ++i) { + for (unsigned int j = 0; j < etapatterns[i].size(); ++j) { + std::unique_ptr<MuonHoughPattern>& houghpattern = etapatterns[i][j]; + if (!houghpattern) { continue; } + if (mergedpatterns[houghpattern.get()] == 1) continue; if (!etapatterns[i][j]->empty()) { - Muon::MuonPrdPattern* muonpattern = houghPatternToEtaPattern(etapatterns[i][j]); - etapatterncollection->push_back(muonpattern); + std::unique_ptr<Muon::MuonPrdPattern> muonpattern = houghPatternToEtaPattern(*etapatterns[i][j]); + etapatterncollection->push_back(std::move(muonpattern)); ATH_MSG_DEBUG(" Lift MuonEtaPattern size " << etapatterns[i][j]->size()); - if (msgLvl(MSG::VERBOSE)) { printPattern(muonpattern); } + if (msgLvl(MSG::VERBOSE)) { printPattern(muonpattern.get()); } } } } @@ -1061,25 +970,22 @@ MuonPrdPatternCollection* MuonHoughPatternTool::getEtaMuonPatterns(MuonHoughPatt return etapatterncollection; } -MuonPrdPatternCollection* MuonHoughPatternTool::getCurvedMuonPatterns(MuonHoughPatternContainerShip& houghpatterns) const { - MuonPrdPatternCollection* curvedpatterncollection = new MuonPrdPatternCollection(); +std::unique_ptr<MuonPrdPatternCollection> MuonHoughPatternTool::getCurvedMuonPatterns(MuonHoughPatternContainerShip& houghpatterns) const { + std::unique_ptr<MuonPrdPatternCollection> curvedpatterncollection = std::make_unique<MuonPrdPatternCollection>(); int maximum_number_of_patterns = m_maximum_level * m_number_of_maxima; curvedpatterncollection->reserve(maximum_number_of_patterns); MuonHoughPatternContainer& curvedpatterns = houghpatterns[MuonHough::hough_curved_at_a_cylinder]; - for (unsigned int i = 0; i < curvedpatterns.size(); i++) { - for (unsigned int j = 0; j < curvedpatterns[i].size(); j++) { - MuonHoughPattern* houghpattern = curvedpatterns[i][j]; - if (!houghpattern) { - // std::cout << " zero pointer to curved HoughPattern " << houghpattern << std::endl; - continue; - } + for (unsigned int i = 0; i < curvedpatterns.size(); ++i) { + for (unsigned int j = 0; j < curvedpatterns[i].size(); ++j) { + std::unique_ptr<MuonHoughPattern>& houghpattern = curvedpatterns[i][j]; + if (!houghpattern) { continue; } if (!curvedpatterns[i][j]->empty()) { - Muon::MuonPrdPattern* muonpattern = houghPatternToEtaPattern(curvedpatterns[i][j]); - curvedpatterncollection->push_back(muonpattern); + std::unique_ptr<Muon::MuonPrdPattern> muonpattern = houghPatternToEtaPattern(*curvedpatterns[i][j]); + curvedpatterncollection->push_back(std::move(muonpattern)); ATH_MSG_DEBUG(" Lift MuoncurvedPattern size " << curvedpatterns[i][j]->size()); } } @@ -1087,23 +993,20 @@ MuonPrdPatternCollection* MuonHoughPatternTool::getCurvedMuonPatterns(MuonHoughP return curvedpatterncollection; } -Muon::MuonPrdPattern* MuonHoughPatternTool::houghPatternToEtaPattern(MuonHoughPattern* houghpattern) const { +std::unique_ptr<Muon::MuonPrdPattern> MuonHoughPatternTool::houghPatternToEtaPattern(const MuonHoughPattern& houghpattern) const { ATH_MSG_VERBOSE("houghPatternToEtaPattern"); - std::vector<double> position = houghpattern->getEPos(); - std::vector<double> direction = houghpattern->getEDir(); + const Amg::Vector3D position = houghpattern.getEPos(); + const Amg::Vector3D direction = houghpattern.getEDir(); - double curvature = houghpattern->getECurvature(); - double charge = 1.; - if (curvature < 0) charge = -1; + double curvature = houghpattern.getECurvature(); + double charge = curvature < 0 ? -1 : 1.; double pscale = std::abs(curvature); - double r0 = 0.001; - - if (m_use_cosmics) { r0 = houghpattern->getERPhi(); } + const double r0 = m_use_cosmics ? houghpattern.getERPhi() : 0.001; - double x0 = charge * r0 * std::sin(houghpattern->getEPhi()); - double y0 = -charge * r0 * std::cos(houghpattern->getEPhi()); + double x0 = charge * r0 * std::sin(houghpattern.getEPhi()); + double y0 = -charge * r0 * std::cos(houghpattern.getEPhi()); const Amg::Vector3D pos = Amg::Vector3D(x0, y0, position[2]); const Amg::Vector3D dir = Amg::Vector3D(pscale * direction[0], pscale * direction[1], pscale * direction[2]); @@ -1112,59 +1015,56 @@ Muon::MuonPrdPattern* MuonHoughPatternTool::houghPatternToEtaPattern(MuonHoughPa ATH_MSG_DEBUG("direction: " << direction[0] << " " << direction[1] << " " << direction[2]); ATH_MSG_DEBUG(" Lift Eta Hough Pattern with charge " << charge << " Curvature " << pscale); - Muon::MuonPrdPattern* muonpattern = new Muon::MuonPrdPattern(pos, dir); + std::unique_ptr<Muon::MuonPrdPattern> muonpattern = std::make_unique<Muon::MuonPrdPattern>(pos, dir); - for (unsigned int i = 0; i < houghpattern->size(); i++) { muonpattern->addPrd(houghpattern->getPrd(i)); } + for (unsigned int i = 0; i < houghpattern.size(); ++i) { muonpattern->addPrd(houghpattern.getPrd(i)); } return muonpattern; } -Muon::MuonPrdPattern* MuonHoughPatternTool::houghPatternToPhiPattern(MuonHoughPattern* houghpattern) const { +std::unique_ptr<Muon::MuonPrdPattern> MuonHoughPatternTool::houghPatternToPhiPattern(const MuonHoughPattern& houghpattern) const { ATH_MSG_VERBOSE("houghPatternToPhiPattern"); - std::vector<double> position = houghpattern->getEPos(); - std::vector<double> direction = houghpattern->getEDir(); - - const Amg::Vector3D pos = Amg::Vector3D(position[0], position[1], position[2]); - const Amg::Vector3D dir = Amg::Vector3D(direction[0], direction[1], direction[2]); + const Amg::Vector3D pos = houghpattern.getEPos(); + const Amg::Vector3D dir = houghpattern.getEDir(); - ATH_MSG_DEBUG("position: " << position[0] << " " << position[1] << " " << position[2]); - ATH_MSG_DEBUG("direction: " << direction[0] << " " << direction[1] << " " << direction[2]); - Muon::MuonPrdPattern* muonpattern = new Muon::MuonPrdPattern(pos, dir); + ATH_MSG_DEBUG("position: " << pos[0] << " " << pos[1] << " " << pos[2]); + ATH_MSG_DEBUG("direction: " << dir[0] << " " << dir[1] << " " << dir[2]); + std::unique_ptr<Muon::MuonPrdPattern> muonpattern = std::make_unique<Muon::MuonPrdPattern>(pos, dir); - for (unsigned int i = 0; i < houghpattern->size(); i++) { - muonpattern->addPrd(houghpattern->getPrd(i)); + for (unsigned int i = 0; i < houghpattern.size(); ++i) { + muonpattern->addPrd(houghpattern.getPrd(i)); - ATH_MSG_VERBOSE("PrepRawData Added " << houghpattern->getPrd(i)); + ATH_MSG_VERBOSE("PrepRawData Added " << houghpattern.getPrd(i)); } return muonpattern; } -Muon::MuonPrdPattern* MuonHoughPatternTool::houghPatternsToOneEtaPattern(MuonHoughPattern* houghpattern1, - MuonHoughPattern* houghpattern2) const { +std::unique_ptr<Muon::MuonPrdPattern> MuonHoughPatternTool::houghPatternsToOneEtaPattern(const MuonHoughPattern& houghpattern1, + const MuonHoughPattern& houghpattern2) const { ATH_MSG_DEBUG("houghPatternsToOneEtaPattern"); - int ns1 = houghpattern1->size(); - int ns2 = houghpattern2->size(); + const int ns1 = houghpattern1.size(); + const int ns2 = houghpattern2.size(); - double the1 = houghpattern1->getETheta(); - double the2 = houghpattern2->getETheta(); - double theta = (ns1 * the1 + ns2 * the2) / (ns1 + ns2); + const double the1 = houghpattern1.getETheta(); + const double the2 = houghpattern2.getETheta(); + const double theta = (ns1 * the1 + ns2 * the2) / (ns1 + ns2); - double phi1 = houghpattern1->getEPhi(); - double phi2 = houghpattern2->getEPhi(); - double cos_phi = (ns1 * std::cos(phi1) + ns2 * std::cos(phi2)) / (ns1 + ns2); - double sin_phi = (ns1 * std::sin(phi1) + ns2 * std::sin(phi2)) / (ns1 + ns2); - double phi = std::atan2(sin_phi, cos_phi); + const double phi1 = houghpattern1.getEPhi(); + const double phi2 = houghpattern2.getEPhi(); + const double cos_phi = (ns1 * std::cos(phi1) + ns2 * std::cos(phi2)) / (ns1 + ns2); + const double sin_phi = (ns1 * std::sin(phi1) + ns2 * std::sin(phi2)) / (ns1 + ns2); + const double phi = std::atan2(sin_phi, cos_phi); - double invcur1 = 1. / houghpattern1->getECurvature(); - double invcur2 = 1. / houghpattern2->getECurvature(); + const double invcur1 = 1. / houghpattern1.getECurvature(); + const double invcur2 = 1. / houghpattern2.getECurvature(); - std::vector<double> position1 = houghpattern1->getEPos(); - std::vector<double> position2 = houghpattern2->getEPos(); - double z0 = (ns1 * position1[2] + ns2 * position2[2]) / (ns1 + ns2); + const Amg::Vector3D position1 = houghpattern1.getEPos(); + const Amg::Vector3D position2 = houghpattern2.getEPos(); + const double z0 = (ns1 * position1[2] + ns2 * position2[2]) / (ns1 + ns2); - double invcur = (ns1 * invcur1 + ns2 * invcur2) / (ns1 + ns2); + const double invcur = (ns1 * invcur1 + ns2 * invcur2) / (ns1 + ns2); ATH_MSG_DEBUG("Start Making one eta pattern theta " << theta << " phi " << phi << " invcur " << invcur); @@ -1186,7 +1086,7 @@ Muon::MuonPrdPattern* MuonHoughPatternTool::houghPatternsToOneEtaPattern(MuonHou double r0 = 0.001; if (m_use_cosmics) { // calculate new r0 - r0 = (ns1 * houghpattern1->getERPhi() + ns2 * houghpattern2->getERPhi()) / (ns1 + ns2); + r0 = (ns1 * houghpattern1.getERPhi() + ns2 * houghpattern2.getERPhi()) / (ns1 + ns2); ATH_MSG_DEBUG("New r0: " << r0); } @@ -1196,27 +1096,28 @@ Muon::MuonPrdPattern* MuonHoughPatternTool::houghPatternsToOneEtaPattern(MuonHou ATH_MSG_DEBUG(" Lift one Eta pattern charge " << charge << " curvature " << pscale); const Amg::Vector3D pos = Amg::Vector3D(x0, y0, z0); - const Amg::Vector3D dir = Amg::Vector3D(pscale * sin(theta) * cos_phi, pscale * sin(theta) * sin_phi, pscale * cos(theta)); + const Amg::Vector3D dir = + Amg::Vector3D(pscale * std::sin(theta) * cos_phi, pscale * std::sin(theta) * sin_phi, pscale * std::cos(theta)); - Muon::MuonPrdPattern* muonpattern = new Muon::MuonPrdPattern(pos, dir); + std::unique_ptr<Muon::MuonPrdPattern> muonpattern = std::make_unique<Muon::MuonPrdPattern>(pos, dir); int neta = 0; - for (unsigned int i = 0; i < houghpattern1->size(); i++) { - double the = houghpattern1->getTheta(i); - muonpattern->addPrd(houghpattern1->getPrd(i)); - neta++; + for (unsigned int i = 0; i < houghpattern1.size(); ++i) { + double the = houghpattern1.getTheta(i); + muonpattern->addPrd(houghpattern1.getPrd(i)); + ++neta; ATH_MSG_VERBOSE("PrepRawData Added theta " << the); } - for (unsigned int i = 0; i < houghpattern2->size(); i++) { + for (unsigned int i = 0; i < houghpattern2.size(); ++i) { bool accept = true; - double the = houghpattern2->getTheta(i); - for (unsigned int j = 0; j < houghpattern1->size(); j++) { - if (houghpattern2->getPrd(i) == houghpattern1->getPrd(j)) accept = false; + double the = houghpattern2.getTheta(i); + for (unsigned int j = 0; j < houghpattern1.size(); ++j) { + if (houghpattern2.getPrd(i) == houghpattern1.getPrd(j)) accept = false; } if (accept) { - muonpattern->addPrd(houghpattern2->getPrd(i)); - neta++; + muonpattern->addPrd(houghpattern2.getPrd(i)); + ++neta; ATH_MSG_VERBOSE("PrepRawData Added theta " << the); } else { ATH_MSG_VERBOSE(" PrepRawData already there " << the); @@ -1228,32 +1129,31 @@ Muon::MuonPrdPattern* MuonHoughPatternTool::houghPatternsToOneEtaPattern(MuonHou return muonpattern; } -Muon::MuonPrdPattern* MuonHoughPatternTool::houghPatternsToOnePhiPattern(MuonHoughPattern* houghpattern1, - MuonHoughPattern* houghpattern2) const { +std::unique_ptr<Muon::MuonPrdPattern> MuonHoughPatternTool::houghPatternsToOnePhiPattern(const MuonHoughPattern& houghpattern1, + const MuonHoughPattern& houghpattern2) const { /** IP constraint used, should not be used for cosmics! */ ATH_MSG_DEBUG("houghPatternsToOnePhiPattern"); - double theta = (houghpattern1->getETheta() + houghpattern2->getETheta()) / 2.; - double cos_phi = 0.; - double sin_phi = 0.; + double theta = (houghpattern1.getETheta() + houghpattern2.getETheta()) / 2.; + double cos_phi{0.}, sin_phi{0.}; int nphi = 0; - for (unsigned int i = 0; i < houghpattern1->size(); i++) { - double phi = houghpattern1->getPhi(i); + for (unsigned int i = 0; i < houghpattern1.size(); ++i) { + double phi = houghpattern1.getPhi(i); cos_phi += std::cos(phi); sin_phi += std::sin(phi); - nphi++; + ++nphi; } - for (unsigned int i = 0; i < houghpattern2->size(); i++) { - double phi = houghpattern2->getPhi(i); + for (unsigned int i = 0; i < houghpattern2.size(); ++i) { + double phi = houghpattern2.getPhi(i); bool accept = true; - for (unsigned int j = 0; j < houghpattern1->size(); j++) { - if (houghpattern2->getPrd(i) == houghpattern1->getPrd(j)) accept = false; + for (unsigned int j = 0; j < houghpattern1.size(); ++j) { + if (houghpattern2.getPrd(i) == houghpattern1.getPrd(j)) accept = false; } if (accept) { cos_phi += std::cos(phi); sin_phi += std::sin(phi); - nphi++; + ++nphi; } } @@ -1269,28 +1169,28 @@ Muon::MuonPrdPattern* MuonHoughPatternTool::houghPatternsToOnePhiPattern(MuonHou sin_phi = 0.; nphi = 0; - for (unsigned int i = 0; i < houghpattern1->size(); i++) { - double phi = houghpattern1->getPhi(i); + for (unsigned int i = 0; i < houghpattern1.size(); ++i) { + double phi = houghpattern1.getPhi(i); double dotprod = cphit * std::cos(phi) + sphit * std::sin(phi); if (dotprod > 0.95) { cos_phi += std::cos(phi); sin_phi += std::sin(phi); - nphi++; + ++nphi; } } - for (unsigned int i = 0; i < houghpattern2->size(); i++) { - double phi = houghpattern2->getPhi(i); + for (unsigned int i = 0; i < houghpattern2.size(); ++i) { + double phi = houghpattern2.getPhi(i); double dotprod = cphit * std::cos(phi) + sphit * std::sin(phi); if (dotprod > 0.95) { bool accept = true; - for (unsigned int j = 0; j < houghpattern1->size(); j++) { - if (houghpattern2->getPrd(i) == houghpattern1->getPrd(j)) accept = false; + for (unsigned int j = 0; j < houghpattern1.size(); ++j) { + if (houghpattern2.getPrd(i) == houghpattern1.getPrd(j)) accept = false; } if (accept) { cos_phi += std::cos(phi); sin_phi += std::sin(phi); - nphi++; + ++nphi; } } } @@ -1302,27 +1202,27 @@ Muon::MuonPrdPattern* MuonHoughPatternTool::houghPatternsToOnePhiPattern(MuonHou cos_phi = 0.; sin_phi = 0.; nphi = 0; - for (unsigned int i = 0; i < houghpattern1->size(); i++) { - double phi = houghpattern1->getPhi(i); + for (unsigned int i = 0; i < houghpattern1.size(); ++i) { + double phi = houghpattern1.getPhi(i); double dotprod = cphit * std::cos(phi) + sphit * std::sin(phi); if (dotprod > 0.99) { cos_phi += std::cos(phi); sin_phi += std::sin(phi); - nphi++; + ++nphi; } } - for (unsigned int i = 0; i < houghpattern2->size(); i++) { - double phi = houghpattern2->getPhi(i); + for (unsigned int i = 0; i < houghpattern2.size(); ++i) { + double phi = houghpattern2.getPhi(i); double dotprod = cphit * std::cos(phi) + sphit * std::sin(phi); if (dotprod > 0.99) { bool accept = true; - for (unsigned int j = 0; j < houghpattern1->size(); j++) { - if (houghpattern2->getPrd(i) == houghpattern1->getPrd(j)) accept = false; + for (unsigned int j = 0; j < houghpattern1.size(); ++j) { + if (houghpattern2.getPrd(i) == houghpattern1.getPrd(j)) accept = false; } if (accept) { cos_phi += std::cos(phi); sin_phi += std::sin(phi); - nphi++; + ++nphi; } } } @@ -1334,31 +1234,31 @@ Muon::MuonPrdPattern* MuonHoughPatternTool::houghPatternsToOnePhiPattern(MuonHou cos_phi = 0.; sin_phi = 0.; nphi = 0; - for (unsigned int i = 0; i < houghpattern1->size(); i++) { - double phi = houghpattern1->getPhi(i); - double thetah = houghpattern1->getTheta(i); + for (unsigned int i = 0; i < houghpattern1.size(); ++i) { + double phi = houghpattern1.getPhi(i); + double thetah = houghpattern1.getTheta(i); double dotprod = cphit * std::cos(phi) + sphit * std::sin(phi); if (dotprod > 0.995) { cos_phi += std::cos(phi); sin_phi += std::sin(phi); theta += thetah; - nphi++; + ++nphi; } } - for (unsigned int i = 0; i < houghpattern2->size(); i++) { - double phi = houghpattern2->getPhi(i); - double thetah = houghpattern2->getTheta(i); + for (unsigned int i = 0; i < houghpattern2.size(); ++i) { + double phi = houghpattern2.getPhi(i); + double thetah = houghpattern2.getTheta(i); double dotprod = cphit * std::cos(phi) + sphit * std::sin(phi); if (dotprod > 0.995) { bool accept = true; - for (unsigned int j = 0; j < houghpattern1->size(); j++) { - if (houghpattern2->getPrd(i) == houghpattern1->getPrd(j)) accept = false; + for (unsigned int j = 0; j < houghpattern1.size(); ++j) { + if (houghpattern2.getPrd(i) == houghpattern1.getPrd(j)) accept = false; } if (accept) { cos_phi += std::cos(phi); sin_phi += std::sin(phi); theta += thetah; - nphi++; + ++nphi; } } } @@ -1373,34 +1273,34 @@ Muon::MuonPrdPattern* MuonHoughPatternTool::houghPatternsToOnePhiPattern(MuonHou double z0 = 0.; const Amg::Vector3D pos = Amg::Vector3D(x0, y0, z0); - const Amg::Vector3D dir = Amg::Vector3D(sin(theta) * cphit, sin(theta) * sphit, cos(theta)); + const Amg::Vector3D dir = Amg::Vector3D(std::sin(theta) * cphit, std::sin(theta) * sphit, std::cos(theta)); - Muon::MuonPrdPattern* muonpattern = new Muon::MuonPrdPattern(pos, dir); + std::unique_ptr<Muon::MuonPrdPattern> muonpattern = std::make_unique<Muon::MuonPrdPattern>(pos, dir); nphi = 0; - for (unsigned int i = 0; i < houghpattern1->size(); i++) { - double phi = houghpattern1->getPhi(i); + for (unsigned int i = 0; i < houghpattern1.size(); ++i) { + double phi = houghpattern1.getPhi(i); double dotprod = cphit * std::cos(phi) + sphit * std::sin(phi); if (dotprod > 0.995) { - muonpattern->addPrd(houghpattern1->getPrd(i)); - nphi++; + muonpattern->addPrd(houghpattern1.getPrd(i)); + ++nphi; ATH_MSG_VERBOSE("PrepRawData Merged Clean Phi Added " << phi); } else { ATH_MSG_VERBOSE("PrepRawData Merged Phi Dropped " << phi); } } - for (unsigned int i = 0; i < houghpattern2->size(); i++) { - double phi = houghpattern2->getPhi(i); + for (unsigned int i = 0; i < houghpattern2.size(); ++i) { + double phi = houghpattern2.getPhi(i); double dotprod = cphit * std::cos(phi) + sphit * std::sin(phi); if (dotprod > 0.995) { bool accept = true; - for (unsigned int j = 0; j < houghpattern1->size(); j++) { - if (houghpattern2->getPrd(i) == houghpattern1->getPrd(j)) accept = false; + for (unsigned int j = 0; j < houghpattern1.size(); ++j) { + if (houghpattern2.getPrd(i) == houghpattern1.getPrd(j)) accept = false; } if (accept) { - muonpattern->addPrd(houghpattern2->getPrd(i)); - nphi++; + muonpattern->addPrd(houghpattern2.getPrd(i)); + ++nphi; ATH_MSG_VERBOSE("PrepRawData Merged Clean Phi Added " << phi); } else { ATH_MSG_VERBOSE("PrepRawData Merged Phi Dropped " << phi); @@ -1415,49 +1315,50 @@ Muon::MuonPrdPattern* MuonHoughPatternTool::houghPatternsToOnePhiPattern(MuonHou return muonpattern; } -Muon::MuonPrdPattern* MuonHoughPatternTool::houghPatternToCleanPhiPattern(MuonHoughPattern* houghpattern) const { +std::unique_ptr<Muon::MuonPrdPattern> MuonHoughPatternTool::houghPatternToCleanPhiPattern(MuonHoughPattern& houghpattern) const { /** IP constraint used, should not be used for cosmics! */ // TODO: rewrite with removing hits from patterns, instead of building up ATH_MSG_DEBUG("houghPatternToCleanPhiPattern"); - for (unsigned int i = 0; i < houghpattern->size(); i++) { - ATH_MSG_VERBOSE(houghpattern->getHit(i)->getHitx() - << " " << houghpattern->getHit(i)->getHity() << " " << houghpattern->getHit(i)->getHitz() << " " - << houghpattern->getHit(i)->getPhi() << " " << houghpattern->getHit(i)->getMeasuresPhi() << " " - << houghpattern->getHit(i)->getWhichDetector() << " " << houghpattern->getHit(i)->getWeight() << " " - << houghpattern->getHit(i)->getAssociated()); + if (msgLevel(MSG::VERBOSE)) { + for (unsigned int i = 0; i < houghpattern.size(); ++i) { + const MuonHoughHit* hit = houghpattern.getHit(i); + ATH_MSG_VERBOSE(hit->getHitx() << " " << hit->getHity() << " " << hit->getHitz() << " " << hit->getPhi() << " " + << hit->getMeasuresPhi() << " " << hit->getWhichDetector() << " " << hit->getWeight() << " " + << hit->getAssociated()); + } } - double theta = houghpattern->getETheta(); - unsigned int size = houghpattern->size(); + double theta = houghpattern.getETheta(); + unsigned int size = houghpattern.size(); + double phi = houghpattern.getEPhi(); + double r0 = houghpattern.getERPhi(); ATH_MSG_DEBUG("Start Phi hits cleaning with " << size << " hits " << " theta " << theta); - ATH_MSG_DEBUG("Start Phi: " << houghpattern->getEPhi() << " r0: " << houghpattern->getERPhi()); - houghpattern->updateParametersRPhi(); - double phi = houghpattern->getEPhi(); - double r0 = houghpattern->getERPhi(); - unsigned int newsize = houghpattern->size(); + ATH_MSG_DEBUG("Start Phi: " << phi << " r0: " << r0); + houghpattern.updateParametersRPhi(); + unsigned int newsize = houghpattern.size(); ATH_MSG_VERBOSE("size: " << newsize << " r0: " << r0 << " phi: " << phi); CxxUtils::sincos scphi(phi); const int number_of_iterations = 4; - double cutvalues[number_of_iterations] = {1000., 500., 250., 125.}; + static constexpr std::array<double, number_of_iterations> cutvalues{1000., 500., 250., 125.}; - bool first = true; - MuonHoughPattern* newpattern = houghpattern; + const MuonHoughPattern* newpattern{&houghpattern}; + std::unique_ptr<MuonHoughPattern> pat_owner{}; for (int it = 0; it < number_of_iterations; it++) { bool change = true; while (change) { ATH_MSG_VERBOSE("size: " << newsize << " r0: " << r0 << " phi: " << phi); double max_dist = 0.; - unsigned int max_i = 99999; - for (unsigned int i = 0; i < newpattern->size(); i++) { + unsigned int max_i = UINT_MAX; + for (unsigned int i = 0; i < newpattern->size(); ++i) { double dist = newpattern->getHitx(i) * scphi.sn - newpattern->getHity(i) * scphi.cs - r0; ATH_MSG_VERBOSE("Dist: " << dist); if (dist > max_dist) { @@ -1468,20 +1369,16 @@ Muon::MuonPrdPattern* MuonHoughPatternTool::houghPatternToCleanPhiPattern(MuonHo if (max_dist < cutvalues[it]) { change = false; } else { - MuonHoughPattern* newpattern2 = new MuonHoughPattern(MuonHough::hough_xy); - for (unsigned int i = 0; i < newpattern->size(); i++) { + std::unique_ptr<MuonHoughPattern> newpattern2 = std::make_unique<MuonHoughPattern>(MuonHough::hough_xy); + for (unsigned int i = 0; i < newpattern->size(); ++i) { if (i != max_i) { newpattern2->addHit(newpattern->getHit(i)); } } newpattern2->updateParametersRPhi(); phi = newpattern2->getEPhi(); r0 = newpattern2->getERPhi(); newsize = newpattern2->size(); - if (!first) - delete newpattern; - else { - first = false; - } - newpattern = newpattern2; + newpattern = newpattern2.get(); + pat_owner = std::move(newpattern2); scphi = CxxUtils::sincos(phi); } } @@ -1490,7 +1387,7 @@ Muon::MuonPrdPattern* MuonHoughPatternTool::houghPatternToCleanPhiPattern(MuonHo ATH_MSG_DEBUG("Final size: " << newsize << " r0: " << r0 << " phi: " << phi); double thetanew = 0.; - for (unsigned int i = 0; i < newpattern->size(); i++) { + for (unsigned int i = 0; i < newpattern->size(); ++i) { double thetah = newpattern->getTheta(i); thetanew += thetah; } @@ -1507,25 +1404,22 @@ Muon::MuonPrdPattern* MuonHoughPatternTool::houghPatternToCleanPhiPattern(MuonHo const Amg::Vector3D pos = Amg::Vector3D(x0_new, y0_new, z0_new); const Amg::Vector3D dir = Amg::Vector3D(sctheta.sn * scphi.cs, sctheta.sn * scphi.sn, sctheta.cs); - Muon::MuonPrdPattern* muonpattern = new Muon::MuonPrdPattern(pos, dir); + std::unique_ptr<Muon::MuonPrdPattern> muonpattern = std::make_unique<Muon::MuonPrdPattern>(pos, dir); - for (unsigned int i = 0; i < newpattern->size(); i++) { muonpattern->addPrd(newpattern->getPrd(i)); } + for (unsigned int i = 0; i < newpattern->size(); ++i) { muonpattern->addPrd(newpattern->getPrd(i)); } ATH_MSG_DEBUG("END Clean Phi hits " << newsize << " theta " << thetanew); ATH_MSG_VERBOSE("cleaned pattern: "); - if (msgLvl(MSG::VERBOSE)) { printPattern(muonpattern); } - - if (!first) delete newpattern; - + if (msgLvl(MSG::VERBOSE)) { printPattern(muonpattern.get()); } return muonpattern; } -MuonHoughHitContainer* MuonHoughPatternTool::hitsNotInPattern(const MuonHoughHitContainer* event, int /*id_number*/) { - MuonHoughHitContainer* hits_not_in_patterns = new MuonHoughHitContainer(false); +std::unique_ptr<MuonHoughHitContainer> MuonHoughPatternTool::hitsNotInPattern(const MuonHoughHitContainer& event, int /*id_number*/) { + std::unique_ptr<MuonHoughHitContainer> hits_not_in_patterns = std::make_unique<MuonHoughHitContainer>(false); - for (unsigned int hitid = 0; hitid < event->size(); hitid++) { - if (!event->getHit(hitid)->getAssociated()) { hits_not_in_patterns->addHit(event->getHit(hitid)); } + for (unsigned int hitid = 0; hitid < event.size(); ++hitid) { + if (!event.getHit(hitid)->getAssociated()) { hits_not_in_patterns->addHit(event.getHit(hitid)); } } return hits_not_in_patterns; } @@ -1559,20 +1453,18 @@ double MuonHoughPatternTool::getThresholdHisto(int id_number) const { return thresholdhisto; } -void MuonHoughPatternTool::setWeightMdtCutValue(const MuonHoughHitContainer* event, double& weightmdt) const { - if (m_use_cosmics == true) { +void MuonHoughPatternTool::setWeightMdtCutValue(const MuonHoughHitContainer& event, double& weightmdt) const { + if (m_use_cosmics) { weightmdt = 0.; return; } - int mdthits = event->getMDThitno(); // slow function! - weightmdt = mdthits > 0 ? 1. - 5. / std::sqrt(mdthits) : 0; + int mdthits = event.getMDThitno(); // slow function! + weightmdt = mdthits > 0. ? 1. - 5. / std::sqrt(mdthits) : 0.; } bool MuonHoughPatternTool::hitThroughCut(MuonHoughHit* hit, double weightmdt) const { - if (false == m_weightcutmdt || hit->getDetectorId() != MuonHough::MDT || hit->getProbability() >= weightmdt) { - if (false == m_weightcut || hit->getProbability() >= m_weight) { return true; } - } - return false; + return (!m_weightcutmdt || hit->getDetectorId() != MuonHough::MDT || hit->getProbability() >= weightmdt) && + (!m_weightcut || hit->getProbability() >= m_weight); } void MuonHoughPatternTool::printPattern(Muon::MuonPrdPattern* muonpattern) const { diff --git a/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/src/MuonLayerHoughAlg.cxx b/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/src/MuonLayerHoughAlg.cxx index f993269780ec85f1e2eac16184a695ef8c08ebae..c501777049a02948795f3984e72c0bea51410627 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/src/MuonLayerHoughAlg.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/src/MuonLayerHoughAlg.cxx @@ -41,7 +41,7 @@ StatusCode MuonLayerHoughAlg::execute(const EventContext& ctx) const { const Muon::sTgcPrepDataContainer* stgcPrds = m_keysTgc.empty() ? nullptr : GetObject(m_keysTgc, ctx); const Muon::MMPrepDataContainer* mmPrds = m_keyMM.empty() ? nullptr : GetObject(m_keyMM, ctx); ATH_MSG_VERBOSE("calling layer tool "); - auto [combis, houghDataPerSectorVec] = m_layerTool->analyse(mdtPrds, cscPrds, tgcPrds, rpcPrds, stgcPrds, mmPrds, ctx); + auto [combis, houghDataPerSectorVec] = m_layerTool->find(mdtPrds, cscPrds, tgcPrds, rpcPrds, stgcPrds, mmPrds, ctx); SG::WriteHandle<MuonPatternCombinationCollection> Handle(m_combis, ctx); if (combis) { if (Handle.record(std::move(combis)).isFailure()) { @@ -58,17 +58,12 @@ StatusCode MuonLayerHoughAlg::execute(const EventContext& ctx) const { } // write hough data to SG - SG::WriteHandle<Muon::MuonLayerHoughTool::HoughDataPerSectorVec> handle{m_houghDataPerSectorVecKey, ctx}; + SG::WriteHandle<Muon::HoughDataPerSectorVec> handle{m_houghDataPerSectorVecKey, ctx}; if (houghDataPerSectorVec) { ATH_CHECK(handle.record(std::move(houghDataPerSectorVec))); } else { ATH_MSG_VERBOSE("HoughDataPerSectorVec " << m_houghDataPerSectorVecKey << " is empty, recording"); - ATH_CHECK(handle.record(std::make_unique<Muon::MuonLayerHoughTool::HoughDataPerSectorVec>())); + ATH_CHECK(handle.record(std::make_unique<Muon::HoughDataPerSectorVec>())); } - - m_layerTool->reset(); - return StatusCode::SUCCESS; } // execute - -StatusCode MuonLayerHoughAlg::finalize() { return StatusCode::SUCCESS; } diff --git a/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/src/MuonLayerHoughAlg.h b/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/src/MuonLayerHoughAlg.h index 0ed51cdbdc5421ad55c5a86a2bcd81b51a74df0c..75a86918da9bf578a48dcb1a4a73a7204f6e51ea 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/src/MuonLayerHoughAlg.h +++ b/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/src/MuonLayerHoughAlg.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ #ifndef MUONLAYERHOUGHALG_H @@ -7,8 +7,9 @@ #include "AthenaBaseComps/AthReentrantAlgorithm.h" #include "GaudiKernel/ToolHandle.h" -#include "MuonHoughPatternTools/MuonLayerHoughTool.h" #include "MuonRecHelperTools/MuonEDMPrinterTool.h" +#include "MuonRecToolInterfaces/HoughDataPerSec.h" +#include "MuonRecToolInterfaces/IMuonHoughPatternFinderTool.h" class MuonLayerHoughAlg : public AthReentrantAlgorithm { public: @@ -18,7 +19,6 @@ public: virtual StatusCode initialize() override; virtual StatusCode execute(const EventContext& ctx) const override; - virtual StatusCode finalize() override; private: template <class T> const T* GetObject(const SG::ReadHandleKey<T>& key, const EventContext& ctx) const; @@ -31,10 +31,10 @@ private: SG::ReadHandleKey<Muon::MMPrepDataContainer> m_keyMM{this, "MMPrepDataContainer", "MM_Measurements"}; SG::WriteHandleKey<MuonPatternCombinationCollection> m_combis{this, "MuonPatternCombinationCollection", "MuonLayerHoughCombis"}; - SG::WriteHandleKey<Muon::MuonLayerHoughTool::HoughDataPerSectorVec> m_houghDataPerSectorVecKey{ - this, "Key_MuonLayerHoughToolHoughDataPerSectorVec", "HoughDataPerSectorVec", "HoughDataPerSectorVec key"}; + SG::WriteHandleKey<Muon::HoughDataPerSectorVec> m_houghDataPerSectorVecKey{this, "Key_MuonLayerHoughToolHoughDataPerSectorVec", + "HoughDataPerSectorVec", "HoughDataPerSectorVec key"}; ToolHandle<Muon::MuonEDMPrinterTool> m_printer{this, "printerTool", "Muon::MuonEDMPrinterTool/MuonEDMPrinterTool"}; - ToolHandle<Muon::MuonLayerHoughTool> m_layerTool{this, "MuonLayerScanTool", "Muon::MuonLayerHoughTool/MuonLayerHoughTool"}; + ToolHandle<Muon::IMuonHoughPatternFinderTool> m_layerTool{this, "MuonLayerScanTool", "Muon::MuonLayerHoughTool/MuonLayerHoughTool"}; Gaudi::Property<bool> m_printSummary{this, "PrintSummary", false}; }; diff --git a/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/src/MuonLayerHoughTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/src/MuonLayerHoughTool.cxx index e4e99a433aed9b48f09dd16364939be6f661a384..c16d40db1f9b9e20b15234bfd8492a4cd82cdacd 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/src/MuonLayerHoughTool.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/src/MuonLayerHoughTool.cxx @@ -13,19 +13,13 @@ #include "MuonReadoutGeometry/MuonDetectorManager.h" #include "MuonReadoutGeometry/MuonPadDesign.h" #include "MuonReadoutGeometry/sTgcReadoutElement.h" -#include "TFile.h" -#include "TMath.h" -#include "TTree.h" #include "xAODMuon/MuonSegmentContainer.h" #include "xAODTruth/TruthParticle.h" #include "xAODTruth/TruthParticleContainer.h" namespace Muon { MuonLayerHoughTool::MuonLayerHoughTool(const std::string& type, const std::string& name, const IInterface* parent) : - AthAlgTool(type, name, parent), - m_ntechnologies(UINT_MAX), // gets set inside initialize() - m_techToTruthNameIdx() { - declareInterface<MuonLayerHoughTool>(this); + AthAlgTool(type, name, parent) { declareInterface<IMuonHoughPatternFinderTool>(this); } @@ -40,21 +34,12 @@ namespace Muon { if (Gaudi::Concurrency::ConcurrencyFlags::concurrent() && Gaudi::Concurrency::ConcurrencyFlags::numThreads() > 1) { // Disabled for >1 threads due to thread-safety concerns, but we want to keep it as a debug tool ATH_MSG_DEBUG("HitNtuple disabled because of concurrency"); - m_file = nullptr; - m_tree = nullptr; - m_ntuple = nullptr; } else { - TDirectory* cdir = gDirectory; - m_file = new TFile("HitNtuple.root", "RECREATE"); - m_tree = new TTree("data", "data"); - m_ntuple = new MuonHough::HitNtuple(); + m_file = std::make_unique<TFile>("HitNtuple.root", "RECREATE"); + m_tree = std::make_unique<TTree>("data", "data"); + m_ntuple = std::make_unique<MuonHough::HitNtuple>(); m_ntuple->initForWrite(*m_tree); - gDirectory = cdir; } - } else { - m_file = nullptr; - m_tree = nullptr; - m_ntuple = nullptr; } initializeSectorMapping(muDetMgr); @@ -165,13 +150,8 @@ namespace Muon { StatusCode MuonLayerHoughTool::finalize() { // ??? finalizeNTuple -> may be moved somewhere if (m_doNtuple && m_ntuple) { - TDirectory* cdir = gDirectory; - m_file->cd(); - m_tree->Write(); - m_file->Write(); - m_file->Close(); - delete m_ntuple; - gDirectory = cdir; + m_file->WriteObject(m_tree.get(), m_tree->GetName()); + m_tree.reset(); } return StatusCode::SUCCESS; } @@ -182,7 +162,7 @@ namespace Muon { if (truthMuons.isValid()) { ATH_MSG_DEBUG("Retrieved truth muons " << truthMuons->size()); int nmuons = 0; - for (const auto* const truthMu : *truthMuons) { + for (const xAOD::TruthParticle* truthMu : *truthMuons) { m_ntuple->tpdgId[nmuons] = truthMu->pdgId(); m_ntuple->tbarcode[nmuons] = truthMu->barcode(); m_ntuple->tmuonIndex[nmuons] = nmuons; @@ -204,7 +184,7 @@ namespace Muon { if (truthSegments.isValid()) { ATH_MSG_DEBUG("Retrieved truth Segments " << truthSegments->size()); int nsegs = 0; - for (const auto* const truthSeg : *truthSegments) { + for (const xAOD::MuonSegment* truthSeg : *truthSegments) { m_ntuple->sbarcode[nsegs] = 0; m_ntuple->sposx[nsegs] = truthSeg->x(); m_ntuple->sposy[nsegs] = truthSeg->y(); @@ -228,12 +208,10 @@ namespace Muon { if (m_ntuple) m_ntuple->reset(); } - auto MuonLayerHoughTool::find(const std::vector<const MdtPrepDataCollection*>& mdtCols, - const std::vector<const CscPrepDataCollection*>&, - const std::vector<const TgcPrepDataCollection*>& tgcCols, - const std::vector<const RpcPrepDataCollection*>& rpcCols, const MuonSegmentCombinationCollection*, - const EventContext& ctx) const - -> std::pair<std::unique_ptr<MuonPatternCombinationCollection>, std::unique_ptr<HoughDataPerSectorVec>> { + std::pair<std::unique_ptr<MuonPatternCombinationCollection>, std::unique_ptr<HoughDataPerSectorVec>> MuonLayerHoughTool::find( + const std::vector<const MdtPrepDataCollection*>& mdtCols, const std::vector<const CscPrepDataCollection*>& cscCols, + const std::vector<const TgcPrepDataCollection*>& tgcCols, const std::vector<const RpcPrepDataCollection*>& rpcCols, + const MuonSegmentCombinationCollection*, const EventContext& ctx) const { reset(); State state; ATH_MSG_DEBUG("MuonLayerHoughTool::find"); @@ -251,49 +229,56 @@ namespace Muon { return std::make_pair(regionIndex, sectorLayerHash); }; - for (const auto* col : mdtCols) { + for (const MdtPrepDataCollection* col : mdtCols) { if (!col) continue; Identifier id = col->identify(); int sector = m_idHelperSvc->sector(id); auto hashes = getHashes(id); - fill(state.truthHits, *col, state.houghDataPerSectorVec->vec[sector - 1].hitVec[hashes.second]); + fill(ctx, state.truthHits, *col, state.houghDataPerSectorVec->vec[sector - 1].hitVec[hashes.second]); } - for (const auto* col : rpcCols) { + for (const RpcPrepDataCollection* col : rpcCols) { if (!col) continue; Identifier id = col->identify(); int sector = m_idHelperSvc->sector(id); auto hashes = getHashes(id); - fill(state.truthHits, *col, state.houghDataPerSectorVec->vec[sector - 1].hitVec[hashes.second], + fill(ctx, state.truthHits, *col, state.houghDataPerSectorVec->vec[sector - 1].hitVec[hashes.second], + state.houghDataPerSectorVec->vec[sector - 1].phiHitVec[hashes.first]); + } + for (const CscPrepDataCollection* col : cscCols) { + if (!col) continue; + const Identifier id = col->identify(); + int sector = m_idHelperSvc->sector(id); + auto hashes = getHashes(id); + fill(ctx, state.truthHits, *col, state.houghDataPerSectorVec->vec[sector - 1].hitVec[hashes.second], state.houghDataPerSectorVec->vec[sector - 1].phiHitVec[hashes.first]); } - auto hashInSector = [this](IdentifierHash hash, int sector, unsigned int sectorLayerHash) { const std::vector<IdentifierHash>& hashes = m_collectionsPerSector[sector - 1].technologyRegionHashVecs[MuonStationIndex::TGC][sectorLayerHash]; return std::binary_search(hashes.begin(), hashes.end(), hash); }; - for (const auto* col : tgcCols) { + for (const TgcPrepDataCollection* col : tgcCols) { if (!col) continue; Identifier id = col->identify(); int sector = m_idHelperSvc->sector(id); auto hashes = getHashes(id); // fill current sector - fill(state.truthHits, state.houghDataPerSectorVec->tgcClusteringObjs, *col, + fill(ctx, state.truthHits, state.houghDataPerSectorVec->tgcClusteringObjs, *col, state.houghDataPerSectorVec->vec[sector - 1].hitVec[hashes.second], state.houghDataPerSectorVec->vec[sector - 1].phiHitVec[hashes.first], sector); // fill neighbours if in overlap int neighbourSectorDown = sector == 1 ? 16 : sector - 1; if (hashInSector(col->identifyHash(), neighbourSectorDown, hashes.second)) - fill(state.truthHits, state.houghDataPerSectorVec->tgcClusteringObjs, *col, + fill(ctx, state.truthHits, state.houghDataPerSectorVec->tgcClusteringObjs, *col, state.houghDataPerSectorVec->vec[neighbourSectorDown - 1].hitVec[hashes.second], state.houghDataPerSectorVec->vec[neighbourSectorDown - 1].phiHitVec[hashes.first], neighbourSectorDown); int neighbourSectorUp = sector == 16 ? 1 : sector + 1; if (hashInSector(col->identifyHash(), neighbourSectorUp, hashes.second)) - fill(state.truthHits, state.houghDataPerSectorVec->tgcClusteringObjs, *col, + fill(ctx, state.truthHits, state.houghDataPerSectorVec->tgcClusteringObjs, *col, state.houghDataPerSectorVec->vec[neighbourSectorUp - 1].hitVec[hashes.second], state.houghDataPerSectorVec->vec[neighbourSectorUp - 1].phiHitVec[hashes.first], neighbourSectorUp); } @@ -301,11 +286,10 @@ namespace Muon { return analyse(state); } - auto MuonLayerHoughTool::analyse(const MdtPrepDataContainer* mdtCont, const CscPrepDataContainer* cscCont, - const TgcPrepDataContainer* tgcCont, const RpcPrepDataContainer* rpcCont, - const sTgcPrepDataContainer* stgcCont, const MMPrepDataContainer* mmCont, - const EventContext& ctx) const - -> std::pair<std::unique_ptr<MuonPatternCombinationCollection>, std::unique_ptr<HoughDataPerSectorVec>> { + std::pair<std::unique_ptr<MuonPatternCombinationCollection>, std::unique_ptr<HoughDataPerSectorVec>> MuonLayerHoughTool::find( + const MdtPrepDataContainer* mdtCont, const CscPrepDataContainer* cscCont, const TgcPrepDataContainer* tgcCont, + const RpcPrepDataContainer* rpcCont, const sTgcPrepDataContainer* stgcCont, const MMPrepDataContainer* mmCont, + const EventContext& ctx) const { reset(); State state; ATH_MSG_DEBUG("MuonLayerHoughTool::analyse"); @@ -314,23 +298,20 @@ namespace Muon { state.houghDataPerSectorVec->vec.resize(16); // loops over all sectors, contains hashes for technology and region and chamber (?) - CollectionsPerSectorCit sit = m_collectionsPerSector.begin(); - CollectionsPerSectorCit sit_end = m_collectionsPerSector.end(); - for (; sit != sit_end; ++sit) { - ATH_MSG_DEBUG("analyse: Filling hits sector " << sit->sector); + for (const CollectionsPerSector& sit : m_collectionsPerSector) { + ATH_MSG_DEBUG("analyse: Filling hits sector " << sit.sector); - HoughDataPerSector& houghData = state.houghDataPerSectorVec->vec[sit->sector - 1]; - houghData.sector = sit->sector; + HoughDataPerSector& houghData = state.houghDataPerSectorVec->vec[sit.sector - 1]; + houghData.sector = sit.sector; // fill hits for this sector -> hitsVec and PhiHitsVec are known now - fillHitsPerSector(state.truthHits, state.houghDataPerSectorVec->tgcClusteringObjs, *sit, mdtCont, cscCont, tgcCont, rpcCont, - stgcCont, mmCont, houghData); + fillHitsPerSector(ctx, state, sit.sector, sit, mdtCont, cscCont, tgcCont, rpcCont, stgcCont, mmCont); } return analyse(state); } - auto MuonLayerHoughTool::analyse(State& state) const - -> std::pair<std::unique_ptr<MuonPatternCombinationCollection>, std::unique_ptr<HoughDataPerSectorVec>> { + std::pair<std::unique_ptr<MuonPatternCombinationCollection>, std::unique_ptr<HoughDataPerSectorVec>> MuonLayerHoughTool::analyse( + State& state) const { auto patternCombis = std::make_unique<MuonPatternCombinationCollection>(); // loop over data and fill the hough transform @@ -542,16 +523,17 @@ namespace Muon { // add maxima to seed exclusion list associatedMaxima.insert(road.maxima.begin(), road.maxima.end()); - ATH_MSG_DEBUG(" New road " << road.maxima.size()); - for (auto* max : road.maxima) { - MuonStationIndex::ChIndex chIndex = max->hough->m_descriptor.chIndex; - MuonStationIndex::LayerIndex layer = Muon::MuonStationIndex::toLayerIndex(chIndex); - MuonStationIndex::DetectorRegionIndex region = max->hough->m_descriptor.region; - ATH_MSG_DEBUG(" Sector " << max->hough->m_descriptor.sector << " " << Muon::MuonStationIndex::regionName(region) << " " - << Muon::MuonStationIndex::layerName(layer) << " maximum " << max->max << " position " << max->pos - << " angle " << max->theta << " ptr " << max); + if (msgLevel(MSG::DEBUG)) { + ATH_MSG_DEBUG(" New road " << road.maxima.size()); + for (auto* max : road.maxima) { + MuonStationIndex::ChIndex chIndex = max->hough->m_descriptor.chIndex; + MuonStationIndex::LayerIndex layer = Muon::MuonStationIndex::toLayerIndex(chIndex); + MuonStationIndex::DetectorRegionIndex region = max->hough->m_descriptor.region; + ATH_MSG_DEBUG(" Sector " << max->hough->m_descriptor.sector << " " << Muon::MuonStationIndex::regionName(region) << " " + << Muon::MuonStationIndex::layerName(layer) << " maximum " << max->max << " position " + << max->pos << " angle " << max->theta << " ptr " << max); + } } - bool insert = true; for (auto& oldRoad : roads) { std::vector<const MuonHough::MuonLayerHough::Maximum*> intersection; @@ -584,22 +566,18 @@ namespace Muon { auto maximaSortingLambda = [road](const MuonHough::MuonPhiLayerHough::Maximum* m1, const MuonHough::MuonPhiLayerHough::Maximum* m2) { - if (m1->max == m2->max) { - if (m1->sector == m2->sector) { // prefer the same sector as the seed sector - if (m1->hits.size() == m2->hits.size()) { - if (m1->pos == m2->pos) { - if (std::abs(m1->binposmax - m1->binposmin) == std::abs(m2->binposmax - m2->binposmin)) { - return (m1->binposmin) < (m2->binposmin); - } - return std::abs(m1->binposmax - m1->binposmin) < std::abs(m2->binposmax - m2->binposmin); - } - return m1->pos < m2->pos; - } - return m1->hits.size() < m2->hits.size(); // least hits -> most collimated maximum - } - return m1->sector == road.seed->hough->m_descriptor.sector; + if (m1->max != m2->max) return m1->max > m2->max; + // prefer the same sector as the seed sector + if (m1->sector != m2->sector) return m1->sector == road.seed->hough->m_descriptor.sector; + + if (m1->hits.size() != m2->hits.size()) return m1->hits.size() < m2->hits.size(); // least hits -> most collimated maximum + + if (m1->pos != m2->pos) return m1->pos < m2->pos; + + if (std::abs(m1->binposmax - m1->binposmin) == std::abs(m2->binposmax - m2->binposmin)) { + return (m1->binposmin) < (m2->binposmin); } - return m1->max > m2->max; + return std::abs(m1->binposmax - m1->binposmin) < std::abs(m2->binposmax - m2->binposmin); }; std::stable_sort(road.phiMaxima.begin(), road.phiMaxima.end(), maximaSortingLambda); @@ -700,8 +678,7 @@ namespace Muon { ATH_MSG_DEBUG("Associating maxima in " << MuonStationIndex::regionName(region) << " " << MuonStationIndex::layerName(layer) << " size " << maxima.size()); // loop over maxima in layer - for (auto mit = maxima.begin(); mit != maxima.end(); ++mit) { - MuonHough::MuonLayerHough::Maximum* candMaximum = *mit; + for (MuonHough::MuonLayerHough::Maximum* candMaximum : maxima) { // extrapolate seed to layer assuming a pointing straight line or parabolic // add maximum to road if close enough float yloc_diff = MuonHough::extrapolate(seed, *candMaximum, m_doParabolicExtrapolation); @@ -753,8 +730,7 @@ namespace Muon { << " size " << maxima.size()); // loop over maxima per layer - for (auto mit = maxima.begin(); mit != maxima.end(); ++mit) { - MuonHough::MuonLayerHough::Maximum* candMaximum = *mit; + for (MuonHough::MuonLayerHough::Maximum* candMaximum : maxima) { // extrapolate seed to layer assuming a pointing straight line, swap coordinates float yloc_diff = MuonHough::extrapolate(seed, *candMaximum, m_doParabolicExtrapolation); ATH_MSG_VERBOSE(" Maximum position: y " @@ -773,8 +749,7 @@ namespace Muon { std::set<const TgcClusterObj3D*> tgcClusters; std::set<Identifier> triggerLayers; const MaximumVec& maxima = road.maxima; - for (auto mit = maxima.begin(); mit != maxima.end(); ++mit) { - MuonHough::MuonLayerHough::Maximum* maximum = *mit; + for (MuonHough::MuonLayerHough::Maximum* maximum : maxima) { if (maximum->hough->m_descriptor.sector != sectorData.sector) continue; // skip cases where a maximum on the road does not belong to the currently examined sector @@ -1690,13 +1665,13 @@ namespace Muon { return true; } - void MuonLayerHoughTool::fillHitsPerSector(std::set<Identifier>& truthHits, - std::vector<std::unique_ptr<TgcHitClusteringObj>>& tgcClusteringObjs, - const MuonLayerHoughTool::CollectionsPerSector& collectionsPerSector, - const MdtPrepDataContainer* mdtCont, const CscPrepDataContainer* /*cscCont*/, - const TgcPrepDataContainer* tgcCont, const RpcPrepDataContainer* rpcCont, - const sTgcPrepDataContainer* stgcCont, const MMPrepDataContainer* mmCont, - MuonLayerHoughTool::HoughDataPerSector& houghData) const { + void MuonLayerHoughTool::fillHitsPerSector(const EventContext& ctx, State& state, const int sector, + const CollectionsPerSector& collectionsPerSector, const MdtPrepDataContainer* mdtCont, + const CscPrepDataContainer* /*cscCont*/, const TgcPrepDataContainer* tgcCont, + const RpcPrepDataContainer* rpcCont, const sTgcPrepDataContainer* stgcCont, + const MMPrepDataContainer* mmCont) const { + MuonLayerHoughTool::HoughDataPerSector& houghData = state.houghDataPerSectorVec->vec[sector - 1]; + houghData.sector = sector; // loop over all possible station layers in the sector for (unsigned int tech = 0; tech < m_ntechnologies; ++tech) { for (unsigned int layerHash = 0; layerHash < MuonStationIndex::sectorLayerHashMax(); ++layerHash) { @@ -1704,29 +1679,27 @@ namespace Muon { if (hashes.empty()) continue; auto regionLayer = MuonStationIndex::decomposeSectorLayerHash(layerHash); - HashVec::const_iterator iit = hashes.begin(); - HashVec::const_iterator iit_end = hashes.end(); - for (; iit != iit_end; ++iit) { + for (const IdentifierHash& id_hash : hashes) { // !?! else if made by Felix if (mdtCont && mdtCont->size() > 0 && tech == MuonStationIndex::MDT) { - const auto* pos = mdtCont->indexFindPtr(*iit); - if (pos != nullptr) fill(truthHits, *pos, houghData.hitVec[layerHash]); + const MdtPrepDataCollection* pos = mdtCont->indexFindPtr(id_hash); + if (pos) fill(ctx, state.truthHits, *pos, houghData.hitVec[layerHash]); } else if (rpcCont && rpcCont->size() > 0 && tech == MuonStationIndex::RPC) { - const auto* pos = rpcCont->indexFindPtr(*iit); - if (pos != nullptr) fill(truthHits, *pos, houghData.hitVec[layerHash], houghData.phiHitVec[regionLayer.first]); + const RpcPrepDataCollection* pos = rpcCont->indexFindPtr(id_hash); + if (pos) fill(ctx, state.truthHits, *pos, houghData.hitVec[layerHash], houghData.phiHitVec[regionLayer.first]); } else if (tgcCont && tgcCont->size() > 0 && tech == MuonStationIndex::TGC) { - const auto* pos = tgcCont->indexFindPtr(*iit); - if (pos != nullptr) - fill(truthHits, tgcClusteringObjs, *pos, houghData.hitVec[layerHash], houghData.phiHitVec[regionLayer.first], - collectionsPerSector.sector); + const TgcPrepDataCollection* pos = tgcCont->indexFindPtr(id_hash); + if (pos) + fill(ctx, state.truthHits, state.houghDataPerSectorVec->tgcClusteringObjs, *pos, houghData.hitVec[layerHash], + houghData.phiHitVec[regionLayer.first], collectionsPerSector.sector); } else if (stgcCont && stgcCont->size() > 0 && tech == MuonStationIndex::STGC) { - const auto* pos = stgcCont->indexFindPtr(*iit); - if (pos != nullptr) - fill(truthHits, *pos, houghData.hitVec[layerHash], houghData.phiHitVec[regionLayer.first], + const sTgcPrepDataCollection* pos = stgcCont->indexFindPtr(id_hash); + if (pos) + fill(ctx, state.truthHits, *pos, houghData.hitVec[layerHash], houghData.phiHitVec[regionLayer.first], collectionsPerSector.sector); } else if (mmCont && mmCont->size() > 0 && tech == MuonStationIndex::MM) { - const auto* pos = mmCont->indexFindPtr(*iit); - if (pos != nullptr) fill(truthHits, *pos, houghData.hitVec[layerHash]); + const MMPrepDataCollection* pos = mmCont->indexFindPtr(id_hash); + if (pos) fill(ctx, state.truthHits, *pos, houghData.hitVec[layerHash]); } } } @@ -1783,43 +1756,37 @@ namespace Muon { } } - void MuonLayerHoughTool::fill(std::set<Identifier>& truthHits, const MdtPrepDataCollection& mdts, + void MuonLayerHoughTool::fill(const EventContext& ctx, std::set<Identifier>& truthHits, const MdtPrepDataCollection& mdts, MuonLayerHoughTool::HitVec& hits) const { if (mdts.empty()) return; - auto truthCollections = m_truthNames.makeHandles(); + auto truthCollections = m_truthNames.makeHandles(ctx); Identifier chid = mdts.identify(); MuonStationIndex::DetectorRegionIndex region = m_idHelperSvc->regionIndex(chid); MuonStationIndex::LayerIndex layer = m_idHelperSvc->layerIndex(chid); int sector = m_idHelperSvc->sector(chid); unsigned int technology = m_idHelperSvc->technologyIndex(chid); bool barrelLike = (region == MuonStationIndex::Barrel || layer == MuonStationIndex::BarrelExtended); - unsigned int nmdts = 0; - unsigned int nmdtsBad = 0; - MdtPrepDataCollection::const_iterator mit = mdts.begin(); - MdtPrepDataCollection::const_iterator mit_end = mdts.end(); - for (; mit != mit_end; ++mit) { - const MdtPrepData& prd = **mit; - if (prd.adc() < 50 || prd.status() != Muon::MdtStatusDriftTime) { + unsigned int nmdts(mdts.size()), nmdtsBad{0}; + for (const MdtPrepData* prd : mdts) { + if (prd->adc() < 50 || prd->status() != Muon::MdtStatusDriftTime) { ++nmdtsBad; continue; } - ++nmdts; - const Identifier& id = prd.identify(); - - float r = rCor(prd); - float x = barrelLike ? r : prd.globalPosition().z(); - float y = barrelLike ? prd.globalPosition().z() : r; + const Identifier id = prd->identify(); + float r = rCor(*prd); + float x = barrelLike ? r : prd->globalPosition().z(); + float y = barrelLike ? prd->globalPosition().z() : r; int sublayer = sublay(id); - float ymin = y - prd.localPosition()[Trk::locR]; - float ymax = y + prd.localPosition()[Trk::locR]; + float ymin = y - prd->localPosition()[Trk::locR]; + float ymax = y + prd->localPosition()[Trk::locR]; MuonHough::HitDebugInfo* debug = new MuonHough::HitDebugInfo(technology, sector, region, layer, sublayer); - debug->time = prd.tdc(); - debug->r = prd.localPosition()[Trk::locR]; + debug->time = prd->tdc(); + debug->r = prd->localPosition()[Trk::locR]; std::map<unsigned int, unsigned int>::const_iterator pos = m_techToTruthNameIdx.find(technology); if (pos != m_techToTruthNameIdx.end()) { matchTruth(truthHits, *truthCollections[pos->second], id, *debug); } - MuonHough::Hit* hit = new MuonHough::Hit(sublayer, x, ymin, ymax, 1., debug, *mit); + MuonHough::Hit* hit = new MuonHough::Hit(sublayer, x, ymin, ymax, 1., debug, prd); hits.push_back(hit); } @@ -1829,67 +1796,108 @@ namespace Muon { << m_idHelperSvc->isSmallChamber(chid)); } - void MuonLayerHoughTool::fill(std::set<Identifier>& truthHits, const RpcPrepDataCollection& rpcs, MuonLayerHoughTool::HitVec& hits, - MuonLayerHoughTool::PhiHitVec& phiHits) const { + void MuonLayerHoughTool::fill(const EventContext& ctx, std::set<Identifier>& truthHits, const CscPrepDataCollection& cscs, HitVec& hits, + PhiHitVec& phiHits) const { + /// CSCs were not part of the pattern finding yet.. + if (true || cscs.empty()) return; + auto truthCollections = m_truthNames.makeHandles(ctx); + Identifier chid = cscs.identify(); + unsigned int technology = m_idHelperSvc->technologyIndex(chid); + MuonStationIndex::LayerIndex layer = m_idHelperSvc->layerIndex(chid); + MuonStationIndex::DetectorRegionIndex region = m_idHelperSvc->regionIndex(chid); + int sector = m_idHelperSvc->sector(chid); + unsigned int neta{0}, nphi{0}; + for (const CscPrepData* prd : cscs) { + const bool meas_phi = m_idHelperSvc->rpcIdHelper().measuresPhi(prd->identify()); + nphi += meas_phi; + neta += !meas_phi; + } + ATH_MSG_DEBUG("fillCscs: Filling " << m_idHelperSvc->toStringChamber(chid) << ": loc s" << sector << " " + << MuonStationIndex::regionName(region) << " " << MuonStationIndex::layerName(layer) + << " -> eta hits " << neta << " phi hits " << nphi); + for (const CscPrepData* prd : cscs) { + const Identifier id = prd->identify(); + int sublayer = sublay(id); + MuonHough::HitDebugInfo* debug = new MuonHough::HitDebugInfo(technology, sector, region, layer, sublayer); + debug->isEtaPhi = (neta && nphi); + debug->trigConfirm = 1; + debug->time = prd->time(); + std::map<unsigned int, unsigned int>::const_iterator pos = m_techToTruthNameIdx.find(technology); + if (pos != m_techToTruthNameIdx.end()) { matchTruth(truthHits, *truthCollections[pos->second], id, *debug); } + float weight = (neta && nphi) ? 2 : 1; + if (m_idHelperSvc->rpcIdHelper().measuresPhi(id)) { + const float r = rCor(*prd); + const float phi = prd->globalPosition().phi(); + const double phi1 = phi; // phiCor(phi,sector); + debug->r = -99999; + MuonHough::PhiHit* hit = new MuonHough::PhiHit(sublayer, r, phi1, phi1, weight, debug, prd); + phiHits.push_back(hit); + } else { + const float x = rCor(*prd); + const float y = prd->globalPosition().z(); + const float stripCor = 0.5 * prd->detectorElement()->StripWidth(false); + const float ymin = y - stripCor; + const float ymax = y + stripCor; + debug->r = stripCor; + MuonHough::Hit* hit = new MuonHough::Hit(sublayer, x, ymin, ymax, weight, debug, prd); + hits.push_back(hit); + } + } + } + void MuonLayerHoughTool::fill(const EventContext& ctx, std::set<Identifier>& truthHits, const RpcPrepDataCollection& rpcs, + MuonLayerHoughTool::HitVec& hits, MuonLayerHoughTool::PhiHitVec& phiHits) const { if (rpcs.empty()) return; - auto truthCollections = m_truthNames.makeHandles(); + auto truthCollections = m_truthNames.makeHandles(ctx); Identifier chid = rpcs.identify(); unsigned int technology = m_idHelperSvc->technologyIndex(chid); MuonStationIndex::LayerIndex layer = m_idHelperSvc->layerIndex(chid); MuonStationIndex::DetectorRegionIndex region = m_idHelperSvc->regionIndex(chid); int sector = m_idHelperSvc->sector(chid); - // check whether there are eta and phi hits - unsigned int neta = 0; - unsigned int nphi = 0; - RpcPrepDataCollection::const_iterator mit = rpcs.begin(); - RpcPrepDataCollection::const_iterator mit_end = rpcs.end(); - for (; mit != mit_end; ++mit) { - if (m_idHelperSvc->rpcIdHelper().measuresPhi((*mit)->identify())) - ++nphi; - else - ++neta; + unsigned int neta{0}, nphi{0}; + for (const RpcPrepData* prd : rpcs) { + const bool meas_phi = m_idHelperSvc->rpcIdHelper().measuresPhi(prd->identify()); + nphi += meas_phi; + neta += !meas_phi; } ATH_MSG_DEBUG("fillRPC: Filling " << m_idHelperSvc->toStringChamber(chid) << ": loc s" << sector << " " << MuonStationIndex::regionName(region) << " " << MuonStationIndex::layerName(layer) << " -> eta hits " << neta << " phi hits " << nphi); - mit = rpcs.begin(); - for (; mit != mit_end; ++mit) { - const RpcPrepData& prd = **mit; - const Identifier& id = prd.identify(); + for (const RpcPrepData* prd : rpcs) { + const Identifier id = prd->identify(); int sublayer = sublay(id); MuonHough::HitDebugInfo* debug = new MuonHough::HitDebugInfo(technology, sector, region, layer, sublayer); debug->isEtaPhi = (neta && nphi); debug->trigConfirm = 1; - debug->time = prd.time(); + debug->time = prd->time(); std::map<unsigned int, unsigned int>::const_iterator pos = m_techToTruthNameIdx.find(technology); if (pos != m_techToTruthNameIdx.end()) { matchTruth(truthHits, *truthCollections[pos->second], id, *debug); } float weight = (neta && nphi) ? 2 : 1; if (m_idHelperSvc->rpcIdHelper().measuresPhi(id)) { - const float r = rCor(prd); - const float phi = prd.globalPosition().phi(); + const float r = rCor(*prd); + const float phi = prd->globalPosition().phi(); const double phi1 = phi; // phiCor(phi,sector); debug->r = -99999; - MuonHough::PhiHit* hit = new MuonHough::PhiHit(sublayer, r, phi1, phi1, weight, debug, &prd); + MuonHough::PhiHit* hit = new MuonHough::PhiHit(sublayer, r, phi1, phi1, weight, debug, prd); phiHits.push_back(hit); } else { - const float x = rCor(prd); - const float y = prd.globalPosition().z(); - const float stripCor = 0.5 * prd.detectorElement()->StripWidth(false); + const float x = rCor(*prd); + const float y = prd->globalPosition().z(); + const float stripCor = 0.5 * prd->detectorElement()->StripWidth(false); const float ymin = y - stripCor; const float ymax = y + stripCor; debug->r = stripCor; - MuonHough::Hit* hit = new MuonHough::Hit(sublayer, x, ymin, ymax, weight, debug, *mit); + MuonHough::Hit* hit = new MuonHough::Hit(sublayer, x, ymin, ymax, weight, debug, prd); hits.push_back(hit); } } } - void MuonLayerHoughTool::fill(std::set<Identifier>& truthHits, const MMPrepDataCollection& mms, + void MuonLayerHoughTool::fill(const EventContext& ctx, std::set<Identifier>& truthHits, const MMPrepDataCollection& mms, MuonLayerHoughTool::HitVec& hits) const { if (mms.empty()) return; - auto truthCollections = m_truthNames.makeHandles(); + auto truthCollections = m_truthNames.makeHandles(ctx); Identifier chid = mms.identify(); MuonStationIndex::DetectorRegionIndex region = m_idHelperSvc->regionIndex(chid); MuonStationIndex::LayerIndex layer = m_idHelperSvc->layerIndex(chid); @@ -1899,14 +1907,10 @@ namespace Muon { << MuonStationIndex::regionName(region) << " " << MuonStationIndex::layerName(layer) << " -> hits " << mms.size()); - MMPrepDataCollection::const_iterator mit = mms.begin(); - MMPrepDataCollection::const_iterator mit_end = mms.end(); - for (; mit != mit_end; ++mit) { - const MMPrepData& prd = **mit; - const Identifier& id = prd.identify(); - - float x = prd.globalPosition().z(); - float y = rCor(prd); + for (const MMPrepData* prd : mms) { + const Identifier id = prd->identify(); + float x = prd->globalPosition().z(); + float y = rCor(*prd); int sublayer = sublay(id); float stripCor = 0.45; // get from det el float ymin = y - stripCor; @@ -1915,15 +1919,15 @@ namespace Muon { debug->r = stripCor; std::map<unsigned int, unsigned int>::const_iterator pos = m_techToTruthNameIdx.find(technology); if (pos != m_techToTruthNameIdx.end()) { matchTruth(truthHits, *truthCollections[pos->second], id, *debug); } - MuonHough::Hit* hit = new MuonHough::Hit(sublayer, x, ymin, ymax, 1., debug, *mit); + MuonHough::Hit* hit = new MuonHough::Hit(sublayer, x, ymin, ymax, 1., debug, prd); hits.push_back(hit); } } - void MuonLayerHoughTool::fill(std::set<Identifier>& truthHits, const sTgcPrepDataCollection& stgcs, MuonLayerHoughTool::HitVec& hits, - MuonLayerHoughTool::PhiHitVec& phiHits, int selectedSector) const { + void MuonLayerHoughTool::fill(const EventContext& ctx, std::set<Identifier>& truthHits, const sTgcPrepDataCollection& stgcs, + MuonLayerHoughTool::HitVec& hits, MuonLayerHoughTool::PhiHitVec& phiHits, int selectedSector) const { if (stgcs.empty()) return; - auto truthCollections = m_truthNames.makeHandles(); + auto truthCollections = m_truthNames.makeHandles(ctx); Identifier chid = stgcs.identify(); MuonStationIndex::DetectorRegionIndex region = m_idHelperSvc->regionIndex(chid); MuonStationIndex::LayerIndex layer = m_idHelperSvc->layerIndex(chid); @@ -1934,31 +1938,29 @@ namespace Muon { << MuonStationIndex::regionName(region) << " " << MuonStationIndex::layerName(layer) << " -> hits: " << stgcs.size()); - sTgcPrepDataCollection::const_iterator mit = stgcs.begin(); - sTgcPrepDataCollection::const_iterator mit_end = stgcs.end(); - for (; mit != mit_end; ++mit) { - const sTgcPrepData& prd = **mit; - const Identifier& id = prd.identify(); + for (const sTgcPrepData* prd : stgcs) { + const Identifier id = prd->identify(); int channelType = m_idHelperSvc->stgcIdHelper().channelType(id); // only pick up phi hits in neighbouring sectors if (isNeighbouringSector && channelType == 1) continue; - if (m_onlyUseCurrentBunch && (prd.getBcBitMap() & sTgcPrepData::BCBIT_CURRENT) != sTgcPrepData::BCBIT_CURRENT) continue; + if (m_onlyUseCurrentBunch && (prd->getBcBitMap() & sTgcPrepData::BCBIT_CURRENT) != sTgcPrepData::BCBIT_CURRENT) continue; int sublayer = sublay(id); - MuonHough::HitDebugInfo* debug = new MuonHough::HitDebugInfo(technology, sector, region, layer, sublayer); + std::unique_ptr<MuonHough::HitDebugInfo> debug = + std::make_unique<MuonHough::HitDebugInfo>(technology, sector, region, layer, sublayer); debug->isEtaPhi = 1; - debug->trigConfirm = (prd.getBcBitMap() & sTgcPrepData::BCBIT_CURRENT) == sTgcPrepData::BCBIT_CURRENT; - debug->time = prd.getBcBitMap(); + debug->trigConfirm = (prd->getBcBitMap() & sTgcPrepData::BCBIT_CURRENT) == sTgcPrepData::BCBIT_CURRENT; + debug->time = prd->getBcBitMap(); std::map<unsigned int, unsigned int>::const_iterator pos = m_techToTruthNameIdx.find(technology); if (pos != m_techToTruthNameIdx.end()) { matchTruth(truthHits, *truthCollections[pos->second], id, *debug); } if (m_idHelperSvc->stgcIdHelper().channelType(id) == 1) { // eta strips - float x = prd.globalPosition().z(); - float y = rCor(prd); + float x = prd->globalPosition().z(); + float y = rCor(*prd); float stripCor = 1.5; // get from det el - const MuonGM::MuonChannelDesign* design = prd.detectorElement()->getDesign(id); + const MuonGM::MuonChannelDesign* design = prd->detectorElement()->getDesign(id); if (design) { double stripWidth = design->inputWidth; double stripLength = design->channelLength(m_idHelperSvc->stgcIdHelper().channel(id)); @@ -1968,52 +1970,45 @@ namespace Muon { debug->r = stripCor; float ymin = y - stripCor; float ymax = y + stripCor; - MuonHough::Hit* hit = new MuonHough::Hit(sublayer, x, ymin, ymax, 1., debug, *mit); + MuonHough::Hit* hit = new MuonHough::Hit(sublayer, x, ymin, ymax, 1., debug.release(), prd); hits.push_back(hit); } else { double chWidth = 0; + /// Pad channels -- We should think about enums! if (m_idHelperSvc->stgcIdHelper().channelType(id) == 0) { - // pads - const MuonGM::MuonPadDesign* design = prd.detectorElement()->getPadDesign(id); + const MuonGM::MuonPadDesign* design = prd->detectorElement()->getPadDesign(id); if (!design) { ATH_MSG_WARNING("No design found for " << m_idHelperSvc->toString(id)); - delete debug; continue; } // get the pad width from the detector design - double chWidth = 0.5 * design->channelWidth(prd.localPosition(), true); - - if (m_debugHough) - ATH_MSG_DEBUG(" sPadWidth " << design->sPadWidth << " lPadWidth " << design->lPadWidth << " inputRowWidth " - << design->inputRowWidth); - - if (m_debugHough) ATH_MSG_DEBUG(" Pad chWidth " << chWidth << " phi global " << prd.globalPosition().phi()); + chWidth = 0.5 * design->channelWidth(prd->localPosition(), true); + ATH_MSG_DEBUG(" sPadWidth " << design->sPadWidth << " lPadWidth " << design->lPadWidth << " inputRowWidth " + << design->inputRowWidth); + ATH_MSG_DEBUG(" Pad chWidth " << chWidth << " phi global " << prd->globalPosition().phi()); } else if (m_idHelperSvc->stgcIdHelper().channelType(id) == 2) { - const MuonGM::MuonChannelDesign* design = prd.detectorElement()->getDesign(id); + const MuonGM::MuonChannelDesign* design = prd->detectorElement()->getDesign(id); if (!design) { ATH_MSG_WARNING("No design found for " << m_idHelperSvc->toString(id)); - delete debug; continue; } - double chWidth = 0.5 * design->channelWidth(prd.localPosition()); - - if (m_debugHough) ATH_MSG_DEBUG(" Wire Gang chWidth " << chWidth << " phi global " << prd.globalPosition().phi()); + chWidth = 0.5 * design->channelWidth(prd->localPosition()); + ATH_MSG_DEBUG(" Wire Gang chWidth " << chWidth << " phi global " << prd->globalPosition().phi()); } - Amg::Vector2D lp1(prd.localPosition().x() + chWidth, prd.localPosition().y()); + Amg::Vector2D lp1(prd->localPosition().x() + chWidth, prd->localPosition().y()); Amg::Vector3D gp1; - prd.detectorElement()->surface(id).localToGlobal(lp1, gp1, gp1); + prd->detectorElement()->surface(id).localToGlobal(lp1, gp1, gp1); - lp1[0] = prd.localPosition().x() - chWidth; + lp1[0] = prd->localPosition().x() - chWidth; Amg::Vector3D gp2; - prd.detectorElement()->surface(id).localToGlobal(lp1, gp2, gp2); + prd->detectorElement()->surface(id).localToGlobal(lp1, gp2, gp2); double phi1 = gp1.phi(); double phi2 = gp2.phi(); double phi1c = phi1; // phiCor(phi1,selectedSector); double phi2c = phi2; // phiCor(phi2,selectedSector); - double phi_check = - std::abs(phi1c - phi2c) < TMath::Pi() ? std::abs(phi1c - phi2c) : 2. * TMath::Pi() - std::abs(phi1c - phi2c); + double phi_check = std::abs(xAOD::P4Helpers::deltaPhi(phi1c, phi2c)); if (phi_check > 0.3) { ATH_MSG_WARNING("bad local phi: in " << phi1 << ", " << phi2 << " sector phi " << m_sectorMapping.sectorPhi(selectedSector) << " phicor " << phi1c << ", " @@ -2025,12 +2020,11 @@ namespace Muon { << std::min(phi1c, phi2c) << " max " << std::max(phi1c, phi2c) << " global phi: in " << phi1 << ", " << phi2 << " sector phi " << m_sectorMapping.sectorPhi(selectedSector)); - delete debug; continue; } - float r = rCor(prd); + float r = rCor(*prd); MuonHough::PhiHit* phiHit = - new MuonHough::PhiHit(sublayer, r, std::min(phi1c, phi2c), std::max(phi1c, phi2c), 1, debug, &prd); + new MuonHough::PhiHit(sublayer, r, std::min(phi1c, phi2c), std::max(phi1c, phi2c), 1, debug.release(), prd); ATH_MSG_VERBOSE("Phi hit " << m_idHelperSvc->toString(id) << " r " << r << " phi min " << phiHit->phimin << " phi max " << phiHit->phimax << " bc " << debug->barcode << " chw " << chWidth << " trigC " << debug->trigConfirm << " g phi " << phi1 << " " << phi2); @@ -2039,9 +2033,9 @@ namespace Muon { } } - void MuonLayerHoughTool::fill(std::set<Identifier>& truthHits, std::vector<std::unique_ptr<TgcHitClusteringObj>>& tgcClusteringObjs, - const TgcPrepDataCollection& tgcs, MuonLayerHoughTool::HitVec& hits, - MuonLayerHoughTool::PhiHitVec& phiHits, int sector) const { + void MuonLayerHoughTool::fill(const EventContext& ctx, std::set<Identifier>& truthHits, + std::vector<std::unique_ptr<TgcHitClusteringObj>>& tgcClusteringObjs, const TgcPrepDataCollection& tgcs, + MuonLayerHoughTool::HitVec& hits, MuonLayerHoughTool::PhiHitVec& phiHits, int sector) const { if (tgcs.empty()) return; tgcClusteringObjs.push_back(std::make_unique<TgcHitClusteringObj>(&m_idHelperSvc->tgcIdHelper())); TgcHitClusteringObj& clustering = *tgcClusteringObjs.back(); @@ -2057,37 +2051,30 @@ namespace Muon { if (clustering.clusters3D.empty()) { ATH_MSG_DEBUG("TgcHitClusteringObj, no 3D clusters! "); if (msgLvl(MSG::DEBUG)) { - for (std::vector<const TgcPrepData*>::iterator it = prds.begin(); it != prds.end(); ++it) { - ATH_MSG_DEBUG(" " << m_idHelperSvc->toString((*it)->identify())); - } + for (const TgcPrepData* prd : tgcs) { ATH_MSG_DEBUG(" " << m_idHelperSvc->toString(prd->identify())); } } return; } if (!clustering.bestEtaCluster() || clustering.bestEtaCluster()->hitList.empty() || !clustering.bestEtaCluster()->hitList.front()) { ATH_MSG_DEBUG("TgcHitClusteringObj, no eta cluster selected! "); if (msgLvl(MSG::DEBUG)) { - for (std::vector<const TgcPrepData*>::iterator it = prds.begin(); it != prds.end(); ++it) { - ATH_MSG_DEBUG(" " << m_idHelperSvc->toString((*it)->identify())); - } + for (const TgcPrepData* prd : prds) { ATH_MSG_DEBUG(" " << m_idHelperSvc->toString(prd->identify())); } } return; } - auto truthCollections = m_truthNames.makeHandles(); + auto truthCollections = m_truthNames.makeHandles(ctx); std::vector<int> sectors; getSectors(clustering.clusters3D.front(), sectors); unsigned int technology = m_idHelperSvc->technologyIndex(chid); for (unsigned int si = 0; si < sectors.size(); ++si) { if (sectors[si] != sector) continue; - std::vector<TgcClusterObj3D>::const_iterator cl_it = clustering.clusters3D.begin(); - std::vector<TgcClusterObj3D>::const_iterator cl_it_end = clustering.clusters3D.end(); - for (; cl_it != cl_it_end; ++cl_it) { - const TgcClusterObj3D& cl = *cl_it; + for (const TgcClusterObj3D& cl : clustering.clusters3D) { if (cl.etaCluster.hitList.empty()) { ATH_MSG_WARNING("Incomplete TgcClusterObj3D in chamber " << m_idHelperSvc->toString(chid)); continue; } - const Identifier& id = cl.etaCluster.hitList.front()->identify(); + const Identifier id = cl.etaCluster.hitList.front()->identify(); double x = cl.p11.z(); double y11 = rCor(cl, 1, sector); diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonHoughPatternEvent/CMakeLists.txt b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonHoughPatternEvent/CMakeLists.txt index 63ad822025eafea8ba13c6efa99b67290a72ad59..b7e3e5b99eed9dfeff023de2362b61e770737ed6 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonHoughPatternEvent/CMakeLists.txt +++ b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonHoughPatternEvent/CMakeLists.txt @@ -16,5 +16,5 @@ atlas_add_library( MuonHoughPatternEvent PUBLIC_HEADERS MuonHoughPatternEvent PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} LINK_LIBRARIES AthContainers GeoPrimitives - PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} CxxUtils TrkDetElementBase TrkSurfaces TrkPrepRawData ) + PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} CxxUtils TrkDetElementBase TrkSurfaces TrkPrepRawData GeoPrimitives ) diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonHoughPatternEvent/MuonHoughPatternEvent/MuonHoughHit.h b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonHoughPatternEvent/MuonHoughPatternEvent/MuonHoughHit.h index 547e5837030bee484f5d0daecf1776341e0dca5d..f6ca96d75ddce1aa682bda56d4e8f786c9d2e0f8 100755 --- a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonHoughPatternEvent/MuonHoughPatternEvent/MuonHoughHit.h +++ b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonHoughPatternEvent/MuonHoughPatternEvent/MuonHoughHit.h @@ -5,6 +5,8 @@ #ifndef MUONHOUGHPATTERNEVENT_MUONHOUGHHIT_H #define MUONHOUGHPATTERNEVENT_MUONHOUGHHIT_H +#include <GeoPrimitives/GeoPrimitives.h> + #include <cmath> #include <iostream> #include <string> @@ -14,7 +16,7 @@ namespace MuonHough { /** enum to identify the muondetectortechnology */ enum DetectorTechnology { MDT, CSC, RPC, TGC }; /** number of phi sectors */ - const int phisectors = 16; + constexpr int phisectors = 16; /** angle of half a sector in rad */ const double half_phisector = M_PI / phisectors; } // namespace MuonHough @@ -30,8 +32,8 @@ public: /** constructor per preprawdata (not used) */ MuonHoughHit(const Trk::PrepRawData* prd); /** constructor */ - MuonHoughHit(double x, double y, double z, bool measures_phi, MuonHough::DetectorTechnology detector_id, double prob = 1, - double weight = 1., const Trk::PrepRawData* prd = 0, int id = -1); + MuonHoughHit(const Amg::Vector3D& pos_vec, bool measures_phi, MuonHough::DetectorTechnology detector_id, double prob = 1, + double weight = 1., const Trk::PrepRawData* prd = nullptr, int id = -1); /** destructor */ virtual ~MuonHoughHit() = default; @@ -41,7 +43,7 @@ public: std::string getWhichDetector() const; /** return (x,y,z) vector */ - std::vector<double> getPosition() const; + const Amg::Vector3D& getPosition() const; /** returns id */ int getId() const; /** returns x position */ @@ -97,43 +99,39 @@ public: protected: /** Pointer to preprawdata */ - const Trk::PrepRawData* m_prd; + const Trk::PrepRawData* m_prd{nullptr}; + Amg::Vector3D m_pos{}; /** unique id */ int m_id; - /** x-position of hit */ - double m_hitx; - /** y-position of hit */ - double m_hity; - /** z-position of hit */ - double m_hitz; + /** radius of hit*/ - double m_radius; + double m_radius{0.}; /** absolute value of hit */ - double m_abs; + double m_abs{0.}; /** phi of hit */ - double m_phi; + double m_phi{0.}; /** theta of hit */ - double m_theta; + double m_theta{0.}; /** hit is barrel / endcap */ - bool m_barrel; + bool m_barrel{true}; /** phi sector (0,15), Atlas Convention */ - int m_phi_sector; + int m_phi_sector{0}; /** ratio of the tracklength of the particle to which hit might belong would have traversed in magnetic field (for curved track model) */ - double m_magnetic_trackratio; + double m_magnetic_trackratio{0.}; /** weight of hit in histogram, after rescaling*/ - double m_weight; + double m_weight{1.}; /** original weight */ - const double m_orig_weight; + const double m_orig_weight{1.}; /** probability that hit belongs to true muon (based on trigger confirmation and crude segment finding (used for mdts)) */ - double m_probability; + double m_probability{1.}; /** detector technology of hit */ - MuonHough::DetectorTechnology m_detector_id; + MuonHough::DetectorTechnology m_detector_id{MuonHough::MDT}; /** hit measures phi? */ - bool m_measures_phi; + bool m_measures_phi{false}; /** hit associated to pattern */ bool m_associated; @@ -145,7 +143,7 @@ private: double calcMagneticTrackRatio() const; }; -inline bool operator==(MuonHoughHit hit1, MuonHoughHit hit2) { +inline bool operator==(const MuonHoughHit& hit1, const MuonHoughHit& hit2) { bool equal_to = 0; if (hit1.getHitx() == hit2.getHitx() && hit1.getHity() == hit2.getHity() && hit1.getHitz() == hit2.getHitz()) { equal_to = 1; } @@ -156,9 +154,11 @@ inline bool operator==(MuonHoughHit hit1, MuonHoughHit hit2) { inline MuonHough::DetectorTechnology MuonHoughHit::getDetectorId() const { return m_detector_id; } inline int MuonHoughHit::getId() const { return m_id; } -inline double MuonHoughHit::getHitx() const { return m_hitx; } -inline double MuonHoughHit::getHity() const { return m_hity; } -inline double MuonHoughHit::getHitz() const { return m_hitz; } +inline const Amg::Vector3D& MuonHoughHit::getPosition() const { return m_pos; } + +inline double MuonHoughHit::getHitx() const { return m_pos[Amg::x]; } +inline double MuonHoughHit::getHity() const { return m_pos[Amg::y]; } +inline double MuonHoughHit::getHitz() const { return m_pos[Amg::z]; } inline double MuonHoughHit::getWeight() const { return m_weight; } inline double MuonHoughHit::getOrigWeight() const { return m_orig_weight; } inline double MuonHoughHit::getProbability() const { return m_probability; } diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonHoughPatternEvent/MuonHoughPatternEvent/MuonHoughMathUtils.h b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonHoughPatternEvent/MuonHoughPatternEvent/MuonHoughMathUtils.h index f531d50871c2954f8e46796cc38604188f32e652..b40414ea30d09fa29bcac012835b66667969304a 100755 --- a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonHoughPatternEvent/MuonHoughPatternEvent/MuonHoughMathUtils.h +++ b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonHoughPatternEvent/MuonHoughPatternEvent/MuonHoughMathUtils.h @@ -13,23 +13,23 @@ #include "MuonHoughPatternEvent/MuonHoughHit.h" namespace MuonHough { - const double two_Pi = 2 * M_PI; - const double degree_rad_conversion_factor = M_PI / 180.; - const double rad_degree_conversion_factor = 180. / M_PI; + constexpr double two_Pi = 2 * M_PI; + constexpr double degree_rad_conversion_factor = M_PI / 180.; + constexpr double rad_degree_conversion_factor = 180. / M_PI; // Geometry for curved Hough extrapolation /** relation for transition between endcap and barrel 11.43 m (r) / 14m (z) */ - const double tan_barrel = 11430. / 14000.; + constexpr double tan_barrel = 11430. / 14000.; /** radius of cylinder */ - const double radius_cylinder = 4000.; + constexpr double radius_cylinder = 4000.; /** length of cylinder */ - const double z_cylinder = 6000.; + constexpr double z_cylinder = 6000.; /** z value whereafter no magnetic field / curvature */ - const double z_end = 15000.; + constexpr double z_end = 15000.; /** range where hit is curved in endcap region */ - const double z_magnetic_range = z_end - z_cylinder; + constexpr double z_magnetic_range = z_end - z_cylinder; /** range where hit is curved in endcap region ('squared') */ - const double z_magnetic_range_squared = z_end * z_end - z_cylinder * z_cylinder; + constexpr double z_magnetic_range_squared = z_end * z_end - z_cylinder * z_cylinder; } // namespace MuonHough class MuonHoughMathUtils { @@ -73,7 +73,7 @@ public: /** distance from (x0,y0) to line (r,phi) */ double distanceToLine2D(double x0, double y0, double r, double phi) const; /** distance from (x0,y0,z0) to line (x,y,z,phi,theta) */ - static double distanceToLine3D(double x0, double y0, double z0, double x, double y, double z, double phi, double theta); + static double distanceToLine3D(const Amg::Vector3D& point, const Amg::Vector3D& l_trans, double phi, double theta); /** distance of line y = ax + b to origin */ static double distanceOfLineToOrigin2D(double a, double b); @@ -85,7 +85,7 @@ public: /** calculates theta at (x,y,z) for curved track model, for positive and negative curvature */ static void thetasForCurvedHit(double ratio, MuonHoughHit* hit, double& theta1, double& theta2); /** calculates distance of point (x,y,z) to curved track with z0, theta and invcurvature for curved track model */ - static double signedDistanceCurvedToHit(double z0, double theta, double invcurvature, double hitx, double hity, double hitz); + static double signedDistanceCurvedToHit(double z0, double theta, double invcurvature, const Amg::Vector3D& hit); /** * @brief extrapolates road to global position @@ -100,20 +100,14 @@ public: Amg::Vector3D& roadpose, Amg::Vector3D& roaddire); /** calculates the 3d-point closest to origin in xy-plane */ - static std::vector<double> shortestPointOfLineToOrigin3D(double x, double y, double z, double phi, double theta); + static Amg::Vector3D shortestPointOfLineToOrigin3D(const Amg::Vector3D& vec, double phi, double theta); /** calculates the 3d-point closest to origin */ - static std::vector<double> shortestPointOfLineToOrigin(double x, double y, double z, double phi, double theta); + static Amg::Vector3D shortestPointOfLineToOrigin(const Amg::Vector3D& vec, double phi, double theta); /** calculates if line (x,y,z,phi,theta) crosses cylinder (r_0,z_0) around origin */ - static bool lineThroughCylinder(double x, double y, double z, double phi, double theta, double r_0, double z_0); - - /** cross product between 2 3-vectors */ - static std::vector<double> crossProduct(std::vector<double> x, std::vector<double> y); - /** dot product between 2 3-vectors */ - static double dotProduct(std::vector<double> x, std::vector<double> y); - /** absolute value of 3-vector */ - double abs(std::vector<double> p) const; + static bool lineThroughCylinder(const Amg::Vector3D& vec, double phi, double theta, double r_0, double z_0); + }; inline double MuonHoughMathUtils::angleFromRadialToGrad(double angle) const { @@ -122,6 +116,5 @@ inline double MuonHoughMathUtils::angleFromRadialToGrad(double angle) const { inline double MuonHoughMathUtils::angleFromGradToRadial(double angle) const { return (angle * MuonHough::degree_rad_conversion_factor); } // angle in grad -inline double MuonHoughMathUtils::abs(std::vector<double> p) const { return std::sqrt(p[0] * p[0] + p[1] * p[1] + p[2] * p[2]); } #endif // MUONHOUGHPATTERNEVENT_MUONHOUGHMATHUTILS_H diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonHoughPatternEvent/MuonHoughPatternEvent/MuonHoughPattern.h b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonHoughPatternEvent/MuonHoughPatternEvent/MuonHoughPattern.h index 94308a37907d1b4a323addb88c0d4f156524da12..07fac61221452b7f47091fe8d2dcf0a2f39c49ea 100755 --- a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonHoughPatternEvent/MuonHoughPatternEvent/MuonHoughPattern.h +++ b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonHoughPatternEvent/MuonHoughPatternEvent/MuonHoughPattern.h @@ -6,9 +6,9 @@ #define MUONHOUGHPATTERNEVENT_MUONHOUGHPATTERN_H #include "AthContainers/DataVector.h" +#include "EventPrimitives/EventPrimitives.h" #include "MuonHoughPatternEvent/MuonHoughHitContainer.h" #include "MuonHoughPatternEvent/MuonHoughMathUtils.h" - namespace MuonHough { /** enum to identify the different houghtransformers */ enum MuonHoughTransformers { hough_xy, hough_rzcosmics, hough_curved_at_a_cylinder, hough_rz, hough_rz_mdt, hough_rz_rpc, hough_yz }; @@ -80,38 +80,35 @@ public: void setWhichSegment(bool which_segment); /** calulates 3d point closest to ip */ - std::vector<double> getEPos() const; + Amg::Vector3D getEPos() const; /** calculates direction at point closest to ip */ - std::vector<double> getEDir() const; + Amg::Vector3D getEDir() const; /** update parameters in rphi plane based on weighted fit*/ void updateParametersRPhi(bool cosmics = false); - typedef DataVector<MuonHoughPattern> MuonHoughPatternCollection; + using MuonHoughPatternCollection = DataVector<MuonHoughPattern>; private: /** id number of hough transform used to generate pattern */ - int m_id_number; + int m_id_number{-1}; /** which segment is pattern created in, not relevant if split search is off * 0 lower segment, 1 uppersegment */ - bool m_whichsegment; + bool m_whichsegment{false}; /** phi in rad */ - double m_ephi; + double m_ephi{-M_PI_2}; /** r0 in mm */ - double m_erphi; + double m_erphi{0.}; /** theta in rad */ - double m_etheta; + double m_etheta{M_PI_2}; /** z0 in mm */ - double m_ertheta; + double m_ertheta{0.}; /** curvature of pattern in rz plane in mm */ - double m_ecurvature; + double m_ecurvature{1.}; /** maximum of histogram */ - double m_maximumhistogram; - - /** object for use of mathematical formulas for trackmodels */ - MuonHoughMathUtils m_muonhoughmathutils; + double m_maximumhistogram{0.}; }; inline int MuonHoughPattern::getIdNumber() const { return m_id_number; } diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonHoughPatternEvent/MuonHoughPatternEvent/MuonHoughPatternCollection.h b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonHoughPatternEvent/MuonHoughPatternEvent/MuonHoughPatternCollection.h index cb38d69ae792c2e1ec0d05a2d1dc9b4b1d202b6b..a3fe8a5fcc4b7ec6e01a620b01cea0cdb610c406 100755 --- a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonHoughPatternEvent/MuonHoughPatternEvent/MuonHoughPatternCollection.h +++ b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonHoughPatternEvent/MuonHoughPatternEvent/MuonHoughPatternCollection.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ #ifndef MUONHOUGHPATTERNEVENT_MUONHOUGHPATTERNCOLLECTION_H @@ -10,10 +10,8 @@ /** This typedef represents a collection and container of MuonHoughPattern objects. */ -typedef std::vector<MuonHoughPattern*> MuonHoughPatternCollection; - -typedef std::vector<MuonHoughPatternCollection> MuonHoughPatternContainer; - -typedef std::vector<MuonHoughPatternContainer> MuonHoughPatternContainerShip; +using MuonHoughPatternCollection = std::vector<std::unique_ptr<MuonHoughPattern>>; +using MuonHoughPatternContainer = std::vector<MuonHoughPatternCollection>; +using MuonHoughPatternContainerShip = std::vector<MuonHoughPatternContainer>; #endif // MUONHOUGHPATTERNEVENT_MUONHOUGHPATTERNCOLLECTION_H diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonHoughPatternEvent/MuonHoughPatternEvent/MuonHoughTransformSteering.h b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonHoughPatternEvent/MuonHoughPatternEvent/MuonHoughTransformSteering.h index 199878d27867f1a5c1b1a36a8997273a26292abd..98421189828a0629cc8e6d862dc012e07025a373 100755 --- a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonHoughPatternEvent/MuonHoughPatternEvent/MuonHoughTransformSteering.h +++ b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonHoughPatternEvent/MuonHoughPatternEvent/MuonHoughTransformSteering.h @@ -5,8 +5,8 @@ #ifndef MUONHOUGHPATTERNEVENT_MUONHOUGHTRANSFORMSTEERING_H #define MUONHOUGHPATTERNEVENT_MUONHOUGHTRANSFORMSTEERING_H -#include "MuonHoughPatternEvent/MuonHoughPatternCollection.h" #include "MuonHoughPatternEvent/MuonHoughHisto2DContainer.h" +#include "MuonHoughPatternEvent/MuonHoughPatternCollection.h" #include "MuonHoughPatternEvent/MuonHoughTransformer.h" class MuonHoughPattern; @@ -16,7 +16,7 @@ class MuonHoughTransformSteering { public: /** constructor */ - MuonHoughTransformSteering(MuonHoughTransformer*); + MuonHoughTransformSteering(std::unique_ptr<MuonHoughTransformer>&); /** destructor */ ~MuonHoughTransformSteering(); @@ -50,14 +50,12 @@ public: /** access to histograms */ const MuonHoughHisto2DContainer& histos() const { return m_houghtransformer->histos(); } - const MuonHoughTransformer* transformer() const { return m_houghtransformer; } + const MuonHoughTransformer* transformer() const { return m_houghtransformer.get(); } private: /** the actual houghtransform */ - MuonHoughTransformer* m_houghtransformer; + std::unique_ptr<MuonHoughTransformer> m_houghtransformer; - /** maximum residu for hit to be associated to pattern */ - bool m_maximum_residu_mm; }; #endif // MUONHOUGHPATTERNEVENT_MUONHOUGHTRANSFORMSTEERING_H diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonHoughPatternEvent/MuonHoughPatternEvent/MuonHoughTransformer.h b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonHoughPatternEvent/MuonHoughPatternEvent/MuonHoughTransformer.h index 0b057a0b701341785fe9cb81ef6dc52018caf8ef..694b28b4aaac447de87cbae4f522baffa91f5651 100755 --- a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonHoughPatternEvent/MuonHoughPatternEvent/MuonHoughTransformer.h +++ b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonHoughPatternEvent/MuonHoughPatternEvent/MuonHoughTransformer.h @@ -144,7 +144,7 @@ private: class maximaCompare { public: - bool operator()(std::pair<std::pair<int, int>, double> lhs, std::pair<std::pair<int, int>, double> rhs) const { + bool operator()(const std::pair<std::pair<int, int>, double>& lhs, const std::pair<std::pair<int, int>, double>& rhs) const { return lhs.second > rhs.second; } }; diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonHoughPatternEvent/src/MuonHoughHit.cxx b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonHoughPatternEvent/src/MuonHoughHit.cxx index cd8b07fd473493f153d5354a440fa37dfe297129..772abe4a84c951ac3907c1a342c207a1ad69a6cd 100755 --- a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonHoughPatternEvent/src/MuonHoughHit.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonHoughPatternEvent/src/MuonHoughHit.cxx @@ -11,58 +11,39 @@ #include "TrkPrepRawData/PrepRawData.h" #include "TrkSurfaces/Surface.h" -MuonHoughHit::MuonHoughHit(const Trk::PrepRawData* prd) : m_orig_weight(1.) { +MuonHoughHit::MuonHoughHit(const Trk::PrepRawData* prd) { const Trk::TrkDetElementBase* element = prd->detectorElement(); const Identifier identifier = prd->identify(); - const Amg::Vector3D globalpos = element->surface(identifier).Trk::Surface::localToGlobal(prd->localPosition()); + m_pos = element->surface(identifier).Trk::Surface::localToGlobal(prd->localPosition()); - m_hitx = globalpos.x(); // does this what i expect? - m_hity = globalpos.y(); - m_hitz = globalpos.z(); - - double hitr2 = m_hitx * m_hitx + m_hity * m_hity; - m_radius = std::sqrt(hitr2); - m_abs = std::sqrt(hitr2 + m_hitz * m_hitz); - m_theta = std::atan2(m_radius, m_hitz); - m_phi = std::atan2(m_hity, m_hitx); - m_barrel = (std::abs(m_radius / m_hitz) < MuonHough::tan_barrel) ? 0 : 1; + m_radius = m_pos.perp(); + m_abs = m_pos.mag(); + m_theta = std::atan2(m_radius, getHitz()); + m_phi = m_pos.phi(); + m_barrel = (std::abs(m_radius / getHitz()) < MuonHough::tan_barrel) ? 0 : 1; m_phi_sector = calcPhiSector(); m_magnetic_trackratio = calcMagneticTrackRatio(); - m_prd = prd; - - m_weight = 1; - m_probability = 1; - m_associated = false; - m_id = -1; - - m_detector_id = MuonHough::MDT; - - m_measures_phi = false; } -MuonHoughHit::MuonHoughHit(double x, double y, double z, bool measures_phi, MuonHough::DetectorTechnology detector_id, double prob, +MuonHoughHit::MuonHoughHit(const Amg::Vector3D& pos_vec, bool measures_phi, MuonHough::DetectorTechnology detector_id, double prob, double weight, const Trk::PrepRawData* prd, int id) : m_orig_weight(weight) { m_detector_id = detector_id; m_measures_phi = measures_phi; - m_hitx = x; - m_hity = y; - m_hitz = z; + m_pos = pos_vec; m_probability = prob; m_weight = weight; m_prd = prd; - m_associated = false; m_id = id; - double hitr2 = m_hitx * m_hitx + m_hity * m_hity; - m_radius = std::sqrt(hitr2); - m_abs = std::sqrt(hitr2 + m_hitz * m_hitz); - m_theta = std::atan2(m_radius, m_hitz); - m_phi = std::atan2(m_hity, m_hitx); - m_barrel = (std::abs(m_radius / m_hitz) < MuonHough::tan_barrel) ? 0 : 1; + m_radius = m_pos.perp(); + m_abs = m_pos.mag(); + m_theta = std::atan2(m_radius, getHitz()); + m_phi = m_pos.phi(); + m_barrel = (std::abs(m_radius / getHitz()) < MuonHough::tan_barrel) ? 0 : 1; m_phi_sector = calcPhiSector(); m_magnetic_trackratio = calcMagneticTrackRatio(); } @@ -81,15 +62,6 @@ std::string MuonHoughHit::getWhichDetector() const { return detector_name; } -std::vector<double> MuonHoughHit::getPosition() const { - std::vector<double> position(3); - position[0] = m_hitx; - position[1] = m_hity; - position[2] = m_hitz; - - return position; -} - int MuonHoughHit::calcPhiSector() const { double phi = m_phi; // [-Pi , Pi] phi += MuonHough::half_phisector; @@ -113,18 +85,18 @@ double MuonHoughHit::calcMagneticTrackRatio() const { } } else { int sign = 1; - if (m_hitz < 0) sign = -1; + if (getHitz() < 0) sign = -1; // Endcap hypothesis - if (std::abs(m_hitz) < MuonHough::z_cylinder) { + if (std::abs(getHitz()) < MuonHough::z_cylinder) { magnetic_trk_ratio = 0.; - } else if (std::abs(m_hitz) < MuonHough::z_end) { + } else if (std::abs(getHitz()) < MuonHough::z_end) { // Inside Toroid - double diff_e = m_hitz - sign * MuonHough::z_cylinder; + double diff_e = getHitz() - sign * MuonHough::z_cylinder; magnetic_trk_ratio = diff_e * diff_e / m_abs; } else { // Outside Toroid - magnetic_trk_ratio = (-MuonHough::z_magnetic_range_squared + sign * 2 * m_hitz * MuonHough::z_magnetic_range) / m_abs; + magnetic_trk_ratio = (-MuonHough::z_magnetic_range_squared + sign * 2 * getHitz() * MuonHough::z_magnetic_range) / m_abs; } } diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonHoughPatternEvent/src/MuonHoughHitContainer.cxx b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonHoughPatternEvent/src/MuonHoughHitContainer.cxx index 3aafb2a1c074a7b802163370b26ea4cc28f92d4e..610d5b81020505197dbc470b326bb49a43c3055f 100755 --- a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonHoughPatternEvent/src/MuonHoughHitContainer.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonHoughPatternEvent/src/MuonHoughHitContainer.cxx @@ -34,40 +34,30 @@ void MuonHoughHitContainer::removeHit(int hitno) { int MuonHoughHitContainer::getRPChitno() const { int rpchitno = 0; - for (unsigned int i = 0; i < m_hit.size(); i++) { - if (getDetectorId(i) == MuonHough::RPC) { rpchitno++; } - } + for (unsigned int i = 0; i < m_hit.size(); i++) { rpchitno += getDetectorId(i) == MuonHough::RPC; } return rpchitno; } int MuonHoughHitContainer::getMDThitno() const { int mdthitno = 0; - for (unsigned int i = 0; i < m_hit.size(); i++) { - if (getDetectorId(i) == MuonHough::MDT) { mdthitno++; } - } + for (unsigned int i = 0; i < m_hit.size(); i++) { mdthitno += getDetectorId(i) == MuonHough::MDT; } return mdthitno; } int MuonHoughHitContainer::getRPCetahitno() const { int rpchitno = 0; - for (unsigned int i = 0; i < m_hit.size(); i++) { - if (getDetectorId(i) == MuonHough::RPC && getMeasuresPhi(i) == 0) { rpchitno++; } - } + for (unsigned int i = 0; i < m_hit.size(); i++) { rpchitno += getDetectorId(i) == MuonHough::RPC && getMeasuresPhi(i); } return rpchitno; } int MuonHoughHitContainer::getCSChitno() const { int cschitno = 0; - for (unsigned int i = 0; i < m_hit.size(); i++) { - if (getDetectorId(i) == MuonHough::CSC) { cschitno++; } - } + for (unsigned int i = 0; i < m_hit.size(); i++) { cschitno += getDetectorId(i) == MuonHough::CSC; } return cschitno; } int MuonHoughHitContainer::getTGChitno() const { int tgchitno = 0; - for (unsigned int i = 0; i < m_hit.size(); i++) { - if (getDetectorId(i) == MuonHough::TGC) { tgchitno++; } - } + for (unsigned int i = 0; i < m_hit.size(); i++) { tgchitno += getDetectorId(i) == MuonHough::TGC; } return tgchitno; } diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonHoughPatternEvent/src/MuonHoughMathUtils.cxx b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonHoughPatternEvent/src/MuonHoughMathUtils.cxx index 52eb3a829470e013a1be22f480f6b0d25a0bb450..8d9a5eb6eaca27bc382f38984dbdb67db5838377 100755 --- a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonHoughPatternEvent/src/MuonHoughMathUtils.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonHoughPatternEvent/src/MuonHoughMathUtils.cxx @@ -4,6 +4,8 @@ #include "MuonHoughPatternEvent/MuonHoughMathUtils.h" +#include <float.h> + #include <cassert> #include <iostream> #include <sstream> @@ -11,19 +13,14 @@ #include "AthenaKernel/getMessageSvc.h" #include "CxxUtils/sincos.h" #include "GaudiKernel/MsgStream.h" - +#include "GeoPrimitives/GeoPrimitivesHelpers.h" MuonHoughMathUtils::MuonHoughMathUtils() {} -int MuonHoughMathUtils::sgn(double d) { - if (d < 0) { return -1; } - // if (d==0) {return 0;} //i know, its the definition, but we dont want it - if (d >= 0) { return 1; } - return 666; -} +int MuonHoughMathUtils::sgn(double d) { return d >= 0 ? 1 : -1; } int MuonHoughMathUtils::step(double d, double x0) { - MsgStream log(Athena::getMessageSvc(), "MuonHoughMathUtils::step"); if (d == x0) { + MsgStream log(Athena::getMessageSvc(), "MuonHoughMathUtils::step"); if (log.level() <= MSG::WARNING) log << MSG::WARNING << "WARNING: Possible mistake in Step function" << endmsg; } if (d <= x0) { return 0; } @@ -89,46 +86,32 @@ double MuonHoughMathUtils::distanceToLine2D(double x0, double y0, double r0, dou double x1 = -r0 * scphi.sn; // point closest to origin double y1 = r0 * scphi.cs; - std::vector<double> v(3); // (p1 - p0) - - v[0] = x1 - x0; - v[1] = y1 - y0; - - std::vector<double> r(3); // vector perpendicular to line - - r[0] = x1; - r[1] = y1; + Amg::Vector3D v{x1 - x0, y1 - y0, 0}; // (p1 - p0) - double distance = dotProduct(r, v) / abs(r); + Amg::Vector3D r{x1, y1, 0}; // vector perpendicular to line + double distance = r.dot(v) / r.mag(); return distance; } double MuonHoughMathUtils::distanceToLine3D( - double x0, double y0, double z0, double x, double y, double z, double phi, + const Amg::Vector3D& point, const Amg::Vector3D& l_trans, double phi, double theta) // from wolfram: http://mathworld.wolfram.com/Point-LineDistance3-Dimensional.html { - std::vector<double> x1(3); // x1-x0 - std::vector<double> x3(3); // x2-x1 = e_r - - x1[0] = x - x0; - x1[1] = y - y0; - x1[2] = z - z0; + Amg::Vector3D x1 = l_trans - point; // x1-x0 CxxUtils::sincos scphi(phi); CxxUtils::sincos sctheta(theta); - x3[0] = scphi.cs * sctheta.sn; - x3[1] = scphi.sn * sctheta.sn; - x3[2] = sctheta.cs; + /// + const Amg::Vector3D dir{scphi.cs * sctheta.sn, scphi.sn * sctheta.sn, sctheta.cs}; // sqrt(x3^2) == 1; ! double distance; - std::vector<double> x4(3); - x4 = crossProduct(x3, x1); + const Amg::Vector3D x4 = dir.cross(x1); - distance = std::sqrt(dotProduct(x4, x4)) / (std::sqrt(dotProduct(x3, x3))); + distance = x4.mag(); return distance; } @@ -140,74 +123,54 @@ double MuonHoughMathUtils::signedDistanceOfLineToOrigin2D(double x, double y, do return scphi.apply(x, -y); } -std::vector<double> MuonHoughMathUtils::shortestPointOfLineToOrigin3D( - double x, double y, double z, double phi, double theta) // actually this is the 3d-point closest to origin in xy-plane +Amg::Vector3D MuonHoughMathUtils::shortestPointOfLineToOrigin3D( + const Amg::Vector3D& vec, double phi, double theta) // actually this is the 3d-point closest to origin in xy-plane { - std::vector<double> p(3); - - double r0 = signedDistanceOfLineToOrigin2D(x, y, phi); + double r0 = signedDistanceOfLineToOrigin2D(vec[Amg::x], vec[Amg::y], phi); CxxUtils::sincos scphi(phi); double x0 = r0 * scphi.sn; double y0 = -r0 * scphi.cs; - double radius = std::sqrt((x - x0) * (x - x0) + (y - y0) * (y - y0)); + const double d_x = vec[Amg::x] - x0; + const double d_y = vec[Amg::y] - y0; + double radius = std::hypot(d_x, d_y); - if (std::abs((y - y0) - scphi.sn * radius) > std::abs((y - y0) + scphi.cs * radius)) // also possible for x + if (std::abs(d_y - scphi.sn * radius) > std::abs(d_y + scphi.cs * radius)) // also possible for x { radius = -radius; } - double z0 = z - radius / std::tan(theta); - - p[0] = x0; - p[1] = y0; - p[2] = z0; + double z0 = vec[Amg::z] - radius / std::tan(theta); + const Amg::Vector3D p{x0, y0, z0}; return p; } -std::vector<double> MuonHoughMathUtils::shortestPointOfLineToOrigin( - double x, double y, double z, double phi, +Amg::Vector3D MuonHoughMathUtils::shortestPointOfLineToOrigin( + const Amg::Vector3D& line_trans, double phi, double theta) // from wolfram: http://mathworld.wolfram.com/Point-LineDistance3-Dimensional.html { // origin: - std::vector<double> x0(3); - x0[0] = 0; - x0[1] = 0; - x0[2] = 0; + static const Amg::Vector3D origin{0., 0., 0.}; - std::vector<double> x1(3); // x1-x0 - std::vector<double> x3(3); // x2-x1 - - x1[0] = x - x0[0]; - x1[1] = y - x0[1]; - x1[2] = z - x0[2]; + const Amg::Vector3D x1 = line_trans - origin; CxxUtils::sincos scphi(phi); CxxUtils::sincos sctheta(theta); - - x3[0] = scphi.cs * sctheta.sn; - x3[1] = scphi.sn * sctheta.sn; - x3[2] = sctheta.cs; + const Amg::Vector3D dir{scphi.cs * sctheta.sn, scphi.sn * sctheta.sn, sctheta.cs}; double time = 0; double x5 = 0; - x5 = dotProduct(x1, x3); + x5 = x1.dot(dir); + time = -x5; - time = -x5 / (dotProduct(x3, x3)); - - std::vector<double> p(3); - - p[0] = x1[0] + x3[0] * time; - p[1] = x1[1] + x3[1] * time; - p[2] = x1[2] + x3[2] * time; - - return p; + Amg::Vector3D short_point = x1 + time * dir; + return short_point; } -bool MuonHoughMathUtils::lineThroughCylinder(double x_0, double y_0, double z_0, double phi, double theta, double r_cyl, double z_cyl) { +bool MuonHoughMathUtils::lineThroughCylinder(const Amg::Vector3D& line_trans, double phi, double theta, double r_cyl, double z_cyl) { // if there is one, then track will be split assert(r_cyl >= 0); @@ -215,23 +178,23 @@ bool MuonHoughMathUtils::lineThroughCylinder(double x_0, double y_0, double z_0, CxxUtils::sincos sctheta(theta); // 1 -- check if there is an intersection at z0=+-c0 - double p_1 = z_0 - z_cyl; - double p_2 = z_0 + z_cyl; + double p_1 = line_trans[Amg::z] - z_cyl; + double p_2 = line_trans[Amg::z] + z_cyl; double tantheta = sctheta.sn / sctheta.cs; - double x_1 = x_0 - p_1 * scphi.cs * tantheta; - double y_1 = y_0 - p_1 * scphi.sn * tantheta; - double r_1 = std::sqrt(x_1 * x_1 + y_1 * y_1); + double x_1 = line_trans[Amg::x] - p_1 * scphi.cs * tantheta; + double y_1 = line_trans[Amg::y] - p_1 * scphi.sn * tantheta; + double r_1 = std::hypot(x_1, y_1); if (r_1 < r_cyl) { return true; } - double x_2 = x_0 - p_2 * scphi.cs * tantheta; - double y_2 = y_0 - p_2 * scphi.sn * tantheta; - double r_2 = std::sqrt(x_2 * x_2 + y_2 * y_2); + double x_2 = line_trans[Amg::x] - p_2 * scphi.cs * tantheta; + double y_2 = line_trans[Amg::y] - p_2 * scphi.sn * tantheta; + double r_2 = std::hypot(x_2, y_2); if (r_2 < r_cyl) { return true; } // 2 -- check if there is an intersection with the circle x^2 + y^2 = r_cyl^2 and the line y=px+q, p = tan(phi), q = y_0 - x_0 tan(phi) // <--> r_cyl^2 = (px+q)^2 + x^2 - double r_0 = scphi.apply(-x_0, y_0); + double r_0 = scphi.apply(-line_trans[Amg::x], line_trans[Amg::y]); if (std::abs(r_0) > r_cyl) return false; @@ -243,63 +206,47 @@ bool MuonHoughMathUtils::lineThroughCylinder(double x_0, double y_0, double z_0, double inv_angle = 1 / (scphi.cs * tantheta); - double z_1 = z_0 + (x_1 - x_0) * inv_angle; + double z_1 = line_trans[Amg::z] + (x_1 - line_trans[Amg::x]) * inv_angle; if (std::abs(z_1) < z_cyl) return true; x_2 = s_1 - s_2; - double z_2 = z_0 + (x_2 - x_0) * inv_angle; + double z_2 = line_trans[Amg::z] + (x_2 - line_trans[Amg::x]) * inv_angle; return std::abs(z_2) < z_cyl; } -std::vector<double> MuonHoughMathUtils::crossProduct(std::vector<double> x, std::vector<double> y) { - std::vector<double> z(3); - z[0] = y[1] * x[2] - y[2] * x[1]; - z[1] = y[2] * x[0] - y[0] * x[2]; - z[2] = y[0] * x[1] - y[1] * x[0]; - - return z; -} - -double MuonHoughMathUtils::dotProduct(std::vector<double> x, std::vector<double> y) { - double z; - z = y[0] * x[0] + y[1] * x[1] + y[2] * x[2]; - - return z; -} -double MuonHoughMathUtils::signedDistanceCurvedToHit(double z0, double theta, double invcurvature, double hitx, double hity, double hitz) { - double hitr = std::sqrt(hitx * hitx + hity * hity); +double MuonHoughMathUtils::signedDistanceCurvedToHit(double z0, double theta, double invcurvature, const Amg::Vector3D& hit) { + double hitr = hit.perp(); CxxUtils::sincos sctheta(theta); - double sdistance = 100000000.; + double sdistance = FLT_MAX; // if angle rotation larger than Pi/2 then return large distance (formulas don't work for flip in z!) - if (sctheta.apply(hitr, hitz) < 0) return sdistance; // hitr*sctheta.sn + hitz*sctheta.cs < 0 + if (sctheta.apply(hitr, hit[Amg::z]) < 0) return sdistance; // hitr*sctheta.sn + hitz*sctheta.cs < 0 - int sign = 1; - if (hitz < 0) sign = -1; + const int sign = hit[Amg::z] < 0 ? -1 : 1; - if (std::abs(hitr / hitz) > MuonHough::tan_barrel) { + if (std::abs(hitr / hit[Amg::z]) > MuonHough::tan_barrel) { // Barrel Extrapolation if (std::abs(sctheta.sn) > 1e-7) { double diffr = hitr - MuonHough::radius_cylinder; double zext = z0 + (hitr * sctheta.cs + diffr * diffr * invcurvature) / sctheta.sn; - sdistance = (zext - hitz); + sdistance = (zext - hit[Amg::z]); } } else { if (std::abs(sctheta.sn) > 1e-7) { double rext = 0.; - if (std::abs(hitz) < MuonHough::z_end) { + if (std::abs(hit[Amg::z]) < MuonHough::z_end) { // Forward in Toroid - double diffz = hitz - sign * MuonHough::z_cylinder; - rext = ((hitz - z0) * sctheta.sn - diffz * diffz * invcurvature) / sctheta.cs; + double diffz = hit[Amg::z] - sign * MuonHough::z_cylinder; + rext = ((hit[Amg::z] - z0) * sctheta.sn - diffz * diffz * invcurvature) / sctheta.cs; } else { // Forward OutSide EC Toroid - rext = ((hitz - z0) * sctheta.sn + - (MuonHough::z_magnetic_range_squared - sign * 2 * hitz * (MuonHough::z_magnetic_range)) * invcurvature) / + rext = ((hit[Amg::z] - z0) * sctheta.sn + + (MuonHough::z_magnetic_range_squared - sign * 2 * hit[Amg::z] * (MuonHough::z_magnetic_range)) * invcurvature) / sctheta.cs; } sdistance = (rext - hitr); diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonHoughPatternEvent/src/MuonHoughPattern.cxx b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonHoughPatternEvent/src/MuonHoughPattern.cxx index 8f4c337a0528a601eaf15458b70dd7e83ef85fff..04e406c345c9ef2d66c6e0e7b22c6e7ef07847a0 100755 --- a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonHoughPatternEvent/src/MuonHoughPattern.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonHoughPatternEvent/src/MuonHoughPattern.cxx @@ -8,16 +8,7 @@ #include "CxxUtils/sincos.h" #include "GaudiKernel/MsgStream.h" -MuonHoughPattern::MuonHoughPattern(int id_number, bool ownhits) : - MuonHoughHitContainer(ownhits), - m_id_number(id_number), - m_whichsegment(false), - m_ephi(-M_PI / 2.), - m_erphi(0.), - m_etheta(M_PI / 2.), - m_ertheta(0.), - m_ecurvature(1.), - m_maximumhistogram(0.) {} +MuonHoughPattern::MuonHoughPattern(int id_number, bool ownhits) : MuonHoughHitContainer(ownhits), m_id_number(id_number) {} void MuonHoughPattern::resetTracksegment() { for (unsigned int i = 0; i < m_hit.size(); i++) { @@ -38,7 +29,6 @@ bool MuonHoughPattern::hitInHoughPattern(MuonHoughHit* hit) const // adviced no } double MuonHoughPattern::patternLength() const { - MsgStream log(Athena::getMessageSvc(), "MuonHoughPattern::patternLength"); // takes the first 2 hits and calculates distance and then takes next hit, and calculates from previous 2 hits which 2 are farthest // away, etc.. also possible to calculate point closest to IP and determine if left/ right to pattern, app. just as fast. @@ -49,22 +39,15 @@ double MuonHoughPattern::patternLength() const { int hitno1 = 0; int hitno2 = 1; - std::vector<double> diff(3); - diff[0] = m_hit[hitno1]->getHitx() - m_hit[hitno2]->getHitx(); - diff[1] = m_hit[hitno1]->getHity() - m_hit[hitno2]->getHity(); - diff[2] = m_hit[hitno1]->getHitz() - m_hit[hitno2]->getHitz(); - max_patternlength = m_muonhoughmathutils.abs(diff); + Amg::Vector3D diff = m_hit[hitno1]->getPosition() - m_hit[hitno2]->getPosition(); + max_patternlength = diff.mag(); for (unsigned int i = 2; i < m_hit.size(); i++) { - diff[0] = m_hit[hitno1]->getHitx() - m_hit[i]->getHitx(); - diff[1] = m_hit[hitno1]->getHity() - m_hit[i]->getHity(); - diff[2] = m_hit[hitno1]->getHitz() - m_hit[i]->getHitz(); - pattern_length1 = m_muonhoughmathutils.abs(diff); + diff = m_hit[hitno1]->getPosition() - m_hit[i]->getPosition(); + pattern_length1 = diff.mag(); - diff[0] = m_hit[hitno2]->getHitx() - m_hit[i]->getHitx(); - diff[1] = m_hit[hitno2]->getHity() - m_hit[i]->getHity(); - diff[2] = m_hit[hitno2]->getHitz() - m_hit[i]->getHitz(); - pattern_length2 = m_muonhoughmathutils.abs(diff); + diff = m_hit[hitno2]->getPosition() - m_hit[i]->getPosition(); + pattern_length2 = diff.mag(); if (pattern_length1 <= max_patternlength && pattern_length2 <= max_patternlength) { // nothing happens.. @@ -77,6 +60,7 @@ double MuonHoughPattern::patternLength() const { } } } else { + MsgStream log(Athena::getMessageSvc(), "MuonHoughPattern::patternLength"); if (log.level() <= MSG::VERBOSE) log << MSG::VERBOSE << "MuonHoughPattern::pattern_size <2" << endmsg; } @@ -124,7 +108,6 @@ void MuonHoughPattern::printHoughPattern() const { } double MuonHoughPattern::getEAngle() const { - MsgStream log(Athena::getMessageSvc(), "MuonHoughPattern::getEAngle"); double eangle = 0; switch (m_id_number) { case MuonHough::hough_xy: eangle = m_ephi; break; @@ -134,13 +117,13 @@ double MuonHoughPattern::getEAngle() const { case MuonHough::hough_rz_mdt: case MuonHough::hough_curved_at_a_cylinder: eangle = m_etheta; break; default: + MsgStream log(Athena::getMessageSvc(), "MuonHoughPattern::getEAngle"); if (log.level() <= MSG::VERBOSE) log << MSG::VERBOSE << "MuonHoughPattern::no valid id_number" << endmsg; } return eangle; } double MuonHoughPattern::getER() const { - MsgStream log(Athena::getMessageSvc(), "MuonHoughPattern::getER"); double er = 0; switch (m_id_number) { case MuonHough::hough_xy: er = m_erphi; break; @@ -150,13 +133,13 @@ double MuonHoughPattern::getER() const { case MuonHough::hough_rz_mdt: case MuonHough::hough_curved_at_a_cylinder: er = m_ertheta; break; default: + MsgStream log(Athena::getMessageSvc(), "MuonHoughPattern::getER"); if (log.level() <= MSG::VERBOSE) log << MSG::VERBOSE << "MuonHoughPattern::no valid id_number" << endmsg; } return er; } void MuonHoughPattern::setEAngle(double eangle) { - MsgStream log(Athena::getMessageSvc(), "MuonHoughPattern::setEAngle"); switch (m_id_number) { case MuonHough::hough_xy: m_ephi = eangle; break; case MuonHough::hough_rz: @@ -165,12 +148,12 @@ void MuonHoughPattern::setEAngle(double eangle) { case MuonHough::hough_rz_mdt: case MuonHough::hough_curved_at_a_cylinder: m_etheta = eangle; break; default: + MsgStream log(Athena::getMessageSvc(), "MuonHoughPattern::setEAngle"); if (log.level() <= MSG::VERBOSE) log << MSG::VERBOSE << "MuonHoughPattern::no valid id_number" << endmsg; } } void MuonHoughPattern::setER(double er) { - MsgStream log(Athena::getMessageSvc(), "MuonHoughPattern::setER"); switch (m_id_number) { case MuonHough::hough_xy: m_erphi = er; break; case MuonHough::hough_rz: @@ -179,18 +162,19 @@ void MuonHoughPattern::setER(double er) { case MuonHough::hough_rz_mdt: case MuonHough::hough_curved_at_a_cylinder: m_ertheta = er; break; default: + MsgStream log(Athena::getMessageSvc(), "MuonHoughPattern::setER"); if (log.level() <= MSG::VERBOSE) log << MSG::VERBOSE << "MuonHoughPattern::no valid id_number" << endmsg; } } -std::vector<double> MuonHoughPattern::getEPos() const { +Amg::Vector3D MuonHoughPattern::getEPos() const { // similar to StandardAlgs::shortestPointOfLineToOrigin3D // should be maybe really shortest point, but // problem is that there is no starting point on the line (well this calc. pos could be available) - std::vector<double> pos(3); + Amg::Vector3D pos; pos[0] = m_erphi * std::sin(m_ephi); pos[1] = -m_erphi * std::cos(m_ephi); @@ -203,13 +187,11 @@ std::vector<double> MuonHoughPattern::getEPos() const { return pos; } -std::vector<double> MuonHoughPattern::getEDir() const { - std::vector<double> dir(3); - - dir[0] = std::cos(m_ephi) * std::sin(m_etheta); - dir[1] = std::sin(m_ephi) * std::sin(m_etheta); - dir[2] = std::cos(m_etheta); - +Amg::Vector3D MuonHoughPattern::getEDir() const { + /// + CxxUtils::sincos scphi(m_ephi); + CxxUtils::sincos sctheta(m_etheta); + const Amg::Vector3D dir{scphi.cs * sctheta.sn, scphi.sn * sctheta.sn, sctheta.cs}; return dir; } diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonHoughPatternEvent/src/MuonHoughTransformSteering.cxx b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonHoughPatternEvent/src/MuonHoughTransformSteering.cxx index 488648fbb2d9d83a27f91a72ff9260ec79fe4e7b..da18c31fddddc3c3f3a2f749c5125c21dd575c1a 100755 --- a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonHoughPatternEvent/src/MuonHoughTransformSteering.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonHoughPatternEvent/src/MuonHoughTransformSteering.cxx @@ -9,15 +9,10 @@ #include "MuonHoughPatternEvent/MuonHoughPattern.h" #include "MuonHoughPatternEvent/MuonHoughTransformer.h" -MuonHoughTransformSteering::MuonHoughTransformSteering(MuonHoughTransformer* houghtransformer) { - m_houghtransformer = houghtransformer; - m_maximum_residu_mm = 1.; -} +MuonHoughTransformSteering::MuonHoughTransformSteering(std::unique_ptr<MuonHoughTransformer>& houghtransformer) : + m_houghtransformer{std::move(houghtransformer)} {} -MuonHoughTransformSteering::~MuonHoughTransformSteering() { - delete m_houghtransformer; - m_houghtransformer = nullptr; -} +MuonHoughTransformSteering::~MuonHoughTransformSteering() = default; MuonHoughPatternCollection MuonHoughTransformSteering::constructHoughPatterns(const MuonHoughHitContainer* event, double residu_mm, double residu_grad, int max_patterns, bool which_segment, @@ -34,8 +29,7 @@ MuonHoughPatternCollection MuonHoughTransformSteering::constructHoughPatterns(co int sector = maxima[maximum_number].first; MuonHoughPattern* houghpattern = constructHoughPattern(event, binnumber, residu_mm, residu_grad, sector, which_segment, printlevel); - - houghpatterns.push_back(houghpattern); + houghpatterns.emplace_back(houghpattern); } else { if (printlevel >= 4 || log.level() <= MSG::VERBOSE) { log << MSG::VERBOSE << "binnumber == -1 (no max found), max patterns = " << maximum_number << endmsg; diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonHoughPatternEvent/src/MuonHoughTransformer_CurvedAtACylinder.cxx b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonHoughPatternEvent/src/MuonHoughTransformer_CurvedAtACylinder.cxx index ba78737ef0d1bd3e441fd9b69e9c4f65e491e143..fc7f2eb74af9b47ac916d4af6a6768732f39eab7 100755 --- a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonHoughPatternEvent/src/MuonHoughTransformer_CurvedAtACylinder.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonHoughPatternEvent/src/MuonHoughTransformer_CurvedAtACylinder.cxx @@ -182,15 +182,13 @@ MuonHoughPattern* MuonHoughTransformer_CurvedAtACylinder::hookAssociateHitsToMax } for (unsigned int i = 0; i < event->size(); i++) { - int sectorhit = sector(event->getHit(i)); + MuonHoughHit* hit = event->getHit(i); + int sectorhit = sector(hit); if (sectorhit == sector_1 || sectorhit == sector_2 || sectorhit == sector_3) { - double hitx = event->getHitx(i); - double hity = event->getHity(i); - double hitz = event->getHitz(i); double z0 = 0.; // offset from IP on z-axis - const double sdis = MuonHoughMathUtils::signedDistanceCurvedToHit(z0, theta, invcurvature, hitx, hity, hitz); + const double sdis = MuonHoughMathUtils::signedDistanceCurvedToHit(z0, theta, invcurvature, hit->getPosition()); - double radius3d = std::sqrt(hitx * hitx + hity * hity + hitz * hitz); + double radius3d = hit->getAbs(); if (radius3d < 5000.) radius3d = 5000.; else if (radius3d > 15000.) @@ -200,15 +198,14 @@ MuonHoughPattern* MuonHoughTransformer_CurvedAtACylinder::hookAssociateHitsToMax double residu_distance_mm = std::abs(sdis); if (printlevel >= 4 || log.level() <= MSG::VERBOSE) { - log << MSG::VERBOSE << "MuonHoughTransformer_CurvedAtACylinder::hitx: " << hitx << " hity: " << hity << " hitz: " << hitz - << endmsg; + log << MSG::VERBOSE << "MuonHoughTransformer_CurvedAtACylinder:: " << hit->getPosition() << endmsg; log << MSG::VERBOSE << "MuonHoughTransformer_CurvedAtACylinder::residu_distance: " << sdis << " max_residu_mm*scale: " << max_residu_mm * scale << endmsg; } if (std::abs(residu_distance_mm) < max_residu_mm * scale) // here no circular effect { - double phi = std::atan2(hity, hitx); + double phi = hit->getPhi(); CxxUtils::sincos scphi(phi); sin_phi += scphi.sn; cos_phi += scphi.cs; diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonHoughPatternEvent/src/MuonHoughTransformer_xyz.cxx b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonHoughPatternEvent/src/MuonHoughTransformer_xyz.cxx index e308ff09d3947544cf7728a87d649a20014e90da..f1c679144f75e8cc99553b74d378e091026c6aeb 100755 --- a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonHoughPatternEvent/src/MuonHoughTransformer_xyz.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonHoughPatternEvent/src/MuonHoughTransformer_xyz.cxx @@ -176,7 +176,7 @@ MuonHoughPattern* MuonHoughTransformer_xyz::hookAssociateHitsToMaximum(const Muo scphimax.apply(getHitPos(event, i).first, -getHitPos(event, i) .second); //- coordsmaximum.first + sincosphimax[0] * getHitPos(event,i).first - sincosphimax[1] * - //getHitPos(event,i).second; // phimax shoudl be in map, but there are rounding errors.. + // getHitPos(event,i).second; // phimax shoudl be in map, but there are rounding errors.. if (printlevel >= 3 || log.level() <= MSG::DEBUG) { log << MSG::DEBUG << "MuonHoughTransformer_xyz::hitx: " << getHitPos(event, i).first diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonRecToolInterfaces/MuonRecToolInterfaces/IMuonHoughPatternFinderTool.h b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonRecToolInterfaces/MuonRecToolInterfaces/IMuonHoughPatternFinderTool.h index b795905ba7b227e2b9ff99879e66bb846993b994..67b0fe534e69b87294b31b71df7103ff9a67ca4e 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonRecToolInterfaces/MuonRecToolInterfaces/IMuonHoughPatternFinderTool.h +++ b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonRecToolInterfaces/MuonRecToolInterfaces/IMuonHoughPatternFinderTool.h @@ -16,8 +16,6 @@ #include "MuonRecToolInterfaces/HoughDataPerSec.h" #include "MuonSegment/MuonSegmentCombinationCollection.h" -static const InterfaceID IID_IMuonHoughPatternFinderTool("Muon::IMuonHoughPatternFinderTool", 1, 0); - namespace Trk { class Track; } @@ -28,16 +26,23 @@ namespace Muon { class IMuonHoughPatternFinderTool : virtual public IAlgTool { public: /** access to tool interface */ - static const InterfaceID& interfaceID(); + static const InterfaceID& interfaceID() { + static const InterfaceID IID_IMuonHoughPatternFinderTool("Muon::IMuonHoughPatternFinderTool", 1, 0); + return IID_IMuonHoughPatternFinderTool; + } /** find patterns for a give set of MuonPrepData collections + optionally CSC segment combinations */ + virtual std::pair<std::unique_ptr<MuonPatternCombinationCollection>, std::unique_ptr<Muon::HoughDataPerSectorVec>> find( const std::vector<const MdtPrepDataCollection*>& mdtCols, const std::vector<const CscPrepDataCollection*>& cscCols, const std::vector<const TgcPrepDataCollection*>& tgcCols, const std::vector<const RpcPrepDataCollection*>& rpcCols, const MuonSegmentCombinationCollection* cscSegmentCombis, const EventContext& ctx) const = 0; - }; - inline const InterfaceID& IMuonHoughPatternFinderTool::interfaceID() { return IID_IMuonHoughPatternFinderTool; } + virtual std::pair<std::unique_ptr<MuonPatternCombinationCollection>, std::unique_ptr<HoughDataPerSectorVec>> find( + const MdtPrepDataContainer* mdtCont, const CscPrepDataContainer* cscCols, const TgcPrepDataContainer* tgcCont, + const RpcPrepDataContainer* rpcCont, const sTgcPrepDataContainer* stgcCont, const MMPrepDataContainer* mmCont, + const EventContext& ctx) const = 0; + }; } // namespace Muon diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonRecToolInterfaces/MuonRecToolInterfaces/IMuonHoughPatternTool.h b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonRecToolInterfaces/MuonRecToolInterfaces/IMuonHoughPatternTool.h new file mode 100755 index 0000000000000000000000000000000000000000..36c0a4e5da9d6571900d7081e278ddf19ab4410f --- /dev/null +++ b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonRecToolInterfaces/MuonRecToolInterfaces/IMuonHoughPatternTool.h @@ -0,0 +1,31 @@ +/* + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef MUONHOUGHPATTERNTOOLS_IMUONHOUGHPATTERNTOOL_H +#define MUONHOUGHPATTERNTOOLS_IMUONHOUGHPATTERNTOOL_H + +#include "GaudiKernel/IAlgTool.h" +#include "MuonHoughPatternEvent/MuonHoughPatternCollection.h" +#include "MuonPattern/MuonPatternCollection.h" + +class MuonHoughHitContainer; + +class IMuonHoughPatternTool : virtual public IAlgTool { +public: + /** @todo should be rethought and possibly using the Moore Interface */ + + DeclareInterfaceID(IMuonHoughPatternTool, 1, 0); + + /** Builds Patterns */ + virtual void makePatterns(const MuonHoughHitContainer& hitcontainer, MuonHoughPatternContainerShip& houghpatterns) const = 0; + + /** returns phi patterns */ + virtual std::unique_ptr<MuonPrdPatternCollection> getPhiMuonPatterns(MuonHoughPatternContainerShip& houghpatterns) const = 0; + /** returns eta patterns */ + virtual std::unique_ptr<MuonPrdPatternCollection> getEtaMuonPatterns(MuonHoughPatternContainerShip& houghpatterns) const = 0; + /** returns houghpatterns arrays*/ + virtual MuonHoughPatternContainerShip emptyHoughPattern() const = 0; +}; + +#endif // MUONHOUGHPATTERNTOOLS_IMUONHOUGHPATTERNTOOL_H diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLayerHough/MuonLayerHough/Hit.h b/MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLayerHough/MuonLayerHough/Hit.h index c08fab912bc1b6408fd2f26aa0f3fd2c42bfd859..b3b89cfa2c7e099ce647ddc7d4eeeec5b671a19f 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLayerHough/MuonLayerHough/Hit.h +++ b/MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLayerHough/MuonLayerHough/Hit.h @@ -19,45 +19,46 @@ namespace Muon { } namespace MuonHough { - static const int UNINITIALIZED = -99999; + static constexpr int UNINITIALIZED = -99999; /// struct containing additional debug information on the hits that is not needed for the actual alg /// but very useful for debugging class HitDebugInfo { public: - HitDebugInfo(); + HitDebugInfo() = default; HitDebugInfo(int type_, int sector_, Muon::MuonStationIndex::DetectorRegionIndex region_, Muon::MuonStationIndex::LayerIndex layer_, int sublayer_); - int type; /// technology type - int sector; /// sector - Muon::MuonStationIndex::DetectorRegionIndex region; /// detector region (endcapA/barrel/endcapC) - Muon::MuonStationIndex::LayerIndex layer; /// layer (inner/middle/outer) - int sublayer; /// sublayer within layer - int pdgId; /// pdgId of the associated truth particle (if any) - int barcode; /// barcode of truth particle - int muonIndex; /// index of reconstructed muon - int clusterSize; /// cluster size - int clusterLayers; /// number of layers in the cluster - int isEtaPhi; /// flag whether confirmed in the other projection - int trigConfirm; /// flag whether confirmed by a trigger hit - int binpos; /// spacial bin of the hit with the highest value in the hough space - int bintheta; /// angular bin of the hit with the highest value in the hough space - float time; /// measured time - float r; /// drift radius for MDT, strip pitch for strips - float ph; /// maximum value in the hough space - float phn; /// maximum value in the hough space in neighbouring sector; dege - float ph1; /// maximum value of the hit projected into the first other layer in the hough space - float ph2; /// maximum value of the hit projected into the second other layer in the hough space - float rot; /// angle corresponding to the maximum in the hough space; poin to IP + int type{UNINITIALIZED}; /// technology type + int sector{UNINITIALIZED}; /// sector + Muon::MuonStationIndex::DetectorRegionIndex region{ + Muon::MuonStationIndex::DetectorRegionUnknown}; /// detector region (endcapA/barrel/endcapC) + Muon::MuonStationIndex::LayerIndex layer{Muon::MuonStationIndex::LayerUnknown}; /// layer (inner/middle/outer) + int sublayer{UNINITIALIZED}; /// sublayer within layer + int pdgId{UNINITIALIZED}; /// pdgId of the associated truth particle (if any) + int barcode{UNINITIALIZED}; /// barcode of truth particle + int muonIndex{UNINITIALIZED}; /// index of reconstructed muon + int clusterSize{UNINITIALIZED}; /// cluster size + int clusterLayers{UNINITIALIZED}; /// number of layers in the cluster + bool isEtaPhi{false}; /// flag whether confirmed in the other projection + bool trigConfirm{false}; /// flag whether confirmed by a trigger hit + int binpos{UNINITIALIZED}; /// spacial bin of the hit with the highest value in the hough space + int bintheta{UNINITIALIZED}; /// angular bin of the hit with the highest value in the hough space + float time{UNINITIALIZED}; /// measured time + float r{UNINITIALIZED}; /// drift radius for MDT, strip pitch for strips + float ph{UNINITIALIZED}; /// maximum value in the hough space + float phn{UNINITIALIZED}; /// maximum value in the hough space in neighbouring sector; dege + float ph1{UNINITIALIZED}; /// maximum value of the hit projected into the first other layer in the hough space + float ph2{UNINITIALIZED}; /// maximum value of the hit projected into the second other layer in the hough space + float rot{UNINITIALIZED}; /// angle corresponding to the maximum in the hough space; poin to IP }; /// struct containing all hit information needed for the Hough transform class Hit { public: /// constructor, takes ownership of the HitDebugInfo pointer - Hit(int layer_, float x_, float ymin_, float ymax_, float w_, HitDebugInfo* d_ = 0, const Trk::PrepRawData* prd_ = 0, - const Muon::TgcClusterObj3D* tgc_ = 0); + Hit(int layer_, float x_, float ymin_, float ymax_, float w_, HitDebugInfo* d_ = nullptr, const Trk::PrepRawData* prd_ = nullptr, + const Muon::TgcClusterObj3D* tgc_ = nullptr); /// destructor ~Hit(); @@ -68,22 +69,22 @@ namespace MuonHough { /// =operator Hit& operator=(const Hit& h_); - int layer{}; /// layer identifier (packed word containing technology/sublayer) - float x{}; /// global hit position (x=r in barrel, x=z in endcap) - float ymin{}; /// minimum value of the hit in the precision coordinate (y=z in barrel, y=r in endcap) - float ymax{}; /// maximum value of the hit in the precision coordinate (y=z in barrel, y=r in endcap) - float w{}; /// weight of the hit + int layer{UNINITIALIZED}; /// layer identifier (packed word containing technology/sublayer) + float x{UNINITIALIZED}; /// global hit position (x=r in barrel, x=z in endcap) + float ymin{UNINITIALIZED}; /// minimum value of the hit in the precision coordinate (y=z in barrel, y=r in endcap) + float ymax{UNINITIALIZED}; /// maximum value of the hit in the precision coordinate (y=z in barrel, y=r in endcap) + float w{UNINITIALIZED}; /// weight of the hit /// access to debug information const HitDebugInfo* debugInfo() const { return m_debug; } HitDebugInfo* debugInfo() { return m_debug; } /// access to assiciated hit, either the prd or the tgc pointer is set in athena - const Trk::PrepRawData* prd{}; - const Muon::TgcClusterObj3D* tgc{}; + const Trk::PrepRawData* prd{nullptr}; + const Muon::TgcClusterObj3D* tgc{nullptr}; private: - HitDebugInfo* m_debug{}; /// pointer to debug information + HitDebugInfo* m_debug{nullptr}; /// pointer to debug information /// copy function for internal use void copy(const Hit& hit); @@ -104,22 +105,22 @@ namespace MuonHough { /// =operator PhiHit& operator=(const PhiHit& h_); - int layer{}; /// layer identifier (packed word containing technology/sublayer) - float r{}; /// global hit position (x=r in barrel, x=z in endcap) - float phimin{}; /// minimum value of the hit in the precision coordinate (y=z in barrel, y=r in endcap) - float phimax{}; /// maximum value of the hit in the precision coordinate (y=z in barrel, y=r in endcap) - float w{}; /// weight of the hit + int layer{UNINITIALIZED}; /// layer identifier (packed word containing technology/sublayer) + float r{UNINITIALIZED}; /// global hit position (x=r in barrel, x=z in endcap) + float phimin{UNINITIALIZED}; /// minimum value of the hit in the precision coordinate (y=z in barrel, y=r in endcap) + float phimax{UNINITIALIZED}; /// maximum value of the hit in the precision coordinate (y=z in barrel, y=r in endcap) + float w{UNINITIALIZED}; /// weight of the hit /// access to debug information const HitDebugInfo* debugInfo() const { return m_debug; } HitDebugInfo* debugInfo() { return m_debug; } /// access to assiciated hit, either the prd or the tgc pointer is set in athena - const Trk::PrepRawData* prd{}; - const Muon::TgcClusterObj3D* tgc{}; + const Trk::PrepRawData* prd{nullptr}; + const Muon::TgcClusterObj3D* tgc{nullptr}; private: - HitDebugInfo* m_debug{}; /// pointer to debug information + HitDebugInfo* m_debug{nullptr}; /// pointer to debug information /// copy function for internal use void copy(const PhiHit& hit); @@ -127,42 +128,42 @@ namespace MuonHough { /// struct containing truth or track information struct MuonDebugInfo { - int pdgId; /// pdgId of the true muon - int barcode; /// barcode of the true muon - int muonIndex; /// index of the associated track - float pt; /// pt - float eta; /// eta - float phi; /// phi + int pdgId{UNINITIALIZED}; /// pdgId of the true muon + int barcode{UNINITIALIZED}; /// barcode of the true muon + int muonIndex{UNINITIALIZED}; /// index of the associated track + float pt{UNINITIALIZED}; /// pt + float eta{UNINITIALIZED}; /// eta + float phi{UNINITIALIZED}; /// phi // number of reconstructed hits - int nmdts; - int nrpcs; - int ntgcs; - int ncscs; - int nmms; - int nstgcs; + int nmdts{0}; + int nrpcs{0}; + int ntgcs{0}; + int ncscs{0}; + int nmms{0}; + int nstgcs{0}; // number of true hits - int ntmdts; - int ntrpcs; - int nttgcs; - int ntcscs; - int ntmms; - int ntstgcs; + int ntmdts{0}; + int ntrpcs{0}; + int nttgcs{0}; + int ntcscs{0}; + int ntmms{0}; + int ntstgcs{0}; }; /// struct containing truth or segment information struct SegDebugInfo { - float sposx; - float sposy; - float sposz; - float sdirx; - float sdiry; - float sdirz; - int snPrecHits; - int snTrigHits; - int sSector; - int sChIndex; + float sposx{UNINITIALIZED}; + float sposy{UNINITIALIZED}; + float sposz{UNINITIALIZED}; + float sdirx{UNINITIALIZED}; + float sdiry{UNINITIALIZED}; + float sdirz{UNINITIALIZED}; + int snPrecHits{0}; + int snTrigHits{0}; + int sSector{0}; + int sChIndex{0}; }; /// struct to sort the hits diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLayerHough/MuonLayerHough/MuonLayerHough.h b/MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLayerHough/MuonLayerHough/MuonLayerHough.h index 841cb6bd0195809745518575a0ce7658330911ba..85edd5f084d2f083eea7141cbc413e3923cf329f 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLayerHough/MuonLayerHough/MuonLayerHough.h +++ b/MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLayerHough/MuonLayerHough/MuonLayerHough.h @@ -33,64 +33,42 @@ namespace MuonHough { yBinSize(yBinSize_), thetaStep(thetaStep_), nthetaSamples(nthetaSamples_) {} - RegionDescriptor() : - sector(0), - region(Muon::MuonStationIndex::DetectorRegionUnknown), - chIndex(Muon::MuonStationIndex::ChUnknown), - referencePosition(0), - yMinRange(0), - yMaxRange(0), - yBinSize(1), - thetaStep(1), - nthetaSamples(1) {} - - int sector; - Muon::MuonStationIndex::DetectorRegionIndex region; - Muon::MuonStationIndex::ChIndex chIndex; - float referencePosition; - float yMinRange; - float yMaxRange; - float yBinSize; - float thetaStep; - unsigned int nthetaSamples; + RegionDescriptor() = default; + + int sector{0}; + Muon::MuonStationIndex::DetectorRegionIndex region{Muon::MuonStationIndex::DetectorRegionUnknown}; + Muon::MuonStationIndex::ChIndex chIndex{Muon::MuonStationIndex::ChUnknown}; + float referencePosition{0}; + float yMinRange{0}; + float yMaxRange{0}; + float yBinSize{0}; + float thetaStep{0}; + unsigned int nthetaSamples{1}; }; typedef std::vector<RegionDescriptor> RegionDescriptionVec; struct MuonLayerHough { /// struct representing the maximum in the hough space struct Maximum { - Maximum() : - max(0.), - pos(0.), - theta(0.), - refpos(0.), - refregion(0), - refchIndex(0), - binpos(-1), - binposmin(-1), - binposmax(-1), - binsize(0.), - bintheta(-1), - triggerConfirmed(0), - hough(0) {} - - float max; // value of the maximum - float pos; // spacial position - float theta; // angle - - float refpos; // reference position - int refregion; // reference region - int refchIndex; // reference chamber index - - int binpos; // position bin - int binposmin; // lower edge of the maximum - int binposmax; // upper edge of the maximu - float binsize; // size of bin - int bintheta; // theta bin - int triggerConfirmed; // number of in time trigger hits associated with the maximum - std::vector<Hit*> hits; // vector of associated hits - - const MuonLayerHough* hough; // pointer to the corresponding hough + Maximum() = default; + + float max{0.}; // value of the maximum + float pos{0.}; // spacial position + float theta{0.}; // angle + + float refpos{0.}; // reference position + int refregion{0}; // reference region + int refchIndex{0}; // reference chamber index + + int binpos{-1}; // position bin + int binposmin{-1}; // lower edge of the maximum + int binposmax{-1}; // upper edge of the maximu + float binsize{0.}; // size of bin + int bintheta{-1}; // theta bin + int triggerConfirmed{0}; // number of in time trigger hits associated with the maximum + std::vector<Hit*> hits; // vector of associated hits + + const MuonLayerHough* hough{nullptr}; // pointer to the corresponding hough bool isEndcap() const { // refers to the chamber orientation!!!! so BEE is a barell in this def @@ -183,16 +161,16 @@ namespace MuonHough { // members - float m_binsize; /// binsize - float m_invbinsize; /// inverse binsize + float m_binsize{0}; /// binsize + float m_invbinsize{0}; /// inverse binsize // unsigned int m_nthetasamples; - int m_nbins; + int m_nbins{-1}; - unsigned int max; - int maxhist; - int maxbin; - bool m_debug; + unsigned int max{0}; + int maxhist{-1}; + int maxbin{-1}; + bool m_debug{false}; std::vector<std::unique_ptr<unsigned int[]> > m_histos; // the maximum contents of all the histograms, overlayed RegionDescriptor m_descriptor; }; diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLayerHough/MuonLayerHough/MuonLayerHoughSelector.h b/MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLayerHough/MuonLayerHough/MuonLayerHoughSelector.h index 32f6cf96220f02aceebee65140a9d90e1b59609f..50f6fd355f8e46f41146d9f180b8c2d8505b1820 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLayerHough/MuonLayerHough/MuonLayerHoughSelector.h +++ b/MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLayerHough/MuonLayerHough/MuonLayerHoughSelector.h @@ -11,7 +11,7 @@ namespace MuonHough { class MuonLayerHoughSelector { public: /** Default constructor */ - MuonLayerHoughSelector() {} + MuonLayerHoughSelector() = default; MuonLayerHoughSelector(std::vector<std::pair<int, float>> cutValues); /** Destructor */ diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLayerHough/MuonLayerHough/MuonPhiLayerHough.h b/MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLayerHough/MuonLayerHough/MuonPhiLayerHough.h index 8f2d88a52e950961402858b1e5c0ee8501b2daf1..642d0c06f372c1af53e6cd3d38b7e5f8852f189e 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLayerHough/MuonLayerHough/MuonPhiLayerHough.h +++ b/MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLayerHough/MuonLayerHough/MuonPhiLayerHough.h @@ -7,6 +7,7 @@ #include <cmath> #include <iostream> +#include <memory> #include <string> #include <vector> @@ -18,20 +19,20 @@ namespace MuonHough { struct MuonPhiLayerHough { struct Maximum { - Maximum() : max(0.), pos(0.), binpos(-1), binposmin(-1), binposmax(-1), sector(-1), hough(nullptr) {} + Maximum() = default; - float max; - float pos; + float max{0.}; + float pos{0.}; - int binpos; - int binposmin; - int binposmax; + int binpos{-1}; + int binposmin{-1}; + int binposmax{-1}; - int sector; + int sector{-1}; std::vector<PhiHit*> hits; - const MuonPhiLayerHough* hough; + const MuonPhiLayerHough* hough{nullptr}; }; MuonPhiLayerHough(int nbins, float rangemin, float rangemax, Muon::MuonStationIndex::DetectorRegionIndex region_); @@ -46,8 +47,6 @@ namespace MuonHough { std::pair<int, int> range(float /*r*/, float phi1, float phi2) const { float phimin = std::min(phi1, phi2); float phimax = std::max(phi1, phi2); - // if( phimin < m_rangemin ) phimin = m_rangemin; - // if( phimax > m_rangemax ) phimax = m_rangemax; int bphimin = (phimin - m_rangemin) * m_invbinsize; int bphimax = (phimax - m_rangemin) * m_invbinsize; // add neighbouring bin @@ -81,15 +80,15 @@ namespace MuonHough { std::vector<TH1*> rootHistos(const std::string& prefix, const float* phimin = 0, const float* phimax = 0) const; - float m_binsize; - float m_invbinsize; - float m_rangemin; - float m_rangemax; + float m_binsize{0.}; + float m_invbinsize{0.}; + float m_rangemin{0.}; + float m_rangemax{0.}; Muon::MuonStationIndex::DetectorRegionIndex m_region; int m_nbins; - bool m_debug; - unsigned int* m_histo; + bool m_debug{false}; + std::unique_ptr<unsigned int[]> m_histo; private: // fake copy constructor and assignment operator diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLayerHough/src/Hit.cxx b/MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLayerHough/src/Hit.cxx index bbb9227dc0bcd59f8920653b7f558943bac4a630..98ffe2a6736b178b694ea59fbb29b7822a3a2e29 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLayerHough/src/Hit.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLayerHough/src/Hit.cxx @@ -8,52 +8,9 @@ namespace MuonHough { - HitDebugInfo::HitDebugInfo() : - type(UNINITIALIZED), - sector(UNINITIALIZED), - region(Muon::MuonStationIndex::DetectorRegionUnknown), - layer(Muon::MuonStationIndex::LayerUnknown), - sublayer(UNINITIALIZED), - pdgId(UNINITIALIZED), - barcode(UNINITIALIZED), - muonIndex(UNINITIALIZED), - clusterSize(UNINITIALIZED), - clusterLayers(UNINITIALIZED), - isEtaPhi(UNINITIALIZED), - trigConfirm(UNINITIALIZED), - binpos(UNINITIALIZED), - bintheta(UNINITIALIZED), - time(UNINITIALIZED), - r(UNINITIALIZED), - ph(UNINITIALIZED), - phn(UNINITIALIZED), - ph1(UNINITIALIZED), - ph2(UNINITIALIZED), - rot(UNINITIALIZED) {} - HitDebugInfo::HitDebugInfo(int type_, int sector_, Muon::MuonStationIndex::DetectorRegionIndex region_, Muon::MuonStationIndex::LayerIndex layer_, int sublayer_) : - type(type_), - sector(sector_), - region(region_), - layer(layer_), - sublayer(sublayer_), - pdgId(UNINITIALIZED), - barcode(UNINITIALIZED), - muonIndex(UNINITIALIZED), - clusterSize(UNINITIALIZED), - clusterLayers(UNINITIALIZED), - isEtaPhi(UNINITIALIZED), - trigConfirm(UNINITIALIZED), - binpos(UNINITIALIZED), - bintheta(UNINITIALIZED), - time(UNINITIALIZED), - r(UNINITIALIZED), - ph(UNINITIALIZED), - phn(UNINITIALIZED), - ph1(UNINITIALIZED), - ph2(UNINITIALIZED), - rot(UNINITIALIZED) {} + type(type_), sector(sector_), region(region_), layer(layer_), sublayer(sublayer_) {} Hit::Hit(int layer_, float x_, float ymin_, float ymax_, float w_, HitDebugInfo* d_, const Trk::PrepRawData* prd_, const Muon::TgcClusterObj3D* tgc_) : diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLayerHough/src/MuonLayerHough.cxx b/MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLayerHough/src/MuonLayerHough.cxx index 4f60e7c6bb9f60cbf68ba7dfe6ac6ee36fca9104..0899c8e3b94399b723939b9c906599041a02fcaa 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLayerHough/src/MuonLayerHough.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLayerHough/src/MuonLayerHough.cxx @@ -22,12 +22,18 @@ namespace { // Avoid FPEs occuring in clang 10 , e.g., // FPEAuditor 2 1 WARNING FPE OVERFLOW in [Execute] of [MuGirlStauAlg] on event 257948896 0 0 // by large number - float invtan(const float x) { return x == 0 || x == M_PI ? 1.e12 : 1. / std::tan(x); } + /// Use the relation cot(x) = tan(pi/2 -x ) + float cot(const float x) { + const float arg = M_PI_2 - x; + // Tan becomes singular at -pi/2 and pi/2 + if (std::abs(arg - M_PI_2) <= FLT_EPSILON || std::abs(arg + M_PI_2) <= FLT_EPSILON) return 1.e12; + return std::tan(arg); + } } // namespace namespace MuonHough { MuonLayerHough::MuonLayerHough(const RegionDescriptor& descriptor) : - max(0), maxhist(-1), maxbin(-1), m_debug(false), m_descriptor(descriptor) { + m_descriptor(descriptor) { // calculate the number of bins m_nbins = (m_descriptor.yMaxRange - m_descriptor.yMinRange) / m_descriptor.yBinSize; // the same for all the cycles m_binsize = (m_descriptor.yMaxRange - m_descriptor.yMinRange) / m_nbins; @@ -52,9 +58,9 @@ namespace MuonHough { float dtheta = m_descriptor.thetaStep; float dthetaOffset = 2 * m_descriptor.thetaStep * (ci - (cycles - 1) / 2.); float theta = std::atan2(x, y); - float zref = (m_descriptor.referencePosition - x) * invtan(theta - dthetaOffset) + y; - float z0 = (m_descriptor.referencePosition - x) * invtan(theta - dthetaOffset + dtheta) + y; - float z1 = (m_descriptor.referencePosition - x) * invtan(theta - dthetaOffset - dtheta) + y; + float zref = (m_descriptor.referencePosition - x) * cot(theta - dthetaOffset) + y; + float z0 = (m_descriptor.referencePosition - x) * cot(theta - dthetaOffset + dtheta) + y; + float z1 = (m_descriptor.referencePosition - x) * cot(theta - dthetaOffset - dtheta) + y; float zmin = z0 < z1 ? z0 : z1; float zmax = z0 < z1 ? z1 : z0; @@ -394,9 +400,9 @@ namespace MuonHough { float dtheta = m_descriptor.thetaStep; float dthetaOffset = 2 * m_descriptor.thetaStep * (relbin); // if bintheta = cycles, this is the same as dtheta * (cycles + 1 ) float theta = std::atan2(x, y); - float z0 = (m_descriptor.referencePosition - x) * invtan(theta - dthetaOffset + dtheta) + + float z0 = (m_descriptor.referencePosition - x) * cot(theta - dthetaOffset + dtheta) + y; // move the angle by a step, recalculate the new y value - float z1 = (m_descriptor.referencePosition - x) * invtan(theta - dthetaOffset - dtheta) + y; + float z1 = (m_descriptor.referencePosition - x) * cot(theta - dthetaOffset - dtheta) + y; float zmin = z0 < z1 ? z0 : z1; float zmax = z0 < z1 ? z1 : z0; @@ -488,14 +494,14 @@ namespace MuonHough { float dthetaOffset = 2 * dtheta * (bintheta - (cycles - 1) / 2.); float theta1 = std::atan2(x, y1) - dthetaOffset; - float z01 = dx * invtan(theta1 + dtheta) + y1; - float z11 = dx * invtan(theta1 - dtheta) + y1; + float z01 = dx * cot(theta1 + dtheta) + y1; + float z11 = dx * cot(theta1 - dtheta) + y1; float zmin1 = std::min(z01, z11); float zmax1 = std::max(z01, z11); float theta2 = std::atan2(x, y2) - dthetaOffset; - float z02 = dx * invtan(theta2 + dtheta) + y2; - float z12 = dx * invtan(theta2 - dtheta) + y2; + float z02 = dx * cot(theta2 + dtheta) + y2; + float z12 = dx * cot(theta2 - dtheta) + y2; float zmin2 = std::min(z02, z12); float zmax2 = std::max(z02, z12); @@ -523,7 +529,7 @@ namespace MuonHough { float expected = 0; float extrapolated_diff = 9999; float tan_theta_ref = std::tan(theta_ref); - float invtan_theta_ref = 1. * invtan(theta_ref); + float invtan_theta_ref = 1. * cot(theta_ref); float r_start = ref.hough->m_descriptor.chIndex % 2 > 0 ? 4900. : 5200.; // start of barrel B field; values could be further optimized; 5500.:6500. diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLayerHough/src/MuonLayerHoughSelector.cxx b/MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLayerHough/src/MuonLayerHoughSelector.cxx index 88bc8aab28d142ba6a45e9fa1a9c341d5990eb99..bcc48e4c1affbad1b49ea6beffd34dd7e233c0c4 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLayerHough/src/MuonLayerHoughSelector.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLayerHough/src/MuonLayerHoughSelector.cxx @@ -11,7 +11,7 @@ namespace MuonHough { - typedef std::pair<int, double> valPair; + using valPair = std::pair<int, float>; MuonLayerHoughSelector::MuonLayerHoughSelector(std::vector<std::pair<int, float>> cutValues) { m_cutValues = std::move(cutValues); diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLayerHough/src/MuonPhiLayerHough.cxx b/MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLayerHough/src/MuonPhiLayerHough.cxx index cddccd2fae215f2e4c21d03e3a14b7a4ca7bdaee..4fd66c14d3b7e0b4b9b78353287d6aa839a7b77e 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLayerHough/src/MuonPhiLayerHough.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLayerHough/src/MuonPhiLayerHough.cxx @@ -13,19 +13,18 @@ namespace MuonHough { MuonPhiLayerHough::MuonPhiLayerHough(int nbins, float rangemin, float rangemax, Muon::MuonStationIndex::DetectorRegionIndex region) : - m_rangemin(rangemin), m_rangemax(rangemax), m_region(region), m_nbins(nbins), m_debug(false) { + m_rangemin(rangemin), m_rangemax(rangemax), m_region(region), m_nbins(nbins), m_histo{new unsigned int[m_nbins]} { // calculate the binsize m_binsize = (m_rangemax - m_rangemin) / m_nbins; m_invbinsize = 1. / m_binsize, // setup the histograms - m_histo = new unsigned int[m_nbins]; - reset(); + reset(); } - MuonPhiLayerHough::~MuonPhiLayerHough() { delete[] m_histo; } + MuonPhiLayerHough::~MuonPhiLayerHough() = default; - void MuonPhiLayerHough::reset() const { memset(m_histo, 0, sizeof(unsigned int) * m_nbins); } + void MuonPhiLayerHough::reset() const { memset(m_histo.get(), 0, sizeof(unsigned int) * m_nbins); } void MuonPhiLayerHough::fillLayer2(const std::vector<PhiHit*>& hits, bool subtract) const { if (hits.empty()) return; diff --git a/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/MooSegmentCombinationFinder.cxx b/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/MooSegmentCombinationFinder.cxx index 07185fc8033d30bc797f8bb919fba9967c9cf3bf..88266d1db129eda207a578eda3cde811d3515af3 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/MooSegmentCombinationFinder.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/MooSegmentCombinationFinder.cxx @@ -113,38 +113,39 @@ void Muon::MooSegmentCombinationFinder::findSegments(const std::vector<const Mdt MuonSegmentCombPatternCombAssociationMap segmentPatternMap; - std::unique_ptr<MuonSegmentCombinationCollection> csc2dSegmentCombinations(new MuonSegmentCombinationCollection); - std::unique_ptr<MuonSegmentCombinationCollection> csc4dSegmentCombinations(new MuonSegmentCombinationCollection); + std::unique_ptr<MuonSegmentCombinationCollection> csc2dSegmentCombinations = std::make_unique<MuonSegmentCombinationCollection>(); + std::unique_ptr<MuonSegmentCombinationCollection> csc4dSegmentCombinations = std::make_unique<MuonSegmentCombinationCollection>(); if (m_doCscSegments) { // reconstruct segments in the CSC eta and phi plane csc2dSegmentCombinations = m_csc2dSegmentFinder->find(cscCols, ctx); - printSummary("CSC 2D segment finding", csc2dSegmentCombinations.get()); - + // combine CSC segments in eta and phi plane if any were found if (csc2dSegmentCombinations) { + printSummary("CSC 2D segment finding", *csc2dSegmentCombinations); csc4dSegmentCombinations = m_csc4dSegmentFinder->find(*csc2dSegmentCombinations, ctx); - printSummary("CSC 4D segment finding", csc4dSegmentCombinations.get()); } - - if (csc4dSegmentCombinations) { extractSegmentCollection(csc4dSegmentCombinations.get(), *(output.segmentCollection)); } + if (csc4dSegmentCombinations) { + printSummary("CSC 4D segment finding", *csc4dSegmentCombinations); + extractSegmentCollection(*csc4dSegmentCombinations, *output.segmentCollection); + } } - std::unique_ptr<MuonSegmentCombinationCollection> mdtSegmentCombinations(new MuonSegmentCombinationCollection); + std::unique_ptr<MuonSegmentCombinationCollection> mdtSegmentCombinations = std::make_unique<MuonSegmentCombinationCollection>(); if (m_doMdtSegments) { // search for global patterns auto [combis, houghData] = m_houghPatternFinder->find(mdtCols, cscCols, tgcCols, rpcCols, csc4dSegmentCombinations.get(), ctx); - output.patternCombinations = combis.release(); + output.patternCombinations = std::move(combis); output.houghDataPerSectorVec = std::move(houghData); - printSummary("Pattern finding", output.patternCombinations); + printSummary("Pattern finding", *output.patternCombinations); // search for MDT segments if (output.patternCombinations) { - mdtSegmentCombinations = m_patternSegmentMaker->find(output.patternCombinations, &segmentPatternMap, rpcCols, tgcCols); - if (msgLvl(MSG::DEBUG)) printSummary("MDT segment finding", mdtSegmentCombinations.get()); + mdtSegmentCombinations = m_patternSegmentMaker->find(output.patternCombinations.get(), &segmentPatternMap, rpcCols, tgcCols); + if (msgLvl(MSG::DEBUG) && mdtSegmentCombinations) printSummary("MDT segment finding", *mdtSegmentCombinations); } - if (mdtSegmentCombinations) { extractSegmentCollection(mdtSegmentCombinations.get(), *(output.segmentCollection)); } - printSummary("MDT segment finding", output.segmentCollection); + if (mdtSegmentCombinations) { extractSegmentCollection(*mdtSegmentCombinations, *output.segmentCollection); } + printSummary("MDT segment finding", *output.segmentCollection); } std::unique_ptr<MuonSegmentCombinationCollection> curvedSegmentCombinations; @@ -152,15 +153,15 @@ void Muon::MooSegmentCombinationFinder::findSegments(const std::vector<const Mdt if (m_doSegmentCombinations) { // create dummy collections if CSCs are missing if (!csc2dSegmentCombinations) - csc2dSegmentCombinations = std::unique_ptr<MuonSegmentCombinationCollection>(new MuonSegmentCombinationCollection); + csc2dSegmentCombinations = std::make_unique<MuonSegmentCombinationCollection>(); if (!csc4dSegmentCombinations) - csc4dSegmentCombinations = std::unique_ptr<MuonSegmentCombinationCollection>(new MuonSegmentCombinationCollection); + csc4dSegmentCombinations = std::make_unique<MuonSegmentCombinationCollection>(); // combine MDT and CSC segments if (mdtSegmentCombinations) { curvedSegmentCombinations = m_curvedSegmentCombiner->combineSegments(*mdtSegmentCombinations, *csc4dSegmentCombinations, *csc2dSegmentCombinations, &segmentPatternMap); - if (msgLvl(MSG::DEBUG)) printSummary("Segment combining", curvedSegmentCombinations.get()); + if (msgLvl(MSG::DEBUG)) printSummary("Segment combining", *curvedSegmentCombinations); } } @@ -171,7 +172,7 @@ void Muon::MooSegmentCombinationFinder::findSegments(const std::vector<const Mdt if (!finalComb) finalComb = csc4dSegmentCombinations.get(); if (finalComb) { cleanedSegmentCombinations = m_segmentCombinationCleaner->clean(*finalComb, &segmentPatternMap); - printSummary("Segment combination cleaning", cleanedSegmentCombinations.get()); + printSummary("Segment combination cleaning", *cleanedSegmentCombinations); } } @@ -194,108 +195,68 @@ void Muon::MooSegmentCombinationFinder::findSegments(const std::vector<const Mdt } } if (m_doSegmentCombinationCleaning) m_ncleanedSegmentCombinations += cleanedSegmentCombinations->size(); - - // clean up intermediate steps - if (csc2dSegmentCombinations) postProcess(csc2dSegmentCombinations.get(), segmentPatternMap); - - if (csc4dSegmentCombinations) postProcess(csc4dSegmentCombinations.get(), segmentPatternMap); - - if (mdtSegmentCombinations) postProcess(mdtSegmentCombinations.get(), segmentPatternMap); - - if (curvedSegmentCombinations) postProcess(curvedSegmentCombinations.get(), segmentPatternMap); - - if (cleanedSegmentCombinations) postProcess(cleanedSegmentCombinations.get(), segmentPatternMap); - - segmentPatternMap.clear(); } -void Muon::MooSegmentCombinationFinder::postProcess(MuonSegmentCombinationCollection* col, - MuonSegmentCombPatternCombAssociationMap& segmentPatternMap) const { - MuonSegmentCombinationCollection::const_iterator cit = col->begin(); - MuonSegmentCombinationCollection::const_iterator cit_end = col->end(); - for (; cit != cit_end; ++cit) { segmentPatternMap.erase(*cit); } - return; -} - -void Muon::MooSegmentCombinationFinder::printStage(std::string stageTag) const { ATH_MSG_INFO("Reco stage: " << stageTag); } +void Muon::MooSegmentCombinationFinder::printStage(const std::string& stageTag) const { ATH_MSG_INFO("Reco stage: " << stageTag); } -void Muon::MooSegmentCombinationFinder::printSummary(std::string stageTag, const MuonSegmentCombinationCollection* col) const { - if (m_doSummary || msgLvl(MSG::DEBUG)) { - printStage(stageTag); - if (!col) { - ATH_MSG_INFO("No segment combinations found "); - } else { - ATH_MSG_INFO("Found " << col->size() << " segment combinations " << std::endl << m_edmPrinter->print(*col)); - } - } +void Muon::MooSegmentCombinationFinder::printSummary(const std::string& stageTag, const MuonSegmentCombinationCollection& col) const { + if ( !m_doSummary && !msgLvl(MSG::DEBUG)) return; + printStage(stageTag); + ATH_MSG_INFO("Found " << col.size() << " segment combinations " << std::endl << m_edmPrinter->print(col)); } -void Muon::MooSegmentCombinationFinder::printSummary(std::string stageTag, const Trk::SegmentCollection* col) const { - if (m_doSummary || msgLvl(MSG::DEBUG)) { - printStage(stageTag); - if (!col) { - ATH_MSG_INFO("No segments found "); - } else { - ATH_MSG_INFO("Found " << col->size() << " segments found "); - Trk::SegmentCollection::const_iterator sit = col->begin(); - Trk::SegmentCollection::const_iterator sit_end = col->end(); - for (; sit != sit_end; ++sit) { - const MuonSegment* seg = dynamic_cast<const MuonSegment*>(*sit); - if (seg) { - msg() << m_edmPrinter->print(*seg); - if (sit + 1 != sit_end) msg() << std::endl; - } - } - msg() << endmsg; +void Muon::MooSegmentCombinationFinder::printSummary(const std::string& stageTag, const Trk::SegmentCollection& col) const { + if (!m_doSummary && !msgLvl(MSG::DEBUG)) return; + printStage(stageTag); + ATH_MSG_INFO("Found " << col.size() << " segments found "); + Trk::SegmentCollection::const_iterator sit = col.begin(); + Trk::SegmentCollection::const_iterator sit_end = col.end(); + for (; sit != sit_end; ++sit) { + const MuonSegment* seg = dynamic_cast<const MuonSegment*>(*sit); + if (seg) { + msg() << m_edmPrinter->print(*seg); + if (sit + 1 != sit_end) msg() << std::endl; } } + msg() << endmsg; } -void Muon::MooSegmentCombinationFinder::printSummary(std::string stageTag, const MuonPatternCombinationCollection* col) const { - if (m_doSummary || msgLvl(MSG::DEBUG)) { - printStage(stageTag); - if (!col) { - ATH_MSG_INFO("No pattern combinations found "); - } else { - ATH_MSG_INFO("Found " << col->size() << " pattern combinations found " << std::endl << m_edmPrinter->print(*col)); - } - } +void Muon::MooSegmentCombinationFinder::printSummary(const std::string& stageTag, const MuonPatternCombinationCollection& col) const { + if (!m_doSummary && !msgLvl(MSG::DEBUG)) return; + printStage(stageTag); + ATH_MSG_INFO("Found " << col.size() << " pattern combinations found " << std::endl << m_edmPrinter->print(col)); + } -void Muon::MooSegmentCombinationFinder::extractSegmentCollection(const MuonSegmentCombinationCollection* combiCol, +void Muon::MooSegmentCombinationFinder::extractSegmentCollection(MuonSegmentCombinationCollection& combiCol, Trk::SegmentCollection& segmentCol) const { // store single segments per chamber layer - typedef std::vector<std::unique_ptr<Muon::MuonSegment> > SegVec; + using SegVec=std::vector<std::unique_ptr<Muon::MuonSegment> > ; // typedef SegVec::iterator SegVecIt; - typedef std::map<Muon::MuonStationIndex::ChIndex, std::unique_ptr<SegVec> > RSMap; - typedef RSMap::iterator RSMapIt; + using RSMap = std::map<Muon::MuonStationIndex::ChIndex, std::unique_ptr<SegVec> > ; + using RSMapIt = RSMap::iterator; RSMap segMap; - unsigned int nremovedBadSegments(0); - unsigned int naccepted(0); - - MuonSegmentCombinationCollection::const_iterator cit = combiCol->begin(); - MuonSegmentCombinationCollection::const_iterator cit_end = combiCol->end(); - for (; cit != cit_end; ++cit) { - if (!*cit) { + unsigned int nremovedBadSegments{0}, naccepted{0}; + for ( const MuonSegmentCombination* combi : combiCol) { + if (!combi) { ATH_MSG_DEBUG(" empty MuonSegmentCombination!!! "); continue; } - const Muon::MuonSegmentCombination& combi = **cit; - unsigned int nstations = combi.numberOfStations(); + unsigned int nstations = combi->numberOfStations(); // segment quality level bool ignoreHoles = false; int quality = 1; // chamber status for csc - bool useEta = combi.useStripsInSegment(1); - bool usePhi = combi.useStripsInSegment(0); + bool useEta = combi->useStripsInSegment(1); + bool usePhi = combi->useStripsInSegment(0); // loop over chambers in combi and extract segments for (unsigned int i = 0; i < nstations; ++i) { // loop over segments in station - Muon::MuonSegmentCombination::SegmentVec* segments = combi.stationSegments(i); + Muon::MuonSegmentCombination::SegmentVec* segments = combi->stationSegments(i); // check if not empty if (!segments || segments->empty()) continue; @@ -307,62 +268,43 @@ void Muon::MooSegmentCombinationFinder::extractSegmentCollection(const MuonSegme // add segments to region segment map, remove ambigueties (missing at the moment) RSMapIt rsit = segMap.find(chIndex); if (rsit == segMap.end()) { - std::unique_ptr<SegVec> segs(new SegVec); - // loop over new segments, copy them into collection - Muon::MuonSegmentCombination::SegmentVec::iterator sit = segments->begin(); - Muon::MuonSegmentCombination::SegmentVec::iterator sit_end = segments->end(); - for (; sit != sit_end; ++sit) { - Muon::MuonSegment* seg = (*sit).get(); - // remove bad segments - if (!m_segmentSelector->select(*seg, ignoreHoles, quality, useEta, usePhi)) { - if (msgLvl(MSG::VERBOSE)) { - int q = m_segmentSelector->quality(*seg, ignoreHoles, useEta, usePhi); - ATH_MSG_VERBOSE(" bad segment " << m_edmPrinter->print(*seg) << " quality " << q); - } - ++nremovedBadSegments; - continue; - } - segs->push_back(std::move(*sit)); - } - segMap.insert(std::make_pair(chIndex, std::move(segs))); - } else { - // loop over new segments, copy them into collection - Muon::MuonSegmentCombination::SegmentVec::iterator sit = segments->begin(); - Muon::MuonSegmentCombination::SegmentVec::iterator sit_end = segments->end(); - for (; sit != sit_end; ++sit) { - Muon::MuonSegment* seg = (*sit).get(); - // remove bad segments - if (!m_segmentSelector->select(*seg, ignoreHoles, quality, useEta, usePhi)) { - if (msgLvl(MSG::VERBOSE)) { - int q = m_segmentSelector->quality(*seg, ignoreHoles, useEta, usePhi); - ATH_MSG_VERBOSE(" bad segment " << m_edmPrinter->print(*seg) << " quality " << q); - } - ++nremovedBadSegments; - continue; + segMap.insert(std::make_pair(chIndex, std::make_unique<SegVec>())); + rsit = segMap.find(chIndex); + } + + // loop over new segments, copy them into collection + SegVec bad_segments{}; + bad_segments.reserve(segments->size()); + for ( std::unique_ptr<MuonSegment>& seg : *segments) { + // remove bad segments + if (!m_segmentSelector->select(*seg, ignoreHoles, quality, useEta, usePhi)) { + if (msgLvl(MSG::VERBOSE)) { + int q = m_segmentSelector->quality(*seg, ignoreHoles, useEta, usePhi); + ATH_MSG_VERBOSE(" bad segment " << m_edmPrinter->print(*seg) << " quality " << q); } - rsit->second->push_back(std::move(*sit)); + ++nremovedBadSegments; + bad_segments.emplace_back(std::move(seg)); + continue; } + rsit->second->emplace_back(std::move(seg)); } + // Skim the old segments by the accepted + (*segments) = std::move(bad_segments); } } // optionally output - RSMapIt rsit = segMap.begin(); - RSMapIt rsit_end = segMap.end(); - for (; rsit != rsit_end; ++rsit) { - if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG("Working on new chamber layer with " << rsit->second->size() << " segments"); + for (const auto& rsit: segMap) { + if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG("Working on new chamber layer with " << rsit.second->size() << " segments"); // sort segments according to the number of hits - std::stable_sort(rsit->second->begin(), rsit->second->end(), SortSegmentsByNumberOfHits()); - - // insert remaining segments into segment collection, cast away const as Trk::SegmentCollection contains non - // const pointers - naccepted += rsit->second->size(); - segmentCol.reserve(segmentCol.size() + rsit->second->size()); - SegVec::iterator sit = rsit->second->begin(); - SegVec::iterator sit_end = rsit->second->end(); - for (; sit != sit_end; ++sit) { - segmentCol.push_back((*sit).release()); // releasing here, but the segmentCol immediately takes ownership + std::stable_sort(rsit.second->begin(), rsit.second->end(), SortSegmentsByNumberOfHits()); + + // insert remaining segments into segment collection + naccepted += rsit.second->size(); + segmentCol.reserve(segmentCol.size() + rsit.second->size()); + for ( std::unique_ptr<MuonSegment>& seg : *rsit.second) { + segmentCol.push_back(std::move(seg)); } } @@ -371,16 +313,15 @@ void Muon::MooSegmentCombinationFinder::extractSegmentCollection(const MuonSegme } std::pair<int, int> Muon::MooSegmentCombinationFinder::hitsInMultilayer(const Muon::MuonSegment& segment) const { - int nMl1(0); - int nMl2(0); + int nMl1{0}, nMl2{0}; const std::vector<const Trk::MeasurementBase*>& measurements = segment.containedMeasurements(); std::vector<const Trk::MeasurementBase*>::const_iterator it = measurements.begin(), itEnd = measurements.end(); for (; it != itEnd; ++it) { const Muon::MdtDriftCircleOnTrack* mdt = dynamic_cast<const Muon::MdtDriftCircleOnTrack*>(*it); if (mdt) { int ml = m_idHelperSvc->mdtIdHelper().multilayer(mdt->identify()); - if (ml == 1) ++nMl1; - if (ml == 2) ++nMl2; + nMl1+=(ml == 1); + nMl2+=(ml == 2); } } return std::make_pair(nMl1, nMl2); diff --git a/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/MooSegmentCombinationFinder.h b/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/MooSegmentCombinationFinder.h index 0b99049cfd3ff7bb16ff42ce9387b753a1580bd1..e4b81c58d6ab2e360d269a4b497f476c93d1efe2 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/MooSegmentCombinationFinder.h +++ b/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/MooSegmentCombinationFinder.h @@ -68,16 +68,13 @@ namespace Muon { private: /** helper functions to print summary output for the different stages */ - void printStage(std::string stageTag) const; - void printSummary(std::string stageTag, const MuonSegmentCombinationCollection* col) const; - void printSummary(std::string stageTag, const MuonPatternCombinationCollection* col) const; - void printSummary(std::string stageTag, const Trk::SegmentCollection* col) const; - - /** helper functions to write out intermediate results */ - void postProcess(MuonSegmentCombinationCollection* col, MuonSegmentCombPatternCombAssociationMap& segmentPatternMap) const; - + void printStage( const std::string& stageTag) const; + void printSummary(const std::string& stageTag, const MuonSegmentCombinationCollection& col) const; + void printSummary(const std::string& stageTag, const MuonPatternCombinationCollection& col) const; + void printSummary(const std::string& stageTag, const Trk::SegmentCollection& col) const; + /** extract a segment collection from a segment combination collection */ - void extractSegmentCollection(const MuonSegmentCombinationCollection* combiCol, Trk::SegmentCollection& segments) const; + void extractSegmentCollection(MuonSegmentCombinationCollection& combiCol, Trk::SegmentCollection& segments) const; /** select segment on quality */ bool goodSegment(const MuonSegment& segment) const; diff --git a/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/MooSegmentFinderAlg.cxx b/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/MooSegmentFinderAlg.cxx index 6e2e2b4db82f2e8d93eaad3a3c27c350355db1a8..986ca7fd199b3ee3bfc4925c518b6c637279c5da 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/MooSegmentFinderAlg.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/MooSegmentFinderAlg.cxx @@ -59,12 +59,11 @@ StatusCode MooSegmentFinderAlg::execute(const EventContext& ctx) const { m_segmentFinder->findSegments(mdtCols, cscCols, tgcCols, rpcCols, output, ctx); if (output.patternCombinations) { - if (patHandle.record(std::unique_ptr<MuonPatternCombinationCollection>(output.patternCombinations)).isSuccess()) { + if (patHandle.record(std::move(output.patternCombinations)).isSuccess()) { ATH_MSG_VERBOSE("stored MuonPatternCombinationCollection at " << m_patternCombiLocation.key()); } else { ATH_MSG_ERROR("Failed to store MuonPatternCombinationCollection at " << m_patternCombiLocation.key()); } - output.patternCombinations = nullptr; } else { if (patHandle.record(std::make_unique<MuonPatternCombinationCollection>()).isSuccess()) { ATH_MSG_VERBOSE("stored MuonPatternCombinationCollection at " << m_patternCombiLocation.key()); diff --git a/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MuonSegmentCombinerToolInterfaces/MuonSegmentCombinerToolInterfaces/IMooSegmentCombinationFinder.h b/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MuonSegmentCombinerToolInterfaces/MuonSegmentCombinerToolInterfaces/IMooSegmentCombinationFinder.h index e412932d11f7aa93786d86fb07e6cabeee14cb98..87720ecf829eadfd2cbacd5200ab1cc1a78416e6 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MuonSegmentCombinerToolInterfaces/MuonSegmentCombinerToolInterfaces/IMooSegmentCombinationFinder.h +++ b/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MuonSegmentCombinerToolInterfaces/MuonSegmentCombinerToolInterfaces/IMooSegmentCombinationFinder.h @@ -20,10 +20,10 @@ namespace Muon { class IMooSegmentCombinationFinder : virtual public IAlgTool { public: struct Output { - MuonPatternCombinationCollection* patternCombinations{nullptr}; + std::unique_ptr<MuonPatternCombinationCollection> patternCombinations{nullptr}; + std::unique_ptr<Muon::HoughDataPerSectorVec> houghDataPerSectorVec{nullptr}; Trk::SegmentCollection* segmentCollection{nullptr}; - std::unique_ptr<Muon::HoughDataPerSectorVec> houghDataPerSectorVec; - + Output() = default; }; diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/RpcRawDataMonitoring/RPCLv1AnaAlg.h b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/RpcRawDataMonitoring/RPCLv1AnaAlg.h index 822b854a9ba2c6318fa196c1a84936c73779c256..e28a3b39e1a4f6139e7b92e7b95632ee07ffe690 100644 --- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/RpcRawDataMonitoring/RPCLv1AnaAlg.h +++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/RpcRawDataMonitoring/RPCLv1AnaAlg.h @@ -33,7 +33,7 @@ class RPCLv1AnaAlg : public AthMonitorAlgorithm SG::ReadHandleKey<RpcPadContainer> m_rpcPadContainerKey { this, "RpcPadContainerKey", "RPCPAD", "Key for Rpc Pad" }; SG::ReadHandleKey<xAOD::MuonRoIContainer> m_l1RoiContainerKey - { this, "L1RoiContainerKey", "LVL1MuonRoIs", "Key for L1 ROIs" }; + { this, "MuonRoIContainerName", "LVL1MuonRoIs", "Key for L1 ROIs" }; // // Define configurable cuts diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/RpcRawDataMonitoring/RPCMonitorAlgorithm.h b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/RpcRawDataMonitoring/RPCMonitorAlgorithm.h deleted file mode 100644 index 91f354266518705758bc4a169228dc1d7be5976c..0000000000000000000000000000000000000000 --- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/RpcRawDataMonitoring/RPCMonitorAlgorithm.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef RPCMONITORDQ_RPCMONITORALGORITHM_H -#define RPCMONITORDQ_RPCMONITORALGORITHM_H - -#include "AthenaMonitoring/AthMonitorAlgorithm.h" -#include "AthenaMonitoringKernel/Monitored.h" - -#include "xAODMuon/MuonContainer.h" -#include "xAODMuon/MuonAuxContainer.h" -#include "MuonIdHelpers/RpcIdHelper.h" -#include "MuonRDO/RpcPadContainer.h" -#include "xAODTrigger/MuonRoIContainer.h" - -class RPCMonitorAlgorithm : public AthMonitorAlgorithm -{ - - public: - - RPCMonitorAlgorithm(const std::string& name, ISvcLocator* svcLocator); - virtual ~RPCMonitorAlgorithm(); - virtual StatusCode initialize() override; - virtual StatusCode fillHistograms( const EventContext& ctx ) const override; - - private: - - SG::ReadHandleKey<xAOD::MuonContainer> m_MuonContainerKey - { this, "MuonContainerKey", "Muons", "Key for Muon Containers" }; - SG::ReadHandleKey<RpcPadContainer> m_rpcPadContainerKey - { this, "RpcPadContainerKey", "RPCPAD", "Key for Rpc Pad" }; - SG::ReadHandleKey<xAOD::MuonRoIContainer> m_l1RoiContainerKey - { this, "L1RoiContainerKey", "LVL1MuonRoIs", "Key for L1 ROIs" }; - - // - // Define configurable cuts - // - - // cuts for muon and roi matching - Gaudi::Property<float> m_minRoIDR {this, "MinRoIDR", 0.3}; - - // cuts for the selected muons - Gaudi::Property<float> m_minPt {this, "MinPt", 2.0e3}; - Gaudi::Property<float> m_minEta {this, "MinEta", 0.0}; - Gaudi::Property<float> m_maxEta {this, "MaxEta", 1.05}; - - // xAOD::Muon::Quality m_quality; - Gaudi::Property<int> m_quality {this, "MuQuality", 1}; -}; - - -#endif diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/RpcRawDataMonitoring/RpcOccupancyAnalysis.h b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/RpcRawDataMonitoring/RpcOccupancyAnalysis.h deleted file mode 100644 index 32759c39d5dc8fed250fc5d2a8294f5c4df992f6..0000000000000000000000000000000000000000 --- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/RpcRawDataMonitoring/RpcOccupancyAnalysis.h +++ /dev/null @@ -1,80 +0,0 @@ -#ifndef RPCRAWDATAMONITORING_RPCOCCUPANCYANALYSIS_H -#define RPCRAWDATAMONITORING_RPCOCCUPANCYANALYSIS_H - -#include <utility> -#include <set> - -// Athena/Gaudi -#include "AthenaMonitoring/AthMonitorAlgorithm.h" -#include "GaudiKernel/ServiceHandle.h" -#include "GaudiKernel/ToolHandle.h" -#include "StoreGate/ReadHandleKey.h" -// #include "StoreGate/ReadCondHandleKey.h" -// #include "StoreGate/StoreGateSvc.h" -#include "xAODEventInfo/EventInfo.h" -#include "EventInfo/EventInfo.h" - -// ATLAS -// #include "MuonIdHelpers/MuonIdHelperTool.h" -#include "MuonIdHelpers/IMuonIdHelperSvc.h" -#include "MuonRDO/RpcPadContainer.h" -#include "MuonRDO/RpcSectorLogicContainer.h" -#include "MuonTrigCoinData/RpcCoinDataContainer.h" -#include "MuonReadoutGeometry/MuonDetectorManager.h" -#include "MuonPrepRawData/RpcPrepDataContainer.h" -#include "LumiBlockData/LuminosityCondData.h" -#include "LumiBlockData/LBDurationCondData.h" - -// local -#include "RpcRawDataMonitoring/RPCDQUtils.h" - - -namespace MuonGM -{ - class MuonDetectorManager; -} - -class RpcOccupancyAnalysis : public AthMonitorAlgorithm -{ - public: - RpcOccupancyAnalysis (const std::string& name, ISvcLocator* pSvcLocator); - virtual ~RpcOccupancyAnalysis(); - - virtual StatusCode initialize() override; - virtual StatusCode fillHistograms( const EventContext& ctx ) const override; - - typedef std::map<Identifier, std::shared_ptr<RpcPanel>> RpcPanelMap; - - private: - StatusCode initRpcPanel(); - - StatusCode fillHistPRD(const EventContext& ctx) const; - - private: - BooleanProperty m_plotPRD{this, "plotPRD", false, "switch to plot histograms for Prepare Data objects"}; - BooleanProperty m_hit_percma{this, "hit_percma", false, "switch to plot histograms for Raw Data objects for per CMA"}; - BooleanProperty m_analyseTrack{this, "analyseTrack", false, "switch to analysis track, extrapolate track to RPC"}; - BooleanProperty m_useAODParticle{this, "useAODParticle", false, "use AOD Particle"}; - - DoubleProperty m_avrLumiThr{this, "avrLumiThr", 10., "Thrshold of average luminosity per Luminosity block"}; - DoubleProperty m_lbDuraThr{this, "lbDuraThr", 10., "Thrshold of luminosity block deruation"}; - StringProperty m_packageName{this,"PackageName", "RpcOccupancyAnalysis","group name for histograming"}; - StringProperty m_trigTagList{this,"TagTrigList","HLT_mu26_ivarmedium_L1MU20","list of triggers to be used for trigger matching"}; - - ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}; - const MuonGM::MuonDetectorManager *m_muonMgr; - - SG::ReadHandleKey<xAOD::EventInfo> m_eventInfo {this,"EventInfo","EventInfo","event info"}; - SG::ReadHandleKey<Muon::RpcPrepDataContainer> m_rpcPrdKey {this,"RpcPrepDataContainer","RPC_Measurements","RPC PRDs"}; - - RpcPanelMap m_rpcPanelMap; - - std::vector<TagDef> m_trigTagDefs; - std::vector<GasGapData*> m_gasGapData; - - std::map<std::string,int> m_timeTagGroups; -}; - - - -#endif diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/RpcRawDataMonitoring/RpcTrackAnaAlg.h b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/RpcRawDataMonitoring/RpcTrackAnaAlg.h index 75276b004c8c1b46c05e21898c7618e5ab6c9c03..06bee857da7eee7891141a908cae176cdd4b0f61 100644 --- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/RpcRawDataMonitoring/RpcTrackAnaAlg.h +++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/RpcRawDataMonitoring/RpcTrackAnaAlg.h @@ -13,8 +13,6 @@ #include "GaudiKernel/ServiceHandle.h" #include "GaudiKernel/ToolHandle.h" #include "StoreGate/ReadHandleKey.h" -// #include "StoreGate/ReadCondHandleKey.h" -// #include "StoreGate/StoreGateSvc.h" #include "EventInfo/EventInfo.h" // ATLAS @@ -55,17 +53,19 @@ class RpcTrackAnaAlg : public AthMonitorAlgorithm StatusCode initArrayHistosMap(); StatusCode fillMuonExtrapolateEff(const EventContext& ctx) const; + StatusCode fillHistPRD(const EventContext& ctx) const; + StatusCode triggerMatching(const xAOD::Muon* , const std::vector<TagDef>& ) const; StatusCode extrapolate2RPC(const xAOD::TrackParticle *track, const Trk::PropDirection direction, std::vector<GasGapResult>& results) const; - StatusCode computeTrackIntersectionWithGasGap(ExResult &result, const xAOD::TrackParticle* track_particle, const std::shared_ptr<GasGapData> gap ) const; + StatusCode computeTrackIntersectionWithGasGap(ExResult &result, const xAOD::TrackParticle* track_particle, const std::shared_ptr<GasGapData> &gap ) const; StatusCode readHitsPerGasgap(const EventContext& ctx, std::vector<GasGapResult>& results) const; StatusCode fillClusterSize(std::vector<const Muon::RpcPrepData*> &view_hits, const int panel_index, int isPhi) const; bool IsNearbyHit(const std::vector<const Muon::RpcPrepData*> &cluster_hits, const Muon::RpcPrepData* hit) const; private: BooleanProperty m_plotMuonEff{this, "plotMuonEff", false, "switch to plot histograms for Muon Efficiency"}; - BooleanProperty m_analyseTrack{this, "analyseTrack", false, "switch to analysis track, extrapolate track to RPC"}; + BooleanProperty m_plotPRD{this, "plotPRD", false, "switch to plot histograms for Prepare Data objects"}; BooleanProperty m_useAODParticle{this, "useAODParticle", false, "use AOD Particle"}; DoubleProperty m_avrLumiThr{this, "avrLumiThr", 10., "Thrshold of average luminosity per Luminosity block"}; @@ -99,12 +99,13 @@ class RpcTrackAnaAlg : public AthMonitorAlgorithm /////////////////////////////////////////////////////////////////// ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}; + SG::ReadHandleKey<xAOD::EventInfo> m_eventInfo {this,"EventInfo","EventInfo","event info"}; + const RpcIdHelper *m_rpcIdHelper; - const MuonGM::MuonDetectorManager *m_muonMgr; ToolHandle<Trk::IExtrapolator> m_extrapolator{this,"TrackExtrapolator","Trk::Extrapolator/AtlasExtrapolator","Track extrapolator"}; - SG::ReadHandleKey<xAOD::MuonRoIContainer> m_MuonRoIContainerKey {this, "L1RoiContainerKey", "LVL1MuonRoIs", "Key for L1 ROIs" }; + SG::ReadHandleKey<xAOD::MuonRoIContainer> m_MuonRoIContainerKey {this, "MuonRoIContainerName", "LVL1MuonRoIs", "Key for L1 ROIs" }; SG::ReadHandleKey<xAOD::MuonContainer> m_MuonContainerKey { this, "MuonContainerKey", "Muons", "Key for Offline muon track Containers" }; SG::ReadHandleKey<Muon::RpcPrepDataContainer> m_rpcPrdKey {this,"RpcPrepDataContainer","RPC_Measurements","RPC PRDs"}; @@ -112,7 +113,6 @@ class RpcTrackAnaAlg : public AthMonitorAlgorithm std::vector<TagDef> m_trigTagDefs; std::vector<std::shared_ptr<GasGapData>> m_gasGapData; - }; #endif diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/python/RpcMonitorAlgorithm.py b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/python/RpcMonitorAlgorithm.py index 01be1aa52047689fef9a6d4ebf538219d24f21e4..ef6a6106b54abd302045143ef9074e4ee13f17a6 100644 --- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/python/RpcMonitorAlgorithm.py +++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/python/RpcMonitorAlgorithm.py @@ -22,111 +22,122 @@ def RpcMonitoringConfig(inputFlags): helper = AthMonitorCfgHelper(inputFlags,'RpcMonitoringCfg') ###################################################################################################### - ## RpcOccupancyAnalysis + ## RpcTrackAnaAlgAlg ###################################################################################################### - RpcOccupancyAnalysis=CompFactory.RpcOccupancyAnalysis + from TrkConfig.AtlasExtrapolatorConfig import AtlasExtrapolatorCfg + extrapolator = result.popToolsAndMerge(AtlasExtrapolatorCfg(inputFlags)) - rpcOccupancyAlg = helper.addAlgorithm(RpcOccupancyAnalysis, "RpcOccupancyAnalysisAlg") - # set properties of algorithm RpcOccupancyAnalysis - rpcOccupancyAlg.plotPRD = True + rpcTrackAnaAlg = helper.addAlgorithm(CompFactory.RpcTrackAnaAlg, "RpcTrackAnaAlgAlg", TrackExtrapolator = extrapolator) - rpcOccupancyAlg.TagTrigList = 'HLT_mu26_ivarmedium' - myGroup_occup = helper.addGroup(rpcOccupancyAlg, 'RpcOccupancyAnalysis', 'Muon/MuonRawDataMonitoring/RPC/') + from TrackingGeometryCondAlg.AtlasTrackingGeometryCondAlgConfig import TrackingGeometryCondAlgCfg + result.merge( TrackingGeometryCondAlgCfg(inputFlags ) ) - myGroup_occup.defineHistogram('run;Run', + rpcTrackAnaAlg.plotMuonEff = True + rpcTrackAnaAlg.plotPRD = True + + rpcTrackAnaAlg.TagTrigList = 'HLT_mu26_ivarmedium' + rpcTrackAnaAlg.TagAndProbe = False + rpcTrackAnaAlg.TagAndProbeZmumu = False + + if not inputFlags.DQ.triggerDataAvailable: + rpcTrackAnaAlg.MuonRoIContainerName = '' + + ###################################################################################################### + ## Occupancy histograms + ###################################################################################################### + myGroup_track = helper.addGroup(rpcTrackAnaAlg, 'RpcTrackAnaAlg', 'Muon/MuonRawDataMonitoring/RPC/') + + myGroup_track.defineHistogram('run;Run', title='Run Number;run;Events', type='TH1I', path='RpcOccupancy', xbins=800000,xmin=200000.5,xmax=1000000.5) - myGroup_occup.defineHistogram('evtLB', + myGroup_track.defineHistogram('evtLB', title='Number of Event;Luminosity Block;N Event', type='TH1I', path='RpcOccupancy', xbins=1200, xmin=0.5, xmax=1200.5) - myGroup_occup.defineHistogram('prdTime', + myGroup_track.defineHistogram('prdTime', title="Number of RPC Prepare Data;Time;N RPC Prepare Data", type='TH1D', path='RpcOccupancy', xbins=67, xmin=-104.6875, xmax=104.6875) - myGroup_occup.defineHistogram('prd_sec,prd_layer;NPRDHit_sectorVSlayer', + myGroup_track.defineHistogram('prd_sec,prd_layer;NPRDHit_sectorVSlayer', title="NPRDHit_sectorVSlayer;Sector;layer((dbR-1)*2+gasGap);NHit", type='TH2I', path='RpcOccupancy', xbins=33, xmin=-16.5, xmax=16.5, ybins=8, ymin=0.5, ymax=8.5) - myGroup_occup.defineHistogram('prd_sec_1214,prd_layer_1214;NPRDHit_sectorVSlayer_Sector1214', + myGroup_track.defineHistogram('prd_sec_1214,prd_layer_1214;NPRDHit_sectorVSlayer_Sector1214', title="NPRDHit_sectorVSlayer_Sector1214;Sector;layer((dbR-1)*2+gasGap);NHit", type='TH2I', path='RpcOccupancy', xbins=[-14.5,-13.5,-12.5,-11.5, 11.5, 12.5, 13.5, 14.5], ybins=8, ymin=0.5, ymax=8.5) - myGroup_occup.defineHistogram('prd_sec_eta,prd_layer_eta;NPRDHit_sectorVSlayer_Eta', + myGroup_track.defineHistogram('prd_sec_eta,prd_layer_eta;NPRDHit_sectorVSlayer_Eta', title="NPRDHit_sectorVSlayer_eta;Sector;layer((dbR-1)*2+gasGap);NHit", type='TH2I', path='RpcOccupancy', xbins=33, xmin=-16.5, xmax=16.5, ybins=8, ymin=0.5, ymax=8.5) - myGroup_occup.defineHistogram('prd_sec_phi,prd_layer_phi;NPRDHit_sectorVSlayer_Phi', + myGroup_track.defineHistogram('prd_sec_phi,prd_layer_phi;NPRDHit_sectorVSlayer_Phi', title="NPRDHit_sectorVSlayer_phi;Sector;layer((dbR-1)*2+gasGap);NHit", type='TH2I', path='RpcOccupancy', xbins=33, xmin=-16.5, xmax=16.5, ybins=8, ymin=0.5, ymax=8.5) - myGroup_occup.defineHistogram('StationName,panelInd_geo;NPRDHit_stationName_vs_panelIndex', + myGroup_track.defineHistogram('StationName,panelInd;NPRDHit_stationName_vs_panelIndex', title='StationName_vs_panelIndex;StationName;Panel Index;NHit', type='TH2I', path='RpcOccupancy', xbins=53, xmin=0.5, xmax=53.5, ybins=8592, ymin=-0.5, ymax=8591.5) - myGroup_occup.defineHistogram('StationEta,panelInd_geo;NPRDHit_stationEta_vs_panelIndex', + myGroup_track.defineHistogram('StationEta,panelInd;NPRDHit_stationEta_vs_panelIndex', title='StationEta_vs_panelIndex;StationEta;Panel Index;NHit', type='TH2I', path='RpcOccupancy', xbins=17, xmin=-8.5, xmax=8.5, ybins=8592, ymin=-0.5, ymax=8591.5) - myGroup_occup.defineHistogram('StationPhi,panelInd_geo;NPRDHit_stationPhi_vs_panelIndex', + myGroup_track.defineHistogram('StationPhi,panelInd;NPRDHit_stationPhi_vs_panelIndex', title='StationPhi_vs_panelIndex;StationPhi;Panel Index;NHit', type='TH2I', path='RpcOccupancy', xbins=8, xmin=0.5, xmax=8.5, ybins=8592, ymin=-0.5, ymax=8591.5) - myGroup_occup.defineHistogram('DoubletR,panelInd_geo;NPRDHit_doubletR_vs_panelIndex', + myGroup_track.defineHistogram('DoubletR,panelInd;NPRDHit_doubletR_vs_panelIndex', title='DoubletR_vs_panelIndex;DoubletR;Panel Index;NHit', type='TH2I', path='RpcOccupancy', xbins=2, xmin=0.5, xmax=2.5, ybins=8592, ymin=-0.5, ymax=8591.5) - myGroup_occup.defineHistogram('DoubletZ,panelInd_geo;NPRDHit_doubletZ_vs_panelIndex', + myGroup_track.defineHistogram('DoubletZ,panelInd;NPRDHit_doubletZ_vs_panelIndex', title='DoubletZ_vs_panelIndex;DoubletZ;Panel Index;NHit', type='TH2I', path='RpcOccupancy', xbins=3, xmin=0.5, xmax=3.5, ybins=8592, ymin=-0.5, ymax=8591.5) - myGroup_occup.defineHistogram('DoubletPhi,panelInd_geo;NPRDHit_doubletPhi_vs_panelIndex', + myGroup_track.defineHistogram('DoubletPhi,panelInd;NPRDHit_doubletPhi_vs_panelIndex', title='DoubletPhi_vs_panelIndex;DoubletPhi;Panel Index;NHit', type='TH2I', path='RpcOccupancy', xbins=2, xmin=0.5, xmax=2.5, ybins=8592, ymin=-0.5, ymax=8591.5) - myGroup_occup.defineHistogram('GasGap,panelInd_geo;NPRDHit_gasgap_vs_panelIndex', + myGroup_track.defineHistogram('GasGap,panelInd;NPRDHit_gasgap_vs_panelIndex', title='GasGap_vs_panelIndex;GasGap;Panel Index;NHit', type='TH2I', path='RpcOccupancy', xbins=2, xmin=0.5, xmax=2.5, ybins=8592, ymin=-0.5, ymax=8591.5) - myGroup_occup.defineHistogram('MeasPhi,panelInd_geo;NPRDHit_measPhi_vs_panelIndex', + myGroup_track.defineHistogram('MeasPhi,panelInd;NPRDHit_measPhi_vs_panelIndex', title='MeasPhi_vs_panelIndex;MeasPhi;Panel Index;NHit', type='TH2I', path='RpcOccupancy', xbins=2, xmin=-0.5, xmax=1.5, ybins=8592, ymin=-0.5, ymax=8591.5) - # stationName = {'2':'BML', '3':'BMS', '4':'BOL', '5':'BOS', '8':'BMF' , '9':'BOF', '10':'BOG', '53':'BME'} - timeTags = ['All', 'B3', 'C1', 'A3'] # B3: 3 BC before BC0; C1: BC0; A3: 3 BC after BC0 - array_timeTags = helper.addArray([timeTags], rpcOccupancyAlg, 'RpcOccupancyAnalysis', 'Muon/MuonRawDataMonitoring/RPC/') - array_timeTags.defineHistogram('LB,panelInd;NPRDHit_Panels', - title='{0}_Number of RPC Prepare Data;Luminosity Block;Panel Index;NHit', + myGroup_track.defineHistogram('LB,panelInd;NPRDHit_Panels_All', + title='Number of RPC Prepare Data;Luminosity Block;Panel Index;NHit', type='TH2I', path='RpcOccupancy', xbins=1200, xmin=0.5, xmax=1200.5, ybins=8592, ymin=-0.5, ymax=8591.5) - array_timeTags.defineHistogram('LB;NPRDHitVSLB', - title="{0}_Number of RPC Prepare Data;Luminosity Block;NHit", + myGroup_track.defineHistogram('LB;NPRDHitVSLB_All', + title="Number of RPC Prepare Data;Luminosity Block;NHit", type='TH1I', path='RpcOccupancy', xbins=1200, xmin=0.5, xmax=1200.5) @@ -134,240 +145,223 @@ def RpcMonitoringConfig(inputFlags): ###################################################################################################### ## Rpc Track Analysis ###################################################################################################### - if inputFlags.Trigger.doLVL1 or 'LVL1MuonRoIs' in inputFlags.Input.Collections: - from TrkConfig.AtlasExtrapolatorConfig import AtlasExtrapolatorCfg - extrapolator = result.popToolsAndMerge(AtlasExtrapolatorCfg(inputFlags)) - - rpcTrackAnaAlg = helper.addAlgorithm(CompFactory.RpcTrackAnaAlg, "RpcTrackAnaAlgAlg", TrackExtrapolator = extrapolator) - - - from TrackingGeometryCondAlg.AtlasTrackingGeometryCondAlgConfig import TrackingGeometryCondAlgCfg - result.merge( TrackingGeometryCondAlgCfg(inputFlags ) ) - - rpcTrackAnaAlg.plotMuonEff = True - rpcTrackAnaAlg.analyseTrack= True - - rpcTrackAnaAlg.TagTrigList = 'HLT_mu26_ivarmedium' - rpcTrackAnaAlg.TagAndProbe = False - rpcTrackAnaAlg.TagAndProbeZmumu = False - - myGroup_track = helper.addGroup(rpcTrackAnaAlg, 'RpcTrackAnaAlg', 'Muon/MuonRawDataMonitoring/RPC/') - - trackPath = 'TrackMatch' - myGroup_track.defineHistogram('hitMultiplicity_eta;HitMultiplicity_eta', - type='TH1I', - title='Hit Multiplicity_eta All Panel;#eta strip hit Multiplicity;muon entries', - path=trackPath, - xbins=11,xmin=-0.5, xmax=10.5) - - myGroup_track.defineHistogram('hitMultiplicity_phi;HitMultiplicity_phi', - type='TH1I', - title='Hit Multiplicity_phi All Panel;#phi strip hit Multiplicity;muon entries', - path=trackPath, - xbins=11,xmin=-0.5, xmax=10.5) - - myGroup_track.defineHistogram('hitMultiplicity,panelInd_hM;HitMultiplicity_Panels', - title='Hit Multiplicity;Hit Multiplicity;Panel Index;NMuon', - type='TH2I', - path=trackPath, - xbins=11, xmin=-0.5, xmax=10.5, ybins=8592, ymin=-0.5, ymax=8591.5) - - myGroup_track.defineHistogram('clustMultiplicity_eta;ClusterSize_etaView', - type='TH1I', - title='Cluster size(#eta view);Cluster size;NCluster', - path=trackPath, - xbins=11,xmin=-0.5, xmax=10.5) - - myGroup_track.defineHistogram('clustMultiplicity_phi;ClusterSize_phiView', - type='TH1I', - title='Cluster size(#phi view);Cluster size;NCluster', - path=trackPath, - xbins=11,xmin=-0.5, xmax=10.5) - - myGroup_track.defineHistogram('clustMultiplicity,panelInd_clust;ClusterSize_Panels', - title='Cluste Multiplicity;Cluste Multiplicity;Panel Index;NCluster', - type='TH2I', - path=trackPath, - xbins=11, xmin=-0.5, xmax=10.5, ybins=8592, ymin=-0.5, ymax=8591.5) - - myGroup_track.defineHistogram('muon_passExtrap,panelInd_hM;Panel_Efficiency', - title='Panels Detection Efficiency;Panel Index;Efficiency', - type='TEfficiency', - path=trackPath, - xbins=8592, xmin=-0.5, xmax=8591.5) - - myGroup_track.defineHistogram('detPar_localY_allPanel,panelInd_detpar;DetPar_localY_allPanel', - type='TH2F', - title='Detector Parameter localY;Local Y;panelID;N matched Gasgap', - path=trackPath, - xbins=270,xmin=-2700., xmax=+2700., ybins=8592, ymin=-0.5, ymax=8591.5) - - myGroup_track.defineHistogram('detPar_localZ_allPanel,panelInd_detpar;DetPar_localZ_allPanel', - type='TH2F', - title='Detector Parameter localZ;Local Z;panelID;N matched Gasgap', - path=trackPath, - xbins=140,xmin=-700., xmax=700., ybins=8592, ymin=-0.5, ymax=8591.5) - - myGroup_track.defineHistogram('detPar_globalX_allPanel,panelInd_detpar;DetPar_globalX_allPanel', - type='TH2F', - title='Detector Parameter globalX;Global X;panelID;N matched Gasgap', - path=trackPath, - xbins=300,xmin=-15000., xmax=15000., ybins=8592, ymin=-0.5, ymax=8591.5) - - myGroup_track.defineHistogram('detPar_globalY_allPanel,panelInd_detpar;DetPar_globalY_allPanel', - type='TH2F', - title='Detector Parameter globalY;Global Y;panelID;N matched Gasgap', - path=trackPath, - xbins=300,xmin=-15000., xmax=15000., ybins=8592, ymin=-0.5, ymax=8591.5) - - myGroup_track.defineHistogram('detPar_globalR_allPanel,panelInd_detpar;DetPar_globalR_allPanel', - type='TH2F', - title='Detector Parameter globalR;Global R;panelID;N matched Gasgap', - path=trackPath, - xbins=220,xmin=-22000., xmax=22000., ybins=8592, ymin=-0.5, ymax=8591.5) - - myGroup_track.defineHistogram('detPar_globalZ_allPanel,panelInd_detpar;DetPar_globalZ_allPanel', - type='TH2F', - title='Detector Parameter globalZ;Global Z;panelID;N matched Gasgap', - path=trackPath, - xbins=300,xmin=-15000., xmax=15000., ybins=8592, ymin=-0.5, ymax=8591.5) - - myGroup_track.defineHistogram('dR_TrackGasGap_allPanel,panelInd_detpar;DR_TrackGasGap_allPanel', - type='TH2F', - title='DR between track and gasgap on panel;#Delta R_trackAndgasgap;panelID;N matched Gasgap', - path=trackPath, - xbins=50,xmin=0., xmax=1., ybins=8592, ymin=-0.5, ymax=8591.5) - - myGroup_track.defineHistogram('dR_TrackRE_allPanel,panelInd_detpar;DR_TrackRE_allPanel', - type='TH2F', - title='DR between track and center of ReadoutElement panel;#Delta R_trackAndRE;panelID;N matched Gasgap', - path=trackPath, - xbins=50,xmin=0., xmax=1., ybins=8592, ymin=-0.5, ymax=8591.5) - - myGroup_track.defineHistogram('isOutTime_prd,panelInd_prd;OuttimeHitFraction_PRDHit', - title='Outtime Hit Fraction of PRD Hit;Panel Index;Outtime Hit Fraction', - type='TEfficiency', - path=trackPath, - xbins=8592, xmin=-0.5, xmax=8591.5) - - myGroup_track.defineHistogram('isOutTime_prd_onTrack,panelInd_prd_onTrack;OuttimeHitFraction_PRDHit_onTrack', - title='Outtime Hit Fraction of PRD Hit on Muon Track;Panel Index;Outtime Hit Fraction', - type='TEfficiency', - path=trackPath, - xbins=8592, xmin=-0.5, xmax=8591.5) - - # myGroup_track.defineHistogram('prdHit_time;PrdHit_time', - # title='PRD Hit Time;Hit Time;NHit', - # type='TH1F', - # path=trackPath, - # xbins=64, xmin=-100., xmax=100.) - - # myGroup_track.defineHistogram('prdHit_time,panelInd_prd;PrdHit_time_perPanel', - # type='TH2F', - # title='PRD Hit Time;PRD Hit Time;panelID;NHit', - # path=trackPath, - # xbins=64, xmin=-100., xmax=100., ybins=8592, ymin=-0.5, ymax=8591.5) + trackPath = 'TrackMatch' + myGroup_track.defineHistogram('hitMultiplicity_eta;HitMultiplicity_eta', + type='TH1I', + title='Hit Multiplicity_eta All Panel;#eta strip hit Multiplicity;muon entries', + path=trackPath, + xbins=11,xmin=-0.5, xmax=10.5) + + myGroup_track.defineHistogram('hitMultiplicity_phi;HitMultiplicity_phi', + type='TH1I', + title='Hit Multiplicity_phi All Panel;#phi strip hit Multiplicity;muon entries', + path=trackPath, + xbins=11,xmin=-0.5, xmax=10.5) + + myGroup_track.defineHistogram('hitMultiplicity,panelInd_hM;HitMultiplicity_Panels', + title='Hit Multiplicity;Hit Multiplicity;Panel Index;NMuon', + type='TH2I', + path=trackPath, + xbins=11, xmin=-0.5, xmax=10.5, ybins=8592, ymin=-0.5, ymax=8591.5) + + myGroup_track.defineHistogram('clustMultiplicity_eta;ClusterSize_etaView', + type='TH1I', + title='Cluster size(#eta view);Cluster size;NCluster', + path=trackPath, + xbins=11,xmin=-0.5, xmax=10.5) + + myGroup_track.defineHistogram('clustMultiplicity_phi;ClusterSize_phiView', + type='TH1I', + title='Cluster size(#phi view);Cluster size;NCluster', + path=trackPath, + xbins=11,xmin=-0.5, xmax=10.5) + + myGroup_track.defineHistogram('clustMultiplicity,panelInd_clust;ClusterSize_Panels', + title='Cluste Multiplicity;Cluste Multiplicity;Panel Index;NCluster', + type='TH2I', + path=trackPath, + xbins=11, xmin=-0.5, xmax=10.5, ybins=8592, ymin=-0.5, ymax=8591.5) + + myGroup_track.defineHistogram('muon_passExtrap,panelInd_hM;Panel_Efficiency', + title='Panels Detection Efficiency;Panel Index;Efficiency', + type='TEfficiency', + path=trackPath, + xbins=8592, xmin=-0.5, xmax=8591.5) + + myGroup_track.defineHistogram('detPar_localY_allPanel,panelInd_detpar;DetPar_localY_allPanel', + type='TH2F', + title='Detector Parameter localY;Local Y;panelID;N matched Gasgap', + path=trackPath, + xbins=270,xmin=-2700., xmax=+2700., ybins=8592, ymin=-0.5, ymax=8591.5) + + myGroup_track.defineHistogram('detPar_localZ_allPanel,panelInd_detpar;DetPar_localZ_allPanel', + type='TH2F', + title='Detector Parameter localZ;Local Z;panelID;N matched Gasgap', + path=trackPath, + xbins=140,xmin=-700., xmax=700., ybins=8592, ymin=-0.5, ymax=8591.5) + + myGroup_track.defineHistogram('detPar_globalX_allPanel,panelInd_detpar;DetPar_globalX_allPanel', + type='TH2F', + title='Detector Parameter globalX;Global X;panelID;N matched Gasgap', + path=trackPath, + xbins=300,xmin=-15000., xmax=15000., ybins=8592, ymin=-0.5, ymax=8591.5) + + myGroup_track.defineHistogram('detPar_globalY_allPanel,panelInd_detpar;DetPar_globalY_allPanel', + type='TH2F', + title='Detector Parameter globalY;Global Y;panelID;N matched Gasgap', + path=trackPath, + xbins=300,xmin=-15000., xmax=15000., ybins=8592, ymin=-0.5, ymax=8591.5) + + myGroup_track.defineHistogram('detPar_globalR_allPanel,panelInd_detpar;DetPar_globalR_allPanel', + type='TH2F', + title='Detector Parameter globalR;Global R;panelID;N matched Gasgap', + path=trackPath, + xbins=220,xmin=-22000., xmax=22000., ybins=8592, ymin=-0.5, ymax=8591.5) + + myGroup_track.defineHistogram('detPar_globalZ_allPanel,panelInd_detpar;DetPar_globalZ_allPanel', + type='TH2F', + title='Detector Parameter globalZ;Global Z;panelID;N matched Gasgap', + path=trackPath, + xbins=300,xmin=-15000., xmax=15000., ybins=8592, ymin=-0.5, ymax=8591.5) + + myGroup_track.defineHistogram('dR_TrackGasGap_allPanel,panelInd_detpar;DR_TrackGasGap_allPanel', + type='TH2F', + title='DR between track and gasgap on panel;#Delta R_trackAndgasgap;panelID;N matched Gasgap', + path=trackPath, + xbins=50,xmin=0., xmax=1., ybins=8592, ymin=-0.5, ymax=8591.5) + + myGroup_track.defineHistogram('dR_TrackRE_allPanel,panelInd_detpar;DR_TrackRE_allPanel', + type='TH2F', + title='DR between track and center of ReadoutElement panel;#Delta R_trackAndRE;panelID;N matched Gasgap', + path=trackPath, + xbins=50,xmin=0., xmax=1., ybins=8592, ymin=-0.5, ymax=8591.5) + + myGroup_track.defineHistogram('isOutTime_prd,panelInd_prd;OuttimeHitFraction_PRDHit', + title='Outtime Hit Fraction of PRD Hit;Panel Index;Outtime Hit Fraction', + type='TEfficiency', + path=trackPath, + xbins=8592, xmin=-0.5, xmax=8591.5) + + myGroup_track.defineHistogram('isOutTime_prd_onTrack,panelInd_prd_onTrack;OuttimeHitFraction_PRDHit_onTrack', + title='Outtime Hit Fraction of PRD Hit on Muon Track;Panel Index;Outtime Hit Fraction', + type='TEfficiency', + path=trackPath, + xbins=8592, xmin=-0.5, xmax=8591.5) + + # myGroup_track.defineHistogram('prdHit_time;PrdHit_time', + # title='PRD Hit Time;Hit Time;NHit', + # type='TH1F', + # path=trackPath, + # xbins=64, xmin=-100., xmax=100.) + + # myGroup_track.defineHistogram('prdHit_time,panelInd_prd;PrdHit_time_perPanel', + # type='TH2F', + # title='PRD Hit Time;PRD Hit Time;panelID;NHit', + # path=trackPath, + # xbins=64, xmin=-100., xmax=100., ybins=8592, ymin=-0.5, ymax=8591.5) ###################################################################################################### ## Rpc lv1 Analysis ###################################################################################################### - if inputFlags.Trigger.doLVL1 or 'LVL1MuonRoIs' in inputFlags.Input.Collections: - RPCLv1AnaAlg = CompFactory.RPCLv1AnaAlg - - Lv1AnaAlg = helper.addAlgorithm(RPCLv1AnaAlg, "RPCLv1AnaAlgAlg") - # Lv1AnaAlg.TriggerChain = 'HLT_mu26_ivarmedium' - - myGroup_lv1Trigger = helper.addGroup(Lv1AnaAlg, 'RPCLv1AnaAlg', 'Muon/MuonRawDataMonitoring/RPC/') - - myGroup_lv1Trigger.defineHistogram('nMu;NMuon', - title='Number of Muons;nMuons;Events', - type='TH1I', - path='PlotCand', - xbins=10,xmin=-0.5,xmax=9.5) - myGroup_lv1Trigger.defineHistogram('nMuBarrel;NMuonBarrel', - title='Number of Barrel Muons;nMuons;Events', - type='TH1I', - path='PlotCand', - xbins=5,xmin=-0.5,xmax=4.5) - - myGroup_lv1Trigger.defineHistogram('muPt_full;MuonPt_full', - title='barrel and endcap muon Pt;Pt[MeV];NMuon', - type='TH1D', - path='PlotCand', - xbins=200,xmin=0,xmax=1000e3) - - myGroup_lv1Trigger.defineHistogram('roiEta;roiEta', - title='roi eta;roi #eta;rois', - type='TH1D', - path='PlotCand', - xbins=50,xmin=-2.5,xmax=2.5) - - myGroup_lv1Trigger.defineHistogram('roiBarrelEta;roiBarrelEta', - title='Barrel roi eta;roi #eta;rois', - type='TH1D', - path='PlotCand', - xbins=50,xmin=-2.5,xmax=2.5) - - myGroup_lv1Trigger.defineHistogram('roiBarrelThr;roiBarrelThrs', - title='Barrel roi threshold;roi threshold;rois', - type='TH1I', - path='PlotCand', - xbins=6,xmin=0.5,xmax=6.5) - - myGroup_lv1Trigger.defineHistogram('nMuBarrel_medium;NMuonBarrel_medium', - title='Number of Barrel Medium Muons;nMuons;Events', - type='TH1I', - path='L1Trigger', - xbins=5,xmin=-0.5,xmax=4.5) - - myGroup_lv1Trigger.defineHistogram('muPtDen;MuonPt', - title='Barrel Muon Pt;Pt[MeV];NMuon', - type='TH1D', - path='L1Trigger', - xbins=200,xmin=0,xmax=1000e3) - - myGroup_lv1Trigger.defineHistogram('muEtaDen,muPhiDen;L1TriggerEffDen', - type='TH2D', - title='L1 Trigger Efficiency Denominator;#eta;#phi;NMuon', - path='L1Trigger', - xbins=42,xmin=-1.05, xmax=1.05, - ybins=32,ymin=-3.1415926,ymax=3.1415926) - - lv1Triggers = [str(k) for k in range(1, 6+1)] - array_triggerThr = helper.addArray([lv1Triggers], Lv1AnaAlg, 'RPCLv1AnaAlg', 'Muon/MuonRawDataMonitoring/RPC') - - array_triggerThr.defineHistogram('passTrigger,muPt;L1TriggerEff_muPt', - title='L1 Trigger Threshold{0} Efficiency;Pt[MeV];#epsilon Thr{0}', - type='TEfficiency', - path='L1Trigger', - xbins=10, xmin=0.0, xmax=80.0e3) - - array_triggerThr.defineHistogram('passTrigger,muEta;L1TriggerEff_muEta', - title='L1 Trigger Threshold{0} Efficiency;#eta;#epsilon Thr{0}', - type='TEfficiency', - path='L1Trigger', - xbins=42,xmin=-1.05, xmax=1.05) - - array_triggerThr.defineHistogram('passTrigger,muPhi;L1TriggerEff_muPhi', - title='L1 Trigger Threshold{0} Efficiency;#phi;#epsilon Thr{0}', - type='TEfficiency', - path='L1Trigger', - xbins=32,xmin=-3.1415926,xmax=3.1415926) - - array_triggerThr.defineHistogram('muEta,muPhi;L1TriggerEffNum', - type='TH2D', - title='L1 Trigger Efficiency numerator;#eta;#phi;NMuon Thr{0}', - path='L1Trigger', - xbins=42,xmin=-1.05, xmax=1.05, - ybins=32,ymin=-3.1415926,ymax=3.1415926) - - array_triggerThr.defineHistogram('passTrigger,muEta,muPhi;L1TriggerEff_eta_phi', - title='L1 Trigger Threshold{0} Efficiency;#eta;#phi;#epsilon Thr{0}', - type='TEfficiency', - path='L1Trigger', - xbins=42,xmin=-1.05, xmax=1.05, - ybins=32,ymin=-3.1415926,ymax=3.1415926) + RPCLv1AnaAlg = CompFactory.RPCLv1AnaAlg + + Lv1AnaAlg = helper.addAlgorithm(RPCLv1AnaAlg, "RPCLv1AnaAlgAlg") + # Lv1AnaAlg.TriggerChain = 'HLT_mu26_ivarmedium' + + if not inputFlags.DQ.triggerDataAvailable: + Lv1AnaAlg.MuonRoIContainerName = '' + + myGroup_lv1Trigger = helper.addGroup(Lv1AnaAlg, 'RPCLv1AnaAlg', 'Muon/MuonRawDataMonitoring/RPC/') + + myGroup_lv1Trigger.defineHistogram('nMu;NMuon', + title='Number of Muons;nMuons;Events', + type='TH1I', + path='PlotCand', + xbins=10,xmin=-0.5,xmax=9.5) + myGroup_lv1Trigger.defineHistogram('nMuBarrel;NMuonBarrel', + title='Number of Barrel Muons;nMuons;Events', + type='TH1I', + path='PlotCand', + xbins=5,xmin=-0.5,xmax=4.5) + + myGroup_lv1Trigger.defineHistogram('muPt_full;MuonPt_full', + title='barrel and endcap muon Pt;Pt[MeV];NMuon', + type='TH1D', + path='PlotCand', + xbins=200,xmin=0,xmax=1000e3) + + myGroup_lv1Trigger.defineHistogram('roiEta;roiEta', + title='roi eta;roi #eta;rois', + type='TH1D', + path='PlotCand', + xbins=50,xmin=-2.5,xmax=2.5) + + myGroup_lv1Trigger.defineHistogram('roiBarrelEta;roiBarrelEta', + title='Barrel roi eta;roi #eta;rois', + type='TH1D', + path='PlotCand', + xbins=50,xmin=-2.5,xmax=2.5) + + myGroup_lv1Trigger.defineHistogram('roiBarrelThr;roiBarrelThrs', + title='Barrel roi threshold;roi threshold;rois', + type='TH1I', + path='PlotCand', + xbins=6,xmin=0.5,xmax=6.5) + + myGroup_lv1Trigger.defineHistogram('nMuBarrel_medium;NMuonBarrel_medium', + title='Number of Barrel Medium Muons;nMuons;Events', + type='TH1I', + path='L1Trigger', + xbins=5,xmin=-0.5,xmax=4.5) + + myGroup_lv1Trigger.defineHistogram('muPtDen;MuonPt', + title='Barrel Muon Pt;Pt[MeV];NMuon', + type='TH1D', + path='L1Trigger', + xbins=200,xmin=0,xmax=1000e3) + + myGroup_lv1Trigger.defineHistogram('muEtaDen,muPhiDen;L1TriggerEffDen', + type='TH2D', + title='L1 Trigger Efficiency Denominator;#eta;#phi;NMuon', + path='L1Trigger', + xbins=42,xmin=-1.05, xmax=1.05, + ybins=32,ymin=-3.1415926,ymax=3.1415926) + + lv1Triggers = [str(k) for k in range(1, 6+1)] + array_triggerThr = helper.addArray([lv1Triggers], Lv1AnaAlg, 'RPCLv1AnaAlg', 'Muon/MuonRawDataMonitoring/RPC') + + array_triggerThr.defineHistogram('passTrigger,muPt;L1TriggerEff_muPt', + title='L1 Trigger Threshold{0} Efficiency;Pt[MeV];#epsilon Thr{0}', + type='TEfficiency', + path='L1Trigger', + xbins=10, xmin=0.0, xmax=80.0e3) + + array_triggerThr.defineHistogram('passTrigger,muEta;L1TriggerEff_muEta', + title='L1 Trigger Threshold{0} Efficiency;#eta;#epsilon Thr{0}', + type='TEfficiency', + path='L1Trigger', + xbins=42,xmin=-1.05, xmax=1.05) + + array_triggerThr.defineHistogram('passTrigger,muPhi;L1TriggerEff_muPhi', + title='L1 Trigger Threshold{0} Efficiency;#phi;#epsilon Thr{0}', + type='TEfficiency', + path='L1Trigger', + xbins=32,xmin=-3.1415926,xmax=3.1415926) + + array_triggerThr.defineHistogram('muEta,muPhi;L1TriggerEffNum', + type='TH2D', + title='L1 Trigger Efficiency numerator;#eta;#phi;NMuon Thr{0}', + path='L1Trigger', + xbins=42,xmin=-1.05, xmax=1.05, + ybins=32,ymin=-3.1415926,ymax=3.1415926) + + array_triggerThr.defineHistogram('passTrigger,muEta,muPhi;L1TriggerEff_eta_phi', + title='L1 Trigger Threshold{0} Efficiency;#eta;#phi;#epsilon Thr{0}', + type='TEfficiency', + path='L1Trigger', + xbins=42,xmin=-1.05, xmax=1.05, + ybins=32,ymin=-3.1415926,ymax=3.1415926) result.merge(helper.result()) print(" RpcMonitorAlgorithm END !") diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/share/CommonConfig_RpcRawDataMonitoring.py b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/share/CommonConfig_RpcRawDataMonitoring.py deleted file mode 100644 index f8fdbc871d283d727446f4db9bf20052e173f1c6..0000000000000000000000000000000000000000 --- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/share/CommonConfig_RpcRawDataMonitoring.py +++ /dev/null @@ -1,85 +0,0 @@ -#-------------------------------------------------------------- -# Configure algorithm. -#-------------------------------------------------------------- - -# setup trigger config -from RecExConfig.RecFlags import rec -rec.doTrigger=True - -from RecExConfig.RecAlgsFlags import recAlgs -recAlgs.doTrigger=True - -from TriggerJobOpts.TriggerFlags import TriggerFlags -TriggerFlags.doTriggerConfigOnly=True - -# read ESD and don't write anything -rec.readESD=True -rec.doWriteAOD=False -rec.doWriteESD=False -rec.doWriteTAG=False -rec.doAOD=False -rec.doDPD=False -rec.doESD=False -doTAG=False - -# switch off as much as possible -rec.doTruth=False -rec.doRecoTiming=False -# rec.doDetStatus=True -rec.doShowSizeStatistics=False -rec.readTAG=False -rec.readRDO=False -rec.doHist=False -rec.doContainerRemapping=False -rec.doJiveXML=False -rec.doEdmMonitor=False -rec.doDumpPoolInputContent=False -rec.doHeavyIon=False -rec.doHIP=False -rec.doWriteBS=False -rec.doPhysValMonHists=False -rec.doVP1=False -rec.doJiveXML=False -rec.doCheckDictionary=False -rec.doFileMetaData=False -rec.doAODCaloCells=False -recAlgs.doAtlfast=False -recAlgs.doMonteCarloReact=False -rec.doEgamma=False -rec.CBNTAthenaAware=False -rec.doAODSelect=False -rec.doWritexAOD=False -rec.doPerfMon=False -rec.doTagRawSummary=False -rec.doBTagging=False -rec.doSemiDetailedPerfMon=False -rec.doAODall=False -rec.doTau=False -rec.doJetMissingETTag=False -recAlgs.doCaloTrkMuId=False -recAlgs.doEFlow=False -recAlgs.doMissingET=False -recAlgs.doMuGirl=False -recAlgs.doMuTag=False -recAlgs.doMuonIDCombined=False -recAlgs.doMuonIDStandAlone=False -recAlgs.doStaco=False -recAlgs.doTileMuID=False -recAlgs.doTrackParticleCellAssociation=False -recAlgs.doTrackRecordFilter=False - -from AthenaCommon.DetFlags import DetFlags -DetFlags.detdescr.all_setOn() -# -# TGC CABLING -##from MuonCablingServers.MuonCablingServersConf import TGCcablingServerSvc -##ServiceMgr += TGCcablingServerSvc() -##theApp.CreateSvc += [ "TGCcablingServerSvc" ] -##ServiceMgr.TGCcablingServerSvc.Atlas=True -##ServiceMgr.TGCcablingServerSvc.forcedUse=True -##ServiceMgr.TGCcablingServerSvc.useMuonTGC_CablingSvc=True -##from TGC_CondCabling.TGC_CondCablingConf import TGCCablingDbTool -##ToolSvc += TGCCablingDbTool() -##from IOVDbSvc.CondDB import conddb -##conddb.addFolderSplitMC('TGC','/TGC/CABLING/MAP_SCHEMA','/TGC/CABLING/MAP_SCHEMA') - diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/share/esd2RpcMon_data_withGRL_triggerSel.py b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/share/esd2RpcMon_data_withGRL_triggerSel.py deleted file mode 100644 index 4636bbcfe50b3487b0bfc34e3c2b34d852a55054..0000000000000000000000000000000000000000 --- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/share/esd2RpcMon_data_withGRL_triggerSel.py +++ /dev/null @@ -1,234 +0,0 @@ -#example of personal topOptions -# -# in 20.1.5.12 for run00272531f611 -# run with athena.py esd2RpcMon_fromMyTopOptions.py > log_esd2RpcMon_fromMyTopOptions & -# -# to use it -# RecExCommon_links.sh # once in a given directory -# athena >! athena.log -# ( myTopOptions.py is defaulted through jobOptions.py soft link) -# -# see RecExCommon/share/RecExCommon_flags.py for more available flags -# and https://twiki.cern.ch/twiki/bin/view/Atlas/RecExCommonFlags -# for more complete documentation. -# - -from AthenaCommon.AthenaCommonFlags import athenaCommonFlags -from RecExConfig.RecFlags import rec -from RecExConfig.RecAlgsFlags import recAlgs -from InDetRecExample.InDetJobProperties import InDetFlags -InDetFlags.doSecVertexFinder.set_Value_and_Lock(False) - -#set input file. Note that this triggers autoconfiguration automatically (see RecExCommonAutoConfiguration wiki) -# here a MC RDO is specified, but this can also be a data BS, an ESD AOD or TAG -#if athenaCommonFlags.FilesInput.isDefault(): # check if not already set upstream -# athenaCommonFlags.FilesInput=["LFN:top_GEO-02-01-00_RDO_extract.pool"] - -# input is DESDM_MCP -athenaCommonFlags.FilesInput=["/einstein2/stefania/atlas/RunII_rpc/Perf/test/data15_13TeV.00281411.physics_Main.merge.DESDM_MCP.f629_m1508._0460.1"] -#athenaCommonFlags.FilesInput=["/tmp/stefspa/esdMuons100_trf.pool.root"] -#athenaCommonFlags.FilesInput=["/tmp/stefspa/esdGeantino100k_trf.pool.root"] -#athenaCommonFlags.FilesInput=["/tmp/stefspa/esdFromMaxRecoGeantino.pool.root"] -#athenaCommonFlags.FilesInput=["/tmp/stefspa/esd.pool.root"] -#athenaCommonFlags.FilesInput=["/afs/cern.ch/user/s/stefspa/atlas/SW/RPCdigTest/runtrf/ESD.pool.root"] -#athenaCommonFlags.FilesInput=["/afs/cern.ch/work/s/stefspa/ESD_GeantinoHits_test125k_condRun00281411.pool.root"] -#athenaCommonFlags.FilesInput=["/afs/cern.ch/work/s/stefspa/ESD_GeantinoHits_test100kFixed_avEffStep5.pool.root"] -#athenaCommonFlags.FilesInput=["/afs/cern.ch/user/s/stefspa/myAfsLinks/stefspaWork/group.det-muon.147407.PowhegPythia8.e3099_s2621.rel201411.RPCDigi010514.nomod.20150930.v01_EXT0/group.det-muon.6582837.EXT0._001189.ESD.pool.root"] -#athenaCommonFlags.FilesInput=["/afs/cern.ch/user/s/stefspa/atlas/SW/RPCdigTest/run/tryDigPrdOnly/restart/try/ESD.pool.root"] -#"root://eosatlas.cern.ch//eos/atlas/atlastier0/rucio/data15_13TeV/physics_Main/00278734/data15_13TeV.00278734.physics_Main.recon.ESD.f628/data15_13TeV.00278734.physics_Main.recon.ESD.f628._lb0005._SFO-6._0001_003.1"] -# -#/eos/atlas/atlastier0/rucio/data15_13TeV/physics_Main/00272531/data15_13TeV.00272531.physics_Main.merge.DESDM_MCP.f611_m1467/data15_13TeV.00272531.physics_Main.merge.DESDM_MCP.f611_m1467._0011.1"] -#athenaCommonFlags.FilesInput=["/tmp/stefspa/testCrash/group.det-muon.147407.PowhegPythia8.e3099_s2621.rel201411.RPCDigi010512.Only.20150913.v01_EXT0.42808390/group.det-muon.6472803.EXT0._001141.ESD.pool.root"] - -# input is ESD !! -#athenaCommonFlags.FilesInput=["root://eosatlas.cern.ch//eos/atlas/atlastier0/rucio/data15_13TeV/physics_Main/00272531/data15_13TeV.00272531.physics_Main.recon.ESD.f611/data15_13TeV.00272531.physics_Main.recon.ESD.f611._lb0130._SFO-6._0001._003.1"] -## -# -#/eos/atlas/atlastier0/rucio/data15_comm/physics_Main/00273391/data15_comm.00273391.physics_Main.recon.ESD.f611/data15_comm.00273391.physics_Main.recon.ESD.f611._lb0820._SFO-6._0001._003.1"] -# -#"root://eosatlas.cern.ch//eos/atlas/atlastier0/rucio/data15_cos/physics_CosmicMuons/00274784/data15_cos.00274784.physics_CosmicMuons.recon.ESD.x345/data15_cos.00274784.physics_CosmicMuons.recon.ESD.x345._lb0439._SFO-ALL._0001_000.1"] -# -#"root://eosatlas.cern.ch//eos/atlas/atlastier0/rucio/data15_13TeV/physics_Main/00271595/data15_13TeV.00271595.physics_Main.merge.DESDM_MCP.f611_m1467/data15_13TeV.00271595.physics_Main.merge.DESDM_MCP.f611_m1467._0074.1"] -# -#root://eosatlas.cern.ch//eos/atlas/atlastier0/rucio/data15_comm/physics_Main/00266766/data15_comm.00266766.physics_Main.recon.ESD.f594/data15_comm.00266766.physics_Main.recon.ESD.f594._lb0017._SFO-ALL._0001.1"]#/eos/atlas/atlastier0/rucio/data15_comm/physics_Main/00265573/data15_comm.00265573.physics_Main.recon.ESD.f581/data15_comm.00265573.physics_Main.recon.ESD.f581._lb0175._SFO-ALL._0001.1"] - -#athenaCommonFlags.jp.AthenaCommonFlags.EvtMax=-1 # number of events to process run on all file -#athenaCommonFlags.EvtMax=200000 # number of events to process run on all file -#athenaCommonFlags.EvtMax=-1 # number of events to process run on all File -athenaCommonFlags.EvtMax=1000 # number of events to process run on all file - - -rec.doTrigger=True -from TriggerJobOpts.TriggerFlags import TriggerFlags -TriggerFlags.doTriggerConfigOnly=True -## set up trigger decision tool -from TrigDecisionTool.TrigDecisionToolConf import Trig__TrigDecisionTool -tdt = Trig__TrigDecisionTool("TrigDecisionTool") -ToolSvc += tdt -tdt.OutputLevel = INFO - - - -# switch off writing of standard reco output -rec.doWriteAOD=False -rec.doWritexAOD=False -rec.doWriteESD=False -rec.doWriteTAG=False -rec.doFileMetaData=False - -rec.doAOD=False -rec.doESD=False -rec.doAODCaloCells=False -rec.doAODall=False -rec.doDPD=False - - -# switch off detectors -rec.doForwardDet=False -# rec.doInDet=False # this will generate a meaningless FATAL error -rec.doCalo=False -# rec.doMuon=False -rec.doEgamma=False -rec.doJetMissingETTag=False -rec.doTau=False -rec.doBTagging=False -rec.doTagRawSummary=False -rec.doLucid=False -rec.doMuonCombined=False -rec.doTruth=False - -# ** Turn PerfMon off for valgrind usage ** -rec.doPerfMon.set_Value_and_Lock(False) -rec.doDetailedPerfMon.set_Value_and_Lock(False) -rec.doSemiDetailedPerfMon.set_Value_and_Lock(False) -#rec.doNameAuditor=True -rec.doNameAuditor=False - - - -# include my own algorithm(s). These jobo will be included at the end of topSequence configuration -# rec.UserAlgs=[ "MyPackage/MyAlgorithm_jobOptions.py" ] -# these lines will be executed at the end of topSequence configuration -# rec.UserExecs=[ "from MyPackage.myAlgConf import myAlg","topSequence+=myAlg()" ] -# these lines will be executed after RecExCommon_flags.py has been imported, last chance for flag modification -# note that flag locking mechanism has a better chance to yield consistent configuration -# see https://twiki.cern.ch/twiki/bin/view/Atlas/TriggerFlags -# see https://twiki.cern.ch/twiki/bin/view/Atlas/UserAnalysisTest#The_AOD_Production_Flags -# rec.UserFlags=[ "AODFlags.FastSimulation=False" ] - - -# autoconfiguration might trigger undesired feature -# rec.doESD.set_Value_and_Lock(False) # uncomment if do not run ESD making algorithms -# rec.doWriteESD.set_Value_and_Lock(False) # uncomment if do not write ESD -# rec.doAOD.set_Value_and_Lock(False) # uncomment if do not run AOD making algorithms -# rec.doWriteAOD.set_Value_and_Lock(False) # uncomment if do not write AOD -# rec.doWriteTAG.set_Value_and_Lock(False) # uncomment if do not write TAG -#rec.doDumpTES=True - -rec.doMonitoring.set_Value_and_Lock(True) -from AthenaMonitoring.DQMonFlags import DQMonFlags -DQMonFlags.monManEnvironment.set_Value_and_Lock('tier0ESD')#produces run directories -#DQMonFlags.monManEnvironment.set_Value_and_Lock('user')#doesn't produce run directories - -DQMonFlags.doInDetAlignMon.set_Value_and_Lock(False) -#disable all monitoring other than alignment (too susceptible to crashes) -DQMonFlags.doPixelMon.set_Value_and_Lock(False) -DQMonFlags.doSCTMon.set_Value_and_Lock(False) -DQMonFlags.doTRTMon.set_Value_and_Lock(False) -DQMonFlags.doInDetGlobalMon.set_Value_and_Lock(False) -DQMonFlags.doGlobalMon.set_Value_and_Lock(False) -DQMonFlags.doLVL1CaloMon.set_Value_and_Lock(False) -DQMonFlags.doCTPMon.set_Value_and_Lock(False) -DQMonFlags.doHLTMon.set_Value_and_Lock(False) -DQMonFlags.doTRTElectronMon.set_Value_and_Lock(False) -DQMonFlags.doTileMon.set_Value_and_Lock(False) -DQMonFlags.doLArMon.set_Value_and_Lock(False) -DQMonFlags.doCaloMon.set_Value_and_Lock(False) -DQMonFlags.doEgammaMon.set_Value_and_Lock(False) -DQMonFlags.doMissingEtMon.set_Value_and_Lock(False) -DQMonFlags.doJetMon.set_Value_and_Lock(False) -DQMonFlags.doTauMon.set_Value_and_Lock(False) -DQMonFlags.doJetTagMon.set_Value_and_Lock(False) -DQMonFlags.doLucidMon.set_Value_and_Lock(False) -DQMonFlags.doInDetPerfMon.set_Value_and_Lock(False) -# muon monitoring -DQMonFlags.doMuonSegmentMon.set_Value_and_Lock(False) -DQMonFlags.doMuonTrackMon.set_Value_and_Lock(False) -DQMonFlags.doMuonAlignMon.set_Value_and_Lock(False) -DQMonFlags.doMuonPhysicsMon.set_Value_and_Lock(False) -DQMonFlags.doMuonTrkPhysMon.set_Value_and_Lock(False) -DQMonFlags.doMuonCombinedMon.set_Value_and_Lock(False) -# muon raw monitoring -DQMonFlags.doMuonRawMon.set_Value_and_Lock(True) -# muon raw monitoring - all det off but RPC and RPCL1 -from MuonDQAMonFlags.MuonDQAProperFlags import MuonDQADetFlags -MuonDQADetFlags.doMDTMon.set_Value_and_Lock(False) -MuonDQADetFlags.doCSCMon.set_Value_and_Lock(False) -MuonDQADetFlags.doTGCMon.set_Value_and_Lock(False) -MuonDQADetFlags.doMDTRPCMon.set_Value_and_Lock(False) -MuonDQADetFlags.doMDTTGCL1Mon.set_Value_and_Lock(False) -MuonDQADetFlags.doTGCL1Mon.set_Value_and_Lock(False) -# -MuonDQADetFlags.doRPCMon.set_Value_and_Lock(True) -MuonDQADetFlags.doRPCL1Mon.set_Value_and_Lock(True) - - -############### -### try here GRL selection -# Configure the goodrunslist selector tool -from GoodRunsLists.GoodRunsListsConf import * -ToolSvc += GoodRunsListSelectorTool() -GoodRunsListSelectorTool.GoodRunsListVec = [ 'data15_13TeV.periodAllYear_DetStatus-v71-pro19-06_DQDefects-00-01-02_PHYS_StandardGRL_All_Good_25ns.xml' ] -GoodRunsListSelectorTool.PassThrough = False -## This Athena job consists of algorithms that loop over events; -## here, the (default) top sequence is used: -from AthenaCommon.AlgSequence import AlgSequence, AthSequencer -#job = AlgSequence() -seq = AthSequencer("AthMasterSeq") -## AthMasterSeq is always executed before the top sequence, and is configured such that -## any follow-up sequence (eg. top sequence) is not executed in case GRLTriggerAlg1 does -## not pass the event -## In short, the sequence AthMasterSeq makes sure that all algs in the job sequence -## are skipped when an event gets rejects -from GoodRunsListsUser.GoodRunsListsUserConf import * -seq += GRLTriggerSelectorAlg('GRLTriggerAlg1') -seq.GRLTriggerAlg1.GoodRunsListArray = ['PHYS_StandardGRL_All_Good_25ns'] ## pick up correct name from inside xml file! -#seq.GRLTriggerAlg1.TriggerSelectionRegistration = 'L1_MBTS_1' ## set this to your favorite trigger, eg. L1_MBTS_1_1 -#seq.GRLTriggerAlg1.OutputLevel=DEBUG -############### - - -# main jobOption -include ("RecExCommon/RecExCommon_topOptions.py") - - -# user modifier of properties should come here -#topSequence.myAlg.someProperty=3.14 -# -#from GeoModelSvc.GeoModelSvcConf import GeoModelSvc -#GeoModelSvc = GeoModelSvc() -#GeoModelSvc.IgnoreTagDifference=True -# -from RpcRawDataMonitoring.RpcRawDataMonitoringConf import RpcRawDataValAlg -# the following true to have strip profiles -RpcRawDataValAlg.doCoolDB = True -# -from RpcRawDataMonitoring.RpcRawDataMonitoringConf import RPCStandaloneTracksMon -# the following true to have tomography -# RPCStandaloneTracksMon.doRadiography = True -# the following true to have per strip timing and efficiency -RPCStandaloneTracksMon.doCoolDB = True -RPCStandaloneTracksMon.StandAloneMatchedWithTrack = True -RPCStandaloneTracksMon.selectTriggerChainGroup = True -RPCStandaloneTracksMon.deSelectTriggerChainGroup = False -#RPCStandaloneTracksMon.OutputLevel=DEBUG -#to select HLT muon triggers ------------------------------ -#RPCStandaloneTracksMon.triggerChainGroupRegExp='HLT_mu.*' -#to select ortogonal (to muons) triggers ------------------------------ -RPCStandaloneTracksMon.triggerChainGroupRegExp='HLT_(e[0-9]*_loose_L1EM[0-9]*|e[0-9]*_lhmedium_L1EM[0-9]*VH|g[0-9]*_loose|2g[0-9]*_tight|tau[0-9]*_medium1_tracktwo|j[0-9]*_320eta490|j[0-9]*|[0-9]j[0-9]*|xe[0-9]*|j[0-9]*_xe[0-9]*|j[0-9]*_bmedium_split|j[0-9]*_bloose_split)' - - -#svcMgr.MessageSvc.OutputLevel=VERBOSE -svcMgr.MessageSvc.defaultLimit=9999999 -#RPCStandaloneTracksMon.OutputLevel=DEBUG - diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/share/runHLTEMPTY_jobOptions.py b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/share/runHLTEMPTY_jobOptions.py deleted file mode 100644 index 77eb9f59b2db07e4fef66ac40dabeec738764dcd..0000000000000000000000000000000000000000 --- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/share/runHLTEMPTY_jobOptions.py +++ /dev/null @@ -1,110 +0,0 @@ -############################################################################################################ -### Input stream -############################################################################################################ -from AthenaCommon.AthenaCommonFlags import athenaCommonFlags - -import RpcRawDataMonitoring.RpcOccupancy_Config as AthRead # python/RpcOccupancy_Config - -import os - -if 'EvtMax' in dir(): - athenaCommonFlags.EvtMax = EvtMax -else: - athenaCommonFlags.EvtMax = -1 - -file_list = [] -if os.path.exists('input.txt'): - infile = open('input.txt', "r") - file_list = infile.readlines() - file_list = [ filename.strip() for filename in file_list ] - print "read files path from input.txt ." - print "files paths: \n", file_list -else: - file_list = ['/eos/atlas/atlascerngroupdisk/det-rpc/data/DESDM_MCP/data18_13TeV.00358615.physics_Main.merge.DESDM_MCP.f961_m2024/data18_13TeV.00358615.physics_Main.merge.DESDM_MCP.f961_m2024._0967.1'] - print "file input.txt does not exist" - print "files paths: \n", file_list - - -# athenaCommonFlags.FilesInput = ['/eos/atlas/atlascerngroupdisk/det-rpc/data/DESDM_MCP/data18_13TeV.00358615.physics_Main.merge.DESDM_MCP.f961_m2024/data18_13TeV.00358615.physics_Main.merge.DESDM_MCP.f961_m2024._0084.1'] -athenaCommonFlags.FilesInput = file_list - -if 'outfile' not in dir(): - outfile = 'rpcmon_HLTEMPTY' - -print '======================================================================' -print 'Output file name: %s\n' %(outfile+".root") -print '======================================================================' - -############################################################################################################ -### Configure tools and services -############################################################################################################ - -if 'writeGeo' not in dir(): - writeGeo = False - -if 'writeIDTracks' not in dir(): - writeIDTracks = True - -#-------------------------------------------------------------------------------------- -# Include and configure RecExCommon -# -include('RpcRawDataMonitoring/CommonConfig_RpcRawDataMonitoring.py') - -include('RecExCommon/RecExCommon_topOptions.py') - -#-------------------------------------------------------------------------------------- -# Must setup cabling services AFTER RecExCommon -# -import MuonCnvExample.MuonCablingConfig -import MuonRPC_Cabling.MuonRPC_CablingConfig - -#-------------------------------------------------------------------------------------- -# Configure region selector tools -# -from RegionSelector.RegSelSvcDefault import RegSelSvcDefault -theRegSelSvc = RegSelSvcDefault() -theRegSelSvc.enableMuon = True -theRegSelSvc.enableMDT = False -theRegSelSvc.enableCSC = False -theRegSelSvc.enableTGC = False -theRegSelSvc.enableRPC = True -ServiceMgr += theRegSelSvc - -#-------------------------------------------------------------------------------------- -# Set output using thistsvc -# -from GaudiSvc.GaudiSvcConf import THistSvc -svcMgr += THistSvc() -svcMgr.THistSvc.Output += [outfile+" DATAFILE='%s' OPT='RECREATE'" %(outfile+".root")] - -svcMgr.MessageSvc.OutputLevel = INFO -svcMgr.MessageSvc.infoLimit = 0 - -#-------------------------------------------------------------------------------------- -# Configure algorithm sequence -# -from AthenaCommon.AlgSequence import AlgSequence -job = AlgSequence() - -trig_decision_tool = CfgMgr.Trig__TrigDecisionTool('TrigDecisionTool', TrigDecisionKey = 'xTrigDecision') -ToolSvc += trig_decision_tool - -job += AthRead.histos_HLT_EMPTY(CfgMgr, outfile) - - -#-------------------------------------------------------------------------------------- -# Print debug info -print "if ServiceMgr==svcMgr: ", ServiceMgr==svcMgr - - -if 'debug' in dir(): - print ToolSvc - print "ServiceMgr --------" - print ServiceMgr - print "svcMgr ------------" - print svcMgr.MessageSvc - -if 'dumpSG' in dir(): - StoreGateSvc = Service('StoreGateSvc') - StoreGateSvc.Dump = dumpSG - diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/share/runHLTMU26_jobOptions.py b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/share/runHLTMU26_jobOptions.py deleted file mode 100644 index 341a6661de96d9b9740888ac6a4cb755493de086..0000000000000000000000000000000000000000 --- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/share/runHLTMU26_jobOptions.py +++ /dev/null @@ -1,110 +0,0 @@ -############################################################################################################ -### Input stream -############################################################################################################ -from AthenaCommon.AthenaCommonFlags import athenaCommonFlags - -import RpcRawDataMonitoring.RpcOccupancy_Config as AthRead # python/RpcOccupancy_Config - -import os - -if 'EvtMax' in dir(): - athenaCommonFlags.EvtMax = EvtMax -else: - athenaCommonFlags.EvtMax = -1 - -file_list = [] -if os.path.exists('input.txt'): - infile = open('input.txt', "r") - file_list = infile.readlines() - file_list = [ filename.strip() for filename in file_list ] - print "read files path from input.txt ." - print "files paths: \n", file_list -else: - file_list = ['/eos/atlas/atlascerngroupdisk/det-rpc/data/DESDM_MCP/data18_13TeV.00358615.physics_Main.merge.DESDM_MCP.f961_m2024/data18_13TeV.00358615.physics_Main.merge.DESDM_MCP.f961_m2024._0967.1'] - print "file input.txt does not exist" - print "files paths: \n", file_list - - -# athenaCommonFlags.FilesInput = ['/eos/atlas/atlascerngroupdisk/det-rpc/data/DESDM_MCP/data18_13TeV.00358615.physics_Main.merge.DESDM_MCP.f961_m2024/data18_13TeV.00358615.physics_Main.merge.DESDM_MCP.f961_m2024._0084.1'] -athenaCommonFlags.FilesInput = file_list - -if 'outfile' not in dir(): - outfile = 'rpcmon_HLTMU26' - -print '======================================================================' -print 'Output file name: %s\n' %(outfile+".root") -print '======================================================================' - -############################################################################################################ -### Configure tools and services -############################################################################################################ - -if 'writeGeo' not in dir(): - writeGeo = False - -if 'writeIDTracks' not in dir(): - writeIDTracks = True - -#-------------------------------------------------------------------------------------- -# Include and configure RecExCommon -# -include('RpcRawDataMonitoring/CommonConfig_RpcRawDataMonitoring.py') - -include('RecExCommon/RecExCommon_topOptions.py') - -#-------------------------------------------------------------------------------------- -# Must setup cabling services AFTER RecExCommon -# -import MuonCnvExample.MuonCablingConfig -import MuonRPC_Cabling.MuonRPC_CablingConfig - -#-------------------------------------------------------------------------------------- -# Configure region selector tools -# -from RegionSelector.RegSelSvcDefault import RegSelSvcDefault -theRegSelSvc = RegSelSvcDefault() -theRegSelSvc.enableMuon = True -theRegSelSvc.enableMDT = False -theRegSelSvc.enableCSC = False -theRegSelSvc.enableTGC = False -theRegSelSvc.enableRPC = True -ServiceMgr += theRegSelSvc - -#-------------------------------------------------------------------------------------- -# Set output using thistsvc -# -from GaudiSvc.GaudiSvcConf import THistSvc -svcMgr += THistSvc() -svcMgr.THistSvc.Output += [outfile+" DATAFILE='%s' OPT='RECREATE'" %(outfile+".root")] - -svcMgr.MessageSvc.OutputLevel = INFO -svcMgr.MessageSvc.infoLimit = 0 - -#-------------------------------------------------------------------------------------- -# Configure algorithm sequence -# -from AthenaCommon.AlgSequence import AlgSequence -job = AlgSequence() - -trig_decision_tool = CfgMgr.Trig__TrigDecisionTool('TrigDecisionTool', TrigDecisionKey = 'xTrigDecision') -ToolSvc += trig_decision_tool - -job += AthRead.histos_HLT_MU26(CfgMgr, outfile) - - -#-------------------------------------------------------------------------------------- -# Print debug info -print "if ServiceMgr==svcMgr: ", ServiceMgr==svcMgr - - -if 'debug' in dir(): - print ToolSvc - print "ServiceMgr --------" - print ServiceMgr - print "svcMgr ------------" - print svcMgr.MessageSvc - -if 'dumpSG' in dir(): - StoreGateSvc = Service('StoreGateSvc') - StoreGateSvc.Dump = dumpSG - diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/share/runNoHLT_jobOptions.py b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/share/runNoHLT_jobOptions.py deleted file mode 100644 index cc8d2562eaee0cd5f580e6cf5561e678819f0618..0000000000000000000000000000000000000000 --- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/share/runNoHLT_jobOptions.py +++ /dev/null @@ -1,119 +0,0 @@ -############################################################################################################ -### Input stream -############################################################################################################ -from AthenaCommon.AthenaCommonFlags import athenaCommonFlags - -import RpcRawDataMonitoring.RpcOccupancy_Config as AthRead # python/RpcOccupancy_Config - -import os - -if 'EvtMax' in dir(): - athenaCommonFlags.EvtMax = EvtMax -else: - athenaCommonFlags.EvtMax = -1 - -file_list = [] -if os.path.exists('input.txt'): - infile = open('input.txt', "r") - file_list = infile.readlines() - file_list = [ filename.strip() for filename in file_list ] - print "read files path from input.txt ." - print "files paths: \n", file_list -else: - file_list = ['/eos/atlas/atlascerngroupdisk/det-rpc/data/DESDM_MCP/data18_13TeV.00358615.physics_Main.merge.DESDM_MCP.f961_m2024/data18_13TeV.00358615.physics_Main.merge.DESDM_MCP.f961_m2024._0967.1'] - print "file input.txt does not exist" - print "files paths: \n", file_list - - -# athenaCommonFlags.FilesInput = ['/eos/atlas/atlascerngroupdisk/det-rpc/data/DESDM_MCP/data18_13TeV.00358615.physics_Main.merge.DESDM_MCP.f961_m2024/data18_13TeV.00358615.physics_Main.merge.DESDM_MCP.f961_m2024._0084.1'] -athenaCommonFlags.FilesInput = file_list - -if 'outfile' not in dir(): - outfile = 'rpcmon' - -print '======================================================================' -print 'Output file name: %s\n' %(outfile+".root") -print '======================================================================' - -############################################################################################################ -### Configure tools and services -############################################################################################################ - -if 'writeGeo' not in dir(): - writeGeo = False - -if 'writeIDTracks' not in dir(): - writeIDTracks = True - -#-------------------------------------------------------------------------------------- -# Include and configure RecExCommon -# -include('RpcRawDataMonitoring/CommonConfig_RpcRawDataMonitoring.py') - -include('RecExCommon/RecExCommon_topOptions.py') - -#-------------------------------------------------------------------------------------- -# Must setup cabling services AFTER RecExCommon -# -import MuonCnvExample.MuonCablingConfig -import MuonRPC_Cabling.MuonRPC_CablingConfig - -#-------------------------------------------------------------------------------------- -# Configure region selector tools -# -from RegionSelector.RegSelSvcDefault import RegSelSvcDefault -theRegSelSvc = RegSelSvcDefault() -theRegSelSvc.enableMuon = True -theRegSelSvc.enableMDT = False -theRegSelSvc.enableCSC = False -theRegSelSvc.enableTGC = False -theRegSelSvc.enableRPC = True -ServiceMgr += theRegSelSvc - -#-------------------------------------------------------------------------------------- -# Set output using thistsvc -# -from GaudiSvc.GaudiSvcConf import THistSvc -svcMgr += THistSvc() -svcMgr.THistSvc.Output += [outfile+" DATAFILE='%s' OPT='RECREATE'" %(outfile+".root")] - -svcMgr.MessageSvc.OutputLevel = INFO -svcMgr.MessageSvc.infoLimit = 0 - -#-------------------------------------------------------------------------------------- -# Configure algorithm sequence -# -from AthenaCommon.AlgSequence import AlgSequence -job = AlgSequence() - -trig_decision_tool = CfgMgr.Trig__TrigDecisionTool('TrigDecisionTool', TrigDecisionKey = 'xTrigDecision') -ToolSvc += trig_decision_tool - -job += AthRead.histos(CfgMgr, outfile) - - -#-------------------------------------------------------------------------------------- -# Print debug info -print "if ServiceMgr==svcMgr: ", ServiceMgr==svcMgr - -print "Test_____0" -athenaEventLoopMgr = Service('AthenaEventLoopMgr') - -print "Test_____1" -athenaEventLoopMgr.EventPrintoutInterval = 100 -print "Test_____2" - -theApp.ReflexPluginDebugLevel = 10000 -print "Test_____3" - -if 'debug' in dir(): - print ToolSvc - print "ServiceMgr --------" - print ServiceMgr - print "svcMgr ------------" - print svcMgr.MessageSvc - -if 'dumpSG' in dir(): - StoreGateSvc = Service('StoreGateSvc') - StoreGateSvc.Dump = dumpSG - diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/src/RPCLv1AnaAlg.cxx b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/src/RPCLv1AnaAlg.cxx index 084f519d2418e897992e9d564b90c4d0c9c03d58..ff8a73dd17159c1d2edc04ad3489a06c0db53175 100644 --- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/src/RPCLv1AnaAlg.cxx +++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/src/RPCLv1AnaAlg.cxx @@ -27,7 +27,6 @@ StatusCode RPCLv1AnaAlg::initialize() //======================================================================================================== StatusCode RPCLv1AnaAlg::fillHistograms(const EventContext& ctx) const { - using namespace Monitored; auto tool = getGroup(m_packageName); @@ -68,110 +67,114 @@ StatusCode RPCLv1AnaAlg::fillHistograms(const EventContext& ctx) const std::vector<const xAOD::MuonRoI*> roisBarrel; std::vector< std::vector<const xAOD::MuonRoI*> > roisBarrelThr1(6); - SG::ReadHandle<xAOD::MuonRoIContainer> muonRoIs(m_l1RoiContainerKey, ctx); - if(!muonRoIs.isValid()){ - ATH_MSG_ERROR("evtStore() does not contain muon L1 ROI Collection with name "<< m_l1RoiContainerKey); - return StatusCode::FAILURE; - } - + /* raw LVL1MuonRoIs */ + if (!m_l1RoiContainerKey.empty()) { + SG::ReadHandle<xAOD::MuonRoIContainer> muonRoIs(m_l1RoiContainerKey, ctx); - roiEtaVec.reserve(muonRoIs->size()); - roiBarrelEtaVec.reserve(muonRoIs->size()); - roiBarrelThrVec.reserve(muonRoIs->size()); - roisBarrel.reserve(muonRoIs->size()); - for(const auto roi : *muonRoIs) { - roiEtaVec.push_back(roi->eta()); - if(roi->getSource() != xAOD::MuonRoI::RoISource::Barrel) { - continue; + if(!muonRoIs.isValid()){ + ATH_MSG_ERROR("evtStore() does not contain muon L1 ROI Collection with name "<< m_l1RoiContainerKey); + return StatusCode::FAILURE; } - roiBarrelEtaVec.push_back(roi->eta()); - roiBarrelThrVec.push_back(roi->getThrNumber()); - roisBarrel.push_back(roi); - // - // collect roi according to the threshold - // - int thr = roi->getThrNumber(); - for (int i_thr=0;i_thr < thr ;i_thr++){ - roisBarrelThr1[i_thr].push_back(roi); + roiEtaVec.reserve(muonRoIs->size()); + roiBarrelEtaVec.reserve(muonRoIs->size()); + roiBarrelThrVec.reserve(muonRoIs->size()); + roisBarrel.reserve(muonRoIs->size()); + for(const auto roi : *muonRoIs) { + roiEtaVec.push_back(roi->eta()); + if(roi->getSource() != xAOD::MuonRoI::RoISource::Barrel) { + continue; + } + + roiBarrelEtaVec.push_back(roi->eta()); + roiBarrelThrVec.push_back(roi->getThrNumber()); + roisBarrel.push_back(roi); + // + // collect roi according to the threshold + // + int thr = roi->getThrNumber(); + for (int i_thr=0;i_thr < thr ;i_thr++){ + roisBarrelThr1[i_thr].push_back(roi); + } } - } - auto roiEtaCollection = Collection("roiEta", roiEtaVec); - auto roiBarrelEtaCollection = Collection("roiBarrelEta", roiBarrelEtaVec); - auto roiBarrelThrCollection = Collection("roiBarrelThr", roiBarrelThrVec); - fill(tool, roiEtaCollection); - fill(tool, roiBarrelEtaCollection); - fill(tool, roiBarrelThrCollection); + auto roiEtaCollection = Collection("roiEta", roiEtaVec); + auto roiBarrelEtaCollection = Collection("roiBarrelEta", roiBarrelEtaVec); + auto roiBarrelThrCollection = Collection("roiBarrelThr", roiBarrelThrVec); + fill(tool, roiEtaCollection); + fill(tool, roiBarrelEtaCollection); + fill(tool, roiBarrelThrCollection); - // - // match muon and roi - // - muPtDenVec.reserve(muons->size()); - for(const auto muon : *muons) { - double pt = muon->pt(); - double eta = muon->eta(); - double phi = muon->phi(); + // + // match muon and roi + // + muPtDenVec.reserve(muons->size()); + for(const auto muon : *muons) { - xAOD::Muon::Quality quality = muon->quality(); + double pt = muon->pt(); + double eta = muon->eta(); + double phi = muon->phi(); - if(std::abs(pt) < m_minPt || std::abs(eta) < m_minEta || std::abs(eta) > m_maxEta) { - continue; - } - nmuon_barrel ++; + xAOD::Muon::Quality quality = muon->quality(); - if(!(quality <= m_quality)) { - continue; - } - nmuon_barrel_midium ++; + if(std::abs(pt) < m_minPt || std::abs(eta) < m_minEta || std::abs(eta) > m_maxEta) { + continue; + } + nmuon_barrel ++; - // fill numerator - auto i_pt = Scalar<double>("muPt", pt); - auto i_eta = Scalar<double>("muEta", eta); - auto i_etaDen = Scalar<double>("muEtaDen", eta); - auto i_phi = Scalar<double>("muPhi", phi); - auto i_phiDen = Scalar<double>("muPhiDen", phi); - auto i_passTrigger = Scalar<bool>("passTrigger", false); + if(!(quality <= m_quality)) { + continue; + } + nmuon_barrel_midium ++; - for (int i_thr=0;i_thr<6;i_thr++){ - i_passTrigger = false; + // fill numerator + auto i_pt = Scalar<double>("muPt", pt); + auto i_eta = Scalar<double>("muEta", eta); + auto i_etaDen = Scalar<double>("muEtaDen", eta); + auto i_phi = Scalar<double>("muPhi", phi); + auto i_phiDen = Scalar<double>("muPhiDen", phi); + auto i_passTrigger = Scalar<bool>("passTrigger", false); - for(const auto& roi : roisBarrelThr1[i_thr]) { + for (int i_thr=0;i_thr<6;i_thr++){ + i_passTrigger = false; - const double dphi = TVector2::Phi_mpi_pi(roi->phi() - phi); - const double deta = roi->eta() - eta; - const double dr = std::sqrt(dphi*dphi + deta*deta); + for(const auto& roi : roisBarrelThr1[i_thr]) { - if(dr > m_l1trigMatchWindow) { - continue; + const double dphi = TVector2::Phi_mpi_pi(roi->phi() - phi); + const double deta = roi->eta() - eta; + const double dr = std::sqrt(dphi*dphi + deta*deta); + + if(dr > m_l1trigMatchWindow) { + continue; + } + i_passTrigger = true; } - i_passTrigger = true; + + fill(m_tools[m_TriggerThrGroup.at(std::to_string(i_thr+1))], i_pt, i_eta, i_phi, i_passTrigger); } - - fill(m_tools[m_TriggerThrGroup.at(std::to_string(i_thr+1))], i_pt, i_eta, i_phi, i_passTrigger); + + // + // fill denominator + // + muPtDenVec .push_back(muon->pt()); + fill(tool, i_etaDen, i_phiDen); } + auto Nmuon = Scalar<int>("nMu", nmuon); + auto Nmuon_barrel = Scalar<int>("nMuBarrel", nmuon_barrel); + auto Nmuon_barrel_midium = Scalar<int>("nMuBarrel_medium", nmuon_barrel_midium); + + auto muPtCollection = Collection("muPtDen", muPtDenVec); + // - // fill denominator + // Fill histograms // - muPtDenVec .push_back(muon->pt()); - fill(tool, i_etaDen, i_phiDen); + fill(tool, Nmuon, Nmuon_barrel, Nmuon_barrel_midium); + fill(tool, muPtFullCollection); + fill(tool, muPtCollection); } - auto Nmuon = Scalar<int>("nMu", nmuon); - auto Nmuon_barrel = Scalar<int>("nMuBarrel", nmuon_barrel); - auto Nmuon_barrel_midium = Scalar<int>("nMuBarrel_medium", nmuon_barrel_midium); - - auto muPtCollection = Collection("muPtDen", muPtDenVec); - - // - // Fill histograms - // - fill(tool, Nmuon, Nmuon_barrel, Nmuon_barrel_midium); - fill(tool, muPtFullCollection); - fill(tool, muPtCollection); - return StatusCode::SUCCESS; } diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/src/RPCMonitorAlgorithm.cxx b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/src/RPCMonitorAlgorithm.cxx deleted file mode 100644 index e8a183ec2c2df0aa25f9e0dbcb81ccde9c18ea97..0000000000000000000000000000000000000000 --- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/src/RPCMonitorAlgorithm.cxx +++ /dev/null @@ -1,161 +0,0 @@ -/* - Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration -*/ - -#include "RpcRawDataMonitoring/RPCMonitorAlgorithm.h" - -//======================================================================================================== -RPCMonitorAlgorithm::RPCMonitorAlgorithm (const std::string& name, ISvcLocator* pSvcLocator) - :AthMonitorAlgorithm(name,pSvcLocator) -{} - -RPCMonitorAlgorithm::~RPCMonitorAlgorithm() {} - -//======================================================================================================== -StatusCode RPCMonitorAlgorithm::initialize() -{ - ATH_CHECK( m_MuonContainerKey .initialize()); - ATH_CHECK( m_rpcPadContainerKey.initialize()); - ATH_CHECK( m_l1RoiContainerKey .initialize(SG::AllowEmpty)); - - return AthMonitorAlgorithm::initialize(); -} - -//======================================================================================================== -StatusCode RPCMonitorAlgorithm::fillHistograms(const EventContext& ctx) const -{ - using namespace Monitored; - - //Declare the quantities which should be monitored - auto run = Monitored::Scalar<int>("run", 0); - auto nMu = Monitored::Scalar<int>("nMu", 0); - auto nMuBarrel = Monitored::Scalar<int>("nMuBarrel", 0); - - std::vector<double> muPtVec = {}; - std::vector<double> roiEtaVec = {}; - std::vector<double> roiBarrelEtaVec = {}; - - std::vector<int> roiBarrelThrVec = {}; - - ATH_MSG_VERBOSE("Events processed: "<<ctx.evt()); - - run = GetEventInfo(ctx)->runNumber(); - - // - // read muons - // - SG::ReadHandle<xAOD::MuonContainer> muons(m_MuonContainerKey, ctx); - - if(!muons.isValid()) { - ATH_MSG_ERROR("evtStore() does not contain muon Collection with name "<< m_MuonContainerKey); - return StatusCode::FAILURE; - } - - nMu = muons->size(); - - // - // fill muon Pt - // - for(const auto muonItr : *muons) { - muPtVec.push_back(muonItr->pt()); - } - auto muPtCollection = Collection("muPtCollection", muPtVec); - - // - // read rois - // - std::vector<const xAOD::MuonRoI*> roisBarrel; - std::vector<const xAOD::MuonRoI*> roisBarrelThr1; - - if (! m_l1RoiContainerKey.empty()) { - SG::ReadHandle<xAOD::MuonRoIContainer> muonRoIs(m_l1RoiContainerKey, ctx); - if(!muonRoIs.isValid()){ - ATH_MSG_ERROR("evtStore() does not contain muon L1 ROI Collection with name "<< m_l1RoiContainerKey); - return StatusCode::FAILURE; - } - - for(const auto roi : *muonRoIs) { - roiEtaVec.push_back(roi->eta()); - if(roi->getSource() != xAOD::MuonRoI::RoISource::Barrel) { - continue; - } - - roiBarrelEtaVec.push_back(roi->eta()); - roiBarrelThrVec.push_back(roi->getThrNumber()); - roisBarrel.push_back(roi); - // - // collect roi according to the threshold - // - int thr = roi->getThrNumber(); - if(thr >= 1) roisBarrelThr1.push_back(roi); - } - } - auto roiEtaCollection = Collection("roiEtaCollection", roiEtaVec); - auto roiBarrelEtaCollection = Collection("roiBarrelEtaCollection", roiBarrelEtaVec); - auto roiBarrelThrCollection = Collection("roiBarrelThrCollection", roiBarrelThrVec); - - // - // match muon and roi - // - for(const auto muon : *muons) { - - float pt = muon->pt(); - float eta = muon->eta(); - float phi = muon->phi(); - - xAOD::Muon::Quality quality = muon->quality(); - - if(std::abs(pt) < m_minPt || std::abs(eta) < m_minEta || std::abs(eta) > m_maxEta) { - continue; - } - if(!(quality <= m_quality)) { - continue; - } - // to add impact parameter cuts - nMuBarrel++; - // - // to fill denominator - // - auto ptDen = Monitored::Scalar<float>("ptDen", pt); - auto etaDen = Monitored::Scalar<float>("etaDen", eta); - auto phiDen = Monitored::Scalar<float>("phiDen", phi); - auto isPassed = Monitored::Scalar<bool>("isPassed", false); - - for(const auto& roi : roisBarrelThr1) { - - const double dphi = TVector2::Phi_mpi_pi(roi->phi() - phi); - const double deta = roi->eta() - eta; - const double dr = std::sqrt(dphi*dphi + deta*deta); - - if(dr > m_minRoIDR) { - continue; - } - isPassed = true; - } - - fill("RPCMonitorAlgorithm", ptDen, etaDen, phiDen, isPassed); - - if(isPassed) { - auto ptNumThr1 = Monitored::Scalar<float>("ptNumThr1", pt); - auto etaNumThr1 = Monitored::Scalar<float>("etaNumThr1", eta); - auto phiNumThr1 = Monitored::Scalar<float>("phiNumThr1", phi); - fill("RPCMonitorAlgorithm", ptNumThr1, etaNumThr1, phiNumThr1); - } - } - - // - // Fill histograms - // - auto tool = getGroup("RPCMonitorAlgorithm"); - - fill(tool, muPtCollection); - fill(tool, roiEtaCollection); - fill(tool, roiBarrelEtaCollection); - fill(tool, roiBarrelThrCollection); - - fill(tool, run); - fill(tool, nMu); - fill(tool, nMuBarrel); - - return StatusCode::SUCCESS; -} diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/src/RpcOccupancyAnalysis.cxx b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/src/RpcOccupancyAnalysis.cxx deleted file mode 100644 index cb858bbacc56a535b4ca0ad24c742b06ac04e8be..0000000000000000000000000000000000000000 --- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/src/RpcOccupancyAnalysis.cxx +++ /dev/null @@ -1,276 +0,0 @@ -// C/C++ -#include <iostream> -#include <set> -#include <string> -#include <sstream> -#include <typeinfo> -#include <fstream> -// root -#include "TObjArray.h" - -// Athena -#include "MuonReadoutGeometry/RpcReadoutElement.h" -#include "MuonReadoutGeometry/RpcDetectorElement.h" - -// Local -#include "RpcRawDataMonitoring/RpcOccupancyAnalysis.h" - -//================================================================================================ -RpcOccupancyAnalysis::RpcOccupancyAnalysis (const std::string& name, ISvcLocator *pSvcLocator): - AthMonitorAlgorithm(name,pSvcLocator) -{} - -//================================================================================================ -RpcOccupancyAnalysis::~RpcOccupancyAnalysis () {} - -//================================================================================================ -StatusCode RpcOccupancyAnalysis::initialize () -{ - ATH_CHECK( AthMonitorAlgorithm::initialize()); - - ATH_CHECK( detStore()->retrieve(m_muonMgr) ); - ATH_CHECK( m_idHelperSvc.retrieve()); - ATH_CHECK( m_eventInfo.initialize() ); - ATH_CHECK( m_rpcPrdKey.initialize() ); - - m_dataType = dataTypeStringToEnum(m_dataTypeStr); - ATH_CHECK( m_lumiDataKey.initialize (m_useLumi) ); - ATH_CHECK( m_lbDurationDataKey.initialize (m_useLumi && m_dataType != DataType_t::monteCarlo) ); - - ATH_CHECK( initRpcPanel() ); - - // Time Tag - // All: whole range of readout window, 8BCs, = 200ns - // B3 : 3 BCs before BC0, = 75 ns - // C1 : BC0, = 25 ns - // A3 : 3 BCs after BC0, = 75 ns - std::vector<std::string> timeTags = {"All", "B3", "C1", "A3"}; - m_timeTagGroups = Monitored::buildToolMap<int>(m_tools, "RpcOccupancyAnalysis", timeTags); - - ATH_MSG_INFO(" RpcOccupancyAnalysis initialize END "); - return StatusCode::SUCCESS; -} - -//======================================================================================================== -StatusCode RpcOccupancyAnalysis::initRpcPanel() -{ - /* - Iterate over all RpcDetectorElements and RpcReadoutElements - and cache locally all panel - */ - ATH_MSG_INFO( name() << " - RpcOccupancyAnalysis::initRpcPanel - start" ); - const RpcIdHelper& rpcIdHelper = m_idHelperSvc->rpcIdHelper(); - - int nValidPanel = 0; - int panelIn = 0; - - for(unsigned idetEl = 0; idetEl < MuonGM::MuonDetectorManager::RpcDetElMaxHash; ++idetEl) { - const MuonGM::RpcDetectorElement *detEl = m_muonMgr->getRpcDetectorElement(idetEl); - - if(!detEl) { - continue; - } - - for(int doubletZ = 1; doubletZ <= 3; ++doubletZ) { - for(unsigned doubletPhi = 1; doubletPhi <= 2; ++doubletPhi) { - - const MuonGM::RpcReadoutElement *readoutEl = detEl->getRpcReadoutElement(doubletZ, doubletPhi); - - if(!readoutEl) { - continue; - } - - const Identifier readEl_id = readoutEl->identify(); - int doubletZMax = rpcIdHelper.doubletZMax(readEl_id); - - if (doubletZ > doubletZMax){ - continue; - } - - for(unsigned gasgap = 1; gasgap <= 2; ++gasgap) { - std::shared_ptr<RpcPanel> rpcPanel_eta = std::make_shared<RpcPanel>(*m_idHelperSvc, readoutEl, doubletZ, doubletPhi, gasgap, 0, panelIn); - std::shared_ptr<RpcPanel> rpcPanel_phi = std::make_shared<RpcPanel>(*m_idHelperSvc, readoutEl, doubletZ, doubletPhi, gasgap, 1, panelIn); - - if(rpcPanel_eta->panel_valid) { - m_rpcPanelMap.insert(std::map<Identifier, std::shared_ptr<RpcPanel>>::value_type(rpcPanel_eta->panelId, rpcPanel_eta)); - nValidPanel ++; - } - - if(rpcPanel_phi->panel_valid) { - m_rpcPanelMap.insert(std::map<Identifier, std::shared_ptr<RpcPanel>>::value_type(rpcPanel_phi->panelId, rpcPanel_phi)); - nValidPanel ++; - } - } - } - } - } - - ATH_MSG_INFO( "nValidPanel = "<<nValidPanel ); - - return StatusCode::SUCCESS; -} - -//================================================================================================ -StatusCode RpcOccupancyAnalysis::fillHistograms(const EventContext& ctx) const -{ - using namespace Monitored; - - SG::ReadHandle<xAOD::EventInfo> eventInfo(m_eventInfo, ctx); - int e_lumiBlock = eventInfo->lumiBlock(); - - if (!m_lumiDataKey.empty() && ! m_lbDurationDataKey.empty()) { - - SG::ReadCondHandle<LuminosityCondData> lumi(m_lumiDataKey, ctx); - SG::ReadCondHandle<LBDurationCondData> dur(m_lbDurationDataKey, ctx); - - double e_lbAverageLuminosity = lumi->lbAverageLuminosity(); - double e_lbDuration = dur->lbDuration(); - - if (e_lbAverageLuminosity < m_avrLumiThr || e_lbDuration < m_lbDuraThr ) { - ATH_MSG_DEBUG( " This Luminosity block doesn't pass lbAverageLuminosity and luminosity block duration selection. "); - - return StatusCode::SUCCESS; - } - } - - if(m_plotPRD) { - ATH_CHECK( fillHistPRD(ctx) ); - } - - auto tool = getGroup(m_packageName); - auto evtLB = Scalar<int>("evtLB", e_lumiBlock); - auto run = Scalar<int>("run", eventInfo->runNumber()); - fill(tool, evtLB, run); - - return StatusCode::SUCCESS; -} - -//================================================================================================ -StatusCode RpcOccupancyAnalysis::fillHistPRD(const EventContext& ctx) const -{ - using namespace Monitored; - // - // Read RPC Prepare data - // - - SG::ReadHandle<Muon::RpcPrepDataContainer> rpcContainer(m_rpcPrdKey, ctx); - const RpcIdHelper& rpcIdHelper = m_idHelperSvc->rpcIdHelper(); - - SG::ReadHandle<xAOD::EventInfo> eventInfo(m_eventInfo, ctx); - const int i_lb = eventInfo->lumiBlock(); - std::vector<double> v_prdTime = {}; - - auto prd_sec_all = Scalar<int>("prd_sec", 0 ); - auto prd_layer_all = Scalar<int>("prd_layer", 0 ); - auto prd_sec_1214 = Scalar<int>("prd_sec_1214", 0 ); - auto prd_layer_1214 = Scalar<int>("prd_layer_1214", 0 ); - - auto prd_sec_all_eta = Scalar<int>("prd_sec_eta", 0 ); - auto prd_layer_all_eta = Scalar<int>("prd_layer_eta", 0 ); - auto prd_sec_all_phi = Scalar<int>("prd_sec_phi", 0 ); - auto prd_layer_all_phi = Scalar<int>("prd_layer_phi", 0 ); - - auto i_prd_LB = Scalar<int>("LB", i_lb ); - auto i_panelIndex = Scalar<int>("panelInd", 0 ); - - auto i_panelIndex_geo = Scalar<int>("panelInd_geo", 0 ); - auto i_prd_stationName = Scalar<int>("StationName", 0 ); - auto i_prd_stationEta = Scalar<int>("StationEta", 0 ); - auto i_prd_stationPhi = Scalar<int>("StationPhi", 0 ); - auto i_prd_doubletR = Scalar<int>("DoubletR", 0 ); - auto i_prd_doubletZ = Scalar<int>("DoubletZ", 0 ); - auto i_prd_doubletPhi = Scalar<int>("DoubletPhi", 0 ); - auto i_prd_gasGap = Scalar<int>("GasGap", 0 ); - auto i_prd_measPhi = Scalar<int>("MeasPhi", -1); - - auto tool = getGroup(m_packageName); - - int panel_index; - std::pair<int, int> sec_layer; - - // - // loop on RpcPrepData container - // - for(const Muon::RpcPrepDataCollection *rpcCollection: *rpcContainer) { - if(!rpcCollection) { - continue; - } - - // - // loop on RpcPrepData - // - for(const Muon::RpcPrepData* rpcData: *rpcCollection) { - if(!rpcData) { - continue; - } - - Identifier id = rpcData->identify(); - const int measphi = rpcIdHelper.measuresPhi(id); - - auto temp_panel = std::make_unique<RpcPanel>(id, rpcIdHelper); - - std::map<Identifier, std::shared_ptr<RpcPanel>>::const_iterator i_panel=m_rpcPanelMap.find(temp_panel->panelId); - if (i_panel == m_rpcPanelMap.end()){ - ATH_MSG_WARNING( "The panelID corresponding prd hit does NOT link to a known Panel !!!" ); - continue; - } - else{ - panel_index = i_panel->second->panel_index; - } - - sec_layer = temp_panel->getSectorLayer(); - prd_sec_all = sec_layer.first; - prd_layer_all = sec_layer.second; - - if (std::abs(sec_layer.first)==12 || std::abs(sec_layer.first)==14){ - prd_sec_1214 = sec_layer.first; - prd_layer_1214 = sec_layer.second; - } - - fill(tool, prd_sec_all, prd_layer_all, prd_sec_1214, prd_layer_1214); - - if (measphi == 0){ - prd_sec_all_eta = sec_layer.first; - prd_layer_all_eta = sec_layer.second; - fill(tool, prd_sec_all_eta, prd_layer_all_eta); - } - else{ - prd_sec_all_phi = sec_layer.first; - prd_layer_all_phi = sec_layer.second; - fill(tool, prd_sec_all_phi, prd_layer_all_phi); - } - - i_panelIndex = panel_index; - fill(m_tools[m_timeTagGroups.at("All")], i_prd_LB, i_panelIndex); - - if(std::abs(rpcData->time()) < 12.5) { - fill(m_tools[m_timeTagGroups.at("C1")], i_prd_LB, i_panelIndex); - } - else if(-87.5 < rpcData->time() && rpcData->time() < -12.5) { - fill(m_tools[m_timeTagGroups.at("B3")], i_prd_LB, i_panelIndex); - } - else if (12.5 < rpcData->time() && rpcData->time() < 87.5) { - fill(m_tools[m_timeTagGroups.at("A3")], i_prd_LB, i_panelIndex); - } - - i_panelIndex_geo = panel_index; - i_prd_stationName = i_panel->second->stationName; - i_prd_stationEta = i_panel->second->stationEta ; - i_prd_stationPhi = i_panel->second->stationPhi ; - i_prd_doubletR = i_panel->second->doubletR ; - i_prd_doubletZ = i_panel->second->doubletZ ; - i_prd_doubletPhi = i_panel->second->doubletPhi ; - i_prd_gasGap = i_panel->second->gasGap ; - i_prd_measPhi = i_panel->second->measPhi ; - fill(tool, i_panelIndex_geo, i_prd_stationName, i_prd_stationEta, i_prd_stationPhi, i_prd_doubletR, i_prd_doubletZ, i_prd_doubletPhi, i_prd_gasGap, i_prd_measPhi); - - v_prdTime.push_back(rpcData->time()); - } // loop on RpcPrepData - } // loop on RpcPrepData container - - auto prdTimeCollection = Collection("prdTime", v_prdTime); - fill(tool, prdTimeCollection); - - ATH_MSG_DEBUG( " fillHistPRD finished " ); - return StatusCode::SUCCESS; -} diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/src/RpcTrackAnaAlg.cxx b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/src/RpcTrackAnaAlg.cxx index 6fa28796cbd93d3eb48608027282f8e0a8a0cd5c..498dcb8751fdd7326eabb54a8e115fc6b9d349a8 100644 --- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/src/RpcTrackAnaAlg.cxx +++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/src/RpcTrackAnaAlg.cxx @@ -26,19 +26,18 @@ RpcTrackAnaAlg::~RpcTrackAnaAlg () {} //================================================================================================ StatusCode RpcTrackAnaAlg::initialize () { - using namespace Monitored; - ATH_MSG_INFO(" RpcTrackAnaAlg initialize begin "); ATH_CHECK( AthMonitorAlgorithm::initialize()); ATH_CHECK( detStore()->retrieve(m_muonMgr) ); ATH_CHECK( m_idHelperSvc.retrieve()); + ATH_CHECK( m_eventInfo.initialize() ); m_dataType = dataTypeStringToEnum(m_dataTypeStr); ATH_CHECK( m_lumiDataKey.initialize (m_useLumi) ); ATH_CHECK( m_lbDurationDataKey.initialize (m_useLumi && m_dataType != DataType_t::monteCarlo) ); - ATH_CHECK( m_MuonRoIContainerKey.initialize() ); + ATH_CHECK( m_MuonRoIContainerKey.initialize(SG::AllowEmpty) ); ATH_CHECK( m_MuonContainerKey.initialize() ); ATH_CHECK( m_rpcPrdKey.initialize() ); @@ -149,6 +148,11 @@ StatusCode RpcTrackAnaAlg::initTrigTag() //================================================================================================ StatusCode RpcTrackAnaAlg::fillHistograms(const EventContext& ctx) const { + using namespace Monitored; + + SG::ReadHandle<xAOD::EventInfo> eventInfo(m_eventInfo, ctx); + int e_lumiBlock = eventInfo->lumiBlock(); + if (!m_lumiDataKey.empty() && ! m_lbDurationDataKey.empty()) { SG::ReadCondHandle<LuminosityCondData> lumi(m_lumiDataKey, ctx); @@ -168,23 +172,32 @@ StatusCode RpcTrackAnaAlg::fillHistograms(const EventContext& ctx) const ATH_CHECK( fillMuonExtrapolateEff(ctx) ); } + if(m_plotPRD) { + ATH_CHECK( fillHistPRD(ctx) ); + } + + auto tool = getGroup(m_packageName); + auto evtLB = Scalar<int>("evtLB", e_lumiBlock); + auto run = Scalar<int>("run", eventInfo->runNumber()); + fill(tool, evtLB, run); + return StatusCode::SUCCESS; } +//================================================================================================ StatusCode RpcTrackAnaAlg::fillMuonExtrapolateEff(const EventContext& ctx) const { using namespace Monitored; auto tool = getGroup(m_packageName); - xAOD::MuonRoIContainer rois; if (!m_MuonRoIContainerKey.empty()) { - /* raw LVL1MuonRoIs distributions */ - auto roisptr = SG::get<xAOD::MuonRoIContainer>(m_MuonRoIContainerKey, ctx); - if(! roisptr){ - ATH_MSG_ERROR("evtStore() does not contain muon RoI Collection with name "<< m_MuonRoIContainerKey); + /* raw LVL1MuonRoIs */ + SG::ReadHandle<xAOD::MuonRoIContainer > muonRoIs( m_MuonRoIContainerKey, ctx); + + if(!muonRoIs.isValid()){ + ATH_MSG_ERROR("evtStore() does not contain muon L1 ROI Collection with name "<< m_MuonRoIContainerKey); return StatusCode::FAILURE; } - rois = *roisptr; } SG::ReadHandle<xAOD::MuonContainer> muons(m_MuonContainerKey, ctx); @@ -232,16 +245,14 @@ StatusCode RpcTrackAnaAlg::fillMuonExtrapolateEff(const EventContext& ctx) const if( mu1_it->muon->charge() == mu2_it->muon->charge() ) continue; double dimuon_mass = (mu2_it->fourvec + mu1_it->fourvec).M(); - // if(std::abs( dimuon_mass - m_zMass.value()) > m_zMassWindow.value() )continue; if(dimuon_mass>m_zMass_lowLimit && dimuon_mass<m_zMass_upLimit) { mu1_it->isZmumu=true; mu2_it->isZmumu=true; } } } - - // if (m_analyseTrack && mu1_it->isolated && mu1_it->isZmumu) { - if (m_analyseTrack) { + + if ( mu1_it->isolated && mu1_it->isZmumu ) { const xAOD::TrackParticle* track = mu1_it->muon->trackParticle(xAOD::Muon::MuonSpectrometerTrackParticle); if(!track) continue; @@ -254,6 +265,124 @@ StatusCode RpcTrackAnaAlg::fillMuonExtrapolateEff(const EventContext& ctx) const return StatusCode::SUCCESS; } +//================================================================================================ +StatusCode RpcTrackAnaAlg::fillHistPRD(const EventContext& ctx) const +{ + using namespace Monitored; + // + // Read RPC Prepare data + // + + SG::ReadHandle<Muon::RpcPrepDataContainer> rpcContainer(m_rpcPrdKey, ctx); + const RpcIdHelper& rpcIdHelper = m_idHelperSvc->rpcIdHelper(); + + SG::ReadHandle<xAOD::EventInfo> eventInfo(m_eventInfo, ctx); + const int i_lb = eventInfo->lumiBlock(); + std::vector<double> v_prdTime = {}; + + auto prd_sec_all = Scalar<int>("prd_sec", 0 ); + auto prd_layer_all = Scalar<int>("prd_layer", 0 ); + auto prd_sec_1214 = Scalar<int>("prd_sec_1214", 0 ); + auto prd_layer_1214 = Scalar<int>("prd_layer_1214", 0 ); + + auto prd_sec_all_eta = Scalar<int>("prd_sec_eta", 0 ); + auto prd_layer_all_eta = Scalar<int>("prd_layer_eta", 0 ); + auto prd_sec_all_phi = Scalar<int>("prd_sec_phi", 0 ); + auto prd_layer_all_phi = Scalar<int>("prd_layer_phi", 0 ); + + auto i_prd_LB = Scalar<int>("LB", i_lb ); + auto i_panelIndex = Scalar<int>("panelInd", 0 ); + + auto i_prd_stationName = Scalar<int>("StationName", 0 ); + auto i_prd_stationEta = Scalar<int>("StationEta", 0 ); + auto i_prd_stationPhi = Scalar<int>("StationPhi", 0 ); + auto i_prd_doubletR = Scalar<int>("DoubletR", 0 ); + auto i_prd_doubletZ = Scalar<int>("DoubletZ", 0 ); + auto i_prd_doubletPhi = Scalar<int>("DoubletPhi", 0 ); + auto i_prd_gasGap = Scalar<int>("GasGap", 0 ); + auto i_prd_measPhi = Scalar<int>("MeasPhi", -1); + + auto tool = getGroup(m_packageName); + + int panel_index; + std::pair<int, int> sec_layer; + + // + // loop on RpcPrepData container + // + for(const Muon::RpcPrepDataCollection *rpcCollection: *rpcContainer) { + if(!rpcCollection) { + continue; + } + + // + // loop on RpcPrepData + // + for(const Muon::RpcPrepData* rpcData: *rpcCollection) { + if(!rpcData) { + continue; + } + + Identifier id = rpcData->identify(); + const int measphi = rpcIdHelper.measuresPhi(id); + + auto temp_panel = std::make_unique<RpcPanel>(id, rpcIdHelper); + + std::map<Identifier, std::shared_ptr<RpcPanel>>::const_iterator i_panel=m_rpcPanelMap.find(temp_panel->panelId); + if (i_panel == m_rpcPanelMap.end()){ + ATH_MSG_WARNING( "The panelID corresponding prd hit does NOT link to a known Panel !!!" ); + continue; + } + else{ + panel_index = i_panel->second->panel_index; + } + + sec_layer = temp_panel->getSectorLayer(); + prd_sec_all = sec_layer.first; + prd_layer_all = sec_layer.second; + + if (std::abs(sec_layer.first)==12 || std::abs(sec_layer.first)==14){ + prd_sec_1214 = sec_layer.first; + prd_layer_1214 = sec_layer.second; + } + + fill(tool, prd_sec_all, prd_layer_all, prd_sec_1214, prd_layer_1214); + + if (measphi == 0){ + prd_sec_all_eta = sec_layer.first; + prd_layer_all_eta = sec_layer.second; + fill(tool, prd_sec_all_eta, prd_layer_all_eta); + } + else{ + prd_sec_all_phi = sec_layer.first; + prd_layer_all_phi = sec_layer.second; + fill(tool, prd_sec_all_phi, prd_layer_all_phi); + } + + i_panelIndex = panel_index; + fill(tool, i_prd_LB, i_panelIndex); + + i_prd_stationName = i_panel->second->stationName; + i_prd_stationEta = i_panel->second->stationEta ; + i_prd_stationPhi = i_panel->second->stationPhi ; + i_prd_doubletR = i_panel->second->doubletR ; + i_prd_doubletZ = i_panel->second->doubletZ ; + i_prd_doubletPhi = i_panel->second->doubletPhi ; + i_prd_gasGap = i_panel->second->gasGap ; + i_prd_measPhi = i_panel->second->measPhi ; + fill(tool, i_panelIndex, i_prd_LB, i_prd_stationName, i_prd_stationEta, i_prd_stationPhi, i_prd_doubletR, i_prd_doubletZ, i_prd_doubletPhi, i_prd_gasGap, i_prd_measPhi); + + v_prdTime.push_back(rpcData->time()); + } // loop on RpcPrepData + } // loop on RpcPrepData container + + auto prdTimeCollection = Collection("prdTime", v_prdTime); + fill(tool, prdTimeCollection); + + ATH_MSG_DEBUG( " fillHistPRD finished " ); + return StatusCode::SUCCESS; +} + //================================================================================================ StatusCode RpcTrackAnaAlg::triggerMatching(const xAOD::Muon* offline_muon, const std::vector<TagDef>& list_of_triggers ) const { @@ -297,7 +426,7 @@ StatusCode RpcTrackAnaAlg::extrapolate2RPC(const xAOD::TrackParticle *track, con -- Check that extrapolation result valid -- Check that extrapolated position is in the gas gap surface bounds if both within checks valid - then save RPC extrapolation result - */ + */ using namespace Monitored; auto tool = getGroup(m_packageName); @@ -313,7 +442,7 @@ StatusCode RpcTrackAnaAlg::extrapolate2RPC(const xAOD::TrackParticle *track, con // // Iterate over RPC readout elements and compute intersections with each gas gap // - for(const std::shared_ptr<GasGapData>& gap: m_gasGapData) { + for(const std::shared_ptr<GasGapData> &gap: m_gasGapData) { ExResult result(gap->gapid, direction); // Compute track distance to the center of ReadoutElement and to the gas gap surface @@ -330,7 +459,7 @@ StatusCode RpcTrackAnaAlg::extrapolate2RPC(const xAOD::TrackParticle *track, con if(m_minDRTrackToReadoutElement > 0.0 && result.minTrackReadoutDR > m_minDRTrackToReadoutElement) { continue; } - + if(m_minDRTrackToGasGap > 0.0 && result.minTrackGasGapDR > m_minDRTrackToGasGap) { continue; } @@ -405,7 +534,7 @@ StatusCode RpcTrackAnaAlg::extrapolate2RPC(const xAOD::TrackParticle *track, con // StatusCode RpcTrackAnaAlg::computeTrackIntersectionWithGasGap(const EventContext& ctx, ExResult & result, StatusCode RpcTrackAnaAlg::computeTrackIntersectionWithGasGap(ExResult & result, const xAOD::TrackParticle* track_particle, - const std::shared_ptr<GasGapData> gap) const + const std::shared_ptr<GasGapData> &gap) const { /* This function: diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/src/components/RpcRawDataMonitoring_entries.cxx b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/src/components/RpcRawDataMonitoring_entries.cxx index 15f36e5fc8f793f5eee44fba29607ca4d3553e82..584ce4fa9c05a011d86da59fbda303ed20474461 100644 --- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/src/components/RpcRawDataMonitoring_entries.cxx +++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/src/components/RpcRawDataMonitoring_entries.cxx @@ -3,8 +3,6 @@ #include "RpcRawDataMonitoring/RpcLv1RawDataSectorLogic.h" #include "RpcRawDataMonitoring/RpcLv1RawDataEfficiency.h" #include "RpcRawDataMonitoring/RPCStandaloneTracksMon.h" -#include "RpcRawDataMonitoring/RPCMonitorAlgorithm.h" -#include "RpcRawDataMonitoring/RpcOccupancyAnalysis.h" #include "RpcRawDataMonitoring/RpcTrackAnaAlg.h" #include "RpcRawDataMonitoring/RPCLv1AnaAlg.h" @@ -13,7 +11,5 @@ DECLARE_COMPONENT( RpcLv1RawDataValAlg ) DECLARE_COMPONENT( RpcLv1RawDataSectorLogic ) DECLARE_COMPONENT( RpcLv1RawDataEfficiency ) DECLARE_COMPONENT( RPCStandaloneTracksMon ) -DECLARE_COMPONENT( RPCMonitorAlgorithm ) -DECLARE_COMPONENT( RpcOccupancyAnalysis ) DECLARE_COMPONENT( RpcTrackAnaAlg ) DECLARE_COMPONENT( RPCLv1AnaAlg ) diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcLv1RawDataValAlg_Efficiency.cxx b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcLv1RawDataValAlg_Efficiency.cxx index 9802da57d8425abd4aa16321a2735ddd1263c533..da6abfe20926eb34afc24b2fa40b79b4bc855492 100644 --- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcLv1RawDataValAlg_Efficiency.cxx +++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcLv1RawDataValAlg_Efficiency.cxx @@ -99,6 +99,7 @@ TgcLv1RawDataValAlg::bookHistogramsEfficiency(){ else if( bin <= 32+27 ) boundary += 1./3.; else if( bin <= 32+27+16 ) boundary += 0.5; else boundary += 1.0; + pt_bins[bin] = boundary; } /////////////////////////////////////////////////////////////////////////// @@ -141,7 +142,8 @@ TgcLv1RawDataValAlg::bookHistogramsEfficiency(){ ATH_MSG_DEBUG( ss.str() ); m_tgclv1turnondenom[ac][pt][pna][m] = new TH1F(ss.str().c_str(), (ss.str() + ";p_{T} GeV/c;Entries").c_str(), pt_nbins, pt_bins); m_tgclv1turnondenom[ac][pt][pna][m]->Sumw2(); - ATH_CHECK( tgclv1_turnon_numdenom_ac[ac]->regHist(m_tgclv1turnondenom[ac][pt][pna][m]) ); + for(int ibin = 1 ; ibin <= m_tgclv1turnondenom[ac][pt][pna][m]->GetNbinsX() ; ibin++) m_tgclv1turnondenom[ac][pt][pna][m]->Fill( m_tgclv1turnondenom[ac][pt][pna][m]->GetXaxis()->GetBinCenter(ibin) ); + ATH_CHECK( tgclv1_turnon_numdenom_ac[ac]->regHist(m_tgclv1turnondenom[ac][pt][pna][m]) ); ///////////////////////////////////// // L1 Trigger Efficiency Maps @@ -209,6 +211,7 @@ TgcLv1RawDataValAlg::bookHistogramsEfficiency(){ ATH_MSG_DEBUG( ss.str() ); m_tgclv1turnondenom_ES[ac][pt] = new TH1F(ss.str().c_str(), (ss.str() + ";p_{T} GeV/c;Entries").c_str(), pt_nbins, pt_bins); m_tgclv1turnondenom_ES[ac][pt]->Sumw2(); + for(int ibin = 1 ; ibin <= m_tgclv1turnondenom_ES[ac][pt]->GetNbinsX() ; ibin++) m_tgclv1turnondenom_ES[ac][pt]->Fill( m_tgclv1turnondenom_ES[ac][pt]->GetXaxis()->GetBinCenter(ibin) ); ATH_CHECK( tgclv1_turnon_numdenom_ac_ES[ac]->regHist(m_tgclv1turnondenom_ES[ac][pt]) ); }//pT diff --git a/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinTRTStandaloneTrackAlg.cxx b/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinTRTStandaloneTrackAlg.cxx index fcf97442f4343caf43bba5921c35ff113357c692..bf0e96fb2fed85a2bbbd416b92f317020e77e049 100644 --- a/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinTRTStandaloneTrackAlg.cxx +++ b/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinTRTStandaloneTrackAlg.cxx @@ -145,19 +145,20 @@ ThinTRTStandaloneTrackAlg::execute(const EventContext& ctx) const } } } - if (m_doMuon) { - SG::ReadHandle<xAOD::MuonContainer> muons(m_inputMuonContainerKey, ctx); - if (!muons.isValid()) { - ATH_MSG_FATAL("Failed to retrieve " << m_inputMuonContainerKey.key()); - return StatusCode::FAILURE; - } - for (const xAOD::Muon* muon : *muons) { - const xAOD::TrackParticle* trk = - muon->trackParticle(xAOD::Muon::InnerDetectorTrackParticle); - if (trk) - keptInDetTrackParticles[trk->index()] = true; - } - } + if (m_doMuon){ + SG::ReadHandle<xAOD::MuonContainer> muons(m_inputMuonContainerKey, ctx); + if( !muons.isValid() ) { + ATH_MSG_FATAL("Failed to retrieve "<< m_inputMuonContainerKey.key()); + return StatusCode::FAILURE; + } + for (const xAOD::Muon* muon : *muons){ + const xAOD::TrackParticle* trk = muon->trackParticle(xAOD::Muon::InnerDetectorTrackParticle); + /// SaF muons have the ID link to the InDetForwardTrackParticles + if (muon->muonType() != xAOD::Muon::SiliconAssociatedForwardMuon && trk) keptInDetTrackParticles[trk->index()] = true; + } + + + } // Do the thinning indetTrackPC.keep(keptInDetTrackParticles); diff --git a/PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/Job.h b/PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/Job.h index 23d3c76287f3b3c5aaf583a506ec3712fc90a45c..a38097f859df49d1647d10c7e2906de093647331 100644 --- a/PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/Job.h +++ b/PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/Job.h @@ -390,6 +390,16 @@ namespace EL public: static const std::string optLocalNoUnsetup; + /// \brief the option to specify the number of parallel jobs in + /// \ref LocalDriver (0 = number of hardware cores) (default=1) + /// + /// As an intermediate between running a single job locally and + /// running in batch, this allows to run multiple processes in + /// parallel locally. It is still recommended to just run in + /// batch instead, but sometimes this is more practical. + public: + static const std::string optNumParallelProcs; + /// \brief the option to do processing in a background process in PROOF public: diff --git a/PhysicsAnalysis/D3PDTools/EventLoop/Root/Job.cxx b/PhysicsAnalysis/D3PDTools/EventLoop/Root/Job.cxx index 4d6b21f7122a30221e39ee5780fe78ca8a4f9a37..4ec0dbde40d0b5dcff68f0f3ca1685685fc5e766 100644 --- a/PhysicsAnalysis/D3PDTools/EventLoop/Root/Job.cxx +++ b/PhysicsAnalysis/D3PDTools/EventLoop/Root/Job.cxx @@ -61,6 +61,7 @@ namespace EL const std::string Job::optDisableMetrics = "nc_disable_metrics"; const std::string Job::optResetShell = "nc_reset_shell"; const std::string Job::optLocalNoUnsetup = "nc_local_no_unsetup"; + const std::string Job::optNumParallelProcs = "nc_num_parallel_processes"; const std::string Job::optBackgroundProcess = "nc_background_process"; const std::string Job::optOutputSampleName = "nc_outputSampleName"; const std::string Job::optGridDestSE = "nc_destSE"; diff --git a/PhysicsAnalysis/D3PDTools/EventLoop/Root/LocalDriver.cxx b/PhysicsAnalysis/D3PDTools/EventLoop/Root/LocalDriver.cxx index d539774682cc6ba422790e4048ff1f261dbb6370..0c0287ec9d3a54dc41d1f1d4e8d6fa7c10683158 100644 --- a/PhysicsAnalysis/D3PDTools/EventLoop/Root/LocalDriver.cxx +++ b/PhysicsAnalysis/D3PDTools/EventLoop/Root/LocalDriver.cxx @@ -20,6 +20,8 @@ #include <RootCoreUtils/Assert.h> #include <RootCoreUtils/ShellExec.h> #include <RootCoreUtils/ThrowMsg.h> +#include <mutex> +#include <thread> // // method implementations @@ -68,6 +70,13 @@ namespace EL data.options.castString(Job::optDockerImage)}; const std::string dockerOptions { data.options.castString(Job::optDockerOptions)}; + int numParallelProcs + = data.options.castDouble (Job::optNumParallelProcs, 1); + if (numParallelProcs < 0) + { + ANA_MSG_ERROR ("invalid number of parallel processes: " << numParallelProcs); + return StatusCode::FAILURE; + } std::ostringstream basedirName; basedirName << data.submitDir << "/tmp"; @@ -76,19 +85,71 @@ namespace EL if (gSystem->MakeDirectory (basedirName.str().c_str()) != 0) RCU_THROW_MSG ("failed to create directory " + basedirName.str()); } - for (std::size_t index : data.batchJobIndices) + auto submitSingle = [&, this] (std::size_t index) noexcept -> StatusCode + { + try + { + std::ostringstream dirName; + dirName << basedirName.str() << "/" << index; + if (gSystem->MakeDirectory (dirName.str().c_str()) != 0) + { + ANA_MSG_ERROR ("failed to create directory " + dirName.str()); + return StatusCode::FAILURE; + } + + std::ostringstream cmd; + cmd << "cd " << dirName.str() << " && "; + if (!dockerImage.empty()) + cmd << "docker run --rm -v " << RCU::Shell::quote (data.submitDir) << ":" << RCU::Shell::quote (data.submitDir) << " " << dockerOptions << " " << dockerImage << " "; + cmd << RCU::Shell::quote (data.submitDir) << "/submit/run " << index; + RCU::Shell::exec (cmd.str()); + } catch (std::exception& e) + { + ANA_MSG_ERROR ("exception in job " << index << ": " << e.what()); + return StatusCode::FAILURE; + } + return StatusCode::SUCCESS; + }; + if (numParallelProcs == 1) + { + for (std::size_t index : data.batchJobIndices) + { + if (submitSingle (index).isFailure()) + return StatusCode::FAILURE; + } + } else { - std::ostringstream dirName; - dirName << basedirName.str() << "/" << index; - if (gSystem->MakeDirectory (dirName.str().c_str()) != 0) - RCU_THROW_MSG ("failed to create directory " + dirName.str()); - - std::ostringstream cmd; - cmd << "cd " << dirName.str() << " && "; - if (!dockerImage.empty()) - cmd << "docker run --rm -v " << RCU::Shell::quote (data.submitDir) << ":" << RCU::Shell::quote (data.submitDir) << " " << dockerOptions << " " << dockerImage << " "; - cmd << RCU::Shell::quote (data.submitDir) << "/submit/run " << index; - RCU::Shell::exec (cmd.str()); + if (numParallelProcs == 0) + numParallelProcs = std::thread::hardware_concurrency(); + if (numParallelProcs > int (data.batchJobIndices.size())) + numParallelProcs = data.batchJobIndices.size(); + std::vector<std::thread> threads; + std::mutex mutex; + auto indexIter = data.batchJobIndices.begin(); + bool abort = false; + while (threads.size() < unsigned (numParallelProcs)) + { + threads.emplace_back ([&,this] () noexcept + { + std::unique_lock<std::mutex> lock (mutex); + while (indexIter != data.batchJobIndices.end() && !abort) + { + auto myindex = *indexIter; + ++ indexIter; + lock.unlock(); + if (submitSingle (myindex).isFailure()) + { + abort = true; + return; + } + lock.lock (); + } + }); + } + for (auto& thread : threads) + thread.join(); + if (abort) + return StatusCode::FAILURE; } data.submitted = true; } diff --git a/PhysicsAnalysis/D3PDTools/EventLoopTest/CMakeLists.txt b/PhysicsAnalysis/D3PDTools/EventLoopTest/CMakeLists.txt index 72782790953068aa892462e7f6d6e082d58639fe..04ab1d214bd74665a95eb91af29dae637200f09b 100644 --- a/PhysicsAnalysis/D3PDTools/EventLoopTest/CMakeLists.txt +++ b/PhysicsAnalysis/D3PDTools/EventLoopTest/CMakeLists.txt @@ -15,8 +15,11 @@ atlas_add_root_dictionary( EventLoopTestLib EventLoopTest/UnitTestAlg4.h EventLoopTest/UnitTestTool.h Root/LinkDef.h EXTERNAL_PACKAGES ROOT ) +# have one basic library to use for most tests. this has an explicit list +# of files, because some files go into the next library. atlas_add_library( EventLoopTestLib - EventLoopTest/*.h EventLoopTest/*.ihh Root/*.cxx ${EventLoopTestDictSource} + Root/UnitTest.cxx Root/UnitTestAlg.cxx Root/UnitTestAlg1.cxx Root/UnitTestAlg2.cxx Root/UnitTestAlg3.cxx Root/UnitTestAlg4.cxx Root/UnitTestAlg5.cxx Root/UnitTestAlg6.cxx Root/UnitTestAlgXAOD.cxx Root/UnitTestConfig.cxx Root/UnitTestTool.cxx + ${EventLoopTestDictSource} PUBLIC_HEADERS EventLoopTest DEFINITIONS USE_CMAKE INCLUDE_DIRS ${GTEST_INCLUDE_DIRS} @@ -24,6 +27,11 @@ atlas_add_library( EventLoopTestLib LINK_LIBRARIES ${GTEST_LIBRARIES} AnaAlgorithmLib AsgMessagingLib AsgTools EventLoop RootCoreUtils SampleHandler PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} xAODEventInfo xAODMetaData ) +# have a separate library for the Driver test fixture. this needs to +# be an object library to link correctly for a parametric gtest fixture. +add_library( EventLoopTestFixtureLib OBJECT Root/UnitTestFixture.cxx) +target_link_libraries (EventLoopTestFixtureLib PUBLIC EventLoopTestLib ) + atlas_add_dictionary( EventLoopTestDict EventLoopTest/EventLoopTestDict.h EventLoopTest/selection.xml @@ -36,17 +44,24 @@ function( _add_gtest cxx_name ) if (${slow_index} GREATER -1) set (EXTRA_ARGS ${EXTRA_ARGS} TIMEOUT 900) endif () + set (EXTRA_LIBS PROPERTIES ) + list (FIND FIXTURE_TESTS "${cxx_name}" fixture_index) + if (${fixture_index} GREATER -1) + set (EXTRA_LIBS EventLoopTestFixtureLib) + endif () get_filename_component( test_name ${cxx_name} NAME_WE ) atlas_add_test (${test_name} SOURCES test/${test_name}.cxx INCLUDE_DIRS ${GMOCK_INCLUDE_DIRS} LINK_LIBRARIES ${GMOCK_LIBRARIES} RootCoreUtils AsgTools AsgTestingLib - SampleHandler EventLoopTestLib xAODRootAccess ${EXTRA_ARGS}) + SampleHandler EventLoopTestLib xAODRootAccess ${EXTRA_LIBS} ${EXTRA_ARGS}) set_tests_properties (EventLoopTest_${test_name}_ctest PROPERTIES LABELS "EventLoopTest;EventLoop;SampleHandler;AnaAlgorithm" ) endfunction( _add_gtest ) set (MANUAL_TESTS test/gt_LSFDriver_EOS.cxx test/make_test_file.cxx test/ut_driver_direct_gridinput.cxx test/ut_driver_kubernetes.cxx test/ut_driver_local_docker.cxx test/ut_driver_grid.cxx test/ut_driver_condor.cxx test/ut_driver_ll.cxx test/ut_driver_lsf.cxx test/ut_driver_torque.cxx test/ut_xrootd_output.cxx test/ut_xrootd_input.cxx) +set (FIXTURE_TESTS test/gt_DirectDriver.cxx test/gt_LSFDriver_EOS.cxx test/gt_LocalDriver.cxx) + set (SLOW_TESTS test/gt_DirectDriver.cxx test/gt_LocalDriver.cxx test/gt_LeakChecks.cxx test/gt_UnitTestAlgXAOD.cxx) diff --git a/PhysicsAnalysis/D3PDTools/EventLoopTest/Root/UnitTestAlg3.cxx b/PhysicsAnalysis/D3PDTools/EventLoopTest/Root/UnitTestAlg3.cxx index 9e38631cc412384473469665584d70de79c7d107..8ce37c2fc1f69600a35365cc091b358a35d42058 100644 --- a/PhysicsAnalysis/D3PDTools/EventLoopTest/Root/UnitTestAlg3.cxx +++ b/PhysicsAnalysis/D3PDTools/EventLoopTest/Root/UnitTestAlg3.cxx @@ -19,7 +19,12 @@ namespace EL { // Allocate the requested amount of memory. if( m_leakBytes > 0 ) { - char* lostPointer = new char[ m_leakBytes ]; + // This needs to be `volatile` and zeroed out to ensure the memory + // really gets allocated by the operating system. Without `volatile` + // the compiler is essentially allowed to optimize away the write, + // and the operating system isn't required to allocate it if it isn't + // written to. + volatile char* lostPointer = new volatile char[ m_leakBytes ]; for( int i = 0; i < m_leakBytes; ++i ) { *lostPointer = 0; ++lostPointer; diff --git a/PhysicsAnalysis/D3PDTools/EventLoopTest/test/ut_driver_local_parallel.cxx b/PhysicsAnalysis/D3PDTools/EventLoopTest/test/ut_driver_local_parallel.cxx new file mode 100644 index 0000000000000000000000000000000000000000..23208cf8de2aecc5d801404d298aa44da0d8bb12 --- /dev/null +++ b/PhysicsAnalysis/D3PDTools/EventLoopTest/test/ut_driver_local_parallel.cxx @@ -0,0 +1,29 @@ +/* + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration +*/ + + +// +// includes +// + +#include <EventLoop/Global.h> + +#include <EventLoop/LocalDriver.h> +#include <EventLoop/Job.h> +#include <EventLoopTest/UnitTest.h> + +// +// main program +// + +using namespace EL; + +int main () +{ + LocalDriver driver; + driver.options()->setDouble (Job::optNumParallelProcs, 0u); + UnitTest ut ("local"); + ut.cleanup = false; + return ut.run (driver); +} diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/CMakeLists.txt b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/CMakeLists.txt index 6ea906bc1982869c51a8fc6846c2779e1d0de8d4..38afa6a2b97f24c66e372529f5aae0d6c6e51132 100644 --- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/CMakeLists.txt +++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/CMakeLists.txt @@ -38,6 +38,7 @@ atlas_add_library( FlavorTagDiscriminants Root/HbbTagConfig.cxx Root/HbbGraphConfig.cxx Root/VRJetOverlapDecorator.cxx + Root/FTagDataDependencyNames.cxx PUBLIC_HEADERS FlavorTagDiscriminants PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${LWTNN_INCLUDE_DIRS} ${ONNXRUNTIME_INCLUDE_DIRS} @@ -54,6 +55,7 @@ if (NOT XAOD_STANDALONE) src/BTagTrackLinkCopyAlg.cxx src/BTaggingBuilderAlg.cxx src/PoorMansIpAugmenterAlg.cxx + src/JetTagConditionalDecoratorAlg.cxx src/components/FlavorTagDiscriminants_entries.cxx LINK_LIBRARIES FlavorTagDiscriminants ) diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/DL2.h b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/DL2.h index 3158d953d2ee8d486b9624b5eee06c40d865736f..c769841ca22e8336db2a5daa8749cc4d66993f48 100644 --- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/DL2.h +++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/DL2.h @@ -24,6 +24,7 @@ namespace FlavorTagDiscriminants { const FTagOptions& = FTagOptions()); void decorate(const xAOD::BTagging& btag) const; void decorate(const xAOD::Jet& jet) const; + void decorateWithDefaults(const xAOD::Jet&) const; void decorate(const xAOD::Jet& jet, const SG::AuxElement& decorated) const; // functions to report data depdedencies diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/DL2HighLevel.h b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/DL2HighLevel.h index d961322135c6a4943502e79133e9fa06837ea355..d6f135015d7320458ab332513ab43055db85e08e 100644 --- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/DL2HighLevel.h +++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/DL2HighLevel.h @@ -32,6 +32,7 @@ namespace FlavorTagDiscriminants { ~DL2HighLevel(); void decorate(const xAOD::BTagging& btag) const; void decorate(const xAOD::Jet& jet) const; + void decorateWithDefaults(const xAOD::Jet& jet) const; FTagDataDependencyNames getDataDependencyNames() const; private: std::unique_ptr<DL2> m_dl2; diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/DL2Tool.h b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/DL2Tool.h index 556fc0fcbdeed8798f65f96e10a3b5036575b464..9cb926e1f5b75f101aef2de132c680ff64707c94 100644 --- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/DL2Tool.h +++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/DL2Tool.h @@ -8,7 +8,7 @@ #include "AsgTools/AsgTool.h" #include "FlavorTagDiscriminants/IBTagDecorator.h" -#include "FlavorTagDiscriminants/IJetTagDecorator.h" +#include "FlavorTagDiscriminants/IJetTagConditionalDecorator.h" namespace FlavorTagDiscriminants { @@ -23,9 +23,9 @@ namespace FlavorTagDiscriminants { class DL2Tool : public asg::AsgTool, virtual public IBTagDecorator, - virtual public IJetTagDecorator + virtual public IJetTagConditionalDecorator { - ASG_TOOL_CLASS2(DL2Tool, IBTagDecorator, IJetTagDecorator ) + ASG_TOOL_CLASS2(DL2Tool, IBTagDecorator, IJetTagConditionalDecorator ) public: DL2Tool(const std::string& name); ~DL2Tool(); @@ -35,6 +35,7 @@ namespace FlavorTagDiscriminants { // returns 0 for success virtual void decorate(const xAOD::BTagging& btag) const override; virtual void decorate(const xAOD::Jet& jet) const override; + virtual void decorateWithDefaults(const xAOD::Jet& jet) const override; virtual std::set<std::string> getDecoratorKeys() const override; virtual std::set<std::string> getAuxInputKeys() const override; diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/DataPrepUtilities.h b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/DataPrepUtilities.h index f9c1b02db1e37a0f1b56383294dec7a32ec6a6ea..adf447598524374384112385f8411d2ab2f28c43 100644 --- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/DataPrepUtilities.h +++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/DataPrepUtilities.h @@ -157,7 +157,7 @@ namespace FlavorTagDiscriminants { return {m_name, ret_value}; } }; - + // The track getter is responsible for getting the tracks from the // jet applying a selection, and then sorting the tracks. class TracksFromJet{ @@ -278,26 +278,33 @@ namespace FlavorTagDiscriminants { namespace dataprep { - void createGetterConfig( lwt::GraphConfig& graph_config, + std::tuple< + std::vector<FTagInputConfig>, + std::vector<FTagTrackSequenceConfig>, + FTagOptions> + createGetterConfig( lwt::GraphConfig& graph_config, FlipTagConfig flip_config, std::map<std::string, std::string> remap_scalar, - TrackLinkType track_link_type, - std::vector<FTagInputConfig>& input_config, - std::vector<FTagTrackSequenceConfig>& trk_config, - FTagOptions& options); + TrackLinkType track_link_type); - std::tuple<std::vector<internal::VarFromBTag>, - std::vector<internal::VarFromJet>, std::set<std::string>> + std::tuple< + std::vector<internal::VarFromBTag>, + std::vector<internal::VarFromJet>, + FTagDataDependencyNames> createBvarGetters( const std::vector<FTagInputConfig>& inputs); - std::tuple<std::vector<internal::TrackSequenceBuilder>, std::set<std::string>, - std::set<std::string>> createTrackGetters( + std::tuple< + std::vector<internal::TrackSequenceBuilder>, + FTagDataDependencyNames> + createTrackGetters( const std::vector<FTagTrackSequenceConfig>& track_sequences, const FTagOptions& options, const std::string& jetLinkName); - std::tuple<std::map<std::string, internal::OutNode>, std::set<std::string>> - createDecorators( + std::tuple< + std::map<std::string, internal::OutNode>, + FTagDataDependencyNames> + createDecorators( const lwt::GraphConfig& config, const FTagOptions& options); } diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/DecoratorAlg.h b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/DecoratorAlg.h index 3ff4fd97592d4758b9e1b5005a7bd3d5430204df..f9536b66f2280dad05fbc2b6d23ca100026970cf 100644 --- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/DecoratorAlg.h +++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/DecoratorAlg.h @@ -19,7 +19,7 @@ namespace FlavorTagDiscriminants { virtual StatusCode initialize() override; virtual StatusCode execute(const EventContext& cxt) const override; virtual StatusCode finalize() override; - private: + protected: SG::ReadHandleKey<CONTAINER> m_containerKey { this, "container", "", "Key for the input collection"}; SG::ReadHandleKey<CONSTITUENTS> m_constituentKey { diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/DecoratorAlg.icc b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/DecoratorAlg.icc index 697f6a8ded98f0e56ab4f2580d22759dae9c0165..6c3186992350aacf5a4f929441d36c87861c774f 100644 --- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/DecoratorAlg.icc +++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/DecoratorAlg.icc @@ -1,3 +1,4 @@ +// In case the extension is confusing, this is a -*- C++ -*- file /* Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/FTagDataDependencyNames.h b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/FTagDataDependencyNames.h index 6e5c640aff0618c0f7a4a2032781d02be2953ae7..0446112d17ca946b985062359e5dbe4103e9597e 100644 --- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/FTagDataDependencyNames.h +++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/FTagDataDependencyNames.h @@ -1,3 +1,7 @@ +/* + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +*/ + #ifndef FTAG_DATA_DEPENDENCY_NAMES_H #define FTAG_DATA_DEPENDENCY_NAMES_H @@ -9,6 +13,8 @@ namespace FlavorTagDiscriminants { std::set<std::string> trackInputs; std::set<std::string> bTagInputs; std::set<std::string> bTagOutputs; + FTagDataDependencyNames operator+(FTagDataDependencyNames) const; + void operator+=(FTagDataDependencyNames); }; } diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/IJetTagConditionalDecorator.h b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/IJetTagConditionalDecorator.h new file mode 100644 index 0000000000000000000000000000000000000000..8c13a2221bd95fcbcce4a8d1804d1487b25ea186 --- /dev/null +++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/IJetTagConditionalDecorator.h @@ -0,0 +1,42 @@ +// for text editors: this file is -*- C++ -*- +/* + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration +*/ + +// This is similar to the IJetTagDecorator, the difference being that +// it provides a decorateWithDefaults method. +// +// The calling tool must decide whether to call decorate or +// decorateWithDefaults on any given jet. The second case is intended +// to be used on jets where the inputs can't be calculated or would be +// nonsensical for some reason. + +#ifndef I_JETTAG_CONDITIONAL_DECORATOR_H +#define I_JETTAG_CONDITIONAL_DECORATOR_H + +#include "IDependencyReporter.h" +#include "IJetTagDecorator.h" + +#include "AsgTools/IAsgTool.h" +#include "xAODJet/JetFwd.h" + +class IJetTagConditionalDecorator : virtual public asg::IAsgTool, + virtual public IDependencyReporter, + virtual public IJetTagDecorator +{ +ASG_TOOL_INTERFACE(IJetTagConditionalDecorator) + +public: + + /// Destructor. + virtual ~IJetTagConditionalDecorator() { }; + + /// Method to decorate a jet. + virtual void decorate(const xAOD::Jet& jet) const = 0; + /// Method to decorate a jet with defaults. + virtual void decorateWithDefaults(const xAOD::Jet& jet) const = 0; + +}; + + +#endif diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/JetTagConditionalDecoratorAlg.h b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/JetTagConditionalDecoratorAlg.h new file mode 100644 index 0000000000000000000000000000000000000000..f673db73490cb31fdd4a201d76f9325b959b7edc --- /dev/null +++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/JetTagConditionalDecoratorAlg.h @@ -0,0 +1,38 @@ +/* + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef JET_TAG_CONDITIONALDECORATOR_ALG_H +#define JET_TAG_CONDITIONALDECORATOR_ALG_H + +#include "FlavorTagDiscriminants/DecoratorAlg.h" +#include "FlavorTagDiscriminants/IJetTagConditionalDecorator.h" + +#include "xAODJet/JetContainer.h" +#include "xAODTracking/TrackParticleContainer.h" + +namespace detail { + using JetTag_t = FlavorTagDiscriminants::DecoratorAlg< + xAOD::JetContainer, + IJetTagConditionalDecorator, + xAOD::TrackParticleContainer + >; +} + +namespace FlavorTagDiscriminants { + class JetTagConditionalDecoratorAlg : public detail::JetTag_t + { + public: + JetTagConditionalDecoratorAlg(const std::string& name, + ISvcLocator* svcloc); + virtual StatusCode initialize() override; + virtual StatusCode execute(const EventContext& cxt ) const override; + private: + Gaudi::Property<std::string> m_tagFlag { + this, "tagFlag", "", "Jet variable to flag a jet for tagging" + }; + SG::ReadDecorHandleKey<xAOD::JetContainer> m_tagFlagReadDecor; + }; +} + +#endif diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/OnnxUtil.h b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/OnnxUtil.h index 6993ef5d68cde33d63d6b40246364652738fd33b..b0325ec567654311d462daf60b5d38ad67ecaba5 100644 --- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/OnnxUtil.h +++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/OnnxUtil.h @@ -40,9 +40,6 @@ namespace FlavorTagDiscriminants { std::vector<std::string> m_input_node_names; std::vector<std::string> m_output_node_names; - - int m_num_outputscore; - }; // Class OnnxUtil } // end of FlavorTagDiscriminants namespace diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/DL2.cxx b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/DL2.cxx index 3a55c90b6c507a7d2ae5c91b9b9f7e058a15e039..1689396a084e7d85f0debd97cf578b1d85a3e6ac 100644 --- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/DL2.cxx +++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/DL2.cxx @@ -39,17 +39,20 @@ namespace FlavorTagDiscriminants { lwt::rep::all)); } - std::tie(m_varsFromBTag, m_varsFromJet, m_dataDependencyNames.bTagInputs) = - dataprep::createBvarGetters(inputs); - - std::set<std::string> bTagInputsTrackGetter; - std::tie(m_trackSequenceBuilders, bTagInputsTrackGetter, - m_dataDependencyNames.trackInputs) = - dataprep::createTrackGetters(track_sequences, options, jetLinkName); - m_dataDependencyNames.bTagInputs.merge(bTagInputsTrackGetter); - - std::tie(m_decorators, m_dataDependencyNames.bTagOutputs) = - dataprep::createDecorators(graph_config, options); + auto [vb, vj, ds] = dataprep::createBvarGetters(inputs); + m_varsFromBTag = vb; + m_varsFromJet = vj; + m_dataDependencyNames += ds; + + auto [tsb, td] = dataprep::createTrackGetters( + track_sequences, options, jetLinkName); + m_dataDependencyNames += td; + m_trackSequenceBuilders = tsb; + + auto [decorators, dd] = dataprep::createDecorators( + graph_config, options); + m_dataDependencyNames += dd; + m_decorators = decorators; } void DL2::decorate(const xAOD::BTagging& btag) const { @@ -63,6 +66,15 @@ namespace FlavorTagDiscriminants { void DL2::decorate(const xAOD::Jet& jet) const { decorate(jet, jet); } + void DL2::decorateWithDefaults(const xAOD::Jet& jet) const { + // save out things + for (const auto& dec: m_decorators) { + for (const auto& node: dec.second) { + // save something that is clearly wrong + node.second(jet) = NAN; + } + } + } void DL2::decorate(const xAOD::Jet& jet, const SG::AuxElement& btag) const { using namespace internal; diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/DL2HighLevel.cxx b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/DL2HighLevel.cxx index 05dd5512be6ad8133d940e50c4674391d5b520f1..52ccd1adf6e10f938f9e8064eaad45e9d8c88821 100644 --- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/DL2HighLevel.cxx +++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/DL2HighLevel.cxx @@ -35,17 +35,12 @@ namespace FlavorTagDiscriminants { std::ifstream input_stream(nn_path); lwt::GraphConfig config = lwt::parse_json_graph(input_stream); - std::vector<FTagInputConfig> input_config; - std::vector<FTagTrackSequenceConfig> trk_config; - FTagOptions options; - if (config.inputs.size() > 1) { throw std::logic_error("DL2 doesn't support multiple inputs"); } - dataprep::createGetterConfig( - config, flip_config, remap_scalar, track_link_type, - input_config, trk_config, options); + auto [input_config, trk_config, options] = dataprep::createGetterConfig( + config, flip_config, remap_scalar, track_link_type); m_dl2.reset( new DL2( @@ -65,6 +60,9 @@ namespace FlavorTagDiscriminants { void DL2HighLevel::decorate(const xAOD::Jet& jet) const { m_dl2->decorate(jet); } + void DL2HighLevel::decorateWithDefaults(const xAOD::Jet& jet) const { + m_dl2->decorateWithDefaults(jet); + } FTagDataDependencyNames DL2HighLevel::getDataDependencyNames() const { diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/DL2Tool.cxx b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/DL2Tool.cxx index a52c6c0786258293de6c261029df262748ec7660..7731212030cb08e708712b254df3785228238003 100644 --- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/DL2Tool.cxx +++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/DL2Tool.cxx @@ -50,6 +50,11 @@ namespace FlavorTagDiscriminants { m_dl2->decorate(jet); ATH_MSG_VERBOSE("Decorated jet"); } + void DL2Tool::decorateWithDefaults(const xAOD::Jet& jet) const { + ATH_MSG_DEBUG("Decorating jet with defaults from: " + m_props.nnFile); + m_dl2->decorateWithDefaults(jet); + ATH_MSG_VERBOSE("Decorated jet with defaults"); + } std::set<std::string> DL2Tool::getDecoratorKeys() const { return m_dl2->getDataDependencyNames().bTagOutputs; diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/DataPrepUtilities.cxx b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/DataPrepUtilities.cxx index 44a104361000d1c5506ec1f6f09319efc75a6723..f4567ec719b226cd71c91c3b9d02561ccbe3ff78 100644 --- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/DataPrepUtilities.cxx +++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/DataPrepUtilities.cxx @@ -482,19 +482,17 @@ namespace FlavorTagDiscriminants { namespace dataprep { - //****************************// - // previously in DL2HighLevel // - //****************************// - - void createGetterConfig( lwt::GraphConfig& config, + std::tuple< + std::vector<FTagInputConfig>, + std::vector<FTagTrackSequenceConfig>, + FTagOptions> + createGetterConfig( lwt::GraphConfig& config, FlipTagConfig flip_config, std::map<std::string, std::string> remap_scalar, - TrackLinkType track_link_type, - std::vector<FTagInputConfig>& input_config, - std::vector<FTagTrackSequenceConfig>& trk_config, - FTagOptions& options + TrackLinkType track_link_type ){ + // __________________________________________________________________ // we rewrite the inputs if we're using flip taggers // @@ -557,6 +555,7 @@ namespace FlavorTagDiscriminants { {"softMuon_.*"_r, "softMuon_isDefaults"}, {"((log_)?pt|abs_eta|eta|phi|energy)"_r, ""}}; // no default for custom cases + std::vector<FTagInputConfig> input_config; for (auto& node: config.inputs){ // allow the user to remape some of the inputs remap_inputs(node.variables, remap_scalar, @@ -567,8 +566,14 @@ namespace FlavorTagDiscriminants { input_names.push_back(var.name); } + // check to make sure the next line doesn't overwrite something + // TODO: figure out how to support multiple scalar input nodes + if (!input_config.empty()) { + throw std::logic_error( + "We don't currently support multiple scalar input nodes"); + } input_config = get_input_config( - input_names, type_regexes, default_flag_regexes); + input_names, type_regexes, default_flag_regexes); } // ___________________________________________________________________ @@ -578,7 +583,7 @@ namespace FlavorTagDiscriminants { for (const auto& node: config.input_sequences) { std::vector<std::string> names; for (const auto& var: node.variables) { - names.push_back(var.name); + names.push_back(var.name); } trk_names.emplace_back(node.name, names); } @@ -611,10 +616,11 @@ namespace FlavorTagDiscriminants { {".*_loose202102NoIpCuts_.*"_r, TrackSelection::LOOSE_202102_NOIP}, }; - trk_config = get_track_input_config( + auto trk_config = get_track_input_config( trk_names, trk_type_regexes, trk_sort_regexes, trk_select_regexes); // some additional options + FTagOptions options; if (auto h = remap_scalar.extract(options.track_prefix)) { options.track_prefix = h.mapped(); } @@ -624,19 +630,17 @@ namespace FlavorTagDiscriminants { options.flip = flip_config; options.remap_scalar = remap_scalar; options.track_link_type = track_link_type; + return std::make_tuple(input_config, trk_config, options); } // getGetterConfig - - //*******************// - // previously in DL2 // - //*******************// - - std::tuple<std::vector<internal::VarFromBTag>, - std::vector<internal::VarFromJet>, std::set<std::string>> + std::tuple< + std::vector<internal::VarFromBTag>, + std::vector<internal::VarFromJet>, + FTagDataDependencyNames> createBvarGetters( const std::vector<FTagInputConfig>& inputs) { - std::set<std::string> bTagInputs; + FTagDataDependencyNames deps; std::vector<internal::VarFromBTag> varsFromBTag; std::vector<internal::VarFromJet> varsFromJet; @@ -644,27 +648,28 @@ namespace FlavorTagDiscriminants { if (input.type != EDMType::CUSTOM_GETTER) { auto filler = internal::get::varFromBTag(input.name, input.type, input.default_flag); - bTagInputs.insert(input.name); + deps.bTagInputs.insert(input.name); varsFromBTag.push_back(filler); } else { varsFromJet.push_back(internal::customGetterAndName(input.name)); } if (input.default_flag.size() > 0) { - bTagInputs.insert(input.default_flag); + deps.bTagInputs.insert(input.default_flag); } } - return std::make_tuple(varsFromBTag, varsFromJet, bTagInputs); + return std::make_tuple(varsFromBTag, varsFromJet, deps); } - std::tuple<std::vector<internal::TrackSequenceBuilder>,std::set<std::string>, - std::set<std::string>> createTrackGetters( + std::tuple< + std::vector<internal::TrackSequenceBuilder>, + FTagDataDependencyNames> + createTrackGetters( const std::vector<FTagTrackSequenceConfig>& track_sequences, const FTagOptions& options, const std::string& jetLinkName) { - std::set<std::string> trackInputs; - std::set<std::string> bTagInputs; + FTagDataDependencyNames deps; std::vector<internal::TrackSequenceBuilder> trackSequenceBuilders; for (const FTagTrackSequenceConfig& cfg: track_sequences) { @@ -683,21 +688,23 @@ namespace FlavorTagDiscriminants { track_data_deps.merge(deps); } trackSequenceBuilders.push_back(track_getter); - trackInputs.merge(track_data_deps); - bTagInputs.insert(jetLinkName); - bTagInputs.insert(options.track_link_name); + deps.trackInputs.merge(track_data_deps); + deps.bTagInputs.insert(jetLinkName); + deps.bTagInputs.insert(options.track_link_name); } - return std::make_tuple(trackSequenceBuilders, bTagInputs, trackInputs); + return std::make_tuple(trackSequenceBuilders, deps); } - std::tuple<std::map<std::string, internal::OutNode>, std::set<std::string>> - createDecorators( + std::tuple< + std::map<std::string, internal::OutNode>, + FTagDataDependencyNames> + createDecorators( const lwt::GraphConfig& config, const FTagOptions& options) { - std::set<std::string> bTagOutputs; + FTagDataDependencyNames deps; std::map<std::string, internal::OutNode> decorators; std::map<std::string, std::string> remap = options.remap_scalar; @@ -710,7 +717,7 @@ namespace FlavorTagDiscriminants { // let user rename the output if (auto h = remap.extract(name)) name = h.mapped(); - bTagOutputs.insert(name); + deps.bTagOutputs.insert(name); SG::AuxElement::Decorator<float> f(name); node.emplace_back(element, f); @@ -728,7 +735,7 @@ namespace FlavorTagDiscriminants { throw std::logic_error("found unused output remapping(s): " + outputs); } - return std::make_tuple(decorators, bTagOutputs); + return std::make_tuple(decorators, deps); } } // end of datapre namespace diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/FTagDataDependencyNames.cxx b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/FTagDataDependencyNames.cxx new file mode 100644 index 0000000000000000000000000000000000000000..f0f69cfd042055dc32114f11c630b1d7edb0ee4c --- /dev/null +++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/FTagDataDependencyNames.cxx @@ -0,0 +1,20 @@ +/* + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +*/ + +#include "FlavorTagDiscriminants/FTagDataDependencyNames.h" + +namespace FlavorTagDiscriminants { + FTagDataDependencyNames FTagDataDependencyNames::operator+( + FTagDataDependencyNames d2) const { + FTagDataDependencyNames d1 = *this; + d1.trackInputs.merge(d2.trackInputs); + d1.bTagInputs.merge(d2.bTagInputs); + d1.bTagOutputs.merge(d2.bTagOutputs); + return d1; + } + void FTagDataDependencyNames::operator+=(FTagDataDependencyNames d) { + FTagDataDependencyNames tmp = *this + d; + *this = tmp; + } +} diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/GNNTool.cxx b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/GNNTool.cxx index 53ec5a04a064e466d808d2434b51cbb158588122..935d6227f5d22740eb0a41267f1071abe1db809a 100644 --- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/GNNTool.cxx +++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/GNNTool.cxx @@ -62,21 +62,22 @@ namespace FlavorTagDiscriminants { m_config = lwt::parse_json_graph(gnn_config_stream); - dataprep::createGetterConfig( - m_config, flip_config, m_props.variableRemapping, trackLinkType, - m_inputs, m_track_sequences, m_options); + std::tie(m_inputs, m_track_sequences, m_options) = + dataprep::createGetterConfig( + m_config, flip_config, m_props.variableRemapping, trackLinkType); - std::tie(m_varsFromBTag, m_varsFromJet, m_dataDependencyNames.bTagInputs) = + std::tie(m_varsFromBTag, m_varsFromJet, m_dataDependencyNames) = dataprep::createBvarGetters(m_inputs); - std::set<std::string> bTagInputsTrackGetter; - std::tie(m_trackSequenceBuilders, bTagInputsTrackGetter, - m_dataDependencyNames.trackInputs) = + FTagDataDependencyNames bTagInputsTrackGetter; + std::tie(m_trackSequenceBuilders, bTagInputsTrackGetter) = dataprep::createTrackGetters(m_track_sequences, m_options, jetLinkName); - m_dataDependencyNames.bTagInputs.merge(bTagInputsTrackGetter); + m_dataDependencyNames += bTagInputsTrackGetter; - std::tie(m_decorators, m_dataDependencyNames.bTagOutputs) = + FTagDataDependencyNames bTagOutputs; + std::tie(m_decorators, bTagOutputs) = dataprep::createDecorators(m_config, m_options); + m_dataDependencyNames += bTagOutputs; return StatusCode::SUCCESS; } diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/src/JetTagConditionalDecoratorAlg.cxx b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/src/JetTagConditionalDecoratorAlg.cxx new file mode 100644 index 0000000000000000000000000000000000000000..194bf3c1b9fb855039514ebe8be913b95b2abdd0 --- /dev/null +++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/src/JetTagConditionalDecoratorAlg.cxx @@ -0,0 +1,42 @@ +/* + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration +*/ + +#include "FlavorTagDiscriminants/JetTagConditionalDecoratorAlg.h" + +namespace FlavorTagDiscriminants { + JetTagConditionalDecoratorAlg::JetTagConditionalDecoratorAlg( + const std::string& name, ISvcLocator* svcloc): + detail::JetTag_t(name, svcloc) + { + } + + StatusCode JetTagConditionalDecoratorAlg::initialize() { + ATH_CHECK(detail::JetTag_t::initialize()); + m_tagFlagReadDecor = SG::ReadDecorHandleKey<xAOD::JetContainer>( + this, m_tagFlag, m_containerKey.key() + "." + m_tagFlag, ""); + ATH_CHECK(m_tagFlagReadDecor.initialize()); + return StatusCode::SUCCESS; + } + + StatusCode JetTagConditionalDecoratorAlg::execute( + const EventContext& cxt ) const { + SG::ReadDecorHandle<xAOD::JetContainer, char> container( + m_tagFlagReadDecor, cxt); + if (!container.isValid()) { + ATH_MSG_ERROR("no container " << container.key()); + return StatusCode::FAILURE; + } + ATH_MSG_DEBUG( + "Decorating " + std::to_string(container->size()) + " elements"); + for (const auto* element: *container) { + if (container(*element)) { + m_decorator->decorate(*element); + } else { + m_decorator->decorateWithDefaults(*element); + } + } + return StatusCode::SUCCESS; + } + +} diff --git a/PhysicsAnalysis/JetTagging/JetTagValidation/JetTagDQA/data/PhysValBtag_VariablesMenu.json b/PhysicsAnalysis/JetTagging/JetTagValidation/JetTagDQA/data/PhysValBtag_VariablesMenu.json index 078b128bc81e977e8d968541223af6426cf7f305..118a14259ca0fe5c140d9afe99f94852aa501021 100755 --- a/PhysicsAnalysis/JetTagging/JetTagValidation/JetTagDQA/data/PhysValBtag_VariablesMenu.json +++ b/PhysicsAnalysis/JetTagging/JetTagValidation/JetTagDQA/data/PhysValBtag_VariablesMenu.json @@ -396,6 +396,21 @@ "forData": "true" }, + "DL1d": { + "_comment": "pb, pc, and pu", + "title": "DL1d", + "xtitle": "DL1d px", + "ytitle": "Jets", + "path": {"ART": "bTagging", "PHYSVAL": "tagger"}, + "xbins": 100, + "xmin": 0, + "xmax": 1, + "forEach": ["pb", "pc", "pu"], + "forEachTruthType": ["U", "B", "C", "DATA"], + "type": "TH1D", + "forData": "true" + }, + "DL1r": { "_comment": "pb, pc, and pu", "title": "DL1r", diff --git a/PhysicsAnalysis/JetTagging/JetTagValidation/JetTagDQA/scripts/Draw_PhysVal_btagROC.c b/PhysicsAnalysis/JetTagging/JetTagValidation/JetTagDQA/scripts/Draw_PhysVal_btagROC.c index d1c4abbb89ba05660ced96f3120edf1097e7d3ff..d0c320d296af3f1e53df96a6c1ae461a28387a97 100644 --- a/PhysicsAnalysis/JetTagging/JetTagValidation/JetTagDQA/scripts/Draw_PhysVal_btagROC.c +++ b/PhysicsAnalysis/JetTagging/JetTagValidation/JetTagDQA/scripts/Draw_PhysVal_btagROC.c @@ -72,7 +72,7 @@ const float EffMax=1.; //Some global variables for plotting: // taggers with 'old_taggers' in their name are assumed to be in the folder called 'old_taggers' in the merged root file -const vector<TString> taggers = {"IP2D","IP3D","RNNIP","SV1","IP3DSV1","MV2c10","JetFitter","DL1","DL1r"}; +const vector<TString> taggers = {"IP2D","IP3D","RNNIP","SV1","IP3DSV1","MV2c10","JetFitter","DL1","DL1d","DL1r"}; //const vector<TString> taggers = {"IP2D"}; //const vector<TString> taggers = {"IP3D"}; //const vector<TString> taggers = {"RNNIP"}; @@ -132,6 +132,7 @@ void fill_WP_values(){ WP_values.insert(make_pair<TString, vector<TString>>("SV1", {"40", "50", "60"})); WP_values.insert(make_pair<TString, vector<TString>>("JetFitter", {"50", "70", "80"})); WP_values.insert(make_pair<TString, vector<TString>>("DL1", {"60", "70", "77", "85"})); + WP_values.insert(make_pair<TString, vector<TString>>("DL1d", {"60", "70", "77", "85"})); WP_values.insert(make_pair<TString, vector<TString>>("DL1r", {"60", "70", "77", "85"})); WP_values.insert(make_pair<TString, vector<TString>>("IP2D", {"50", "70", "80"})); WP_values.insert(make_pair<TString, vector<TString>>("IP3DSV1", {"50", "70", "80"})); @@ -143,6 +144,7 @@ void fill_WP_values(){ WP_values.insert(make_pair<TString, vector<TString>>("SV1", {"60"})); WP_values.insert(make_pair<TString, vector<TString>>("JetFitter", {"70"})); WP_values.insert(make_pair<TString, vector<TString>>("DL1", {"70"})); + WP_values.insert(make_pair<TString, vector<TString>>("DL1d", {"70"})); WP_values.insert(make_pair<TString, vector<TString>>("DL1r", {"70"})); WP_values.insert(make_pair<TString, vector<TString>>("IP2D", {"70"})); WP_values.insert(make_pair<TString, vector<TString>>("IP3DSV1", {"70"})); diff --git a/PhysicsAnalysis/JetTagging/JetTagValidation/JetTagDQA/scripts/mergePhysValFiles.py b/PhysicsAnalysis/JetTagging/JetTagValidation/JetTagDQA/scripts/mergePhysValFiles.py index f145147ef7c01342343fd176f0cff58549be11c1..f6fe7e31afbf18eed862836c8e71ff4b9bd212f9 100644 --- a/PhysicsAnalysis/JetTagging/JetTagValidation/JetTagDQA/scripts/mergePhysValFiles.py +++ b/PhysicsAnalysis/JetTagging/JetTagValidation/JetTagDQA/scripts/mergePhysValFiles.py @@ -23,6 +23,7 @@ categories = ['jet', 'tagger_SV1', 'tagger_JetFitter', 'tagger_DL1', + 'tagger_DL1d', 'tagger_DL1r', 'old_taggers', #'tagger_IP2D', @@ -43,7 +44,7 @@ sub_categories_type_1 = [ '_incl', '_muon', ] -categories_with_subcategories_type_2 = ['tagger_IP3D', 'tagger_RNNIP', 'tagger_SV1', 'tagger_JetFitter', 'tagger_DL1', 'tagger_DL1r'] +categories_with_subcategories_type_2 = ['tagger_IP3D', 'tagger_RNNIP', 'tagger_SV1', 'tagger_JetFitter', 'tagger_DL1', 'tagger_DL1d', 'tagger_DL1r'] sub_categories_type_2 = [ '_pt_ttbar', '_pt_Zprime', @@ -66,6 +67,7 @@ sub_categories_TProfiles = ['IP3D', 'SV1', 'JetFitter', 'DL1', + 'DL1d', 'DL1r', 'IP2D', 'IP3DSV1', diff --git a/PhysicsAnalysis/JetTagging/JetTagValidation/JetTagDQA/src/BTaggingValidationPlots.cxx b/PhysicsAnalysis/JetTagging/JetTagValidation/JetTagDQA/src/BTaggingValidationPlots.cxx index 0a86b247797a5566d7796968ab6f3866bc2cdfed..aee68d37f99118f91cc6ee0a1da6ca97e1d92315 100644 --- a/PhysicsAnalysis/JetTagging/JetTagValidation/JetTagDQA/src/BTaggingValidationPlots.cxx +++ b/PhysicsAnalysis/JetTagging/JetTagValidation/JetTagDQA/src/BTaggingValidationPlots.cxx @@ -739,6 +739,9 @@ namespace JetTagDQA{ m_DL1_pb = bookHistogram("DL1_pb", "DL1_pb", m_sParticleType); m_DL1_pc = bookHistogram("DL1_pc", "DL1_pc", m_sParticleType); m_DL1_pu = bookHistogram("DL1_pu", "DL1_pu", m_sParticleType); + m_DL1d_pb = bookHistogram("DL1d_pb", "DL1d_pb", m_sParticleType); + m_DL1d_pc = bookHistogram("DL1d_pc", "DL1d_pc", m_sParticleType); + m_DL1d_pu = bookHistogram("DL1d_pu", "DL1d_pu", m_sParticleType); m_DL1r_pb = bookHistogram("DL1r_pb", "DL1r_pb", m_sParticleType); m_DL1r_pc = bookHistogram("DL1r_pc", "DL1r_pc", m_sParticleType); m_DL1r_pu = bookHistogram("DL1r_pu", "DL1r_pu", m_sParticleType); @@ -1534,13 +1537,28 @@ namespace JetTagDQA{ btag->MVx_discriminant("MV2c10", weight_MV2c10); // get the DL1x vars - double DL1_pb = btag->auxdata<ftagfloat_t>("DL1_pb"); - double DL1_pc = btag->auxdata<ftagfloat_t>("DL1_pc"); - double DL1_pu = btag->auxdata<ftagfloat_t>("DL1_pu"); + double DL1_pb, DL1_pu, DL1_pc; + try{ DL1_pb = btag->auxdata<ftagfloat_t>("DL1_pb"); } + catch(std::exception& exception){ DL1_pb = -1; } + try{ DL1_pu = btag->auxdata<ftagfloat_t>("DL1_pu"); } + catch(std::exception& exception){ DL1_pu = -1; } + try{ DL1_pc = btag->auxdata<ftagfloat_t>("DL1_pc"); } + catch(std::exception& exception){ DL1_pc = -1; } m_DL1_pb->Fill(DL1_pb, event->beamSpotWeight()); m_DL1_pu->Fill(DL1_pu, event->beamSpotWeight()); m_DL1_pc->Fill(DL1_pc, event->beamSpotWeight()); + double DL1d_pb, DL1d_pu, DL1d_pc; + try{ DL1d_pb = btag->auxdata<ftagfloat_t>("DL1dv00_pb"); } + catch(std::exception& exception){ DL1d_pb = -1; } + try{ DL1d_pu = btag->auxdata<ftagfloat_t>("DL1dv00_pu"); } + catch(std::exception& exception){ DL1d_pu = -1; } + try{ DL1d_pc = btag->auxdata<ftagfloat_t>("DL1dv00_pc"); } + catch(std::exception& exception){ DL1d_pc = -1; } + m_DL1d_pb->Fill(DL1d_pb, event->beamSpotWeight()); + m_DL1d_pu->Fill(DL1d_pu, event->beamSpotWeight()); + m_DL1d_pc->Fill(DL1d_pc, event->beamSpotWeight()); + double DL1r_pb, DL1r_pu, DL1r_pc; try{ DL1r_pb = btag->auxdata<ftagfloat_t>("DL1r_pb"); } catch(std::exception& exception){ DL1r_pb = -1; } @@ -1554,9 +1572,10 @@ namespace JetTagDQA{ // calculate the DL1 discriminant value double weight_DL1 = log( DL1_pb / ( DL1_pc * m_DL1_fc + DL1_pu * (1-m_DL1_fc) ) ); + double weight_DL1d = log( DL1d_pb / ( DL1d_pc * m_DL1d_fc + DL1d_pu * (1-m_DL1d_fc) ) ); double weight_DL1r = log( DL1r_pb / ( DL1r_pc * m_DL1r_fc + DL1r_pu * (1-m_DL1r_fc) ) ); - updateNJetsThatPassedWPCutsMap(nJetsThatPassedWPCuts, btag->IP3D_loglikelihoodratio(), btag->IP2D_loglikelihoodratio(), weight_RNNIP, btag->SV1_loglikelihoodratio(), btag->SV1plusIP3D_discriminant(), btag->JetFitter_loglikelihoodratio(), weight_MV2c10, weight_DL1, weight_DL1r); + updateNJetsThatPassedWPCutsMap(nJetsThatPassedWPCuts, btag->IP3D_loglikelihoodratio(), btag->IP2D_loglikelihoodratio(), weight_RNNIP, btag->SV1_loglikelihoodratio(), btag->SV1plusIP3D_discriminant(), btag->JetFitter_loglikelihoodratio(), weight_MV2c10, weight_DL1, weight_DL1d, weight_DL1r); // fill the histograms with the tagger discriminants for(std::map<std::string, TH1*>::const_iterator hist_iter=m_weight_histos.begin(); hist_iter!=m_weight_histos.end(); ++hist_iter){ @@ -1593,6 +1612,7 @@ namespace JetTagDQA{ // DL1 taggers bool pass_nTracksCut_DL1 = nGTinSV1 > 0 && nIP3DTracks > 0; BTaggingValidationPlots::fillDiscriminantHistograms("DL1_", weight_DL1, m_DL1_workingPoints, truth_label, hist_iter, label_iter, pass_nTracksCut_DL1, jet->pt(), jet_Lxy, onZprime, event); + BTaggingValidationPlots::fillDiscriminantHistograms("DL1d_", weight_DL1d, m_DL1d_workingPoints, truth_label, hist_iter, label_iter, pass_nTracksCut_DL1, jet->pt(), jet_Lxy, onZprime, event); BTaggingValidationPlots::fillDiscriminantHistograms("DL1r_", weight_DL1r, m_DL1r_workingPoints, truth_label, hist_iter, label_iter, pass_nTracksCut_DL1, jet->pt(), jet_Lxy, onZprime, event); } } @@ -1643,6 +1663,7 @@ namespace JetTagDQA{ else if(*tag_iter == "JetFitter") workingPoints = m_JetFitter_workingPoints; else if(*tag_iter == "MV2c10") workingPoints = m_MV2c10_workingPoints; else if(*tag_iter == "DL1") workingPoints = m_DL1_workingPoints; + else if(*tag_iter == "DL1d") workingPoints = m_DL1d_workingPoints; else if(*tag_iter == "DL1r") workingPoints = m_DL1r_workingPoints; // loop over the working points for(std::map<std::string, double>::const_iterator working_points_iter = workingPoints.begin(); working_points_iter != workingPoints.end(); ++working_points_iter){ @@ -1668,6 +1689,7 @@ namespace JetTagDQA{ else if(*tag_iter == "JetFitter") workingPoints = m_JetFitter_workingPoints; else if(*tag_iter == "MV2c10") workingPoints = m_MV2c10_workingPoints; else if(*tag_iter == "DL1") workingPoints = m_DL1_workingPoints; + else if(*tag_iter == "DL1d") workingPoints = m_DL1d_workingPoints; else if(*tag_iter == "DL1r") workingPoints = m_DL1r_workingPoints; // loop over the working points for(std::map<std::string, double>::const_iterator working_points_iter = workingPoints.begin(); working_points_iter != workingPoints.end(); ++working_points_iter){ @@ -1678,7 +1700,7 @@ namespace JetTagDQA{ } } - void BTaggingValidationPlots::updateNJetsThatPassedWPCutsMap(std::map<std::string, int>& nJetsThatPassedWPCuts, const double& discr_IP3D, const double& discr_IP2D, const double& discr_RNNIP, const double& discr_SV1, const double& discr_IP3DSV1, const double& discr_JetFitter, const double& discr_MV2c10, const double& discr_DL1, const double& discr_DL1r){ + void BTaggingValidationPlots::updateNJetsThatPassedWPCutsMap(std::map<std::string, int>& nJetsThatPassedWPCuts, const double& discr_IP3D, const double& discr_IP2D, const double& discr_RNNIP, const double& discr_SV1, const double& discr_IP3DSV1, const double& discr_JetFitter, const double& discr_MV2c10, const double& discr_DL1, const double& discr_DL1d, const double& discr_DL1r){ // loop over the taggers for(std::vector<std::string>::const_iterator tag_iter = m_taggers.begin(); tag_iter != m_taggers.end(); ++tag_iter){ // get the right working points and discriminant values @@ -1692,6 +1714,7 @@ namespace JetTagDQA{ else if(*tag_iter == "JetFitter"){ workingPoints = m_JetFitter_workingPoints; discriminant_value = discr_JetFitter; } else if(*tag_iter == "MV2c10"){ workingPoints = m_MV2c10_workingPoints; discriminant_value = discr_MV2c10; } else if(*tag_iter == "DL1"){ workingPoints = m_DL1_workingPoints; discriminant_value = discr_DL1; } + else if(*tag_iter == "DL1d"){ workingPoints = m_DL1d_workingPoints; discriminant_value = discr_DL1d; } else if(*tag_iter == "DL1r"){ workingPoints = m_DL1r_workingPoints; discriminant_value = discr_DL1r; } // loop over the working points for(std::map<std::string, double>::const_iterator working_points_iter = workingPoints.begin(); working_points_iter != workingPoints.end(); ++working_points_iter){ @@ -1717,6 +1740,7 @@ namespace JetTagDQA{ else if(*tag_iter == "JetFitter") workingPoints = m_JetFitter_workingPoints; else if(*tag_iter == "MV2c10") workingPoints = m_MV2c10_workingPoints; else if(*tag_iter == "DL1") workingPoints = m_DL1_workingPoints; + else if(*tag_iter == "DL1d") workingPoints = m_DL1d_workingPoints; else if(*tag_iter == "DL1r") workingPoints = m_DL1r_workingPoints; // loop over the working points for(std::map<std::string, double>::const_iterator working_points_iter = workingPoints.begin(); working_points_iter != workingPoints.end(); ++working_points_iter){ @@ -1792,6 +1816,7 @@ namespace JetTagDQA{ m_taggers.push_back("JetFitter"); m_taggers.push_back("MV2c10"); m_taggers.push_back("DL1"); + m_taggers.push_back("DL1d"); m_taggers.push_back("DL1r"); // list of all truth labels @@ -1853,35 +1878,26 @@ namespace JetTagDQA{ m_JetFitter_workingPoints.insert(std::make_pair("80", -3.3)); } - if (m_sParticleType=="antiKt4EMPFlowJets"){ // these WP values were read from the CDI file - // MV2c10 (PFlow 2018_10) - m_MV2c10_workingPoints.insert(std::make_pair("70", 0.826829)); - if(m_detailLevel > 10){ - m_MV2c10_workingPoints.insert(std::make_pair("60", 0.939187)); - m_MV2c10_workingPoints.insert(std::make_pair("77", 0.629222)); - m_MV2c10_workingPoints.insert(std::make_pair("85", 0.0722749)); - } - - // DL1 (PFlow 2019_03) - m_DL1_fc = 0.018; - m_DL1_workingPoints.insert(std::make_pair("70", 3.095)); - if(m_detailLevel > 10){ - m_DL1_workingPoints.insert(std::make_pair("60", 4.415)); - m_DL1_workingPoints.insert(std::make_pair("77", 2.015)); - m_DL1_workingPoints.insert(std::make_pair("85", 0.365)); - } + // DL1d (WP cuts determined in Nov 2021) + m_DL1d_fc = 0.018; + m_DL1d_workingPoints.insert(std::make_pair("70", 3.494)); + if(m_detailLevel > 10){ + m_DL1d_workingPoints.insert(std::make_pair("60", 4.884)); + m_DL1d_workingPoints.insert(std::make_pair("77", 2.443)); + m_DL1d_workingPoints.insert(std::make_pair("85", 0.930)); + } - // DL1r (PFlow 2019_03) - m_DL1r_fc = 0.018; - m_DL1r_workingPoints.insert(std::make_pair("70", 3.245)); - if(m_detailLevel > 10){ - m_DL1r_workingPoints.insert(std::make_pair("60", 4.565)); - m_DL1r_workingPoints.insert(std::make_pair("77", 2.195)); - m_DL1r_workingPoints.insert(std::make_pair("85", 0.665)); - } + // DL1r (PFlow 2019_03) + m_DL1r_fc = 0.018; + m_DL1r_workingPoints.insert(std::make_pair("70", 3.245)); + if(m_detailLevel > 10){ + m_DL1r_workingPoints.insert(std::make_pair("60", 4.565)); + m_DL1r_workingPoints.insert(std::make_pair("77", 2.195)); + m_DL1r_workingPoints.insert(std::make_pair("85", 0.665)); } - else if (m_sParticleType=="antiKt4EMTopoJets"){ // these WP values were read from the CDI file + // WP cut that depend on the jet collection + if (m_sParticleType=="antiKt4EMTopoJets"){ // these WP values were read from the CDI file // MV2c10 (EMTopo 2018_10) m_MV2c10_workingPoints.insert(std::make_pair("70", 0.830283)); if(m_detailLevel > 10){ @@ -1897,75 +1913,10 @@ namespace JetTagDQA{ m_DL1_workingPoints.insert(std::make_pair("60", 2.73599)); m_DL1_workingPoints.insert(std::make_pair("77", 1.44686)); m_DL1_workingPoints.insert(std::make_pair("85", 0.463453)); - } - - // DL1r (no WPs for EMTopo! use Pflow ones: PFlow 2019_03) - m_DL1r_fc = 0.018; - m_DL1r_workingPoints.insert(std::make_pair("70", 3.245)); - if(m_detailLevel > 10){ - m_DL1r_workingPoints.insert(std::make_pair("60", 4.565)); - m_DL1r_workingPoints.insert(std::make_pair("77", 2.195)); - m_DL1r_workingPoints.insert(std::make_pair("85", 0.665)); } } - else if (m_sParticleType=="antiKt2PV0TrackJets"){ // these WP values were taken from this twiki in Dec 2020: https://twiki.cern.ch/twiki/bin/viewauth/AtlasProtected/BTaggingBenchmarksRelease21#DL1_tagger - // MV2c10 - m_MV2c10_workingPoints.insert(std::make_pair("70", 0.66)); - if(m_detailLevel > 10){ - m_MV2c10_workingPoints.insert(std::make_pair("60", 0.86)); - m_MV2c10_workingPoints.insert(std::make_pair("77", 0.38)); - m_MV2c10_workingPoints.insert(std::make_pair("85", -0.15)); - } - - // DL1 - m_DL1_fc = 0.080; - m_DL1_workingPoints.insert(std::make_pair("70", 1.47)); - if(m_detailLevel > 10){ - m_DL1_workingPoints.insert(std::make_pair("60", 2.13)); - m_DL1_workingPoints.insert(std::make_pair("77", 0.89)); - m_DL1_workingPoints.insert(std::make_pair("85", 0.13)); - } - - // DL1r - m_DL1r_fc = 0.030; - m_DL1r_workingPoints.insert(std::make_pair("70", 2.17)); - if(m_detailLevel > 10){ - m_DL1r_workingPoints.insert(std::make_pair("60", 2.89)); - m_DL1r_workingPoints.insert(std::make_pair("77", 1.79)); - m_DL1r_workingPoints.insert(std::make_pair("85", 1.07)); - } - } - - else if (m_sParticleType=="antiKtVR30Rmax4Rmin02TrackJets"){ // these WP values were taken from this twiki in Dec 2020: https://twiki.cern.ch/twiki/bin/viewauth/AtlasProtected/BTaggingBenchmarksRelease21#DL1_tagger - // MV2c10 - m_MV2c10_workingPoints.insert(std::make_pair("70", 0.79)); - if(m_detailLevel > 10){ - m_MV2c10_workingPoints.insert(std::make_pair("60", 0.92)); - m_MV2c10_workingPoints.insert(std::make_pair("77", 0.58)); - m_MV2c10_workingPoints.insert(std::make_pair("85", 0.05)); - } - - // DL1 - m_DL1_fc = 0.080; - m_DL1_workingPoints.insert(std::make_pair("70", 1.81)); - if(m_detailLevel > 10){ - m_DL1_workingPoints.insert(std::make_pair("60", 2.50)); - m_DL1_workingPoints.insert(std::make_pair("77", 1.31)); - m_DL1_workingPoints.insert(std::make_pair("85", 0.42)); - } - - // DL1r - m_DL1r_fc = 0.030; - m_DL1r_workingPoints.insert(std::make_pair("70", 2.71)); - if(m_detailLevel > 10){ - m_DL1r_workingPoints.insert(std::make_pair("60", 3.88)); - m_DL1r_workingPoints.insert(std::make_pair("77", 2.06)); - m_DL1r_workingPoints.insert(std::make_pair("85", 1.31)); - } - } - - else { // no WPs defined for this jet collection ... -- use the PFlow WPs // these WP values were read from the CDI file + else { // PFlow collection and other collections with no WPs defined -> use the PFlow WPs // these WP values were read from the CDI file // MV2c10 (PFlow 2018_10) m_MV2c10_workingPoints.insert(std::make_pair("70", 0.826829)); if(m_detailLevel > 10){ @@ -1982,15 +1933,6 @@ namespace JetTagDQA{ m_DL1_workingPoints.insert(std::make_pair("77", 2.015)); m_DL1_workingPoints.insert(std::make_pair("85", 0.365)); } - - // DL1r (PFlow 2019_03) - m_DL1r_fc = 0.018; - m_DL1r_workingPoints.insert(std::make_pair("70", 3.245)); - if(m_detailLevel > 10){ - m_DL1r_workingPoints.insert(std::make_pair("60", 4.565)); - m_DL1r_workingPoints.insert(std::make_pair("77", 2.195)); - m_DL1r_workingPoints.insert(std::make_pair("85", 0.665)); - } } } @@ -2063,6 +2005,10 @@ namespace JetTagDQA{ else if(*tag_iter == "DL1"){ bookDiscriminantVsPTAndLxyHistograms("DL1", m_DL1_workingPoints, false, label_iter, m_sParticleType); } + //Dl1d + else if(*tag_iter == "DL1d"){ + bookDiscriminantVsPTAndLxyHistograms("DL1d", m_DL1d_workingPoints, false, label_iter, m_sParticleType); + } //Dl1r else if(*tag_iter == "DL1r"){ bookDiscriminantVsPTAndLxyHistograms("DL1r", m_DL1r_workingPoints, false, label_iter, m_sParticleType); diff --git a/PhysicsAnalysis/JetTagging/JetTagValidation/JetTagDQA/src/BTaggingValidationPlots.h b/PhysicsAnalysis/JetTagging/JetTagValidation/JetTagDQA/src/BTaggingValidationPlots.h index 9f46861ffa80a1c909a5ea403ebd3a516624f81d..5b54a8c70cbad0ae96a17739a83ef03d8da69f5f 100644 --- a/PhysicsAnalysis/JetTagging/JetTagValidation/JetTagDQA/src/BTaggingValidationPlots.h +++ b/PhysicsAnalysis/JetTagging/JetTagValidation/JetTagDQA/src/BTaggingValidationPlots.h @@ -42,7 +42,7 @@ namespace JetTagDQA{ void bookNJetsThatPassedWPCutsHistos(); void initializeNJetsThatPassedWPCutsMap(std::map<std::string, int>& nJetsThatPassedWPCuts); - void updateNJetsThatPassedWPCutsMap(std::map<std::string, int>& nJetsThatPassedWPCuts, const double& discr_IP3D, const double& discr_IP2D, const double& discr_RNNIP, const double& discr_SV1, const double& discr_IP3DSV1, const double& discr_JetFitter, const double& discr_MV2c10, const double& discr_DL1, const double& discr_DL1r); + void updateNJetsThatPassedWPCutsMap(std::map<std::string, int>& nJetsThatPassedWPCuts, const double& discr_IP3D, const double& discr_IP2D, const double& discr_RNNIP, const double& discr_SV1, const double& discr_IP3DSV1, const double& discr_JetFitter, const double& discr_MV2c10, const double& discr_DL1, const double& discr_DL1d, const double& discr_DL1r); void fillNJetsThatPassedWPCutsHistos(std::map<std::string, int>& nJetsThatPassedWPCuts, const xAOD::EventInfo* event); void makeEfficiencyVsPtPlot(TH1* hReco, TProfile* pEff); @@ -544,6 +544,9 @@ namespace JetTagDQA{ TH1* m_DL1_pb = nullptr; TH1* m_DL1_pc = nullptr; TH1* m_DL1_pu = nullptr; + TH1* m_DL1d_pb = nullptr; + TH1* m_DL1d_pc = nullptr; + TH1* m_DL1d_pu = nullptr; TH1* m_DL1r_pb = nullptr; TH1* m_DL1r_pc = nullptr; TH1* m_DL1r_pu = nullptr; @@ -607,9 +610,11 @@ namespace JetTagDQA{ std::map<std::string, double> m_JetFitter_workingPoints; std::map<std::string, double> m_MV2c10_workingPoints; std::map<std::string, double> m_DL1_workingPoints; + std::map<std::string, double> m_DL1d_workingPoints; std::map<std::string, double> m_DL1r_workingPoints; double m_RNNIP_fc; double m_DL1_fc; + double m_DL1d_fc; double m_DL1r_fc; std::map<std::string, TH1*> m_weight_histos; std::map<std::string, TProfile*> m_eff_profiles; diff --git a/PhysicsAnalysis/PrimaryDPDMaker/share/DRAW_DIMU.py b/PhysicsAnalysis/PrimaryDPDMaker/share/DRAW_DIMU.py index 249c9b221c94e0283d24a88d823d1c2ee1b40d30..5ab78ee3d98fd9fa2847438c221629f88907b9ea 100644 --- a/PhysicsAnalysis/PrimaryDPDMaker/share/DRAW_DIMU.py +++ b/PhysicsAnalysis/PrimaryDPDMaker/share/DRAW_DIMU.py @@ -52,7 +52,7 @@ goodMuonSkimmingTool = DerivationFramework__DRAW_ZMUMUSkimmingTool(name = "DRAW_ MuonPtCut = 3.5) ToolSvc += goodMuonSkimmingTool -periods = TriggerPeriod.future | TriggerPeriod.y2015 | TriggerPeriod.y2016 | TriggerPeriod.y2017 | TriggerPeriod.y2018 +periods = TriggerPeriod.y2015 | TriggerPeriod.y2016 | TriggerPeriod.y2017 | TriggerPeriod.y2018 allUnprescaledTriggers = TriggerAPI.getLowestUnprescaledAnyPeriod(periods, TriggerType.mu) print("DRAW_DIMU: will skim on an OR of the following muon triggers (list provided at run-time by the TriggerAPI):") print(allUnprescaledTriggers) diff --git a/PhysicsAnalysis/PrimaryDPDMaker/share/DRAW_ZMUMU.py b/PhysicsAnalysis/PrimaryDPDMaker/share/DRAW_ZMUMU.py index 31fce8231bb61ce09e1c23cdcde829f8b703b6f0..172e4de04f679b476157efc3a2738c74b092a0dc 100644 --- a/PhysicsAnalysis/PrimaryDPDMaker/share/DRAW_ZMUMU.py +++ b/PhysicsAnalysis/PrimaryDPDMaker/share/DRAW_ZMUMU.py @@ -52,7 +52,7 @@ goodMuonSkimmingTool = DerivationFramework__DRAW_ZMUMUSkimmingTool(name = "DRAW_ MuonPtCut = 20.0) ToolSvc += goodMuonSkimmingTool -periods = TriggerPeriod.future | TriggerPeriod.y2015 | TriggerPeriod.y2016 | TriggerPeriod.y2017 +periods = TriggerPeriod.y2015 | TriggerPeriod.y2016 | TriggerPeriod.y2017 | TriggerPeriod.y2018 allUnprescaledTriggers = TriggerAPI.getLowestUnprescaledAnyPeriod(periods, TriggerType.mu) print("DRAW_ZMUMU: will skim on an OR of the following muon triggers (list provided at run-time by the TriggerAPI):") print(allUnprescaledTriggers) diff --git a/PhysicsAnalysis/SUSYPhys/SUSYTools/CMakeLists.txt b/PhysicsAnalysis/SUSYPhys/SUSYTools/CMakeLists.txt index 240348ba018ce7c68c9a1282584a1d89b077d792..ba242e601b517662652d5349b8a7a5afbf4cabb0 100644 --- a/PhysicsAnalysis/SUSYPhys/SUSYTools/CMakeLists.txt +++ b/PhysicsAnalysis/SUSYPhys/SUSYTools/CMakeLists.txt @@ -90,7 +90,7 @@ if( XAOD_STANDALONE ) endif() # Log ignore patterns -set (extra_patterns " (Entire loop|Excluding first event|First event).*ms|cvmfs/atlas.*\.cern\.ch/repo|INFO|${ATLAS_PLATFORM}/data/SUSYTools|build(/Analysis.*)?/${ATLAS_PLATFORM}|mySTdefs_conf\.tmp|^Ran [0-9]+ tests in [0-9.]+s|create data set info.*|Booked|<HEADER>|Warning in <TClass::Init>|(start|done) processing event") +set (extra_patterns " (Entire loop|Excluding first event|First event).*ms|cvmfs/atlas.*\.cern\.ch/repo|INFO|${ATLAS_PLATFORM}/data/SUSYTools|build(/Analysis.*)?/${ATLAS_PLATFORM}|mySTdefs_conf\.tmp|^Ran [0-9]+ tests in [0-9.]+s|create data set info.*|Booked|<HEADER>|Warning in <TClass::Init>|(start|done) processing event|data/JetMomentTools") # Test(s) in the package: if( XAOD_STANDALONE ) diff --git a/PhysicsAnalysis/TopPhys/xAOD/TopAnalysis/Root/ObjectLoaderStandardCuts.cxx b/PhysicsAnalysis/TopPhys/xAOD/TopAnalysis/Root/ObjectLoaderStandardCuts.cxx index 0b4841fba3df79305946599854789d99b0faa8fe..6c769c6a352c325f3850a7449251f149ef36d3f3 100644 --- a/PhysicsAnalysis/TopPhys/xAOD/TopAnalysis/Root/ObjectLoaderStandardCuts.cxx +++ b/PhysicsAnalysis/TopPhys/xAOD/TopAnalysis/Root/ObjectLoaderStandardCuts.cxx @@ -8,7 +8,6 @@ #include "TopObjectSelectionTools/TopObjectSelection.h" #include "TopObjectSelectionTools/ElectronLikelihoodMC15.h" -#include "TopObjectSelectionTools/ElectronCutBasedMC15.h" //#include "TopObjectSelectionTools/FwdElectronMC15.h" #include "TopObjectSelectionTools/IsolationTools.h" #include "TopObjectSelectionTools/MuonMC15.h" @@ -49,18 +48,8 @@ namespace top { ///-- Electrons --/// if (topConfig->useElectrons()) { - if (topConfig->electronID().find("LH") == std::string::npos && - topConfig->electronIDLoose().find("LH") == std::string::npos) { - //both the tight and loose user settings do not contain LH -> cut based - objectSelection->electronSelection(new top::ElectronCutBasedMC15(topConfig->electronPtcut(), - topConfig->electronVetoLArCrack(), - topConfig->electronID(), - topConfig->electronIDLoose(), - new top::StandardIsolation( - topConfig->electronIsolation(), - topConfig->electronIsolationLoose()))); - } else if (topConfig->electronID().find("LH") != std::string::npos && - topConfig->electronIDLoose().find("LH") != std::string::npos) { + if (topConfig->electronID().find("LH") != std::string::npos && + topConfig->electronIDLoose().find("LH") != std::string::npos) { //user wants likelihood electrons objectSelection->electronSelection(new top::ElectronLikelihoodMC15(topConfig->electronPtcut(), topConfig->electronVetoLArCrack(), @@ -69,15 +58,16 @@ namespace top { new top::StandardIsolation( topConfig->electronIsolation(), topConfig->electronIsolationLoose()), + topConfig->electrond0Sigcut(), + topConfig->electrondeltaz0cut(), topConfig->applyTTVACut(), topConfig->useElectronChargeIDSelection() )); } else { - ATH_MSG_ERROR("Not sure it makes sense to use a mix of LH and cut-based electrons for the tight/loose definitions\n" - << "Tight electron definition is " << topConfig->electronID() << "\n" - << "Loose electron definition is " << topConfig->electronIDLoose() << "\n" - << "If it does make sense, feel free to fix this"); - throw std::runtime_error("Mixing LH and cut-based electron definitions for tight/loose"); + ATH_MSG_ERROR("Only likelihood-based electron ID is currently supported. You have selected:\n" + << "Tight electron definition: " << topConfig->electronID() << "\n" + << "Loose electron definition: " << topConfig->electronIDLoose()); + throw std::runtime_error("Unsupported electron ID option"); } } @@ -95,6 +85,8 @@ namespace top { else objectSelection->muonSelection(new top::MuonMC15(topConfig->muonPtcut(), new top::StandardIsolation(topConfig->muonIsolation(), topConfig->muonIsolationLoose()), + topConfig->muond0Sigcut(), + topConfig->muondeltaz0cut(), topConfig->applyTTVACut())); } diff --git a/PhysicsAnalysis/TopPhys/xAOD/TopConfiguration/Root/ConfigurationSettings.cxx b/PhysicsAnalysis/TopPhys/xAOD/TopConfiguration/Root/ConfigurationSettings.cxx index 4d27b77cdfb80a99eb0a3ff3809db7ddeec12970..ddf7fb4030d4fc1e1ab5dcedc181a77b4db89b99 100644 --- a/PhysicsAnalysis/TopPhys/xAOD/TopConfiguration/Root/ConfigurationSettings.cxx +++ b/PhysicsAnalysis/TopPhys/xAOD/TopConfiguration/Root/ConfigurationSettings.cxx @@ -60,6 +60,8 @@ namespace top { registerParameter("ElectronIDLoose", "Type of electron for background. Likelihood LooseAndBLayerLH, MediumLH, TightLH", "MediumLH"); registerParameter("ElectronPt", "Electron pT cut for object selection (in MeV). Default 25 GeV.", "25000."); + registerParameter("Electrond0Sig", "Electron d0 significance cut for object selection. Default 5", "5."); + registerParameter("Electrondeltaz0", "Electron delta z0 cut for object selection. Default 0.5 mm", "0.5"); registerParameter("EgammaSystematicModel", "Egamma Calibration Systematic model : FULL_v1 , 1NP_v1 (default)", "1NP_v1"); registerParameter("ElectronEfficiencySystematicModel", @@ -109,6 +111,8 @@ namespace top { registerParameter("MuonPt", "Muon pT cut for object selection (in MeV). Default 25 GeV.", "25000"); registerParameter("MuonEta", "Absolute Muon eta cut for object selection. Default 2.5.", "2.5"); + registerParameter("Muond0Sig", "Muon d0 significance cut for object selection. Default 3", "3."); + registerParameter("Muondeltaz0", "Muon delta z0 cut for object selection. Default 0.5 mm", "0.5"); registerParameter("MuonQuality", "Muon quality cut for object selection. Options are VeryLoose, Loose, Medium (default) and Tight", "Medium"); diff --git a/PhysicsAnalysis/TopPhys/xAOD/TopConfiguration/Root/TopConfig.cxx b/PhysicsAnalysis/TopPhys/xAOD/TopConfiguration/Root/TopConfig.cxx index 2c226d78b81c145f4d8a5ac0e09362e82f5d71ed..8a6e8a31538f332d524118f866db84d948f58d58 100644 --- a/PhysicsAnalysis/TopPhys/xAOD/TopConfiguration/Root/TopConfig.cxx +++ b/PhysicsAnalysis/TopPhys/xAOD/TopConfiguration/Root/TopConfig.cxx @@ -197,6 +197,8 @@ namespace top { m_electronIsolationLoose("SetMe"), m_electronIsolationSF("SetMe"), m_electronIsolationSFLoose("SetMe"), + m_electron_d0SigCut(5.0), + m_electron_delta_z0(0.5), m_electronIDDecoration("SetMe"), m_electronIDLooseDecoration("SetMe"), m_useElectronChargeIDSelection(false), @@ -1093,6 +1095,8 @@ namespace top { this->useElectronChargeIDSelection(settings->value("UseElectronChargeIDSelection")); this->useEgammaLeakageCorrection(settings->value("UseEgammaLeakageCorrection")); this->electronPtcut(std::stof(settings->value("ElectronPt"))); + this->electrond0Sigcut(std::stof(settings->value("Electrond0Sig"))); + this->electrondeltaz0cut(std::stof(settings->value("Electrondeltaz0"))); this->enablePromptLeptonImprovedVetoStudies(settings->value("EnablePromptLeptonImprovedVetoStudies")); @@ -1174,6 +1178,8 @@ namespace top { // Muon configuration this->muonPtcut(std::stof(settings->value("MuonPt"))); this->muonEtacut(std::stof(settings->value("MuonEta"))); + this->muond0Sigcut(std::stof(settings->value("Muond0Sig"))); + this->muondeltaz0cut(std::stof(settings->value("Muondeltaz0"))); this->muonQuality(settings->value("MuonQuality")); this->muonQualityLoose(settings->value("MuonQualityLoose")); { diff --git a/PhysicsAnalysis/TopPhys/xAOD/TopConfiguration/TopConfiguration/TopConfig.h b/PhysicsAnalysis/TopPhys/xAOD/TopConfiguration/TopConfiguration/TopConfig.h index a0e28fad218e74b1e644dcae0e73afd7b0dffcde..784e78631d0999b6a293b267e7b8e39962c095fd 100644 --- a/PhysicsAnalysis/TopPhys/xAOD/TopConfiguration/TopConfiguration/TopConfig.h +++ b/PhysicsAnalysis/TopPhys/xAOD/TopConfiguration/TopConfiguration/TopConfig.h @@ -739,6 +739,18 @@ namespace top { } } + inline virtual void electrond0Sigcut(const float d0sig) { + if (!m_configFixed) { + m_electron_d0SigCut = d0sig; + } + } + + inline virtual void electrondeltaz0cut(const float delta_z0) { + if (!m_configFixed) { + m_electron_delta_z0 = delta_z0; + } + } + inline virtual void electronIsolation(const std::string& iso) { if (!m_configFixed) { m_electronIsolation = iso; @@ -793,6 +805,8 @@ namespace top { inline virtual const std::string& electronIDLoose() const {return m_electronIDLoose;} inline virtual bool electronVetoLArCrack() const {return m_electronVetoLArCrack;} inline virtual float electronPtcut() const {return m_electronPtcut;} + inline virtual float electrond0Sigcut() const {return m_electron_d0SigCut;} + inline virtual float electrondeltaz0cut() const {return m_electron_delta_z0;} inline virtual const std::string& electronIsolation() const {return m_electronIsolation;} inline virtual const std::string& electronIsolationLoose() const {return m_electronIsolationLoose;} inline virtual const std::vector<std::string>& electronIsolationWPs() const {return m_electronIsolationWPs;} @@ -899,6 +913,18 @@ namespace top { } } + inline virtual void muond0Sigcut(const float d0sig) { + if (!m_configFixed) { + m_muon_d0SigCut = d0sig; + } + } + + inline virtual void muondeltaz0cut(const float delta_z0) { + if (!m_configFixed) { + m_muon_delta_z0 = delta_z0; + } + } + inline virtual void muonEtacut(const float eta) { if (!m_configFixed) { m_muonEtacut = eta; @@ -979,6 +1005,8 @@ namespace top { inline virtual float muonPtcut() const {return m_muonPtcut;} inline virtual float muonEtacut() const {return m_muonEtacut;} + inline virtual float muond0Sigcut() const {return m_muon_d0SigCut;} + inline virtual float muondeltaz0cut() const {return m_muon_delta_z0;} inline virtual const std::string& muonQuality() const {return m_muonQuality;} inline virtual const std::string& muonQualityLoose() const {return m_muonQualityLoose;} inline virtual bool muonUseMVALowPt() const {return m_muonUseMVALowPt;} diff --git a/PhysicsAnalysis/TopPhys/xAOD/TopObjectSelectionTools/Root/ElectronCutBasedMC15.cxx b/PhysicsAnalysis/TopPhys/xAOD/TopObjectSelectionTools/Root/ElectronCutBasedMC15.cxx deleted file mode 100644 index c9f99cc96ef4f5828575085fab5a502bccdaf9a4..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/TopPhys/xAOD/TopObjectSelectionTools/Root/ElectronCutBasedMC15.cxx +++ /dev/null @@ -1,67 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - */ - -#include "TopObjectSelectionTools/ElectronCutBasedMC15.h" - -namespace top { - ElectronCutBasedMC15::ElectronCutBasedMC15(double ptcut, bool vetoCrack, const std::string& quality, - const std::string& qualityLoose, IsolationBase* isolation) : - m_ptcut(ptcut), - m_vetoCrack(vetoCrack), - m_quality(quality), - m_qualityLoose(qualityLoose), - m_isolation(isolation) { - } - - bool ElectronCutBasedMC15::passSelection(const xAOD::Electron& el) const { - if (!passSelectionNoIsolation(el, m_quality)) return false; - - if (m_isolation && !m_isolation->passSelection(el)) return false; - - return true; - } - - bool ElectronCutBasedMC15::passSelectionLoose(const xAOD::Electron& el) const { - if (!passSelectionNoIsolation(el, m_qualityLoose)) return false; - - if (m_isolation && !m_isolation->passSelectionLoose(el)) return false; - - return true; - } - - bool ElectronCutBasedMC15::passSelectionNoIsolation(const xAOD::Electron& el, const std::string& quality) const { - // if (el.author() != xAOD::EgammaParameters::AuthorElectron && el.author() != xAOD::EgammaParameters::AuthorSofte) - // return false; - - if (el.pt() < m_ptcut) return false; - - // This will be replaced with the proper AsgElectronIsEMSelector - // Once the calib files are on afs (cvmfs?) - not there yet..... - if (!el.passSelection(quality)) return false; - - //WARNING: Not all electrons keep clusters in the derivation - //i.e. bad electrons (which is why we moved the check on the quality - //before the check on the calo cluster) - //Good electrons should always have a cluster, if not then crash to warn us - //Better than checking and silently doing nothing... - //This stops a crash - if (std::fabs(el.caloCluster()->etaBE(2)) > 2.47) return false; - - if (m_vetoCrack && std::fabs(el.caloCluster()->etaBE(2)) > 1.37 && - std::fabs(el.caloCluster()->etaBE(2)) < 1.52) return false; - - return true; - } - - void ElectronCutBasedMC15::print(std::ostream& os) const { - os << "ElectronCutBasedMC15\n"; - os << " * pT > " << m_ptcut << "\n"; - os << " * Currently disabled --- |cluster_eta| < 2.47 \n"; - os << " * Veto 1.37 < |cluster_eta| < 1.52? " << std::boolalpha << m_vetoCrack << "\n"; - os << " * Quality " << m_quality << "\n"; - - if (!m_isolation) os << " * No isolation requirement\n"; - else m_isolation->print(os); - } -} diff --git a/PhysicsAnalysis/TopPhys/xAOD/TopObjectSelectionTools/Root/ElectronLikelihoodMC15.cxx b/PhysicsAnalysis/TopPhys/xAOD/TopObjectSelectionTools/Root/ElectronLikelihoodMC15.cxx index 7cc4aff94c90b18d43111d2c5905957120084ab2..d628a458eefd47ebc81fb6ca7fd374651ee4c526 100644 --- a/PhysicsAnalysis/TopPhys/xAOD/TopObjectSelectionTools/Root/ElectronLikelihoodMC15.cxx +++ b/PhysicsAnalysis/TopPhys/xAOD/TopObjectSelectionTools/Root/ElectronLikelihoodMC15.cxx @@ -15,9 +15,12 @@ namespace top { ElectronLikelihoodMC15::ElectronLikelihoodMC15(const double ptcut, const bool vetoCrack, const std::string& operatingPoint, const std::string& operatingPointLoose, StandardIsolation* isolation, - const bool applyTTVACut, const bool applyChargeIDCut) : + const double d0SigCut, const double delta_z0, const bool applyTTVACut, + const bool applyChargeIDCut) : m_ptcut(ptcut), m_vetoCrack(vetoCrack), + m_d0SigCut(d0SigCut), + m_delta_z0(delta_z0), m_operatingPoint("SetMe"), m_operatingPointLoose("SetMe"), m_operatingPoint_DF("SetMe"), @@ -74,6 +77,25 @@ namespace top { top::check(m_deadHVTool.retrieve(), "Failed to setup Egamma DeadHVCellRemovalTool"); } + ElectronLikelihoodMC15::ElectronLikelihoodMC15(const double ptcut, const bool vetoCrack, + const std::string& operatingPoint, + const std::string& operatingPointLoose, + StandardIsolation* isolation, + const bool applyChargeIDCut) + : ElectronLikelihoodMC15::ElectronLikelihoodMC15(ptcut, vetoCrack, operatingPoint, + operatingPointLoose, isolation, 5.0, 0.5, true, + applyChargeIDCut) {} + + ElectronLikelihoodMC15::ElectronLikelihoodMC15(const double ptcut, const bool vetoCrack, + const std::string& operatingPoint, + const std::string& operatingPointLoose, + StandardIsolation* isolation, + const bool applyTTVACut, + const bool applyChargeIDCut) + : ElectronLikelihoodMC15::ElectronLikelihoodMC15(ptcut, vetoCrack, operatingPoint, + operatingPointLoose, isolation, 5.0, 0.5, applyTTVACut, + applyChargeIDCut) {} + bool ElectronLikelihoodMC15::passSelection(const xAOD::Electron& el) const { if (!passSelectionNoIsolation(el, m_operatingPoint_DF, m_operatingPoint)) return false; @@ -143,7 +165,7 @@ namespace top { //Veto electrons suffering from the 2015+2016/mc16a crack+topocluster association bug //See https://twiki.cern.ch/twiki/bin/viewauth/AtlasProtected/HowToCleanJets2017#EGamma_Crack_Electron_topocluste for details if (el.isAvailable<char>("DFCommonCrackVetoCleaning")) - if (!el.auxdataConst<char>("DFCommonCrackVetoCleaning")) return false; + if (!el.auxdataConst<char>("DFCommonCrackVetoCleaning")) return false; if (m_vetoCrack && std::fabs(el.caloCluster()->etaBE(2)) > 1.37 && std::fabs(el.caloCluster()->etaBE(2)) < 1.52) return false; diff --git a/PhysicsAnalysis/TopPhys/xAOD/TopObjectSelectionTools/Root/MuonMC15.cxx b/PhysicsAnalysis/TopPhys/xAOD/TopObjectSelectionTools/Root/MuonMC15.cxx index 1970f04711d2a8a871655a57ca8816085a8e6674..a49bbcf70092cc5ca9387d6fa6c0fb573d9d38ad 100644 --- a/PhysicsAnalysis/TopPhys/xAOD/TopObjectSelectionTools/Root/MuonMC15.cxx +++ b/PhysicsAnalysis/TopPhys/xAOD/TopObjectSelectionTools/Root/MuonMC15.cxx @@ -10,8 +10,12 @@ using namespace TopObjectSelectionTools; namespace top { - MuonMC15::MuonMC15(const double ptcut, IsolationBase* isolation, const bool applyTTVACut) : + MuonMC15::MuonMC15(const double ptcut, IsolationBase* isolation, + const double d0SigCut, const double delta_z0_sintheta, + const bool applyTTVACut) : m_ptcut(ptcut), + m_d0SigCut(d0SigCut), + m_delta_z0(delta_z0_sintheta), m_muonSelectionTool("MuonSelectionTool"), m_muonSelectionToolLoose("MuonSelectionToolLoose"), m_isolation(isolation), @@ -20,6 +24,12 @@ namespace top { top::check(m_muonSelectionToolLoose.retrieve(), "Failed to retrieve muonSelectionToolLoose"); } + MuonMC15::MuonMC15(const double ptcut, IsolationBase* isolation, const bool applyTTVACut) + : MuonMC15::MuonMC15(ptcut, isolation, 3.0, 0.5, applyTTVACut) {} + + MuonMC15::MuonMC15(const double ptcut, IsolationBase* isolation) + : MuonMC15::MuonMC15(ptcut, isolation, 3.0, 0.5, true) {} + bool MuonMC15::passSelection(const xAOD::Muon& mu) const { if (mu.pt() < m_ptcut) return false; diff --git a/PhysicsAnalysis/TopPhys/xAOD/TopObjectSelectionTools/TopObjectSelectionTools/ElectronCutBasedMC15.h b/PhysicsAnalysis/TopPhys/xAOD/TopObjectSelectionTools/TopObjectSelectionTools/ElectronCutBasedMC15.h deleted file mode 100644 index 41f8d0a5653564142c3a859480534d4cb8a74e45..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/TopPhys/xAOD/TopObjectSelectionTools/TopObjectSelectionTools/ElectronCutBasedMC15.h +++ /dev/null @@ -1,90 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - */ - -#ifndef ELECTRONCUTBASEDMC15_H_ -#define ELECTRONCUTBASEDMC15_H_ - -#include "TopObjectSelectionTools/ElectronSelectionBase.h" -#include "TopObjectSelectionTools/IsolationTools.h" - -#include <memory> - -namespace top { -/** - * @brief Electron selection based on the cut-based thingy. - */ - class ElectronCutBasedMC15: public top::ElectronSelectionBase { - public: - /** - * @brief Class to help select cut-based good electrons. - * - * @param ptcut The minimum pT cut to apply to the electrons. - * @param vetoCrack Do you want to veto 1.37 < |cluster_eta| < 1.52? - * @param quality The definition for good electrons, e.g. "Tight" - * @param qualityLoose The loose defeinition, for fake-lepton estimates with - * the matrix method? - * @param isolation nullptr for un-isolated, or a new "isolation object" to - * apply isolation cuts - */ - ElectronCutBasedMC15(double ptcut, bool vetoCrack, const std::string& quality, const std::string& qualityLoose, - IsolationBase* isolation); - virtual ~ElectronCutBasedMC15() {} - /** - * @brief The cuts to select good electrons for your analysis should be - * implemented in here. - * - * @param el The electron to cut on (all electrons in the event are passed - * to the tool) - * @return True if this is a good electron, false otherwise. - */ - virtual bool passSelection(const xAOD::Electron& el) const override; - - /** - * @brief The loose selection needed by some background estimates. - * - * @param el - * @return - */ - virtual bool passSelectionLoose(const xAOD::Electron& el) const override; - - /** - * @brief Print some useful information about the electron selection. - * - * Usually this goes to the log file, so you know what you ran with. - * - * @param Where the print-out should go, e.g. msg stream - */ - virtual void print(std::ostream&) const override; - protected: - /** - * @brief Since both selections are fairly similar, we can perform - * the un-isolated part in one function. - * - * Do all the cuts except for the isolation. - * - * @param el The electron in question - * @param quality The string "Tight" or whatever to say which quality cuts - * should be applied. - * @return True if the electron passes - */ - bool passSelectionNoIsolation(const xAOD::Electron& el, const std::string& quality) const; - - ///minimum pT cut to apply - double m_ptcut; - - ///Should we veto the LAr crack region? - bool m_vetoCrack; - - ///Quality requirement for the tight (analysis) definition - std::string m_quality; - - ///Quality requirement for the loose (background estimate?) definition - std::string m_qualityLoose; - - ///The isolation tool, or nullptr if we don't want isolation - std::unique_ptr<top::IsolationBase> m_isolation; - }; -} - -#endif diff --git a/PhysicsAnalysis/TopPhys/xAOD/TopObjectSelectionTools/TopObjectSelectionTools/ElectronLikelihoodMC15.h b/PhysicsAnalysis/TopPhys/xAOD/TopObjectSelectionTools/TopObjectSelectionTools/ElectronLikelihoodMC15.h index c9863fbda1f55d20d6df42b93eb52726d9331b86..83c932540c086226ea0e54bb17320d9a914fd4b8 100644 --- a/PhysicsAnalysis/TopPhys/xAOD/TopObjectSelectionTools/TopObjectSelectionTools/ElectronLikelihoodMC15.h +++ b/PhysicsAnalysis/TopPhys/xAOD/TopObjectSelectionTools/TopObjectSelectionTools/ElectronLikelihoodMC15.h @@ -26,13 +26,25 @@ namespace top { * definition * @param operatingPointLoose Likelihood operating point for the loose * objects (fakes estimates?) - * @param isolation The isolation tool the user wants to use. If you don't + * @param isolation The isolation tool the user wants to use. If you don't * want any isolation cuts to be applied then leave this as a nullptr. + * @param d0SigCut The maximum d0 significance cut + * @param delta_z0 The maximum |delta z0 sin(theta)| cut + * @param applyTTVACut Whether to apply cuts on d0 and z0 + * @param applyChargeIDCut Whether to apply charge identification selector tool */ ElectronLikelihoodMC15(const double ptcut, const bool vetoCrack, const std::string& operatingPoint, const std::string& operatingPointLoose, StandardIsolation* isolation, - const bool applyTTVACut = true, const bool applyChargeIDCut = false); - // this constructor is kept for backward compatibility - isPrimaryxAOD is not needed anymore + const bool applyChargeIDCut); + + ElectronLikelihoodMC15(const double ptcut, const bool vetoCrack, const std::string& operatingPoint, + const std::string& operatingPointLoose, StandardIsolation* isolation, + const bool applyTTVACut, const bool applyChargeIDCut); + + ElectronLikelihoodMC15(const double ptcut, const bool vetoCrack, const std::string& operatingPoint, + const std::string& operatingPointLoose, StandardIsolation* isolation, + const double d0SigCut, const double delta_z0, const bool applyTTVACut, + const bool applyChargeIDCut); virtual ~ElectronLikelihoodMC15() {} /** @@ -101,6 +113,10 @@ namespace top { ///Veto the crack region? bool m_vetoCrack; + /// TTVA cuts + double m_d0SigCut; + double m_delta_z0; + std::string m_operatingPoint; std::string m_operatingPointLoose; std::string m_operatingPoint_DF; diff --git a/PhysicsAnalysis/TopPhys/xAOD/TopObjectSelectionTools/TopObjectSelectionTools/MuonMC15.h b/PhysicsAnalysis/TopPhys/xAOD/TopObjectSelectionTools/TopObjectSelectionTools/MuonMC15.h index beaf3c9d60a2860cb69e29c44952837aeb2f5f2d..dc8caf90ce182eba4ab412f9ef2ed9f2eebd5cb8 100644 --- a/PhysicsAnalysis/TopPhys/xAOD/TopObjectSelectionTools/TopObjectSelectionTools/MuonMC15.h +++ b/PhysicsAnalysis/TopPhys/xAOD/TopObjectSelectionTools/TopObjectSelectionTools/MuonMC15.h @@ -22,10 +22,22 @@ namespace top { * * @param ptcut The minimum pT cut for good muons. * @param isolation The isolation the user wants to apply. Don't want any - * isolation to be applied? Then leave this as a nullptr. + * isolation to be applied? Then leave this as a nullptr. + * @param d0SigCut The maximum d0 significance cut + * @param delta_z0 The maximum |delta z0 sin(theta)| cut + * @param applyTTVACut Whether to apply cuts on d0 and z0 */ + MuonMC15(const double ptcut, + IsolationBase* isolation); + + MuonMC15(const double ptcut, + IsolationBase* isolation, + const bool applyTTVACut); + MuonMC15(const double ptcut, IsolationBase* isolation, + const double d0SigCut, + const double delta_z0, const bool applyTTVACut = true); // Does nothing. @@ -61,6 +73,10 @@ namespace top { // Lower pT threshold to apply to object selection. double m_ptcut; + // TTVA cuts + double m_d0SigCut; + double m_delta_z0; + // Proper tool to select muons. ToolHandle<CP::IMuonSelectionTool> m_muonSelectionTool; ToolHandle<CP::IMuonSelectionTool> m_muonSelectionToolLoose; diff --git a/Projects/AnalysisBase/externals.txt b/Projects/AnalysisBase/externals.txt index 9a4dd9d20375c613b49112cba4d72f4752dcfbd8..a5607590f11652040e0c40c452f7253024c0dd11 100644 --- a/Projects/AnalysisBase/externals.txt +++ b/Projects/AnalysisBase/externals.txt @@ -6,4 +6,4 @@ # forbidden. # The version of atlas/atlasexternals to use: -AnalysisBaseExternalsVersion = 2.0.119 +AnalysisBaseExternalsVersion = 2.0.121 diff --git a/Projects/AthAnalysis/externals.txt b/Projects/AthAnalysis/externals.txt index 8c0f4e8f1fab16ef1dcc15d4ff18eb8d942624f7..c448a1cab7f2a6090c12a11538e6eff44d3bd798 100644 --- a/Projects/AthAnalysis/externals.txt +++ b/Projects/AthAnalysis/externals.txt @@ -6,4 +6,4 @@ # forbidden. # The version of atlas/atlasexternals to use: -AthAnalysisExternalsVersion = 2.0.119 +AthAnalysisExternalsVersion = 2.0.121 diff --git a/Projects/AthDataQuality/externals.txt b/Projects/AthDataQuality/externals.txt index 834a3f216e756e2a7dd3e9b27bf90eba40810cb5..4c386df3f3a3a3d9be44f06109a276fbd7dcf4fd 100644 --- a/Projects/AthDataQuality/externals.txt +++ b/Projects/AthDataQuality/externals.txt @@ -5,4 +5,4 @@ # an "origin/" prefix before it. For tags however this is explicitly # forbidden. -AtlasExternalsVersion = 2.0.119 +AtlasExternalsVersion = 2.0.121 diff --git a/Projects/AthDataQuality/version.txt b/Projects/AthDataQuality/version.txt index 441eb005e31581e4033d4744ea5033b03e7c614d..140125644054770fe54c322164c33e7cd9395b79 100644 --- a/Projects/AthDataQuality/version.txt +++ b/Projects/AthDataQuality/version.txt @@ -1 +1 @@ -22.0.48 +22.0.49 diff --git a/Projects/AthGeneration/externals.txt b/Projects/AthGeneration/externals.txt index dd7a35839f2b8be3341b5f5cd4ab4cbcd2c580da..2bbf6634e93d8a93f1a231308586d1055e0820d8 100644 --- a/Projects/AthGeneration/externals.txt +++ b/Projects/AthGeneration/externals.txt @@ -6,4 +6,4 @@ # forbidden. # The version of atlas/atlasexternals to use: -AthGenerationExternalsVersion = 2.0.119 +AthGenerationExternalsVersion = 2.0.121 diff --git a/Projects/AthGeneration/version.txt b/Projects/AthGeneration/version.txt index 5db9154de3c33299cf79b526d002840c73e4d954..ea132e04821c3973cae1d644d8a53635126d5094 100644 --- a/Projects/AthGeneration/version.txt +++ b/Projects/AthGeneration/version.txt @@ -1 +1 @@ -22.6.7 +22.6.8 diff --git a/Projects/AthSimulation/externals.txt b/Projects/AthSimulation/externals.txt index ccbd6a80a649a98cdcc88f29d1e8b0742b1d3368..624b2f1c01edfb880d91597715ec2dbdb77c65fe 100644 --- a/Projects/AthSimulation/externals.txt +++ b/Projects/AthSimulation/externals.txt @@ -6,4 +6,4 @@ # forbidden. # The version of atlas/atlasexternals to use: -AthSimulationExternalsVersion = 2.0.119 +AthSimulationExternalsVersion = 2.0.121 diff --git a/Projects/AthSimulation/package_filters.txt b/Projects/AthSimulation/package_filters.txt index 9d140ba9e07602516995ab56d188a154b4dd7011..81b3aee29a102cdb7ae9df3be13e3b830e0b5502 100644 --- a/Projects/AthSimulation/package_filters.txt +++ b/Projects/AthSimulation/package_filters.txt @@ -282,7 +282,6 @@ + Simulation/BeamEffects + Simulation/G4Atlas/G4AtlasAlg + Simulation/G4Atlas/G4AtlasApps -+ Simulation/G4Atlas/G4AtlasControl + Simulation/G4Atlas/G4AtlasInterfaces + Simulation/G4Atlas/G4AtlasServices + Simulation/G4Atlas/G4AtlasTools diff --git a/Projects/AthSimulation/version.txt b/Projects/AthSimulation/version.txt index 441eb005e31581e4033d4744ea5033b03e7c614d..140125644054770fe54c322164c33e7cd9395b79 100644 --- a/Projects/AthSimulation/version.txt +++ b/Projects/AthSimulation/version.txt @@ -1 +1 @@ -22.0.48 +22.0.49 diff --git a/Projects/Athena/CMakeLists.txt b/Projects/Athena/CMakeLists.txt index 252407a1407576b0d779b883d252b6e4aa4a23df..0cef1a0fc7c2f2a29fca5c09c60ef9eaca95c9e5 100644 --- a/Projects/Athena/CMakeLists.txt +++ b/Projects/Athena/CMakeLists.txt @@ -12,6 +12,11 @@ include( CheckLanguage ) check_language( CUDA ) if( CMAKE_CUDA_COMPILER ) enable_language( CUDA ) + # Force the compilation of CUDA code for only compute capability 5.2 for now. + # To get rid of warnings from 11.0 about not supporting older compute + # capabilities anymore. + set( CMAKE_CUDA_ARCHITECTURES "52" CACHE STRING + "CUDA architectures to build code for" ) endif() # Set the versions of the TDAQ externals to pick up for the build: @@ -85,6 +90,11 @@ find_package( VDT ) find_package( TIFF ) find_package( heaptrack ) +# (Hopefully) Temporary global dependence on cuDNN, as described +# in ATLASRECTS-6680. +find_package( CUDAToolkit ) +find_package( cuDNN ) + # Set up the correct runtime environment for OpenBLAS. set( OpenBlasEnvironment_DIR "${CMAKE_SOURCE_DIR}/cmake" CACHE PATH "Directory holding OpenBlasEnvironmentConfig.cmake" ) diff --git a/Projects/Athena/build_externals.sh b/Projects/Athena/build_externals.sh index 81360f19769d4651db3ec490dfe7cc51e176b382..5eac2b57507545006343b6fdde03c71779e6b97e 100755 --- a/Projects/Athena/build_externals.sh +++ b/Projects/Athena/build_externals.sh @@ -11,7 +11,8 @@ ATLAS_EXT_PROJECT_NAME="AthenaExternals" ATLAS_BUILDTYPE="RelWithDebInfo" ATLAS_EXTRA_CMAKE_ARGS=(-DLCG_VERSION_NUMBER=101 -DLCG_VERSION_POSTFIX="_ATLAS_4" - -DATLAS_GAUDI_TAG="v36r2.000") + -DATLAS_GAUDI_TAG="v36r2.000" + -DATLAS_ONNXRUNTIME_USE_CUDA=FALSE) ATLAS_EXTRA_MAKE_ARGS=() # Let "the common script" do all the heavy lifting. diff --git a/Projects/Athena/externals.txt b/Projects/Athena/externals.txt index c1cccab65a4e3938b9abecac1ed55f990ec69ca5..5bbeb4d8a43676256bba9c31e92ce54ebb21a614 100644 --- a/Projects/Athena/externals.txt +++ b/Projects/Athena/externals.txt @@ -6,4 +6,4 @@ # forbidden. # The version of atlas/atlasexternals to use: -AthenaExternalsVersion = 2.0.119 +AthenaExternalsVersion = 2.0.121 diff --git a/Projects/Athena/version.txt b/Projects/Athena/version.txt index 441eb005e31581e4033d4744ea5033b03e7c614d..140125644054770fe54c322164c33e7cd9395b79 100644 --- a/Projects/Athena/version.txt +++ b/Projects/Athena/version.txt @@ -1 +1 @@ -22.0.48 +22.0.49 diff --git a/Projects/DetCommon/externals.txt b/Projects/DetCommon/externals.txt index b5496f110df93e98158e3a9fac9ccef0fb296269..0a481e6896f3daf503ea0e2d8f9659a825434898 100644 --- a/Projects/DetCommon/externals.txt +++ b/Projects/DetCommon/externals.txt @@ -6,4 +6,4 @@ # forbidden. # The version of atlas/atlasexternals to use: -AtlasExternalsVersion = 2.0.119 +AtlasExternalsVersion = 2.0.121 diff --git a/Projects/DetCommon/version.txt b/Projects/DetCommon/version.txt index 441eb005e31581e4033d4744ea5033b03e7c614d..140125644054770fe54c322164c33e7cd9395b79 100644 --- a/Projects/DetCommon/version.txt +++ b/Projects/DetCommon/version.txt @@ -1 +1 @@ -22.0.48 +22.0.49 diff --git a/Projects/VP1Light/externals.txt b/Projects/VP1Light/externals.txt index 6d578f1ba133413b848d4e9fb3a2eede42618a7f..d96e747191fedff01032d81786fd11b79cd49132 100644 --- a/Projects/VP1Light/externals.txt +++ b/Projects/VP1Light/externals.txt @@ -6,4 +6,4 @@ # forbidden. # The version of atlas/atlasexternals to use: -VP1LightExternalsVersion = 2.0.119 +VP1LightExternalsVersion = 2.0.121 diff --git a/Projects/VP1Light/version.txt b/Projects/VP1Light/version.txt index 441eb005e31581e4033d4744ea5033b03e7c614d..140125644054770fe54c322164c33e7cd9395b79 100644 --- a/Projects/VP1Light/version.txt +++ b/Projects/VP1Light/version.txt @@ -1 +1 @@ -22.0.48 +22.0.49 diff --git a/Projects/WorkDir/CMakeLists.txt b/Projects/WorkDir/CMakeLists.txt index 181e4ee937cb668ea93008a3ae8518ae83c5456c..6a3ee4da643591cac8138cdaa6e92b6239ce571e 100644 --- a/Projects/WorkDir/CMakeLists.txt +++ b/Projects/WorkDir/CMakeLists.txt @@ -10,6 +10,12 @@ cmake_minimum_required( VERSION 3.10 ) # the version and languages. project( WorkDir ) +# Force the compilation of CUDA code for only compute capability 5.2 for now. +# To get rid of warnings from 11.0 about not supporting older compute +# capabilities anymore. +set( CMAKE_CUDA_ARCHITECTURES "52" CACHE STRING + "CUDA architectures to build code for" ) + # Let the user pick up updated AtlasCMake/AtlasLCG versions for testing. # Remember that it's not a problem if AtlasCMake is not found, that's why # we use the QUIET keyword. diff --git a/Reconstruction/HeavyIonRec/HIJetRec/share/HIegamma_jobOptions.py b/Reconstruction/HeavyIonRec/HIJetRec/share/HIegamma_jobOptions.py index 5f2e3c277c728d2e2bc1f60815584e160d44da33..dad87051dc686c1f0646304e42097505a5b281b5 100644 --- a/Reconstruction/HeavyIonRec/HIJetRec/share/HIegamma_jobOptions.py +++ b/Reconstruction/HeavyIonRec/HIJetRec/share/HIegamma_jobOptions.py @@ -1,4 +1,5 @@ #build subtracted cells +from AODFix.AODFix import AODFix_postEgammaRec from HIJetRec.SubtractedCellGetter import SubtractedCellGetter subtr_gett=SubtractedCellGetter() @@ -20,14 +21,13 @@ jobproperties.CaloRecFlags.doCaloTopoCluster = True jobproperties.CaloRecFlags.doCaloEMTopoCluster = True jobproperties.CaloRecFlags.clusterCellGetterName='HIJetRec.SubtractedCellGetter.SubtractedCellGetter' -rec.doEgamma=True +rec.doEgamma = True + from egammaRec.egammaRecFlags import jobproperties -jobproperties.egammaRecFlags.Enabled=True jobproperties.egammaRecFlags.inputTopoClusterCollection='SubtractedCaloTopoCluster' jobproperties.egammaRecFlags.egammaTopoClusterCollection='SubtractedEgammaTopoCluster' jobproperties.egammaRecFlags.cellContainerName='SubtractedCells' -jobproperties.egammaRecFlags.doEgammaCaloSeeded=True -jobproperties.egammaRecFlags.doEgammaForwardSeeded=False + from AthenaCommon.AlgSequence import AlgSequence topSequence = AlgSequence() @@ -90,8 +90,12 @@ if DetFlags.haveRIO.Calo_on() : #Run egamma pdr.flag_domain('egamma') -if rec.doEgamma() : protectedInclude( "egammaRec/egammaRec_jobOptions.py" ) -from AODFix.AODFix import AODFix_postEgammaRec +if rec.doEgamma(): + from AthenaConfiguration.ComponentAccumulator import CAtoGlobalWrapper + from AthenaConfiguration.AllConfigFlags import ConfigFlags + from egammaConfig.egammaReconstructionConfig import ( + egammaReconstructionCfg) + CAtoGlobalWrapper(egammaReconstructionCfg, ConfigFlags) AODFix_postEgammaRec() diff --git a/Reconstruction/MuonIdentification/MuonCombinedConfig/python/MuonCombinedRecToolsConfig.py b/Reconstruction/MuonIdentification/MuonCombinedConfig/python/MuonCombinedRecToolsConfig.py index 8b4f82ba142fc64253b5d6bbc00db38317906370..0ab4e285099b1e201caa6017715c7444cfe94366 100644 --- a/Reconstruction/MuonIdentification/MuonCombinedConfig/python/MuonCombinedRecToolsConfig.py +++ b/Reconstruction/MuonIdentification/MuonCombinedConfig/python/MuonCombinedRecToolsConfig.py @@ -456,6 +456,8 @@ def MuidTrackCleanerCfg(flags, name='MuidTrackCleaner', **kwargs ): if flags.Muon.MuonTrigger: kwargs.setdefault("Iterate", False) kwargs.setdefault("RecoverOutliers", False) + acc = iPatFitterCfg(flags, 'iPatFitterClean', MaxIterations=4) + kwargs.setdefault("Fitter", acc.getPrimary()) return MuonTrackCleanerCfg(flags, name, **kwargs) def MuidCaloEnergyParam(flags, name='MuidCaloEnergyParam', **kwargs ): diff --git a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedFitTools.py b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedFitTools.py index bd05220139b1ca8b2e7ab01cdd1e284bb74acf60..d1627e0e3765ad9a9f3a81873d2f2ffb43a8c856 100644 --- a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedFitTools.py +++ b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedFitTools.py @@ -299,7 +299,7 @@ def CombinedMuonTrackBuilderFit( name='CombinedMuonTrackBuilderFit', **kwargs ): kwargs.setdefault("Fitter" , getPublicToolClone("TrigiPatFitter_"+suffix, "iPatFitter", TrackSummaryTool=trackSummary) ) kwargs.setdefault("SLFitter" , getPublicToolClone("TrigiPatSLFitter_"+suffix, "iPatSLFitter", TrackSummaryTool=trackSummary) ) kwargs.setdefault("CscRotCreator" , "" ) - kwargs.setdefault("Cleaner" , getPrivateToolClone("TrigMuidTrackCleaner_"+suffix,"MuidTrackCleaner", Fitter=kwargs["Fitter"]) ) + kwargs.setdefault("Cleaner" , getPrivateToolClone("TrigMuidTrackCleaner_"+suffix,"MuidTrackCleaner", Fitter=getPublicToolClone("TrigiPatFitterClean_"+suffix, "iPatFitter", TrackSummaryTool=trackSummary, MaxIterations=4))) else: import MuonCombinedRecExample.CombinedMuonTrackSummary # noqa: F401 (import side-effects) @@ -377,7 +377,7 @@ def CombinedMuonTrackBuilder( name='CombinedMuonTrackBuilder', **kwargs ): kwargs.setdefault("SLFitter" , getPublicToolClone("TrigiPatSLFitter_"+suffix, "iPatSLFitter", TrackSummaryTool=trackSummary) ) kwargs.setdefault("MuonErrorOptimizer", "") kwargs.setdefault("CscRotCreator" , "" ) - kwargs.setdefault("Cleaner" , getPrivateToolClone("TrigMuidTrackCleaner_"+suffix, "MuidTrackCleaner", Fitter=kwargs["Fitter"]) ) + kwargs.setdefault("Cleaner" , getPrivateToolClone("TrigMuidTrackCleaner_"+suffix, "MuidTrackCleaner", Fitter=getPublicToolClone("TrigiPatFitterClean_"+suffix, "iPatFitter", TrackSummaryTool=trackSummary, MaxIterations=4))) else: import MuonCombinedRecExample.CombinedMuonTrackSummary # noqa: F401 (import side-effects) kwargs.setdefault("MuonHoleRecovery" , getPublicTool("MuidSegmentRegionRecoveryTool") ) diff --git a/Reconstruction/RecExample/RecExCommon/share/CombinedRec_config.py b/Reconstruction/RecExample/RecExCommon/share/CombinedRec_config.py index d1e37a1ad680de6ebcbff198f3fd20c61ce95f52..c1b2bb750cca12b21fd066bbba85645fa5899796 100755 --- a/Reconstruction/RecExample/RecExCommon/share/CombinedRec_config.py +++ b/Reconstruction/RecExample/RecExCommon/share/CombinedRec_config.py @@ -45,16 +45,20 @@ if (rec.doESD()) and (recAlgs.doEFlow() or rec.doTau() or rec.doEgamma()) : # CaloExtensionBuilder(True) # -# functionality : electron photon identification +# functionality : electron photon Reconstruction # # from InDetRecExample.InDetJobProperties import InDetFlags pdr.flag_domain('egamma') -if rec.doEgamma(): - protectedInclude( "egammaRec/egammaRec_jobOptions.py" ) +if rec.doEgamma() and rec.doESD(): + from egammaConfig.egammaReconstructionConfig import ( + egammaReconstructionCfg) + CAtoGlobalWrapper(egammaReconstructionCfg, ConfigFlags) if InDetFlags.doR3LargeD0() and InDetFlags.storeSeparateLargeD0Container(): - protectedInclude( "egammaRec/egammaLRTRec_jobOptions.py" ) + from egammaConfig.egammaLRTReconstructionConfig import ( + egammaLRTReconstructionCfg) + CAtoGlobalWrapper(egammaLRTReconstructionCfg, ConfigFlags) AODFix_postEgammaRec() diff --git a/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py b/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py index 2e2d7420f214de72217b615964082b40a4518bf9..987a91429b98194dd0a5e79e4c6ec987b6ddb0b5 100644 --- a/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py +++ b/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py @@ -444,6 +444,20 @@ if recAlgs.doEFlow(): #Some settings for pflow have to toggle to a different setup for RecExCommon workflows. ConfigFlags.PF.useRecExCommon=True +if rec.doEgamma(): + # C.A uses Clusters RecExCommom Cluster (rm the "s") + ConfigFlags.Egamma.Keys.Internal.EgammaTopoClusters = 'egammaTopoCluster' + ConfigFlags.Egamma.Keys.Input.TopoClusters = 'CaloTopoCluster' + +if rec.doHeavyIon(): + # This is copy from the old style to the new + # We need to have HI flags to do it nicer + ConfigFlags.Egamma.Keys.Input.TopoClusters = 'SubtractedCaloTopoCluster' + ConfigFlags.Egamma.Keys.Internal.EgammaTopoClusters = 'SubtractedEgammaTopoCluster' + ConfigFlags.Egamma.Keys.Input.CaloCells = 'SubtractedCells' + ConfigFlags.Egamma.doCentral = True + ConfigFlags.Egamma.doForward = False + # Lock the flags logRecExCommon_topOptions.info("Locking ConfigFlags") ConfigFlags.lock() diff --git a/Reconstruction/RecExample/RecExRecoTest/share/RecExRecoTest_ART_egamma_fromESD.py b/Reconstruction/RecExample/RecExRecoTest/share/RecExRecoTest_ART_egamma_fromESD.py index f66a2f13420cabc28b28f2c1c09d1bd764123c0b..e715ccebe8bd2623e4e00f0e8f79d4cc6b1cf96f 100644 --- a/Reconstruction/RecExample/RecExRecoTest/share/RecExRecoTest_ART_egamma_fromESD.py +++ b/Reconstruction/RecExample/RecExRecoTest/share/RecExRecoTest_ART_egamma_fromESD.py @@ -1,7 +1,13 @@ # -# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration # +from AthenaConfiguration.ComponentAccumulator import CAtoGlobalWrapper +from AthenaConfiguration.AllConfigFlags import ConfigFlags +from AthenaConfiguration.OldFlags2NewFlags import getNewConfigFlags +from TrackToCalo.CaloExtensionBuilderAlgConfig import CaloExtensionBuilder +from egammaConfig.egammaReconstructionConfig import ( + egammaReconstructionCfg) from AthenaCommon.AlgSequence import AlgSequence topSequence = AlgSequence() @@ -104,8 +110,6 @@ DetFlags.detdescr.Muon_setOn() DetFlags.detdescr.ID_setOn() DetFlags.detdescr.Calo_setOn() if hasattr(DetFlags,'BField_on'): DetFlags.detdescr.BField_setOn() -from TrkDetDescrSvc.AtlasTrackingGeometrySvc import AtlasTrackingGeometrySvc -AtlasTrackingGeometrySvc = svcMgr.AtlasTrackingGeometrySvc from AtlasGeoModel import SetGeometryVersion from AtlasGeoModel import GeoModelInit @@ -158,15 +162,19 @@ try: except Exception: treatExeption("could not get handle to egammaTopoClusterCopier") -include( "McParticleAlgs/TruthParticleBuilder_jobOptions.py" ) +include("McParticleAlgs/TruthParticleBuilder_jobOptions.py") -from TrackToCalo.CaloExtensionBuilderAlgConfig import CaloExtensionBuilder #False tells it we don't want to extend Large Radius Tracks, only default InDetTrackParticles. -CaloExtensionBuilder(False) +CaloExtensionBuilder(False) -from egammaRec.egammaRecFlags import jobproperties +#egamma new config +ConfigFlags = getNewConfigFlags() +ConfigFlags.Egamma.Keys.Internal.EgammaTopoClusters = 'egammaTopoCluster' +ConfigFlags.Egamma.Keys.Input.TopoClusters = 'CaloTopoCluster' +ConfigFlags.lock() +# Add egamma +CAtoGlobalWrapper(egammaReconstructionCfg, ConfigFlags) -include( "egammaRec/egammaRec_jobOptions.py" ) import AthenaPoolCnvSvc.WriteAthenaPool logRecoOutputItemList_jobOptions = logging.getLogger( 'py:RecoOutputItemList_jobOptions' ) diff --git a/Reconstruction/RecExample/RecJobTransformTests/test/test_mcRun3_NSW.sh b/Reconstruction/RecExample/RecJobTransformTests/test/test_mcRun3_NSW.sh new file mode 100755 index 0000000000000000000000000000000000000000..54951bd1b34177390c3ec002268289c9fb46dd33 --- /dev/null +++ b/Reconstruction/RecExample/RecJobTransformTests/test/test_mcRun3_NSW.sh @@ -0,0 +1,12 @@ +#!/bin/sh +# +# art-description: Run reco using NSW setup without pileup or RDOTrigger steps. +# art-output: log.* +# art-athena-mt: 8 +# art-type: grid +# art-include: master/Athena + +Reco_tf.py '--AMI=r13134' '--inputHITSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/RecJobTransformTests/NSW/valid1.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.HITS.e4993_s3747.pool.root' '--outputRDOFile=myRDO.pool.root' '--outputAODFile=myAOD.pool.root' '--outputESDFile=myESD.pool.root' + +RES=$? +echo "art-result: $RES Reco" diff --git a/Reconstruction/RecoAlgs/IsolationAlgs/python/IsoGetter.py b/Reconstruction/RecoAlgs/IsolationAlgs/python/IsoGetter.py index 7b5f2fa4751b66924429e417491005c0486b4873..6c2730b3ed5b6b23ea6dae67151a2d0eaa9a88a4 100644 --- a/Reconstruction/RecoAlgs/IsolationAlgs/python/IsoGetter.py +++ b/Reconstruction/RecoAlgs/IsolationAlgs/python/IsoGetter.py @@ -264,8 +264,12 @@ class isoGetter ( Configured ) : mlog.info('entering') # configure iso here: + self._isoBuilderHandle = [] try: - self._isoBuilderHandle = [egcisoBuilder(),eltisoBuilder(),phtisoBuilder(),muisoBuilder()] + if rec.doEgamma(): + self._isoBuilderHandle.extend([egcisoBuilder(),eltisoBuilder(),phtisoBuilder()]) + if rec.doMuonCombined(): + self._isoBuilderHandle.append(muisoBuilder()) except Exception: mlog.error("could not get handle to IsolationBuilder") import traceback diff --git a/Reconstruction/egamma/egammaAlgs/python/EMBremCollectionBuilder.py b/Reconstruction/egamma/egammaAlgs/python/EMBremCollectionBuilder.py index bd40a4795946a7c626c34d786076ec51c8c07062..0745f324c2e6621892813ce6f286e976ef5e4133 100644 --- a/Reconstruction/egamma/egammaAlgs/python/EMBremCollectionBuilder.py +++ b/Reconstruction/egamma/egammaAlgs/python/EMBremCollectionBuilder.py @@ -11,7 +11,8 @@ from AthenaCommon.Logging import logging from egammaAlgs import egammaAlgsConf from egammaRec import egammaKeys from egammaRec.Factories import AlgFactory -from egammaTools.egammaExtrapolators import egammaExtrapolator, AtlasPublicExtrapolator +from egammaTools.egammaExtrapolators import ( + egammaExtrapolator, AtlasPublicExtrapolator) # default configuration of the EMBremCollectionBuilder from InDetRecExample.InDetJobProperties import InDetFlags from InDetRecExample.InDetKeys import InDetKeys diff --git a/Reconstruction/egamma/egammaAlgs/python/EMBremCollectionBuilderConfig.py b/Reconstruction/egamma/egammaAlgs/python/EMBremCollectionBuilderConfig.py index c67e835e3b724fd0c5632153e3f0d7d96e4a2573..06056f932bf931c36cf34e79cefaf9172758a26e 100644 --- a/Reconstruction/egamma/egammaAlgs/python/EMBremCollectionBuilderConfig.py +++ b/Reconstruction/egamma/egammaAlgs/python/EMBremCollectionBuilderConfig.py @@ -13,19 +13,28 @@ def GSFTrackSummaryToolCfg(flags, acc = ComponentAccumulator() if "PixelToTPIDTool" not in kwargs: - kwargs["PixelToTPIDTool"] = CompFactory.InDet.PixelToTPIDTool( - name="GSFBuildPixelToTPIDTool") + if flags.Detector.EnablePixel: + kwargs["PixelToTPIDTool"] = CompFactory.InDet.PixelToTPIDTool( + name="GSFBuildPixelToTPIDTool") + else: + kwargs["PixelToTPIDTool"] = None # TODO what happens to # ClusterSplitProbabilityName= # TrackingCommon.combinedClusterSplitProbName() ? + # It is "InDetTRT_SeededAmbiguityProcessorSplitProb" in run-2 config + # (because backTrk and TRTSA are run) + # It might be "AmbiguityProcessorSplitProb" in run-3 config + # (only one existing till now) if "InDetSummaryHelperTool" not in kwargs: - from InDetConfig.TrackingCommonConfig import ( - InDetRecTestBLayerToolCfg) - testBLTool = acc.popToolsAndMerge( - InDetRecTestBLayerToolCfg( - flags, - name="GSFBuildTestBLayerTool")) + testBLTool = None + if flags.Detector.EnablePixel: + from InDetConfig.TrackingCommonConfig import ( + InDetRecTestBLayerToolCfg) + testBLTool = acc.popToolsAndMerge( + InDetRecTestBLayerToolCfg( + flags, + name="GSFBuildTestBLayerTool")) from InDetConfig.InDetRecToolConfig import ( InDetTrackSummaryHelperToolCfg) @@ -40,14 +49,17 @@ def GSFTrackSummaryToolCfg(flags, )) if "TRT_ElectronPidTool" not in kwargs: - from InDetConfig.TRT_ElectronPidToolsConfig import ( - TRT_ElectronPidToolCfg) - kwargs["TRT_ElectronPidTool"] = acc.popToolsAndMerge( - TRT_ElectronPidToolCfg( - flags, - name="GSFBuildTRT_ElectronPidTool", - CalculateNNPid=False, - MinimumTrackPtForNNPid=0.)) + if flags.Detector.EnableTRT: + from InDetConfig.TRT_ElectronPidToolsConfig import ( + TRT_ElectronPidToolCfg) + kwargs["TRT_ElectronPidTool"] = acc.popToolsAndMerge( + TRT_ElectronPidToolCfg( + flags, + name="GSFBuildTRT_ElectronPidTool", + CalculateNNPid=False, + MinimumTrackPtForNNPid=0.)) + else: + kwargs["TRT_ElectronPidTool"] = None kwargs.setdefault("doSharedHits", False) kwargs.setdefault("doHolesInDet", False) @@ -80,7 +92,7 @@ def EMBremCollectionBuilderCfg(flags, KeepParameters=True, TrackToVertex=acc.popToolsAndMerge(TrackToVertexCfg(flags)), UseTrackSummaryTool=False, - BadClusterID=flags.InDet.pixelClusterBadClusterID) + BadClusterID=0) kwargs["TrackParticleCreatorTool"] = gsfTrackParticleCreatorTool if "TrackSlimmingTool" not in kwargs: diff --git a/Reconstruction/egamma/egammaAlgs/python/egammaSelectedTrackCopyConfig.py b/Reconstruction/egamma/egammaAlgs/python/egammaSelectedTrackCopyConfig.py index be53168480b4b29c7802fae68d5ee494f3a899a2..09a581ade2fdab38e444337418ad0331c73572a6 100644 --- a/Reconstruction/egamma/egammaAlgs/python/egammaSelectedTrackCopyConfig.py +++ b/Reconstruction/egamma/egammaAlgs/python/egammaSelectedTrackCopyConfig.py @@ -19,6 +19,7 @@ def egammaSelectedTrackCopyCfg( if "egammaCaloClusterSelector" not in kwargs: egammaCaloClusterGSFSelector = CompFactory.egammaCaloClusterSelector( name='caloClusterGSFSelector', + egammaCheckEnergyDepositTool=CompFactory.egammaCheckEnergyDepositTool(), EMEtCut=2250., EMEtSplittingFraction=0.7, EMFCut=0.5 diff --git a/Reconstruction/egamma/egammaCaloTools/python/egammaCaloToolsConfig.py b/Reconstruction/egamma/egammaCaloTools/python/egammaCaloToolsConfig.py index 269cf7d4babdc5289604e43a6cb1115a38eb2dd0..75b94fb9ff9d0f575712259844bd81c594059a64 100644 --- a/Reconstruction/egamma/egammaCaloTools/python/egammaCaloToolsConfig.py +++ b/Reconstruction/egamma/egammaCaloTools/python/egammaCaloToolsConfig.py @@ -1,21 +1,22 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration -__doc__ = "Tool configuration to instantiate all egammaCaloTools with default configuration." +__doc__ = """ +Tool configuration to instantiate +all egammaCaloTools with default configuration. +""" -#--------------------------------------- from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from AthenaConfiguration.ComponentFactory import CompFactory + def CaloFillRectangularClusterCfg(flags): - result=ComponentAccumulator() + result = ComponentAccumulator() - CaloFillRectangularCluster=CompFactory.CaloFillRectangularCluster - caloFillRectangularCluster = CaloFillRectangularCluster(eta_size = 5, - phi_size = 7, - cells_name = flags.Egamma.Keys.Input.CaloCells) + CaloFillRectangularCluster = CompFactory.CaloFillRectangularCluster + caloFillRectangularCluster = CaloFillRectangularCluster( + eta_size=5, + phi_size=7, + cells_name=flags.Egamma.Keys.Input.CaloCells) result.setPrivateTools(caloFillRectangularCluster) return result - -#--------------------------------------- - diff --git a/Reconstruction/egamma/egammaCaloTools/python/egammaCaloToolsFactories.py b/Reconstruction/egamma/egammaCaloTools/python/egammaCaloToolsFactories.py index 70c72c7c5feca0c0a011b1fde01bd746cc2c90ae..c9bb730d3ba2e02af787582fdb596c963bcd8e5f 100644 --- a/Reconstruction/egamma/egammaCaloTools/python/egammaCaloToolsFactories.py +++ b/Reconstruction/egamma/egammaCaloTools/python/egammaCaloToolsFactories.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration from CaloClusterCorrection import CaloClusterCorrectionConf as Cccc __doc__ = """ToolFactories to instantiate all @@ -9,7 +9,6 @@ from egammaRec.Factories import ToolFactory from egammaCaloTools import egammaCaloToolsConf from egammaRec import egammaKeys -# --------------------------------------- egammaShowerShape = ToolFactory( egammaCaloToolsConf.egammaShowerShape, @@ -35,6 +34,3 @@ egammaIso = ToolFactory( egammaCheckEnergyDepositTool = ToolFactory( egammaCaloToolsConf.egammaCheckEnergyDepositTool) - - -# --------------------------------------- diff --git a/Reconstruction/egamma/egammaConfig/python/egammaLRTReconstructionConfig.py b/Reconstruction/egamma/egammaConfig/python/egammaLRTReconstructionConfig.py index 26ed299665c65989256b68480685a30d57f60df1..55090abb32fa8ce9e293b0dec1e7b3f7b2f322fd 100644 --- a/Reconstruction/egamma/egammaConfig/python/egammaLRTReconstructionConfig.py +++ b/Reconstruction/egamma/egammaConfig/python/egammaLRTReconstructionConfig.py @@ -25,7 +25,7 @@ def egammaLRTReconstructionCfg(flags, name="egammaLRTReconstruction"): EMExtrapolationToolsLRTCommonCacheCfg(flags)) acc.merge(egammaSelectedTrackCopyCfg( flags, - name="egammaSelectedLRTTrackCopy", + name="LRTegammaSelectedTrackCopy", TrackParticleContainerName="InDetLargeD0TrackParticles", OutputTrkPartContainerName="LRTegammaSelectedTrackParticles", ExtrapolationToolCommonCache=emextLRTCommonCache) @@ -35,7 +35,7 @@ def egammaLRTReconstructionCfg(flags, name="egammaLRTReconstruction"): EMBremCollectionBuilderCfg) acc.merge(EMBremCollectionBuilderCfg( flags, - name='EMLRTBremCollectionBuilder', + name='LRTEMBremCollectionBuilder', TrackParticleContainerName='InDetLargeD0TrackParticles', SelectedTrackParticleContainerName='LRTegammaSelectedTrackParticles', OutputTrkPartContainerName='LRT'+flags.Egamma.Keys.Output.GSFTrackParticles, @@ -46,7 +46,7 @@ def egammaLRTReconstructionCfg(flags, name="egammaLRTReconstruction"): EMGSFCaloExtensionBuilderCfg) acc.merge(EMGSFCaloExtensionBuilderCfg( flags, - name='EMGSFLRTCaloExtensionBuilder', + name='LRTEMGSFCaloExtensionBuilder', GSFPerigeeCache='LRTGSFPerigeeCaloExtension', GSFLastCache='LRTGSFLastCaloExtension', GFFTrkPartContainerName='LRT'+flags.Egamma.Keys.Output.GSFTrackParticles) @@ -101,6 +101,7 @@ def egammaLRTReconstructionCfg(flags, name="egammaLRTReconstruction"): InputElectronRecCollectionName='LRT' + flags.Egamma.Keys.Internal.ElectronSuperRecs, ElectronOutputName='LRT'+flags.Egamma.Keys.Output.Electrons, + PhotonOutputName="LRT"+flags.Egamma.Keys.Output.Photons, EMClusterTool=LRTEMClusterTool, doPhotons=False) ) @@ -118,6 +119,13 @@ def egammaLRTReconstructionCfg(flags, name="egammaLRTReconstruction"): MatchForwardElectrons=False) ) + # To use egamma CA within standard config + import inspect + stack = inspect.stack() + if len(stack) >= 2 and stack[1].function == 'CAtoGlobalWrapper': + for el in acc._allSequences: + el.name = "TopAlg" + mlog.info("EGamma LRT reconstruction configured") return acc diff --git a/Reconstruction/egamma/egammaMVACalib/CMakeLists.txt b/Reconstruction/egamma/egammaMVACalib/CMakeLists.txt index 8155feb9d49601602f4915bfe112f86690cba922..b218ff580b9da389f7bbab83a4ad3ea7972ccc6f 100644 --- a/Reconstruction/egamma/egammaMVACalib/CMakeLists.txt +++ b/Reconstruction/egamma/egammaMVACalib/CMakeLists.txt @@ -33,5 +33,11 @@ atlas_add_component( egammaMVACalib LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaBaseComps GaudiKernel egammaMVACalibLib) endif() +if( NOT XAOD_ANALYSIS) +atlas_add_test(egammaMVASvcConfigTest + SCRIPT python -m egammaMVACalib.egammaMVACalibConfig + POST_EXEC_SCRIPT nopost.sh) +endif() + # Install files from the package: atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} ) diff --git a/Reconstruction/egamma/egammaMVACalib/python/TrigEgammaMVACalibConfig.py b/Reconstruction/egamma/egammaMVACalib/python/TrigEgammaMVACalibConfig.py deleted file mode 100644 index 844d9f2926139cd4019c9c70560e01c0a9b11ba7..0000000000000000000000000000000000000000 --- a/Reconstruction/egamma/egammaMVACalib/python/TrigEgammaMVACalibConfig.py +++ /dev/null @@ -1,40 +0,0 @@ -# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration - -from AthenaCommon.Logging import logging -from AthenaConfiguration.ComponentFactory import CompFactory -from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator -egammaMVACalibTool, egammaMVASvc=CompFactory.getComps("egammaMVACalibTool","egammaMVASvc",) -from xAODEgamma.xAODEgammaParameters import xAOD - - -def TrigEgammaMVACalibCfg(flags, name="TrigEgammaMVASvc"): - - mlog = logging.getLogger('TrigEgammaMVACalibConfig') - mlog.debug('Start configuration') - - acc = ComponentAccumulator() - - if flags.Trigger.egamma.calibMVAVersion is not None: - folder = flags.Trigger.egamma.calibMVAVersion - mlog.debug('MVA version: %s', folder) - else: - raise KeyError("Trigger.egamma.calibMVAVersion not set") - - mlog.debug('Cluster Correction version: %s', flags.Trigger.egamma.clusterCorrectionVersion) - - TrigElectronMVATool = egammaMVACalibTool(name="TrigElectronMVATool", - ParticleType=xAOD.EgammaParameters.electron, - folder=folder, - use_layer_corrected=False) - - TrigPhotonMVATool = egammaMVACalibTool(name="TrigPhotonMVATool", - ParticleType=xAOD.EgammaParameters.unconvertedPhoton, - folder=folder, - use_layer_corrected=False) - - TrigEgammaMVASvc = egammaMVASvc(name=name, - ElectronTool=TrigElectronMVATool, - UnconvertedPhotonTool=TrigPhotonMVATool) - - acc.addService(TrigEgammaMVASvc, primary=True) - return acc diff --git a/Reconstruction/egamma/egammaMVACalib/python/egammaMVACalibConfig.py b/Reconstruction/egamma/egammaMVACalib/python/egammaMVACalibConfig.py index 8117b07208d0f312b9fd1aa4528846ef02f19d9b..7672c6221004d673a149f6e1e0a211ead1121be5 100644 --- a/Reconstruction/egamma/egammaMVACalib/python/egammaMVACalibConfig.py +++ b/Reconstruction/egamma/egammaMVACalib/python/egammaMVACalibConfig.py @@ -3,59 +3,81 @@ from AthenaCommon.Logging import logging from AthenaConfiguration.ComponentFactory import CompFactory from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator -egammaMVACalibTool, egammaMVASvc=CompFactory.getComps("egammaMVACalibTool","egammaMVASvc",) from xAODEgamma.xAODEgammaParameters import xAOD -def egammaMVASvcCfg(flags, name="egammaMVASvc"): +def egammaMVAToolCfg(flags, **kwargs): + acc = ComponentAccumulator() + acc.setPrivateTools(CompFactory.egammaMVACalibTool(**kwargs)) + return acc - mlog = logging.getLogger(name) - mlog.debug('Start configuration') +def egammaMVASvcCfg(flags, name="egammaMVASvc", **kwargs): + + mlog = logging.getLogger(name) acc = ComponentAccumulator() if flags.Egamma.Calib.MVAVersion is not None: folder = flags.Egamma.Calib.MVAVersion - mlog.debug('MVA version: %s', folder) + mlog.info('egamma MVA calib version: %s', folder) else: raise KeyError("Egamma.Calib.MVAVersion is not set") - electronMVATool = egammaMVACalibTool(name="electronMVATool", - ParticleType=xAOD.EgammaParameters.electron, - folder=folder) - unconvertedPhotonMVATool = egammaMVACalibTool(name="unconvertedPhotonMVATool", - ParticleType=xAOD.EgammaParameters.unconvertedPhoton, - folder=folder) - convertedPhotonMVATool = egammaMVACalibTool(name="convertedPhotonMVATool", - ParticleType=xAOD.EgammaParameters.convertedPhoton, - folder=folder) - - egMVASvc = egammaMVASvc(name=name, - ElectronTool=electronMVATool, - UnconvertedPhotonTool=unconvertedPhotonMVATool, - ConvertedPhotonTool=convertedPhotonMVATool) - - acc.addService(egMVASvc, primary=True) + if "ElectronTool" not in kwargs: + kwargs["ElectronTool"] = acc.popToolsAndMerge( + egammaMVAToolCfg( + flags, + name="electronMVATool", + ParticleType=xAOD.EgammaParameters.electron, + folder=folder) + ) + + if "UnconvertedPhotonTool" not in kwargs: + kwargs["UnconvertedPhotonTool"] = acc.popToolsAndMerge( + egammaMVAToolCfg( + flags, + name="unconvertedPhotonMVATool", + ParticleType=xAOD.EgammaParameters.unconvertedPhoton, + folder=folder) + ) + + if "ConvertedPhotonTool" not in kwargs: + kwargs["ConvertedPhotonTool"] = acc.popToolsAndMerge( + egammaMVAToolCfg( + flags, + name="convertedPhotonMVATool", + ParticleType=xAOD.EgammaParameters.convertedPhoton, + folder=folder) + ) + + acc.addService( + CompFactory.egammaMVASvc( + name=name, + **kwargs), primary=True) return acc if __name__ == "__main__": from AthenaConfiguration.AllConfigFlags import ConfigFlags - from AthenaCommon.Logging import log - from AthenaCommon.Constants import DEBUG from AthenaCommon.Configurable import Configurable - Configurable.configurableRun3Behavior = 1 - log.setLevel(DEBUG) + from AthenaConfiguration.ComponentAccumulator import printProperties + from AthenaConfiguration.TestDefaults import defaultTestFiles + + Configurable.configurableRun3Behavior = True - ConfigFlags.Input.isMC = True - ConfigFlags.Input.Files = ["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/q221/21.0/myRDO.pool.root"] + ConfigFlags.Input.Files = defaultTestFiles.RDO + ConfigFlags.fillFromArgs() ConfigFlags.lock() cfg = ComponentAccumulator() + mlog = logging.getLogger("egammaMVASvcConfigTest") + mlog.info("Configuring egammaMVASvc :") + printProperties(mlog, cfg.getPrimaryAndMerge( + egammaMVASvcCfg(ConfigFlags)), + nestLevel=1, + printDefaults=True) cfg.printConfig() - acc = egammaMVASvcCfg(ConfigFlags) - cfg.merge(acc) f = open("egmvatools.pkl", "wb") cfg.store(f) diff --git a/Reconstruction/egamma/egammaTrackTools/python/egammaTrackToolsConfig.py b/Reconstruction/egamma/egammaTrackTools/python/egammaTrackToolsConfig.py index 0acb175d5e136883f9db73fe5bb4d2788f9df844..c8635c99c05934c2603350f7aefbdfbe690060d7 100644 --- a/Reconstruction/egamma/egammaTrackTools/python/egammaTrackToolsConfig.py +++ b/Reconstruction/egamma/egammaTrackTools/python/egammaTrackToolsConfig.py @@ -11,11 +11,37 @@ from TrkConfig.AtlasExtrapolatorConfig import ( from TrackToCalo.TrackToCaloConfig import ParticleCaloExtensionToolCfg +def egCaloDepthCfg(flags, **kwargs): + acc = ComponentAccumulator() + kwargs.setdefault("name", "egCaloDepthToolmiddle") + kwargs.setdefault("DepthChoice", "middle") + acc.setPrivateTools( + CompFactory.CaloDepthTool(**kwargs)) + return acc + + +def egCaloSurfaceBuilderCfg(flags, **kwargs): + acc = ComponentAccumulator() + kwargs.setdefault( + "CaloDepthTool", + acc.popToolsAndMerge(egCaloDepthCfg(flags))) + + acc.setPrivateTools( + CompFactory.CaloSurfaceBuilder(**kwargs) + ) + return acc + + def EMLastCaloExtensionToolCfg(flags, **kwargs): + acc = ComponentAccumulator() kwargs.setdefault("name", "EMLastCaloExtensionTool") kwargs.setdefault("ParticleType", "electron") + + if "CaloSurfaceBuilder" not in kwargs: + kwargs["CaloSurfaceBuilder"] = acc.popToolsAndMerge( + egCaloSurfaceBuilderCfg(flags)) + if "Extrapolator" not in kwargs: - acc = ComponentAccumulator() extrapAcc = egammaCaloExtrapolatorCfg(flags) kwargs["Extrapolator"] = acc.popToolsAndMerge(extrapAcc) return ParticleCaloExtensionToolCfg(flags, **kwargs) diff --git a/Reconstruction/egamma/egammaTrackTools/python/egammaTrackToolsFactories.py b/Reconstruction/egamma/egammaTrackTools/python/egammaTrackToolsFactories.py index 2e954ab0004359458890e4a2fc49813d59efcd2e..536f84b2a295416db046112a266c5c335c151180 100644 --- a/Reconstruction/egamma/egammaTrackTools/python/egammaTrackToolsFactories.py +++ b/Reconstruction/egamma/egammaTrackTools/python/egammaTrackToolsFactories.py @@ -3,23 +3,38 @@ __doc__ = """ToolFactories to instantiate all egammaCaloTools with default configuration""" __author__ = "Bruno Lenzi , Christos Anastopoulos" -from egammaRec.Factories import ToolFactory +from egammaRec.Factories import ToolFactory, PublicToolFactory from egammaTrackTools import egammaTrackToolsConf from egammaTools.egammaExtrapolators import ( egammaCaloExtrapolator, egammaExtrapolator) import AthenaCommon.CfgMgr as CfgMgr + +egCaloDepthTool = PublicToolFactory( + CfgMgr.CaloDepthTool, + name="egCaloDepthTool", + DepthChoice="middle" +) + +egCaloSurfaceBuilder = ToolFactory( + CfgMgr.CaloSurfaceBuilder, + name="egCaloSurfaceBuilder", + CaloDepthTool=egCaloDepthTool +) + EMLastCaloExtensionTool = ToolFactory( CfgMgr.Trk__ParticleCaloExtensionTool, name="EMLastCaloExtensionTool", Extrapolator=egammaCaloExtrapolator, - ParticleType="electron") + ParticleType="electron", + CaloSurfaceBuilder=egCaloSurfaceBuilder) EMParticleCaloExtensionTool = ToolFactory( CfgMgr.Trk__ParticleCaloExtensionTool, name="EMParticleCaloExtensionTool", Extrapolator=egammaCaloExtrapolator, ParticleType="electron", + CaloSurfaceBuilder=egCaloSurfaceBuilder, StartFromPerigee=True) diff --git a/Reconstruction/egamma/egammaTrackTools/src/EMExtrapolationTools.cxx b/Reconstruction/egamma/egammaTrackTools/src/EMExtrapolationTools.cxx index 76f559ea6e0cbfda061db4811a0410b255a62bc1..2fd05e3ee61a9d961ba6052a09cd92efda4181df 100644 --- a/Reconstruction/egamma/egammaTrackTools/src/EMExtrapolationTools.cxx +++ b/Reconstruction/egamma/egammaTrackTools/src/EMExtrapolationTools.cxx @@ -139,7 +139,7 @@ StatusCode EMExtrapolationTools::getMatchAtCalo(const EventContext& ctx, const xAOD::CaloCluster& cluster, const xAOD::TrackParticle& trkPB, - Trk::PropDirection direction, + Trk::PropDirection, std::array<double, 4>& eta, std::array<double, 4>& phi, std::array<double, 4>& deltaEta, @@ -169,12 +169,13 @@ EMExtrapolationTools::getMatchAtCalo(const EventContext& ctx, */ case fromPerigeeRescaled: { Trk::Perigee trkPar = getRescaledPerigee(trkPB, cluster); - std::unique_ptr<Trk::CaloExtension> extension = - m_perigeeParticleCaloExtensionTool->caloExtension( - ctx, trkPar, direction, Trk::muon); - didExtension = extension != nullptr; - if (didExtension) { - intersections = getIntersections(*extension, cluster); + const auto extension = + m_perigeeParticleCaloExtensionTool->egammaCaloExtension( + ctx, trkPar, cluster); + didExtension = !extension.empty(); + for (const auto& i : extension) { + intersections.emplace_back( + i.first, i.second->position().eta(), i.second->position().phi()); } } break; /* For the other cases @@ -354,7 +355,7 @@ EMExtrapolationTools::getEtaPhiAtCalo(const EventContext& ctx, if (!vertex) { return false; } - Amg::Vector3D momentum = getMomentumAtVertex(ctx,*vertex); + Amg::Vector3D momentum = getMomentumAtVertex(ctx, *vertex); if (momentum.mag() < 1e-5) { ATH_MSG_DEBUG("Intersection failed"); return false; @@ -366,7 +367,7 @@ EMExtrapolationTools::getEtaPhiAtCalo(const EventContext& ctx, Trk::PerigeeSurface surface(vertex->position()); Trk::Perigee trkPar( vertex->position(), momentum.unit() * 1.e10, +1, surface, std::nullopt); - bool success = getEtaPhiAtCalo(ctx,&trkPar, etaAtCalo, phiAtCalo); + bool success = getEtaPhiAtCalo(ctx, &trkPar, etaAtCalo, phiAtCalo); return success; } /* The actual calculation happens here*/ @@ -488,9 +489,9 @@ EMExtrapolationTools::getMomentumAtVertex(const EventContext& ctx, ATH_MSG_DEBUG("getMomentumAtVertex : getting from auxdata"); return Amg::Vector3D(accPx(vertex), accPy(vertex), accPz(vertex)); } - for (unsigned int i = 0; i < vertex.nTrackParticles(); ++i) { - momentum += getMomentumAtVertex(ctx, vertex, i); - } + for (unsigned int i = 0; i < vertex.nTrackParticles(); ++i) { + momentum += getMomentumAtVertex(ctx, vertex, i); + } return momentum; } diff --git a/Reconstruction/egamma/egammaValidation/python/egammaOnlyPreExec.py b/Reconstruction/egamma/egammaValidation/python/egammaOnlyPreExec.py index 4708feae31f3d300847cc5338fddd7a673b93a9b..a87e1022e8b72fcf694b58fa49965fd1aeba1ef5 100644 --- a/Reconstruction/egamma/egammaValidation/python/egammaOnlyPreExec.py +++ b/Reconstruction/egamma/egammaValidation/python/egammaOnlyPreExec.py @@ -4,9 +4,14 @@ from RecExConfig.RecFlags import rec from RecExConfig.RecAlgsFlags import recAlgs from ParticleBuilderOptions.AODFlags import AODFlags from JetRec.JetRecFlags import jetFlags +from AthenaCommon.DetFlags import DetFlags +from AthenaConfiguration.AllConfigFlags import ConfigFlags def setRunEgammaOnlyRecoFlags(): + + DetFlags.Muon_setOff() + ConfigFlags.Detector.GeometryMuon = False rec.doTrigger.set_Value_and_Lock(False) rec.doTau.set_Value_and_Lock(False) rec.doMuon.set_Value_and_Lock(False) diff --git a/Simulation/BeamEffects/share/BeamEffectsAlg_test.ref b/Simulation/BeamEffects/share/BeamEffectsAlg_test.ref index 6c7319f09e73a164aa4559136f4c94aa35e1a029..b5a10bdc84cd934f2e530953f2bd33df6d9a9eb5 100644 --- a/Simulation/BeamEffects/share/BeamEffectsAlg_test.ref +++ b/Simulation/BeamEffects/share/BeamEffectsAlg_test.ref @@ -13,7 +13,7 @@ ApplicationMgr Ready [----------] 7 tests from BeamEffectsAlg_test [ RUN ] BeamEffectsAlg_test.empty_alg_execute ClassIDSvc INFO getRegistryEntries: read 2101 CLIDRegistry entries for module ALL -BeamEffectsAlg FATAL No input McEventCollection called GEN_EVENT in StoreGate. +BeamEffectsAlg FATAL No input McEventCollection called GEN_EVENT in StoreGateSvc [ OK ] BeamEffectsAlg_test.empty_alg_execute (16 ms) [ RUN ] BeamEffectsAlg_test.set_properties ClassIDSvc INFO getRegistryEntries: read 430 CLIDRegistry entries for module ALL diff --git a/Simulation/BeamEffects/src/BeamEffectsAlg.cxx b/Simulation/BeamEffects/src/BeamEffectsAlg.cxx index 4a7c8626e35c216fb34ba8b4580655e4cbf911fe..02f34284af3d1f3f8a1c4c1b1dd43fb86e7f0ccf 100644 --- a/Simulation/BeamEffects/src/BeamEffectsAlg.cxx +++ b/Simulation/BeamEffects/src/BeamEffectsAlg.cxx @@ -45,7 +45,7 @@ namespace Simulation SG::ReadHandle<McEventCollection> h_inputMcEventCollection (m_inputMcEventCollection, ctx); SG::WriteHandle<McEventCollection> h_outputMcEventCollection (m_outputMcEventCollection, ctx); if(!h_inputMcEventCollection.isValid()) { - ATH_MSG_FATAL("No input McEventCollection called " << h_inputMcEventCollection.name() << " in StoreGate."); + ATH_MSG_FATAL("No input McEventCollection called " << h_inputMcEventCollection.name() << " in " << h_inputMcEventCollection.store()); return StatusCode::FAILURE; } auto outputMcEventCollection = std::make_unique<McEventCollection>(*h_inputMcEventCollection); diff --git a/Simulation/Digitization/python/DigiAlgConfig.py b/Simulation/Digitization/python/DigiAlgConfig.py index 7552573f7efc504cc462edc3426b31ca6faa74eb..1f8b795a494a2e5ac83032747208768ca404f8e2 100644 --- a/Simulation/Digitization/python/DigiAlgConfig.py +++ b/Simulation/Digitization/python/DigiAlgConfig.py @@ -42,7 +42,8 @@ def getStandardTruthPileUpTools(): if digitizationFlags.doBeamGas.get_Value() or digitizationFlags.doBeamHalo.get_Value(): PileUpToolsList += [ "NewMergeMcEventCollTool_HaloGas" ] else: - PileUpToolsList += [ "MergeMcEventCollTool" ] + if not athenaCommonFlags.DoFullChain(): + PileUpToolsList += [ "MergeMcEventCollTool" ] if 'PileUpAntiKt4TruthJets' in digitizationFlags.experimentalDigi(): PileUpToolsList += [ "MergeAntiKt4TruthJetsTool" ] if 'PileUpAntiKt6TruthJets' in digitizationFlags.experimentalDigi(): @@ -64,7 +65,8 @@ def getStandardSignalOnlyTruthPileUpTools(): if not athenaCommonFlags.DoFullChain(): PileUpToolsList += [ "NewMergeMcEventCollTool_Signal" ] else: - PileUpToolsList += [ "SignalOnlyMcEventCollTool" ] + if not athenaCommonFlags.DoFullChain(): + PileUpToolsList += [ "SignalOnlyMcEventCollTool" ] if 'PileUpAntiKt4TruthJets' in digitizationFlags.experimentalDigi(): PileUpToolsList += [ "MergeAntiKt4TruthJetsTool" ] if 'PileUpAntiKt6TruthJets' in digitizationFlags.experimentalDigi(): @@ -94,7 +96,8 @@ def getStandardInTimeOnlyTruthPileUpTools(): if digitizationFlags.doBeamGas.get_Value() or digitizationFlags.doBeamHalo.get_Value(): PileUpToolsList += [ "InTimeOnlyNewMergeMcEventCollTool_HaloGas" ] else: - PileUpToolsList += [ "InTimeOnlyMcEventCollTool" ] + if not athenaCommonFlags.DoFullChain(): + PileUpToolsList += [ "InTimeOnlyMcEventCollTool" ] if 'PileUpAntiKt4TruthJets' in digitizationFlags.experimentalDigi(): PileUpToolsList += [ "MergeAntiKt4TruthJetsTool" ] if 'PileUpAntiKt6TruthJets' in digitizationFlags.experimentalDigi(): diff --git a/Simulation/Digitization/python/DigiOutput.py b/Simulation/Digitization/python/DigiOutput.py index a562320bd5aa904d57eeed9b4d94e2918326ded2..5e21312c981c5704861f896f6c0b933190adabb0 100644 --- a/Simulation/Digitization/python/DigiOutput.py +++ b/Simulation/Digitization/python/DigiOutput.py @@ -205,7 +205,10 @@ def getStreamRDO_ItemList(log): StreamRDO_ItemList+=["LArTTL1Container#*"] from AtlasGeoModel.CommonGMJobProperties import CommonGeometryFlags as commonGeoFlags if commonGeoFlags.Run()=="RUN3": - StreamRDO_ItemList+=["LArDigitContainer#LArDigitSCL2"] + if digitizationFlags.PileUpPresampling: + StreamRDO_ItemList+=["LArDigitContainer#*LArDigitSCL2"] + else: + StreamRDO_ItemList+=["CaloCellContainer#SCell"] if DetFlags.simulateLVL1.Tile_on(): if DetFlags.writeRDOPool.Tile_on(): StreamRDO_ItemList+=["TileTTL1Container#*"] diff --git a/Simulation/Digitization/share/LVL1Digitization.py b/Simulation/Digitization/share/LVL1Digitization.py index deb97ad17a9251e61e3197e38add0f8aad65fac1..bcfb3aad5461e31fcbdd4d40d56ea773db0fd0bc 100755 --- a/Simulation/Digitization/share/LVL1Digitization.py +++ b/Simulation/Digitization/share/LVL1Digitization.py @@ -42,6 +42,9 @@ if DetFlags.simulateLVL1.LAr_on(): if commonGeoFlags.Run()=="RUN3": from LArL1Sim.LArSCL1Getter import * theLArSCL1Getter = LArSCL1Getter() + if not digitizationFlags.PileUpPresampling: + from LArROD.LArSCellGetter import LArSCellGetter + theLArSCellGetter = LArSCellGetter() if DetFlags.simulateLVL1.Tile_on(): protectedInclude( "TileSimAlgs/TileTTL1_jobOptions.py" ) diff --git a/Simulation/FastSimulation/FastChainPileup/test/test_new_g4ms_pileup.sh b/Simulation/FastSimulation/FastChainPileup/test/test_new_g4ms_pileup.sh new file mode 100755 index 0000000000000000000000000000000000000000..4421ab1ba8a890c3aa321cc50148089f51bf6725 --- /dev/null +++ b/Simulation/FastSimulation/FastChainPileup/test/test_new_g4ms_pileup.sh @@ -0,0 +1,83 @@ +#!/bin/sh +# +# art-description: G4MS test with pile-up profile +# art-type: grid +# art-include: master/Athena +# art-output: run-* + +maxevent=1 +inputfile="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/ISF_Validation/mc12_valid.110401.PowhegPythia_P2012_ttbar_nonallhad.evgen.EVNT.e3099.01517252._000001.pool.root.1" +HighPtMinbiasHitsFiles="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/mc16_13TeV.361239.Pythia8EvtGen_A3NNPDF23LO_minbias_inelastic_high.merge.HITS.e4981_s3087_s3089/*" +LowPtMinbiasHitsFiles="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/mc16_13TeV.361238.Pythia8EvtGen_A3NNPDF23LO_minbias_inelastic_low.merge.HITS.e4981_s3087_s3089/*" + + +mkdir run-wopostexec; cd run-wopostexec +FastChain_tf.py \ + --simulator ATLFASTIIF_G4MS \ + --useISF True \ + --randomSeed 123 \ + --enableLooperKiller True \ + --physicsList 'FTFP_BERT_ATL' \ + --jobNumber 1 \ + --bunchSpacing 25 \ + --digiSeedOffset1 '1' \ + --digiSeedOffset2 '2' \ + --inputEVNTFile ${inputfile} \ + --outputRDOFile RDO.pool.root \ + --maxEvents ${maxevent} \ + --skipEvents 0 \ + --geometryVersion default:ATLAS-R2-2016-01-00-01 \ + --conditionsTag default:OFLCOND-MC16-SDR-16 \ + --preSimExec 'from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags;TrkDetFlags.TRT_BuildStrawLayers=True;from ISF_Config.ISF_jobProperties import ISF_Flags;ISF_Flags.UseTrackingGeometryCond=False' \ + --preSimInclude 'Campaigns/MC16a.py' 'Campaigns/PileUpMC16a.py' \ + --postInclude='PyJobTransforms/UseFrontier.py' \ + --postExec 'ServiceMgr.MessageSvc.Format = "% F%32W%S%7W%R%T %0W%M"' \ + --inputHighPtMinbiasHitsFile ${HighPtMinbiasHitsFiles} \ + --inputLowPtMinbiasHitsFile ${LowPtMinbiasHitsFiles} \ + --pileupFinalBunch '6' \ + --numberOfHighPtMinBias '0.116075313' \ + --numberOfLowPtMinBias '44.3839246425' \ + --numberOfCavernBkg 0 \ + --imf False +rc1=$? +echo "art-result: ${rc1} EVNTtoRDO" + +cd .. +mkdir run-withpostexec; cd run-withpostexec +FastChain_tf.py \ + --simulator ATLFASTIIF_G4MS \ + --useISF True \ + --randomSeed 123 \ + --enableLooperKiller True \ + --physicsList 'FTFP_BERT_ATL' \ + --jobNumber 1 \ + --bunchSpacing 25 \ + --digiSeedOffset1 '1' \ + --digiSeedOffset2 '2' \ + --inputEVNTFile ${inputfile} \ + --outputRDOFile RDO.pool.root \ + --maxEvents ${maxevent} \ + --skipEvents 0 \ + --geometryVersion default:ATLAS-R2-2016-01-00-01 \ + --conditionsTag default:OFLCOND-MC16-SDR-16 \ + --preSimExec 'from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags;TrkDetFlags.TRT_BuildStrawLayers=True;from ISF_Config.ISF_jobProperties import ISF_Flags;ISF_Flags.UseTrackingGeometryCond=False' \ + --preSimInclude 'Campaigns/MC16a.py' 'Campaigns/PileUpMC16a.py' \ + --postInclude='PyJobTransforms/UseFrontier.py' \ + --postExec 'ServiceMgr.EventSelector.FirstLB=1;ServiceMgr.EventSelector.InitialTimeStamp=1446539425;ServiceMgr.EventSelector.OverrideRunNumber=True;ServiceMgr.EventSelector.OverrideRunNumberFromInput=True;ServiceMgr.EventSelector.RunNumber=284500;ServiceMgr.MessageSvc.Format = "% F%32W%S%7W%R%T %0W%M"' \ + --inputHighPtMinbiasHitsFile ${HighPtMinbiasHitsFiles} \ + --inputLowPtMinbiasHitsFile ${LowPtMinbiasHitsFiles} \ + --pileupFinalBunch '6' \ + --numberOfHighPtMinBias '0.116075313' \ + --numberOfLowPtMinBias '44.3839246425' \ + --numberOfCavernBkg 0 \ + --imf False + +cd .. +rc2=$? +echo "art-result: ${rc2} "EVNTtoRDO-withpostExec"" + +if [[ ${rc1} -eq 0 && ${rc2} -eq 0 ]] +then + art.py compare ref run-wopostexec/RDO.pool.root run-withpostexec/RDO.pool.root --mode=summary + echo "art-result: $? diff-root" +fi diff --git a/Simulation/G4Atlas/G4AtlasApps/python/AtlasG4Eng.py b/Simulation/G4Atlas/G4AtlasApps/python/AtlasG4Eng.py index 74d811afe91098094dbcd45bd2f0126169a95add..e7eb0d11b7fae6268d9e395b282ff7500fd8efcf 100644 --- a/Simulation/G4Atlas/G4AtlasApps/python/AtlasG4Eng.py +++ b/Simulation/G4Atlas/G4AtlasApps/python/AtlasG4Eng.py @@ -15,7 +15,7 @@ __author__ = "A. Dell`Acqua, M. Gallas" from AthenaCommon import Logging from time import time import os, os.path, string, sys -import ROOT,cppyy +import cppyy # TODO: Rename to AppProfiler, to avoid class/variable confusion class _app_profiler(object): @@ -109,8 +109,6 @@ class G4AtlasEngine: # pylcgdict default dictionaries self.load_Dict('AtlasSealCLHEPDict') - self.load_Dict('G4AtlasControlDict') - G4AtlasEngine._ctrl = ROOT.SimControl() self.init_status = 0 self.useISF = useISF @@ -133,7 +131,6 @@ class G4AtlasEngine: if G4AtlasEngine.log.level <= 30: from SimFlags import simFlags simFlags.G4Commands += ['/run/verbose 2'] # FIXME make configurable based on Athena message level? - #G4AtlasEngine._ctrl.initializeG4(is_hive) G4AtlasEngine.log.info(' G4AtlasEngine: _init_G4: init Geant4 ') self._InitList.append('init_G4') G4AtlasEngine._app_profiler('_init_G4: ') diff --git a/Simulation/G4Atlas/G4AtlasControl/CMakeLists.txt b/Simulation/G4Atlas/G4AtlasControl/CMakeLists.txt deleted file mode 100644 index 610639715ccbeaef2b7c1aefed5dca819a9ea377..0000000000000000000000000000000000000000 --- a/Simulation/G4Atlas/G4AtlasControl/CMakeLists.txt +++ /dev/null @@ -1,31 +0,0 @@ -################################################################################ -# Package: G4AtlasControl -################################################################################ - -# Declare the package name: -atlas_subdir( G4AtlasControl ) - -# External dependencies: -find_package( CLHEP ) -find_package( Geant4 ) -find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread ) -find_package( XercesC ) -find_package( Eigen ) - -# this line failed automatic conversion in cmt2cmake : -# macro_prepend G4AtlasControlDict_shlibflags " -lG4AtlasControl " - -# Component(s) in the package: -atlas_add_library( G4AtlasControl - src/*.cxx - PUBLIC_HEADERS G4AtlasControl - PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${GEANT4_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} - PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS} - LINK_LIBRARIES GaudiKernel - PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} ${XERCESC_LIBRARIES} ${GEANT4_LIBRARIES} ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} ) - -atlas_add_dictionary( G4AtlasControlDict - G4AtlasControl/G4AtlasControlDict.h - G4AtlasControl/selection.xml - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${GEANT4_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} ${XERCESC_LIBRARIES} ${GEANT4_LIBRARIES} ${CLHEP_LIBRARIES} GaudiKernel G4AtlasControl ) diff --git a/Simulation/G4Atlas/G4AtlasControl/G4AtlasControl/G4AtlasControlDict.h b/Simulation/G4Atlas/G4AtlasControl/G4AtlasControl/G4AtlasControlDict.h deleted file mode 100644 index f87f38c263b3c1531f6db49887ad73d086cf6460..0000000000000000000000000000000000000000 --- a/Simulation/G4Atlas/G4AtlasControl/G4AtlasControl/G4AtlasControlDict.h +++ /dev/null @@ -1,5 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "G4AtlasControl/SimControl.h" diff --git a/Simulation/G4Atlas/G4AtlasControl/G4AtlasControl/SimControl.h b/Simulation/G4Atlas/G4AtlasControl/G4AtlasControl/SimControl.h deleted file mode 100644 index b68c1dec39eae69071723aa3a0ba0cc7e6282726..0000000000000000000000000000000000000000 --- a/Simulation/G4Atlas/G4AtlasControl/G4AtlasControl/SimControl.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef G4AtlasControl_SimControl_H -#define G4AtlasControl_SimControl_H - -#include <string> - -/// @class SimControl -/// @brief C++ class used for passing configuration -/// from the python layer to C++ layer. -/// -/// This code was originally written to allow configuration of G4 from -/// the python layer prior to the introduction of configurable -/// properties in Athena classes. Once the FADS migration -/// (ATLASSIM-2256) is complete all of this code should be obsolete. -class SimControl -{ -public: - /// Empty Constructor - SimControl(); - /// Empty Destructor - virtual ~SimControl(); - /// Still used from PyG4Atlas.G4AtlasEngine to initialize Geant4. - void initializeG4(bool isMT=false) const; -}; - -#endif diff --git a/Simulation/G4Atlas/G4AtlasControl/G4AtlasControl/selection.xml b/Simulation/G4Atlas/G4AtlasControl/G4AtlasControl/selection.xml deleted file mode 100644 index bb3be890c7b32702360e8dcd8ef26bed3519b489..0000000000000000000000000000000000000000 --- a/Simulation/G4Atlas/G4AtlasControl/G4AtlasControl/selection.xml +++ /dev/null @@ -1,3 +0,0 @@ -<lcgdict> - <class name="SimControl"/> -</lcgdict> diff --git a/Simulation/G4Atlas/G4AtlasControl/doc/packagedoc.h b/Simulation/G4Atlas/G4AtlasControl/doc/packagedoc.h deleted file mode 100644 index 4fdb64aba98c49821b0543ca71c19dc172be09cb..0000000000000000000000000000000000000000 --- a/Simulation/G4Atlas/G4AtlasControl/doc/packagedoc.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -/** -@page G4AtlasControl_page G4AtlasControl -@author Andrea Dell'Acqua (dellacqu@mail.cern.ch) - -@section G4AtlasControl_G4AtlasControl Introduction - -This package includes all the control interfaces from the python layer into the C++ layer of the simulation. All the menus available to the user trhough the AtlasG4Engine are defined here (and are applied in G4AtlasApps). - -@section G4AtlasControl_G4AtlasControl Class Overview - -The classes in this package are: - - - G4CommandInterface : An interface to the G4 command line (available from Python) - - MCTruthMenu : An interface for adding or applying truth strategies during the simulation - - ParticleDataModifier : An interface for modifying particle properties during the simulation (charge, mass, etc) - - SimControl : One interface to rule them all - - - -*/ diff --git a/Simulation/G4Atlas/G4AtlasControl/src/SimControl.cxx b/Simulation/G4Atlas/G4AtlasControl/src/SimControl.cxx deleted file mode 100644 index fcb5f7ac1ec5c5035cb82c5776136bdbdd62750c..0000000000000000000000000000000000000000 --- a/Simulation/G4Atlas/G4AtlasControl/src/SimControl.cxx +++ /dev/null @@ -1,33 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "G4AtlasControl/SimControl.h" - -// Geant4 includes -#include "G4RunManager.hh" - -// STL includes -#include <stdexcept> - -SimControl::SimControl() -{ -} - -SimControl::~SimControl() -{ -} - -void SimControl::initializeG4(bool isMT) const -{ - auto rm = G4RunManager::GetRunManager(); - if (rm) { - rm->Initialize(); - // Initialization differs slightly in multi-threading. - // TODO: add more details about why this is here. - if(!isMT && rm->ConfirmBeamOnCondition()) { - rm->RunInitialization(); - } - } - else throw std::runtime_error("Run manager retrieval has failed"); -} diff --git a/Simulation/G4Atlas/G4AtlasTools/python/G4AtlasToolsConfigNew.py b/Simulation/G4Atlas/G4AtlasTools/python/G4AtlasToolsConfigNew.py index 4e6e2a1b1e218578a1faf9ab93c79e55a1f7448f..df9e253dc60add7fb9bbcd43c6960378ec98bb7e 100644 --- a/Simulation/G4Atlas/G4AtlasTools/python/G4AtlasToolsConfigNew.py +++ b/Simulation/G4Atlas/G4AtlasTools/python/G4AtlasToolsConfigNew.py @@ -159,8 +159,8 @@ def CaloSensitiveDetectorListCfg(ConfigFlags): if ConfigFlags.Sim.CalibrationRun in ['LAr', 'LAr+Tile']: from LArG4SD.LArG4SDToolConfig import LArDeadSensitiveDetectorToolCfg, LArActiveSensitiveDetectorToolCfg, LArInactiveSensitiveDetectorToolCfg tools += [ result.popToolsAndMerge(LArDeadSensitiveDetectorToolCfg(ConfigFlags)) ] - tools += [ result.popToolsAndMerge(LArActiveSensitiveDetectorToolCfg(ConfigFlags)) ] tools += [ result.popToolsAndMerge(LArInactiveSensitiveDetectorToolCfg(ConfigFlags)) ] + tools += [ result.popToolsAndMerge(LArActiveSensitiveDetectorToolCfg(ConfigFlags)) ] elif ConfigFlags.Sim.CalibrationRun == 'DeadLAr': from LArG4SD.LArG4SDToolConfig import LArDeadSensitiveDetectorToolCfg tools += [ result.popToolsAndMerge(LArDeadSensitiveDetectorToolCfg(ConfigFlags)) ] @@ -172,7 +172,6 @@ def CaloSensitiveDetectorListCfg(ConfigFlags): else: from TileGeoG4SD.TileGeoG4SDToolConfig import TileGeoG4SDCfg tools += [ result.popToolsAndMerge(TileGeoG4SDCfg(ConfigFlags)) ] # mode 0 : No CaloCalibrationHits - if ConfigFlags.Sim.RecordStepInfo: from ISF_FastCaloSimSD.ISF_FastCaloSimSDToolConfig import FCS_StepInfoSDToolCfg tools += [ result.popToolsAndMerge(FCS_StepInfoSDToolCfg(ConfigFlags)) ] diff --git a/Simulation/G4Utilities/G4UserActions/python/G4UserActionsConfig.py b/Simulation/G4Utilities/G4UserActions/python/G4UserActionsConfig.py index 079c70c5f01b95b8ed26cc03319b0af8dc525dda..a7df623bb3df730a1bb0582b3f242254d0efc4cf 100644 --- a/Simulation/G4Utilities/G4UserActions/python/G4UserActionsConfig.py +++ b/Simulation/G4Utilities/G4UserActions/python/G4UserActionsConfig.py @@ -48,6 +48,8 @@ def getAthenaTrackingActionTool(name='G4UA::AthenaTrackingActionTool', **kwargs) kwargs.setdefault('SubDetVolumeLevel', subDetLevel) return CfgMgr.G4UA__AthenaTrackingActionTool(name,**kwargs) +def getFixG4CreatorProcessTool(name="G4UA::FixG4CreatorProcessTool", **kwargs): + return CfgMgr.G4UA__FixG4CreatorProcessTool(name, **kwargs) def getHitWrapperTool(name="G4UA::HitWrapperTool", **kwargs): from G4AtlasApps.SimFlags import simFlags diff --git a/Simulation/G4Utilities/G4UserActions/python/G4UserActionsConfigDb.py b/Simulation/G4Utilities/G4UserActions/python/G4UserActionsConfigDb.py index 17a658f06def78f6ae17612d434c6d4a61242643..27512c6ab62f6fd2e44a662c922de9aadd80e1bf 100644 --- a/Simulation/G4Utilities/G4UserActions/python/G4UserActionsConfigDb.py +++ b/Simulation/G4Utilities/G4UserActions/python/G4UserActionsConfigDb.py @@ -12,6 +12,7 @@ addTool("G4UserActions.G4UserActionsConf.G4UA__G4TrackCounterTool", "G4UA::G4Tra addTool("G4UserActions.G4UserActionsConf.G4UA__LengthIntegratorTool", "G4UA::LengthIntegratorTool") addTool("G4UserActions.G4UserActionsConf.G4UA__PhotonKillerTool", "G4UA::PhotonKillerTool") +addTool("G4UserActions.G4UserActionsConfig.getFixG4CreatorProcessTool", "G4UA::FixG4CreatorProcessTool") addTool("G4UserActions.G4UserActionsConfig.getFastIDKillerTool", "G4UA::FastIDKillerTool") addTool("G4UserActions.G4UserActionsConfig.getFastMBKillerTool", "G4UA::FastMBKillerTool") addTool("G4UserActions.G4UserActionsConfig.getHitWrapperTool", "G4UA::HitWrapperTool") diff --git a/Simulation/G4Utilities/G4UserActions/src/FixG4CreatorProcess.cxx b/Simulation/G4Utilities/G4UserActions/src/FixG4CreatorProcess.cxx new file mode 100644 index 0000000000000000000000000000000000000000..37482dd58a483866090fb1237c412a379b57d400 --- /dev/null +++ b/Simulation/G4Utilities/G4UserActions/src/FixG4CreatorProcess.cxx @@ -0,0 +1,54 @@ +/* + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration +*/ + +#include "FixG4CreatorProcess.h" + +#include "G4Step.hh" +#include "G4Event.hh" +#include "G4Gamma.hh" +#include "G4ParticleDefinition.hh" +#include "G4VProcess.hh" +#include "G4EmParameters.hh" + +namespace G4UA +{ + + //--------------------------------------------------------------------------- + FixG4CreatorProcess::FixG4CreatorProcess(){} + + + //--------------------------------------------------------------------------- + void FixG4CreatorProcess::UserSteppingAction(const G4Step* aStep) + { + // + // M. Novak, M. Bandieramonte: 10 November 2021 + // + // Make sure that the creator process of the secondary tracks of the current step + // is the same as the one that limited the step. These can be different in case of + // using `wrapper` processes e.g. G4GammaGeneralProcess or G4HepEm, etc. + if (G4EmParameters::Instance()->GeneralProcessActive()) { + const G4ParticleDefinition* thePrimaryParticle = aStep->GetTrack()->GetParticleDefinition(); + const std::size_t numThisSecondaries = aStep->GetNumberOfSecondariesInCurrentStep(); + if (thePrimaryParticle==G4Gamma::GammaDefinition() && numThisSecondaries>0) { + // Get the pointer to the process that limited the step: i.e. the one that + // created the secondaries of the current step + const G4VProcess* theLimiterProcess = aStep->GetPostStepPoint()->GetProcessDefinedStep(); + // note: this is a vector of secondaries containing all secondaries created + // along the tracking of the current `primary` track (i.e. not only + // secondaries created in this step) + const G4TrackVector* theSecTrackVector = aStep->GetSecondary(); + const std::size_t numAllSecondaries = theSecTrackVector->size(); + for (std::size_t it = numAllSecondaries-numThisSecondaries; it<numAllSecondaries; ++it) { + + G4Track* secTrack = (*theSecTrackVector)[it]; + if (secTrack->GetCreatorProcess()!=theLimiterProcess) { + + secTrack->SetCreatorProcess(theLimiterProcess); + } + } + } + + } + } +} // namespace G4UA diff --git a/Simulation/G4Utilities/G4UserActions/src/FixG4CreatorProcess.h b/Simulation/G4Utilities/G4UserActions/src/FixG4CreatorProcess.h new file mode 100644 index 0000000000000000000000000000000000000000..5c3561498203656fc17140824c93421f70a56677 --- /dev/null +++ b/Simulation/G4Utilities/G4UserActions/src/FixG4CreatorProcess.h @@ -0,0 +1,23 @@ +/* + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef G4UserActions_FixG4CreatorProcess_H +#define G4UserActions_FixG4CreatorProcess_H + +// Geant4 includes +#include "G4UserSteppingAction.hh" + +namespace G4UA +{ + + class FixG4CreatorProcess : public G4UserSteppingAction + { + public: + FixG4CreatorProcess(); + virtual void UserSteppingAction(const G4Step*) override final; + }; // class FixG4CreatorProcess + +} // namespace G4UA + +#endif diff --git a/Simulation/G4Utilities/G4UserActions/src/FixG4CreatorProcessTool.cxx b/Simulation/G4Utilities/G4UserActions/src/FixG4CreatorProcessTool.cxx new file mode 100644 index 0000000000000000000000000000000000000000..d2436b4b4c39a2764f7729dcebeb8a92399442ec --- /dev/null +++ b/Simulation/G4Utilities/G4UserActions/src/FixG4CreatorProcessTool.cxx @@ -0,0 +1,28 @@ +/* + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration +*/ + +#include "FixG4CreatorProcessTool.h" + +namespace G4UA +{ + + //--------------------------------------------------------------------------- + FixG4CreatorProcessTool::FixG4CreatorProcessTool(const std::string& type, + const std::string& name, + const IInterface* parent) + : UserActionToolBase<FixG4CreatorProcess>(type, name, parent) + { + } + + //--------------------------------------------------------------------------- + std::unique_ptr<FixG4CreatorProcess> + FixG4CreatorProcessTool::makeAndFillAction(G4AtlasUserActions& actionList) + { + ATH_MSG_DEBUG("Making a FixG4CreatorProcess action"); + auto action = std::make_unique<FixG4CreatorProcess>(); + actionList.steppingActions.push_back( action.get() ); + return action; + } + +} // namespace G4UA diff --git a/Simulation/G4Utilities/G4UserActions/src/FixG4CreatorProcessTool.h b/Simulation/G4Utilities/G4UserActions/src/FixG4CreatorProcessTool.h new file mode 100644 index 0000000000000000000000000000000000000000..11d023bcade44c7bd586cd5720f183dc2479349a --- /dev/null +++ b/Simulation/G4Utilities/G4UserActions/src/FixG4CreatorProcessTool.h @@ -0,0 +1,38 @@ +/* + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef G4USERACTIONS_G4UA__FIXG4CREATORPROCESSTOOL_H +#define G4USERACTIONS_G4UA__FIXG4CREATORPROCESSTOOL_H + +// Infrastructure includes +#include "G4AtlasTools/UserActionToolBase.h" + +// Local includes +#include "FixG4CreatorProcess.h" + +namespace G4UA +{ + + /// @brief Tool which manages the FixG4CreatorProcess user action. + /// + class FixG4CreatorProcessTool : public UserActionToolBase<FixG4CreatorProcess> + { + + public: + + /// Standard constructor + FixG4CreatorProcessTool(const std::string& type, const std::string& name, + const IInterface* parent); + + protected: + + /// Create the action for the current thread + virtual std::unique_ptr<FixG4CreatorProcess> + makeAndFillAction(G4AtlasUserActions&) override final; + + }; // class FixG4CreatorProcessTool + +} // namespace G4UA + +#endif diff --git a/Simulation/G4Utilities/G4UserActions/src/components/G4UserActions_entries.cxx b/Simulation/G4Utilities/G4UserActions/src/components/G4UserActions_entries.cxx index ec9d7754d4dfd0ef51d7a97256e4f37cf76f79f9..a4f244870562194695df2099bdf25396485d5261 100644 --- a/Simulation/G4Utilities/G4UserActions/src/components/G4UserActions_entries.cxx +++ b/Simulation/G4Utilities/G4UserActions/src/components/G4UserActions_entries.cxx @@ -14,6 +14,7 @@ #include "../HIPLArVolumeAcceptTool.h" #include "../HitWrapperTool.h" #include "../PhotonKillerTool.h" +#include "../FixG4CreatorProcessTool.h" #include "../ScoringVolumeTrackKillerTool.h" #include "../StoppedParticleActionTool.h" #include "../FluxRecorderTool.h" @@ -37,6 +38,7 @@ DECLARE_COMPONENT( G4UA::LengthIntegratorTool ) DECLARE_COMPONENT( G4UA::HIPLArVolumeAcceptTool ) DECLARE_COMPONENT( G4UA::HitWrapperTool ) DECLARE_COMPONENT( G4UA::PhotonKillerTool ) +DECLARE_COMPONENT( G4UA::FixG4CreatorProcessTool ) DECLARE_COMPONENT( G4UA::ScoringVolumeTrackKillerTool ) DECLARE_COMPONENT( G4UA::StoppedParticleActionTool ) DECLARE_COMPONENT( G4UA::FluxRecorderTool ) diff --git a/Simulation/Overlay/OverlayConfiguration/share/skeleton_LegacyOverlay.py b/Simulation/Overlay/OverlayConfiguration/share/skeleton_LegacyOverlay.py index b6a1cf42b88ec05f5b3b921fc5f79f0cd32d67ed..65810363423ea996bd9b32bfc6646a11b4b98256 100644 --- a/Simulation/Overlay/OverlayConfiguration/share/skeleton_LegacyOverlay.py +++ b/Simulation/Overlay/OverlayConfiguration/share/skeleton_LegacyOverlay.py @@ -71,6 +71,7 @@ if hasattr(overlayArgs, 'maxEvents'): athenaCommonFlags.EvtMax.set_Value_and_Lock(overlayArgs.maxEvents) if hasattr(overlayArgs, 'inputHITSFile'): + if not overlayFlags.isDataOverlay(): athenaCommonFlags.FilesInput.set_Value_and_Lock(overlayArgs.inputHITSFile) athenaCommonFlags.PoolHitsInput.set_Value_and_Lock(overlayArgs.inputHITSFile) else: raise RuntimeError('No input HITS file defined') diff --git a/Simulation/SimuJobTransforms/python/CommonSimulationSteering.py b/Simulation/SimuJobTransforms/python/CommonSimulationSteering.py index adb1c50f8124c818b5ed08ada5fe78eb901f121d..93b82b595408492cf6d1802abc018d9d1a09ef20 100644 --- a/Simulation/SimuJobTransforms/python/CommonSimulationSteering.py +++ b/Simulation/SimuJobTransforms/python/CommonSimulationSteering.py @@ -58,7 +58,7 @@ def CommonSimulationCfg(ConfigFlags, log): cfg = MainServicesCfg(ConfigFlags) from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg cfg.merge(PoolReadCfg(ConfigFlags)) - if ConfigFlags.Sim.ReadTR: + if ConfigFlags.Sim.ReadTR or ConfigFlags.Sim.CavernBG == "Read": # Cases 2a, 2b, 2c from TrackRecordGenerator.TrackRecordGeneratorConfigNew import Input_TrackRecordGeneratorCfg cfg.merge(Input_TrackRecordGeneratorCfg(ConfigFlags)) diff --git a/Simulation/SimuJobTransforms/python/G4AtlasAlg_Skeleton.py b/Simulation/SimuJobTransforms/python/G4AtlasAlg_Skeleton.py index f8c737230f079959162b4ae00120f2494acbbd4d..b6beb97f5d570529bb17c2324c7144344fb7cba1 100644 --- a/Simulation/SimuJobTransforms/python/G4AtlasAlg_Skeleton.py +++ b/Simulation/SimuJobTransforms/python/G4AtlasAlg_Skeleton.py @@ -66,15 +66,16 @@ def fromRunArgs(runArgs): ConfigFlags.Input.Files = runArgs.inputEVNTFile elif hasattr(runArgs, 'inputEVNT_TRFile'): ConfigFlags.Input.Files = runArgs.inputEVNT_TRFile - ConfigFlags.Sim.ReadTR = True # Three common cases here: # 2a) Cosmics simulation # 2b) Stopped particle simulation # 2c) Cavern background simulation if ConfigFlags.Beam.Type == 'cosmics': + ConfigFlags.Sim.ReadTR = True ConfigFlags.Sim.CosmicFilterVolumeNames = ['Muon'] ConfigFlags.Detector.GeometryCavern = True # simulate the cavern with a cosmic TR file elif hasattr(runArgs,"trackRecordType") and runArgs.trackRecordType=="stopped": + ConfigFlags.Sim.ReadTR = True log.error('Stopped Particle simulation is not supported yet') else: ConfigFlags.Detector.GeometryCavern = True # simulate the cavern diff --git a/Simulation/SimuJobTransforms/python/ISF_Skeleton.py b/Simulation/SimuJobTransforms/python/ISF_Skeleton.py index b95b7b3d2bed211c4ee781daf826b54744ca309f..e27dd7b51d8ce03adb3eede0d83896010c7f74a0 100644 --- a/Simulation/SimuJobTransforms/python/ISF_Skeleton.py +++ b/Simulation/SimuJobTransforms/python/ISF_Skeleton.py @@ -76,15 +76,16 @@ def fromRunArgs(runArgs): ConfigFlags.Input.Files = runArgs.inputEVNTFile elif hasattr(runArgs, 'inputEVNT_TRFile'): ConfigFlags.Input.Files = runArgs.inputEVNT_TRFile - ConfigFlags.Sim.ReadTR = True # Three common cases here: # 2a) Cosmics simulation # 2b) Stopped particle simulation # 2c) Cavern background simulation if ConfigFlags.Beam.Type == 'cosmics': + ConfigFlags.Sim.ReadTR = True ConfigFlags.Sim.CosmicFilterVolumeNames = ['Muon'] ConfigFlags.Detector.GeometryCavern = True # simulate the cavern with a cosmic TR file elif hasattr(runArgs,"trackRecordType") and runArgs.trackRecordType=="stopped": + ConfigFlags.Sim.ReadTR = True log.error('Stopped Particle simulation is not supported yet') else: ConfigFlags.Detector.GeometryCavern = True # simulate the cavern diff --git a/Simulation/SimuJobTransforms/python/SimulationHelpers.py b/Simulation/SimuJobTransforms/python/SimulationHelpers.py index df05e1e03358f62e2e9a98a19dd2a7dea4b70e43..7a83a836b6681ea253e3669d622d526f4ec32088 100644 --- a/Simulation/SimuJobTransforms/python/SimulationHelpers.py +++ b/Simulation/SimuJobTransforms/python/SimulationHelpers.py @@ -52,3 +52,16 @@ def enableBeamPipeKill(ConfigFlags): def enableTightMuonStepping(ConfigFlags): ConfigFlags.Sim.TightMuonStepping = True + + +def enableG4SignalCavern(ConfigFlags): + """Set ConfigFlags to take care of Neutron BG""" + ConfigFlags.Sim.CavernBG = 'Signal' + +def enableCalHits(ConfigFlags): + """Turns on calibration hits for LAr and Tile""" + ConfigFlags.Sim.CalibrationRun = 'LAr+Tile' + +def enableParticleID(ConfigFlags): + """Mods to have primary particle barcode signature on for calorimeter calibration hits.""" + ConfigFlags.Sim.ParticleID=True \ No newline at end of file diff --git a/Simulation/SimuJobTransforms/python/__init__.py b/Simulation/SimuJobTransforms/python/__init__.py index 228a0f0540aba0b8f0951c94ea381bc0a9e4b149..a52e158aa6f2b7b30df1b6085ea7bfcd817275a1 100644 --- a/Simulation/SimuJobTransforms/python/__init__.py +++ b/Simulation/SimuJobTransforms/python/__init__.py @@ -3,5 +3,8 @@ from .SimulationHelpers import enableFrozenShowersFCalOnly as FrozenShowersFCalOnly from .SimulationHelpers import enableBeamPipeKill as BeamPipeKill from .SimulationHelpers import enableTightMuonStepping as TightMuonStepping +from .SimulationHelpers import enableG4SignalCavern as G4SignalCavern +from .SimulationHelpers import enableCalHits as CalHits +from .SimulationHelpers import enableParticleID as ParticleID -__all__ = ['FrozenShowersFCalOnly', 'BeamPipeKill', 'TightMuonStepping'] +__all__ = ['FrozenShowersFCalOnly', 'BeamPipeKill', 'TightMuonStepping', 'G4SignalCavern', 'CalHits', 'ParticleID'] diff --git a/Simulation/SimulationJobOptions/share/g4/preInclude.G4GammaGeneralProcess.py b/Simulation/SimulationJobOptions/share/g4/preInclude.G4GammaGeneralProcess.py new file mode 100644 index 0000000000000000000000000000000000000000..a4f3cb5eec1b60677cc5d294073beecba2a2895c --- /dev/null +++ b/Simulation/SimulationJobOptions/share/g4/preInclude.G4GammaGeneralProcess.py @@ -0,0 +1,13 @@ +########################################################## +# +# SimulationJobOptions/preInclude.G4GammaGeneralProcess.py +# Marilena Bandieramonte +# +# Activate the G4GammaGeneralProcess and the corresponding +# job options +# +########################################################## + +from G4AtlasApps.SimFlags import simFlags +simFlags.G4Commands+=["/process/em/UseGeneralProcess true"]; +simFlags.OptionalUserActionList.addAction("G4UA::FixG4CreatorProcessTool") diff --git a/Simulation/Tests/SimCoreTests/test/test_AtlasG4_CavernBg_TR2HITS_CGvsCA.sh b/Simulation/Tests/SimCoreTests/test/test_AtlasG4_CavernBg_TR2HITS_CGvsCA.sh index 4c412eb0120672b90da2b33b0b12b59275f03cd2..90f157bd15f7a4c96659b5e67ae7ddac8759d1b1 100755 --- a/Simulation/Tests/SimCoreTests/test/test_AtlasG4_CavernBg_TR2HITS_CGvsCA.sh +++ b/Simulation/Tests/SimCoreTests/test/test_AtlasG4_CavernBg_TR2HITS_CGvsCA.sh @@ -26,7 +26,7 @@ rc=$? mv log.AtlasG4Tf log.G4AtlasAlg_AthenaCA echo "art-result: $rc G4AtlasAlg_AthenaCA" rc2=-9999 -if [ $rc -eq 68 ] +if [ $rc -eq 0 ] then AtlasG4_tf.py \ --inputEVNT_TRFile '/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/SimCoreTests/cavernbg-pythia8-7000.evgen.pool.root' \ diff --git a/Simulation/Tests/SimCoreTests/test/test_AtlasG4_HeavyIonSim_CGvsCA.sh b/Simulation/Tests/SimCoreTests/test/test_AtlasG4_HeavyIonSim_CGvsCA.sh new file mode 100755 index 0000000000000000000000000000000000000000..6b76ec8d798e44dcf0da1f23e02b0f731f4a1093 --- /dev/null +++ b/Simulation/Tests/SimCoreTests/test/test_AtlasG4_HeavyIonSim_CGvsCA.sh @@ -0,0 +1,76 @@ +#!/bin/sh +# +# art-description: Run simulation outside ISF, reading lead ions peripheral simulation (low multiplicity) events, writing HITS, using 2015 geometry and conditions +# art-include: master/Athena +# art-type: grid +# art-output: test.*.HITS.pool.root +# art-output: log.* +# art-output: Config*.pkl + +AtlasG4_tf.py \ +--CA \ +--inputEVNTFile '/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/SimCoreTests/pbpb_Peripheral-hijing-5500.evgen.pool.root' \ +--outputHITSFile 'test.NEW.HITS.pool.root' \ +--maxEvents '1' \ +--skipEvents '4' \ +--randomSeed '10' \ +--geometryVersion 'ATLAS-R1-2012-03-00-00' \ +--conditionsTag 'OFLCOND-RUN12-SDR-19' \ +--DataRunNumber '210184' \ +--physicsList 'FTFP_BERT' \ +--postInclude 'PyJobTransforms.TransformUtils.UseFrontier' \ +--truthStrategy 'MC12' \ +--postExec 'with open("ConfigSimCA.pkl", "wb") as f: cfg.store(f)' \ +--imf False + +#todo add postInclude SimuJobTransforms.HijingPars + +rc=$? +mv log.AtlasG4Tf log.G4AtlasAlg_AthenaCA +echo "art-result: $rc G4AtlasAlg_AthenaCA" +rc2=-9999 +if [ $rc -eq 0 ] +then + ArtPackage=$1 + ArtJobName=$2 + AtlasG4_tf.py \ + --inputEVNTFile '/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/SimCoreTests/pbpb_Peripheral-hijing-5500.evgen.pool.root' \ + --outputHITSFile 'test.OLD.HITS.pool.root' \ + --maxEvents '1' \ + --skipEvents '4' \ + --randomSeed '10' \ + --geometryVersion 'ATLAS-R1-2012-03-00-00_VALIDATION' \ + --conditionsTag 'OFLCOND-RUN12-SDR-19' \ + --DataRunNumber '210184' \ + --physicsList 'FTFP_BERT' \ + --postInclude 'PyJobTransforms/UseFrontier.py' 'AtlasG4Tf:SimulationJobOptions/postInclude.HijingPars.py' \ + --truthStrategy 'MC12' \ + --imf False \ + --athenaopts '"--config-only=ConfigSimCG.pkl"' + + AtlasG4_tf.py \ + --inputEVNTFile '/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/SimCoreTests/pbpb_Peripheral-hijing-5500.evgen.pool.root' \ + --outputHITSFile 'test.OLD.HITS.pool.root' \ + --maxEvents '1' \ + --skipEvents '4' \ + --randomSeed '10' \ + --geometryVersion 'ATLAS-R1-2012-03-00-00_VALIDATION' \ + --conditionsTag 'OFLCOND-RUN12-SDR-19' \ + --DataRunNumber '210184' \ + --physicsList 'FTFP_BERT' \ + --postInclude 'PyJobTransforms/UseFrontier.py' 'AtlasG4Tf:SimulationJobOptions/postInclude.HijingPars.py' \ + --truthStrategy 'MC12' \ + --imf False + + mv log.AtlasG4Tf log.G4AtlasAlg_AthenaCA_OLD + rc2=$? +fi + +echo "art-result: $rc2 G4AtlasAlg_AthenaCA_OLD" +rc4=-9999 +if [ $rc2 -eq 0 ] +then + acmd.py diff-root test.OLD.HITS.pool.root test.NEW.HITS.pool.root --error-mode resilient --mode=semi-detailed --order-trees --ignore-leaves RecoTimingObj_p1_AtlasG4Tf_timings index_ref + rc4=$? +fi +echo "art-result: $rc4 FullG4MT_OLDvsCA" diff --git a/Simulation/Tests/SimCoreTests/test/test_AtlasG4_NeutronCutTest_CGvsCA.sh b/Simulation/Tests/SimCoreTests/test/test_AtlasG4_NeutronCutTest_CGvsCA.sh new file mode 100755 index 0000000000000000000000000000000000000000..b24fc9c620aedfe59ce16369396600aa7f7c055d --- /dev/null +++ b/Simulation/Tests/SimCoreTests/test/test_AtlasG4_NeutronCutTest_CGvsCA.sh @@ -0,0 +1,58 @@ +#!/bin/sh +# +# art-description: Run simulation outside ISF, reading Z->tau tau events, modifying the Neutron timing cut, writing HITS, using 2015 geometry and conditions +# art-include: master/Athena +# art-type: grid +# art-output: test.*.HITS.pool.root +# art-output: log.* +# art-output: Config*.pkl + +AtlasG4_tf.py \ +--CA \ +--inputEVNTFile '/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/SimCoreTests/A3_Ztautau_filter-pythia6-7000.evgen.pool.root' \ +--outputHITSFile 'test.NEW.HITS.pool.root' \ +--maxEvents '1' \ +--skipEvents '0' \ +--randomSeed '10' \ +--geometryVersion 'ATLAS-R2-2015-03-01-00' \ +--conditionsTag 'OFLCOND-RUN12-SDR-19' \ +--DataRunNumber '222525' \ +--physicsList 'FTFP_BERT' \ +--truthStrategy 'MC15aPlus' \ +--postInclude 'PyJobTransforms.TransformUtils.UseFrontier' \ +--preInclude 'SimuJobTransforms.G4SignalCavern' \ +--imf False + +rc=$? +mv log.AtlasG4Tf log.G4AtlasAlg_AthenaCA +echo "art-result: $rc G4AtlasAlg_AthenaCA" +rc2=-9999 +if [ $rc -eq 0 ] +then + ArtPackage=$1 + ArtJobName=$2 + AtlasG4_tf.py \ + --inputEVNTFile '/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/SimCoreTests/A3_Ztautau_filter-pythia6-7000.evgen.pool.root' \ + --outputHITSFile 'test.OLD.HITS.pool.root' \ + --maxEvents '1' \ + --skipEvents '0' \ + --randomSeed '10' \ + --geometryVersion 'ATLAS-R2-2015-03-01-00_VALIDATION' \ + --conditionsTag 'OFLCOND-RUN12-SDR-19' \ + --DataRunNumber '222525' \ + --physicsList 'FTFP_BERT' \ + --postInclude 'PyJobTransforms/UseFrontier.py' \ + --truthStrategy 'MC15aPlus' \ + --preInclude 'SimulationJobOptions/preInclude.G4SignalCavern.py' \ + --imf False + mv log.AtlasG4Tf log.G4AtlasAlg_AthenaCA_OLD + rc2=$? +fi +echo "art-result: $rc2 G4AtlasAlg_AthenaCA_OLD" +rc4=-9999 +if [ $rc2 -eq 0 ] +then + acmd.py diff-root test.OLD.HITS.pool.root test.NEW.HITS.pool.root --error-mode resilient --mode=semi-detailed --order-trees --ignore-leaves RecoTimingObj_p1_AtlasG4Tf_timings index_ref + rc4=$? +fi +echo "art-result: $rc4 FullG4MT_OLDvsCA" diff --git a/Simulation/Tests/SimCoreTests/test/test_AtlasG4_WriteCalHitsTest_CGvsCA.sh b/Simulation/Tests/SimCoreTests/test/test_AtlasG4_WriteCalHitsTest_CGvsCA.sh new file mode 100755 index 0000000000000000000000000000000000000000..a843fa26f577eaecbc6668bd283c16bb550ba8e7 --- /dev/null +++ b/Simulation/Tests/SimCoreTests/test/test_AtlasG4_WriteCalHitsTest_CGvsCA.sh @@ -0,0 +1,78 @@ +#!/bin/sh +# +# art-description: Reading in single particle gen events, writing out full CaloCalibrationHit information, using 2015 geometry and conditions +# art-include: master/Athena +# art-type: grid +# art-output: test.*.HITS.pool.root +# art-output: log.* +# art-output: Config*.pkl + +AtlasG4_tf.py \ +--CA \ +--inputEVNTFile '/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/SimCoreTests/pi_E50_eta0-60.evgen.pool.root' \ +--outputHITSFile 'test.NEW.HITS.pool.root' \ +--maxEvents '10' \ +--skipEvents '0' \ +--randomSeed '10' \ +--geometryVersion 'ATLAS-R2-2015-03-01-00' \ +--conditionsTag 'OFLCOND-RUN12-SDR-19' \ +--DataRunNumber '222525' \ +--physicsList 'FTFP_BERT' \ +--preInclude 'SimuJobTransforms.CalHits,SimuJobTransforms.ParticleID' \ +--postInclude 'PyJobTransforms.TransformUtils.UseFrontier' \ +--truthStrategy 'MC12' \ +--postExec 'with open("ConfigSimCA.pkl", "wb") as f: cfg.store(f)' \ +--imf False + +# todo add postInclude.DCubeTest_CaloCalibHits.py and --preExec 'AtlasG4Tf:simFlags.ReleaseGeoModel=False;' \ + + +rc=$? +mv log.AtlasG4Tf log.G4AtlasAlg_AthenaCA +echo "art-result: $rc G4AtlasAlg_AthenaCA" +rc2=-9999 +if [ $rc -eq 0 ] +then + AtlasG4_tf.py \ + --inputEVNTFile '/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/SimCoreTests/pi_E50_eta0-60.evgen.pool.root' \ + --outputHITSFile 'test.OLD.HITS.pool.root' \ + --maxEvents '10' \ + --skipEvents '0' \ + --randomSeed '10' \ + --geometryVersion 'ATLAS-R2-2015-03-01-00_VALIDATION' \ + --conditionsTag 'OFLCOND-RUN12-SDR-19' \ + --DataRunNumber '222525' \ + --physicsList 'FTFP_BERT' \ + --preInclude 'SimulationJobOptions/preInclude.CalHits.py,SimulationJobOptions/preInclude.ParticleID.py' \ + --postInclude 'PyJobTransforms/UseFrontier.py' 'AtlasG4Tf:G4AtlasTests/postInclude.DCubeTest_CaloCalibHits.py' \ + --preExec 'AtlasG4Tf:simFlags.ReleaseGeoModel=False;' \ + --truthStrategy 'MC12' \ + --imf False \ + --athenaopts '"--config-only=ConfigSimCG.pkl"' + + AtlasG4_tf.py \ + --inputEVNTFile '/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/SimCoreTests/pi_E50_eta0-60.evgen.pool.root' \ + --outputHITSFile 'test.OLD.HITS.pool.root' \ + --maxEvents '10' \ + --skipEvents '0' \ + --randomSeed '10' \ + --geometryVersion 'ATLAS-R2-2015-03-01-00_VALIDATION' \ + --conditionsTag 'OFLCOND-RUN12-SDR-19' \ + --DataRunNumber '222525' \ + --physicsList 'FTFP_BERT' \ + --preInclude 'SimulationJobOptions/preInclude.CalHits.py,SimulationJobOptions/preInclude.ParticleID.py' \ + --postInclude 'PyJobTransforms/UseFrontier.py' 'AtlasG4Tf:G4AtlasTests/postInclude.DCubeTest_CaloCalibHits.py' \ + --preExec 'AtlasG4Tf:simFlags.ReleaseGeoModel=False;' \ + --truthStrategy 'MC12' \ + --imf False + mv log.AtlasG4Tf log.G4AtlasAlg_AthenaCA_OLD + rc2=$? +fi +echo "art-result: $rc2 G4AtlasAlg_AthenaCA_OLD" +rc5=-9999 +if [ $rc2 -eq 0 ] +then + acmd.py diff-root test.OLD.HITS.pool.root test.NEW.HITS.pool.root --error-mode resilient --mode=semi-detailed --order-trees --ignore-leaves RecoTimingObj_p1_AtlasG4Tf_timings index_ref + rc5=$? +fi +echo "art-result: $rc5 CompareHITS_CGvsCA" \ No newline at end of file diff --git a/TileCalorimeter/TileG4/TileGeoG4Calib/python/TileGeoG4CalibConfigNew.py b/TileCalorimeter/TileG4/TileGeoG4Calib/python/TileGeoG4CalibConfigNew.py index 54361a4f9f40d88b7d36bf111119ff4a31567fa4..a55eddde23ab6144a6c990722b50cd963e5f11db 100644 --- a/TileCalorimeter/TileG4/TileGeoG4Calib/python/TileGeoG4CalibConfigNew.py +++ b/TileCalorimeter/TileG4/TileGeoG4Calib/python/TileGeoG4CalibConfigNew.py @@ -1,24 +1,28 @@ # Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from AthenaConfiguration.ComponentFactory import CompFactory TileGeoG4CalibSDTool=CompFactory.TileGeoG4CalibSDTool +from TileGeoG4SD.TileGeoG4SDToolConfig import TileGeoG4SDCalcCfg, TileCTBGeoG4SDCalcCfg + def TileGeoG4CalibSDCfg(ConfigFlags, name="TileGeoG4CalibSD", **kwargs): - result = ComponentAccumulator() kwargs.setdefault("LogicalVolumeNames", [ 'Tile::Scintillator', 'Tile::Tile', 'Tile::TileCentralBarrel', 'Tile::TileEndcapPos', 'Tile::TileEndcapNeg', 'Tile::Barrel', 'Tile::BarrelModule', 'Tile::FrontPlate', 'Tile::EndPlate1', 'Tile::EPHole1', 'Tile::EndPlate2', 'Tile::EPHole2', 'Tile::GirderMother', 'Tile::GirderIron', 'Tile::GirderAluminium', 'Tile::GirderElectronics', 'Tile::Absorber', 'Tile::AbsorberChild', 'Tile::Period', 'Tile::Glue', 'Tile::Wrapper', 'Tile::EBarrel', 'Tile::EBarrelModule', 'Tile::EndPlateSh', 'Tile::ITC', 'Tile::ITCModule', 'Tile::Plug1Module', 'Tile::FrontPlateSh', 'Tile::Plug2Module', 'Tile::Gap', 'Tile::GapModule', 'Tile::IrUp', 'Tile::IrDw', 'Tile::Iron4', 'Tile::Iron3', 'Tile::Iron2', 'Tile::Iron1', 'Tile::IrBox', 'Tile::SaddleModule', 'Tile::LArService', 'Tile::LArCables', 'Tile::ExtBarrelSaddleSupport', 'Tile::Crack', 'Tile::CrackModule', 'Tile::FingerModule', 'Tile::FingerIron', 'Tile::FingerAluminum', 'Tile::FingerElectronics', 'Tile::EFinger', 'Tile::EFingerModule', 'Tile::FingerPos', 'Tile::FingerNeg', 'Tile::SaddlePos', 'Tile::SaddleNeg', 'Tile::ESaddlePos', 'Tile::ESaddleNeg' ] ) kwargs.setdefault("OutputCollectionNames", ["TileHitVec", "TileCalibHitActiveCell", "TileCalibHitInactiveCell", "TileCalibHitDeadMaterial"] ) - result.setPrivateTools( TileGeoG4CalibSDTool(name, **kwargs) ) # is this private..? + result = TileGeoG4SDCalcCfg(ConfigFlags) + kwargs.setdefault("TileCalculator", result.getService("TileGeoG4SDCalc") ) + + result.setPrivateTools( TileGeoG4CalibSDTool(name, **kwargs) ) return result def TileCTBGeoG4CalibSDCfg(ConfigFlags, name="TileCTBGeoG4CalibSD", **kwargs): - result = ComponentAccumulator() kwargs.setdefault("LogicalVolumeNames", [ 'CTB::CTB', 'BEAMPIPE1::BEAMPIPE1', 'BEAMPIPE2::BEAMPIPE2', 'MYLAREQUIV::MYLAREQUIV', 'S1::S1', 'S2::S2', 'S3::S3', 'CALO::CALO', 'MuonWall::MuonWall', 'MuonWall::MuScintillatorLayer', 'Tile::TileTBEnv', 'Tile::Scintillator', 'Tile::Tile', 'Tile::TileCentralBarrel', 'Tile::TileEndcapPos', 'Tile::TileEndcapNeg', 'Tile::Barrel', 'Tile::BarrelModule', 'Tile::FrontPlate', 'Tile::EndPlate1', 'Tile::EPHole1', 'Tile::EndPlate2', 'Tile::EPHole2', 'Tile::GirderMother', 'Tile::GirderIron', 'Tile::GirderAluminium', 'Tile::GirderElectronics', 'Tile::Absorber', 'Tile::AbsorberChild', 'Tile::Period', 'Tile::Glue', 'Tile::Wrapper', 'Tile::EBarrel', 'Tile::EBarrelModule', 'Tile::EndPlateSh', 'Tile::ITC', 'Tile::ITCModule', 'Tile::Plug1Module', 'Tile::FrontPlateSh', 'Tile::Plug2Module', 'Tile::Gap', 'Tile::GapModule', 'Tile::IrUp', 'Tile::IrDw', 'Tile::Iron4', 'Tile::Iron3', 'Tile::Iron2', 'Tile::Iron1', 'Tile::IrBox', 'Tile::SaddleModule', 'Tile::LArService', 'Tile::LArCables', 'Tile::ExtBarrelSaddleSupport', 'Tile::Crack', 'Tile::CrackModule', 'Tile::FingerModule', 'Tile::FingerIron', 'Tile::FingerAluminum', 'Tile::FingerElectronics', 'Tile::EFinger', 'Tile::EFingerModule', 'Tile::FingerPos', 'Tile::FingerNeg', 'Tile::SaddlePos', 'Tile::SaddleNeg', 'Tile::ESaddlePos', 'Tile::ESaddleNeg' ] ) kwargs.setdefault("OutputCollectionNames", ["TileHitVec", "TileCalibHitActiveCell", "TileCalibHitInactiveCell", "TileCalibHitDeadMaterial"] ) - kwargs.setdefault("TileCalculator", "TileCTBGeoG4SDCalc") - + + result = TileCTBGeoG4SDCalcCfg(ConfigFlags) + kwargs.setdefault("TileCalculator", result.getService("TileCTBGeoG4SDCalc") ) + result.setPrivateTools( TileGeoG4CalibSDTool(name, **kwargs) ) return result diff --git a/TileCalorimeter/TileG4/TileGeoG4SD/python/TileGeoG4SDToolConfig.py b/TileCalorimeter/TileG4/TileGeoG4SD/python/TileGeoG4SDToolConfig.py index 1fd56bdcd31d5679fe08403c25260ff6d6989d9f..d8defc1ac01a6c72f16e7be76bdd33bab60c9515 100644 --- a/TileCalorimeter/TileG4/TileGeoG4SD/python/TileGeoG4SDToolConfig.py +++ b/TileCalorimeter/TileG4/TileGeoG4SD/python/TileGeoG4SDToolConfig.py @@ -40,8 +40,7 @@ def TileGeoG4SDCalcCfg(ConfigFlags, name="TileGeoG4SDCalc", **kwargs): if ConfigFlags.Beam.Type == 'cosmics' or ConfigFlags.Sim.ReadTR: kwargs.setdefault("DeltaTHit", [1]) kwargs.setdefault("DoTOFCorrection", False) - if ConfigFlags.Sim.ParticleID: - kwargs.setdefault("DoCalibHitParticleID", ConfigFlags.Sim.ParticleID ) + kwargs.setdefault("DoCalibHitParticleID", ConfigFlags.Sim.ParticleID ) result.addService( TileGeoG4SDCalc(name, **kwargs) ) return result @@ -51,8 +50,7 @@ def TileCTBGeoG4SDCalcCfg(ConfigFlags, name="TileCTBGeoG4SDCalc", **kwargs): result = ComponentAccumulator() kwargs.setdefault("TileTB", True) - if ConfigFlags.Sim.ParticleID: - kwargs.setdefault("DoCalibHitParticleID", ConfigFlags.Sim.ParticleID ) + kwargs.setdefault("DoCalibHitParticleID", ConfigFlags.Sim.ParticleID ) result.addService( TileGeoG4SDCalc(name, **kwargs) ) return result diff --git a/Tools/FullChainTransforms/python/FastChain_Skeleton.py b/Tools/FullChainTransforms/python/FastChain_Skeleton.py index 3d92de5a828d21185793cdb1cfadf5927037e474..b476ec4f6f863a72f3d4a4bceb25639986a0b4d3 100644 --- a/Tools/FullChainTransforms/python/FastChain_Skeleton.py +++ b/Tools/FullChainTransforms/python/FastChain_Skeleton.py @@ -74,6 +74,9 @@ def fromRunArgs(runArgs): from SimuJobTransforms.ISF_Skeleton import defaultSimulationFlags defaultSimulationFlags(ConfigFlags, detectors) + # To get alignment conditions folder + ConfigFlags.GeoModel.Align.LegacyConditionsAccess = True + # Setup digitization flags from Digitization.DigitizationConfigFlags import digitizationRunArgsToFlags digitizationRunArgsToFlags(runArgs, ConfigFlags) diff --git a/Tools/FullChainTransforms/share/FastChainSkeleton.EVGENtoRDO.py b/Tools/FullChainTransforms/share/FastChainSkeleton.EVGENtoRDO.py index db4e90f9c486cc0146836c77c9f65003c01b401f..ae0548c8cfdf548e52d3664083ebae65c6ef06e9 100644 --- a/Tools/FullChainTransforms/share/FastChainSkeleton.EVGENtoRDO.py +++ b/Tools/FullChainTransforms/share/FastChainSkeleton.EVGENtoRDO.py @@ -387,6 +387,7 @@ if hasattr(runArgs,"DataRunNumber"): elif hasattr(runArgs,'jobNumber'): if runArgs.jobNumber>=0: fast_chain_log.info( 'Using job number '+str(runArgs.jobNumber)+' to derive run number.' ) + simFlags.RunDict = { digitizationFlags.RunAndLumiOverrideList.getMinMaxRunNumbers()[0] : digitizationFlags.RunAndLumiOverrideList.getEvtsMax() } simFlags.RunNumber = simFlags.RunDict.GetRunNumber( runArgs.jobNumber ) fast_chain_log.info( 'Set run number based on dictionary to '+str(simFlags.RunNumber) ) @@ -976,6 +977,8 @@ if hasattr(runArgs,"preDigiInclude"): for fragment in runArgs.preDigiInclude: include(fragment) +# Sync again +syncDetFlagsAndDigitizationJobProperties() #-------------------------------------------------------------- # Go for it #-------------------------------------------------------------- @@ -1049,6 +1052,7 @@ import MagFieldServices.SetupField if digitizationFlags.RunAndLumiOverrideList.statusOn: if not(DetFlags.pileup.any_on()): AthError( "This job will try to override pile-up luminosity configuration, but no pile-up will be set up!" ) + ServiceMgr.EventSelector.OverrideRunNumber=True include("Digitization/LumiBlockOverrides.py") if digitizationFlags.dataRunNumber.statusOn: fast_chain_log.warning('digitizationFlags.RunAndLumiOverrideList has been set! digitizationFlags.dataRunNumber (set to %s) will be ignored. ', digitizationFlags.dataRunNumber.get_Value() ) diff --git a/Tools/PROCTools/data/master_q431_AOD_digest_500events.ref b/Tools/PROCTools/data/master_q431_AOD_digest_500events.ref index d35524664b4d302e6f2c7c96089b43c0c737217a..385021080b1fa774b558561069f859a8a207b2bc 100644 --- a/Tools/PROCTools/data/master_q431_AOD_digest_500events.ref +++ b/Tools/PROCTools/data/master_q431_AOD_digest_500events.ref @@ -22,7 +22,7 @@ 330470 1183732647 467 503 100 7 1 8 0 8 20 0 20 330470 1183733040 381 290 21 3 2 5 0 5 10 0 10 330470 1183733070 431 553 141 9 1 16 0 16 24 0 24 - 330470 1183733727 678 789 132 10 1 5 0 5 35 0 35 + 330470 1183733727 678 789 132 10 1 6 0 6 35 0 35 330470 1183734651 361 374 75 7 3 5 0 5 18 0 18 330470 1183734704 438 446 41 6 6 2 0 2 23 0 23 330470 1183734871 556 602 117 8 2 14 0 14 21 0 21 @@ -30,7 +30,7 @@ 330470 1183735593 480 451 71 7 1 5 0 5 26 0 26 330470 1183735786 311 217 8 2 1 0 0 0 8 0 8 330470 1183736050 589 694 67 5 1 11 0 11 29 0 29 - 330470 1183736197 453 486 94 7 5 7 0 7 15 0 15 + 330470 1183736197 453 486 94 7 5 6 0 6 15 0 15 330470 1183736364 427 407 54 5 1 6 0 6 16 0 16 330470 1183736418 466 487 61 5 2 13 0 13 17 0 17 330470 1183736475 741 711 98 8 1 2 0 2 22 0 22 @@ -101,11 +101,11 @@ 330470 1183764842 585 645 127 11 1 15 0 15 29 0 29 330470 1183765366 464 522 99 8 1 6 0 6 10 0 10 330470 1183765436 301 213 26 3 0 5 0 5 5 0 5 - 330470 1183767528 668 643 93 7 1 9 0 9 28 0 28 + 330470 1183767528 668 643 93 7 1 8 0 8 28 0 28 330470 1183767718 467 454 131 12 2 15 0 15 17 0 17 330470 1183768132 410 432 40 4 2 4 0 4 15 0 15 330470 1183768747 598 594 164 12 3 24 0 24 25 0 25 - 330470 1183768758 656 729 136 8 3 15 0 15 24 0 24 + 330470 1183768758 656 729 136 8 3 16 0 16 24 0 24 330470 1183769295 342 338 16 2 2 0 0 0 6 0 6 330470 1183769514 383 372 29 4 2 2 0 2 14 0 14 330470 1183769648 527 579 46 5 4 6 0 6 17 0 17 @@ -139,7 +139,7 @@ 330470 1183782928 539 645 91 8 3 8 0 8 25 0 25 330470 1183783289 507 599 110 7 1 15 0 15 20 0 20 330470 1183783835 437 472 116 6 3 15 0 15 30 0 30 - 330470 1183783921 518 489 104 6 1 22 0 22 32 0 32 + 330470 1183783921 518 489 104 6 1 21 0 21 32 0 32 330470 1183784212 561 538 142 10 0 36 0 36 28 0 28 330470 1183784686 458 490 141 14 7 5 0 5 23 0 23 330470 1183784788 350 327 69 5 3 18 0 18 16 0 16 @@ -183,7 +183,7 @@ 330470 1183800710 470 476 39 5 1 5 0 5 17 0 17 330470 1183801077 415 446 47 5 1 5 0 5 22 0 22 330470 1183801428 382 344 57 6 1 4 0 4 9 0 9 - 330470 1183802242 434 392 41 6 3 8 0 8 19 0 19 + 330470 1183802242 434 392 41 6 3 7 0 7 19 0 19 330470 1183804252 552 594 92 6 2 12 0 12 21 0 21 330470 1183804485 453 502 97 7 1 16 0 16 21 0 21 330470 1183804522 298 235 14 4 1 0 0 0 7 0 7 @@ -226,7 +226,7 @@ 330470 1183823625 409 340 58 5 3 10 0 10 16 0 16 330470 1183824371 362 307 24 5 0 2 0 2 12 0 12 330470 1183824531 393 363 78 8 5 13 0 13 17 0 17 - 330470 1183824603 479 406 72 5 1 14 0 14 27 0 27 + 330470 1183824603 479 406 72 5 1 15 0 15 27 0 27 330470 1183824788 473 361 67 9 3 6 0 6 28 0 28 330470 1183824934 357 456 78 6 2 7 0 7 13 0 13 330470 1183825276 370 333 33 6 1 2 0 2 10 0 10 @@ -266,13 +266,13 @@ 330470 1183842339 196 156 9 2 0 0 0 0 3 0 3 330470 1183842483 550 508 38 5 0 5 0 5 19 0 19 330470 1183842622 404 444 74 7 1 9 0 9 21 0 21 - 330470 1183842772 432 461 74 5 1 16 0 16 23 0 23 + 330470 1183842772 432 461 74 5 1 15 0 15 23 0 23 330470 1183843837 357 374 33 2 0 7 0 7 13 0 13 330470 1183844385 400 394 41 5 1 4 0 4 8 0 8 330470 1183846886 385 267 19 4 0 4 0 4 20 0 20 330470 1183847401 470 461 51 6 2 8 0 8 18 0 18 330470 1183847806 433 488 116 9 1 15 0 15 20 0 20 - 330470 1183848014 277 272 88 7 1 14 0 14 11 0 11 + 330470 1183848014 277 272 88 7 1 14 0 14 12 0 12 330470 1183848066 352 393 75 6 1 10 0 10 20 0 20 330470 1183848576 546 592 76 6 5 5 0 5 24 0 24 330470 1183848643 540 480 40 4 6 5 0 5 31 0 31 @@ -320,7 +320,7 @@ 330470 1183871236 389 313 19 3 0 5 0 5 14 0 14 330470 1183872430 298 309 49 6 2 2 0 2 11 0 11 330470 1183873300 384 372 54 5 3 5 0 5 15 0 15 - 330470 1183874095 543 642 191 15 4 8 0 8 25 0 25 + 330470 1183874095 543 642 191 15 4 9 0 9 25 0 25 330470 1183874756 311 209 16 3 1 1 0 1 9 0 9 330470 1183875240 638 762 111 11 1 9 0 9 28 0 28 330470 1183875307 387 283 26 4 2 2 0 2 13 0 13 @@ -335,7 +335,7 @@ 330470 1183879154 597 628 52 4 4 8 0 8 28 0 28 330470 1183879547 423 439 15 2 2 0 0 0 13 0 13 330470 1183879670 489 525 120 8 2 13 0 13 21 0 21 - 330470 1183879957 494 578 147 13 0 12 0 12 26 0 26 + 330470 1183879957 494 578 147 13 0 12 0 12 25 0 25 330470 1183880152 349 453 49 6 3 1 0 1 16 0 16 330470 1183880330 714 571 175 13 4 25 0 25 52 0 52 330470 1183880565 526 371 92 12 1 10 0 10 35 0 35 @@ -419,7 +419,7 @@ 330470 1183931811 465 375 57 7 0 8 0 8 18 0 18 330470 1183932465 456 541 83 7 3 11 0 11 17 0 17 330470 1183933264 514 450 32 5 2 4 0 4 10 0 10 - 330470 1183934061 556 608 150 10 2 15 0 15 31 0 31 + 330470 1183934061 556 608 150 10 2 14 0 14 31 0 31 330470 1183934188 559 640 135 12 0 11 0 11 28 0 28 330470 1183935176 505 635 103 9 1 7 0 7 21 0 21 330470 1183935243 406 422 117 7 3 15 0 15 26 0 26 diff --git a/Tools/PyUtils/python/Decorators.py b/Tools/PyUtils/python/Decorators.py index 42b5ef8b5eb94cb007e5ac94cca7c043abb0504c..ffa65fb179db31a0687161f625882400a7519ef2 100644 --- a/Tools/PyUtils/python/Decorators.py +++ b/Tools/PyUtils/python/Decorators.py @@ -1,81 +1,13 @@ -# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration -# @author: Sebastien Binet <binet@cern.ch> -# @date: March 2008 -# @purpose: a set of decorators. Most of them (if not all) have been stolen -# from here: -# http://www.phyast.pitt.edu/~micheles/python/documentation.html -# -from __future__ import with_statement, print_function - -__author__ = "Sebastien Binet <binet@cern.ch>" - -__all__ = [ - 'memoize', - 'forking', - 'async_decor', - ] +""" +Some useful decorators. +""" import sys -import itertools from decorator import decorator -@decorator -def memoize(func, *args): - """This decorator implements the memoize pattern, i.e. it caches the result - of a function in a dictionary, so that the next time the function is called - with the same input parameters the result is retrieved from the cache and - not recomputed. - """ - try: - mem_dict = getattr(func, "_mem_dict") - except AttributeError: - # look-up failed so we have to build the cache holder - mem_dict = {} - setattr(func, "_mem_dict", mem_dict) - try: - return mem_dict[args] - except KeyError: - # look-up failed so we have to build the result the first time around - # then we cache - mem_dict[args] = result = func(*args) - return result - -# FIXME: does not work... func is an instance of FunctionMaker which cannot -# be pickled... -@decorator -def mp_forking(func, *args, **kwargs): - import multiprocessing as mp - ## pool = mp.Pool (processes=1) - ## return pool.apply (func, *args, **kwargs) - - # create a local queue to fetch the results back - def wrapping(func): - q = mp.Queue() - def wrap_fct(*args, **kwargs): - try: - res = func(*args, **kwargs) - # catch *everything* and 're-raise' - except BaseException as err: - #import traceback; traceback.print_exc() - res = err - q.put(res) - wrap_fct.q = q - return wrap_fct - - func = wrapping(func) - proc = mp.Process(target=func, args=args, kwargs=kwargs) - proc.start() - res = func.q.get() - proc.join() - proc.terminate() - if isinstance(res, BaseException): - #import traceback; traceback.print_exc() - raise res - #reraise_exception(exc,exc_info) - return res - -def reraise_exception(new_exc, exc_info=None): +def _reraise_exception(new_exc, exc_info=None): if exc_info is None: exc_info = sys.exc_info() _exc_class, _exc, tb = exc_info @@ -111,7 +43,7 @@ def forking(func, *args, **kwargs): return result else: remote_exc = result[0] - reraise_exception(remote_exc) + _reraise_exception(remote_exc) ## child ## else: @@ -135,73 +67,3 @@ def forking(func, *args, **kwargs): os._exit(0) pass # forking - -### a decorator converting blocking functions into asynchronous functions -# stolen from http://pypi.python.org/pypi/decorator/3.0.0 -def _async_on_success(result): # default implementation - "Called on the result of the function" - return result - -def _async_on_failure(exc_info): # default implementation - "Called if the function fails" - _exc_class, _exc, tb = exc_info - raise _exc_class (_exc, tb) - pass - -def _async_on_closing(): # default implementation - "Called at the end, both in case of success and failure" - pass - -class Async(object): - """ - A decorator converting blocking functions into asynchronous - functions, by using threads or processes. Examples: - - async_with_threads = Async(threading.Thread) - async_with_processes = Async(multiprocessing.Process) - """ - - def __init__(self, threadfactory): - self.threadfactory = threadfactory - - def __call__(self, func, - on_success=_async_on_success, - on_failure=_async_on_failure, - on_closing=_async_on_closing): - # every decorated function has its own independent thread counter - func.counter = itertools.count(1) - func.on_success = on_success - func.on_failure = on_failure - func.on_closing = on_closing - return decorator(self.call, func) - - def call(self, func, *args, **kw): - def func_wrapper(): - try: - result = func(*args, **kw) - except Exception: - func.on_failure(sys.exc_info()) - else: - return func.on_success(result) - finally: - func.on_closing() - name = '%s-%s' % (func.__name__, next(func.counter)) - thread = self.threadfactory(None, func_wrapper, name) - thread.start() - return thread - -# default async decorator: using processes -def async_decor(async_type='mp'): - if async_type in ("mp", "multiprocessing"): - from multiprocessing import Process - factory = Process - elif async_type in ("th", "threading"): - from threading import Thread - factory = Thread - else: - raise ValueError ("async_type must be either 'multiprocessing' " - "or 'threading' (got: %s)"%async_type) - async_obj = Async (factory) - return async_obj - - diff --git a/Tools/PyUtils/python/MetaDiff.py b/Tools/PyUtils/python/MetaDiff.py index 7c8224d972ebfed17408f92496d59e3e96e3efd5..7fc5113f320203132369ff2c78f2dd43e367eee5 100644 --- a/Tools/PyUtils/python/MetaDiff.py +++ b/Tools/PyUtils/python/MetaDiff.py @@ -76,9 +76,9 @@ def print_diff(parent_key, obj1, obj2, diff_format): except (AttributeError, TypeError,): pass result += """\ - > {} - ---------- < {} + ---------- + > {} """.format( summary(obj1), summary(obj2) ) @@ -107,9 +107,9 @@ def print_diff_type(parent_key, obj1, obj2, diff_format): if parent_key is not None: result += "{}:\n".format(parent_key) result += """\ - > {} (type: {}) - ---------- < {} (type: {}) + ---------- + > {} (type: {}) """.format( summary(obj1), type(obj1), summary(obj2), type(obj2) ) @@ -145,9 +145,9 @@ def print_diff_dict_keys(parent_key, obj1, obj2, diff_format): if parent_key is not None: result += "{}:\n".format(parent_key) result += """\ - > {} - ---------- < {} + ---------- + > {} """.format( summary(obj1), summary(obj2) ) diff --git a/Tools/PyUtils/python/RootUtils.py b/Tools/PyUtils/python/RootUtils.py index b969bc78fd5b105ceed1d8ee4aaffd1ef26d1800..22fc49487c22b4151548a6918d9f7fcae7578433 100644 --- a/Tools/PyUtils/python/RootUtils.py +++ b/Tools/PyUtils/python/RootUtils.py @@ -1,12 +1,10 @@ -# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration # @file PyUtils.RootUtils # @author Sebastien Binet # @purpose a few utils to ease the day-to-day work with ROOT # @date November 2009 -from __future__ import with_statement, print_function - __doc__ = "a few utils to ease the day-to-day work with ROOT" __author__ = "Sebastien Binet" @@ -19,8 +17,7 @@ __all__ = [ import os import re import six - -from .Decorators import memoize +from functools import cache ### functions ----------------------------------------------------------------- def import_root(batch=True): @@ -120,7 +117,7 @@ def _root_compile (src, fname, batch): ROOT.gErrorIgnoreLevel = orig_root_lvl return -@memoize +@cache def _pythonize_tfile(): import cppyy root = import_root() diff --git a/Tools/PyUtils/python/scripts/diff_root_files.py b/Tools/PyUtils/python/scripts/diff_root_files.py index 3f2de397953e9e2f9c6b06065ff0c155a8dfff6e..6e57741a5ab0f532bda32ef008a1023f4369b6ce 100644 --- a/Tools/PyUtils/python/scripts/diff_root_files.py +++ b/Tools/PyUtils/python/scripts/diff_root_files.py @@ -11,7 +11,7 @@ __author__ = "Sebastien Binet" ### imports ------------------------------------------------------------------- import PyUtils.acmdlib as acmdlib import re -from PyUtils.Decorators import memoize +from functools import cache from math import isnan from numbers import Real from os import environ @@ -330,7 +330,7 @@ def main(args): else: return [int(s) for s in entry[2] if s.isdigit()] - @memoize + @cache def skip_leaf(name_from_dump, skip_leaves): """ Here decide if the current leaf should be skipped. Previously the matching was done based on the full or partial diff --git a/Tools/TrfTestsART/test/test_trf_data15_mt.sh b/Tools/TrfTestsART/test/test_trf_data15_mt.sh index 97a15b7c29ee734b75f78bd164bb94121938c9fe..688497284f3956fb518adf2fe310ec36a33625fe 100755 --- a/Tools/TrfTestsART/test/test_trf_data15_mt.sh +++ b/Tools/TrfTestsART/test/test_trf_data15_mt.sh @@ -17,7 +17,7 @@ timeout 43200 Reco_tf.py \ --preExec 'all:from AthenaMonitoring.DQMonFlags import DQMonFlags; DQMonFlags.doHLTMon=False' \ --postExec 'FPEAuditor.NStacktracesOnFPE=10' \ --autoConfiguration='everything' \ - --conditionsTag 'all:CONDBR2-BLKPA-RUN2-08' --geometryVersion='default:ATLAS-R2-2016-01-00-01' \ + --conditionsTag 'all:CONDBR2-BLKPA-RUN2-09' --geometryVersion='default:ATLAS-R2-2016-01-00-01' \ --runNumber='357750' --steering='doRAWtoALL' --maxEvents='-1' echo "art-result: $? Reco_tf_data15_mt" diff --git a/Tools/TrfTestsART/test/test_trf_data16_mt.sh b/Tools/TrfTestsART/test/test_trf_data16_mt.sh index dae8cd078bc744eccae1b3193155d4e669d2cf1e..71239fc1ec509ee3d2bccce23807871a3ad480cf 100755 --- a/Tools/TrfTestsART/test/test_trf_data16_mt.sh +++ b/Tools/TrfTestsART/test/test_trf_data16_mt.sh @@ -17,7 +17,7 @@ timeout 43200 Reco_tf.py \ --preExec 'all:from AthenaMonitoring.DQMonFlags import DQMonFlags; DQMonFlags.doHLTMon=False' \ --postExec 'FPEAuditor.NStacktracesOnFPE=10' \ --autoConfiguration='everything' \ - --conditionsTag 'all:CONDBR2-BLKPA-RUN2-08' --geometryVersion='default:ATLAS-R2-2016-01-00-01' \ + --conditionsTag 'all:CONDBR2-BLKPA-RUN2-09' --geometryVersion='default:ATLAS-R2-2016-01-00-01' \ --runNumber='357750' --steering='doRAWtoALL' --maxEvents='-1' echo "art-result: $? Reco_tf_data16_mt" diff --git a/Tools/TrfTestsART/test/test_trf_data17_mt.sh b/Tools/TrfTestsART/test/test_trf_data17_mt.sh index f526ffa6164b0c32af9dde8dbba78766bf11a8ea..d37cd7e1a935f666efc05e20fac3250d5e1deedd 100755 --- a/Tools/TrfTestsART/test/test_trf_data17_mt.sh +++ b/Tools/TrfTestsART/test/test_trf_data17_mt.sh @@ -17,7 +17,7 @@ timeout 43200 Reco_tf.py \ --preExec 'all:from AthenaMonitoring.DQMonFlags import DQMonFlags; DQMonFlags.doHLTMon=False' \ --postExec 'FPEAuditor.NStacktracesOnFPE=10' \ --autoConfiguration='everything' \ - --conditionsTag 'all:CONDBR2-BLKPA-RUN2-08' --geometryVersion='default:ATLAS-R2-2016-01-00-01' \ + --conditionsTag 'all:CONDBR2-BLKPA-RUN2-09' --geometryVersion='default:ATLAS-R2-2016-01-00-01' \ --runNumber='357750' --steering='doRAWtoALL' --maxEvents='-1' echo "art-result: $? Reco_tf_data17_mt" diff --git a/Tools/TrfTestsART/test/test_trf_data18_11k_mt.sh b/Tools/TrfTestsART/test/test_trf_data18_11k_mt.sh index 1bd99d1a7ee8ff5947dc5c4d39d5a67ea2dc6eed..2dfd0d2a0c52b45096f19c36f6f027a8a046de5d 100755 --- a/Tools/TrfTestsART/test/test_trf_data18_11k_mt.sh +++ b/Tools/TrfTestsART/test/test_trf_data18_11k_mt.sh @@ -17,7 +17,7 @@ timeout 64800 Reco_tf.py \ --preExec 'all:from AthenaMonitoring.DQMonFlags import DQMonFlags; DQMonFlags.doHLTMon=False' \ --postExec 'FPEAuditor.NStacktracesOnFPE=20' \ --autoConfiguration='everything' \ - --conditionsTag 'all:CONDBR2-BLKPA-RUN2-08' --geometryVersion='default:ATLAS-R2-2016-01-00-01' \ + --conditionsTag 'all:CONDBR2-BLKPA-RUN2-09' --geometryVersion='default:ATLAS-R2-2016-01-00-01' \ --runNumber='357750' --steering='doRAWtoALL' --maxEvents='-1' echo "art-result: $? Reco_tf_data18_11K_mt" diff --git a/Tools/TrfTestsART/test/test_trf_data18_hybrid.sh b/Tools/TrfTestsART/test/test_trf_data18_hybrid.sh index 2ede1a8af1f27769bd6d0394a914f829e5bf7b32..cfef1c0f6deb04425c45f7b1cfe700b1a523dabf 100755 --- a/Tools/TrfTestsART/test/test_trf_data18_hybrid.sh +++ b/Tools/TrfTestsART/test/test_trf_data18_hybrid.sh @@ -17,7 +17,7 @@ timeout 43200 Reco_tf.py \ --preExec 'all:from AthenaMonitoring.DQMonFlags import DQMonFlags; DQMonFlags.doHLTMon=False' \ --postExec 'FPEAuditor.NStacktracesOnFPE=10' \ --autoConfiguration='everything' \ - --conditionsTag 'all:CONDBR2-BLKPA-RUN2-08' --geometryVersion='default:ATLAS-R2-2016-01-00-01' \ + --conditionsTag 'all:CONDBR2-BLKPA-RUN2-09' --geometryVersion='default:ATLAS-R2-2016-01-00-01' \ --runNumber='357750' --steering='doRAWtoALL' --maxEvents='-1' echo "art-result: $? Reco_tf_data18_hybrid" diff --git a/Tools/TrfTestsART/test/test_trf_data18_mp.sh b/Tools/TrfTestsART/test/test_trf_data18_mp.sh index 6f284c115d6ac509105deed14a92ed90adc9929a..214f72a743d511c5d07e34183fbe7fe954dae542 100755 --- a/Tools/TrfTestsART/test/test_trf_data18_mp.sh +++ b/Tools/TrfTestsART/test/test_trf_data18_mp.sh @@ -18,7 +18,7 @@ timeout 43200 Reco_tf.py \ --preExec 'all:from AthenaMonitoring.DQMonFlags import DQMonFlags; DQMonFlags.doHLTMon=False' \ --postExec 'FPEAuditor.NStacktracesOnFPE=10' \ --autoConfiguration='everything' \ - --conditionsTag 'all:CONDBR2-BLKPA-RUN2-08' --geometryVersion='default:ATLAS-R2-2016-01-00-01' \ + --conditionsTag 'all:CONDBR2-BLKPA-RUN2-09' --geometryVersion='default:ATLAS-R2-2016-01-00-01' \ --runNumber='357750' --steering='doRAWtoALL' --maxEvents='-1' echo "art-result: $? Reco_tf_data18_mp" diff --git a/Tools/TrfTestsART/test/test_trf_data18_mt.sh b/Tools/TrfTestsART/test/test_trf_data18_mt.sh index 48fde9b7b119ffbdf9d0339da11ae60beea399e0..d35e009e91eadc44e543922328a234503405b89a 100755 --- a/Tools/TrfTestsART/test/test_trf_data18_mt.sh +++ b/Tools/TrfTestsART/test/test_trf_data18_mt.sh @@ -17,7 +17,7 @@ timeout 43200 Reco_tf.py \ --preExec 'all:from AthenaMonitoring.DQMonFlags import DQMonFlags; DQMonFlags.doHLTMon=False' \ --postExec 'FPEAuditor.NStacktracesOnFPE=10' \ --autoConfiguration='everything' \ - --conditionsTag 'all:CONDBR2-BLKPA-RUN2-08' --geometryVersion='default:ATLAS-R2-2016-01-00-01' \ + --conditionsTag 'all:CONDBR2-BLKPA-RUN2-09' --geometryVersion='default:ATLAS-R2-2016-01-00-01' \ --runNumber='357750' --steering='doRAWtoALL' --maxEvents='-1' echo "art-result: $? Reco_tf_data18_mt" diff --git a/Tools/TrfTestsART/test/test_trf_data18_rucio_mt.sh b/Tools/TrfTestsART/test/test_trf_data18_rucio_mt.sh index 90e485e28ea2b57378696f24b23dcf1c8ac2ff92..e67223b86ff27c1d1a92d33cbf7045164efaab8c 100755 --- a/Tools/TrfTestsART/test/test_trf_data18_rucio_mt.sh +++ b/Tools/TrfTestsART/test/test_trf_data18_rucio_mt.sh @@ -22,7 +22,7 @@ timeout 43200 Reco_tf.py \ --preExec 'all:from AthenaMonitoring.DQMonFlags import DQMonFlags; DQMonFlags.doHLTMon=False' \ --postExec 'FPEAuditor.NStacktracesOnFPE=10' \ --autoConfiguration='everything' \ - --conditionsTag 'all:CONDBR2-BLKPA-RUN2-08' --geometryVersion='default:ATLAS-R2-2016-01-00-01' \ + --conditionsTag 'all:CONDBR2-BLKPA-RUN2-09' --geometryVersion='default:ATLAS-R2-2016-01-00-01' \ --runNumber='357750' --steering='doRAWtoALL' --maxEvents='-1' echo "art-result: $? Reco_tf_data18_rucio_mt" diff --git a/Tools/TrfTestsART/test/test_trf_data18_rucio_weekly_mt.sh b/Tools/TrfTestsART/test/test_trf_data18_rucio_weekly_mt.sh index 9a784affb19638ad32f6af4c36c518c5b80b2e53..7ae518a54d6117060209bf3c25034fbefe82f9eb 100755 --- a/Tools/TrfTestsART/test/test_trf_data18_rucio_weekly_mt.sh +++ b/Tools/TrfTestsART/test/test_trf_data18_rucio_weekly_mt.sh @@ -5,7 +5,7 @@ # art-input: data18_13TeV:data18_13TeV.00357750.physics_Main.daq.RAW # art-input-nfiles: 300 # art-input-nfilesperjob: 3 -# art-include: master/Athena/x86_64-centos7-gcc8-opt +# art-include: master/Athena/x86_64-centos7-gcc11-opt # art-athena-mt: 8 # art-runon: Saturday @@ -20,7 +20,7 @@ timeout 43200 Reco_tf.py \ --preExec 'all:from AthenaMonitoring.DQMonFlags import DQMonFlags; DQMonFlags.doHLTMon=False' \ --postExec 'FPEAuditor.NStacktracesOnFPE=10' \ --autoConfiguration='everything' \ - --conditionsTag 'all:CONDBR2-BLKPA-RUN2-08' --geometryVersion='default:ATLAS-R2-2016-01-00-01' \ + --conditionsTag 'all:CONDBR2-BLKPA-RUN2-09' --geometryVersion='default:ATLAS-R2-2016-01-00-01' \ --runNumber='357750' --steering='doRAWtoALL' --maxEvents='-1' echo "art-result: $? Reco_tf_data18_rucio_weekly_mt" diff --git a/Tools/TrfTestsART/test/test_trf_esdmerge_serial.sh b/Tools/TrfTestsART/test/test_trf_esdmerge_serial.sh index 5ae5f91e288d4f632d701885e49838133370e376..2cb736e61f2cb1847c3e1fb345ee38519cf9bffa 100755 --- a/Tools/TrfTestsART/test/test_trf_esdmerge_serial.sh +++ b/Tools/TrfTestsART/test/test_trf_esdmerge_serial.sh @@ -9,7 +9,7 @@ ESDMerge_tf.py \ --inputESDFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/DESDM_MCP.26614755._001203.pool.root.1,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/DESDM_MCP.26614755._001208.pool.root.1 \ --postInclude="all:RecJobTransforms/UseFrontier.py" \ --autoConfiguration="everything" \ - --conditionsTag="all:CONDBR2-BLKPA-RUN2-08" \ + --conditionsTag="all:CONDBR2-BLKPA-RUN2-09" \ --geometryVersion="all:ATLAS-R2-2016-01-00-01" \ --runNumber="358031" \ --outputESD_MRGFile="DESDM_MCP.pool.root" \ diff --git a/Tools/TrfTestsART/test/test_trf_q221_r2a_mt.sh b/Tools/TrfTestsART/test/test_trf_q221_r2a_mt.sh index 80616a29c9e48da96a4a91191bae960aa214387d..9e400d2279b152662e942404a7b92eec1af9fe96 100755 --- a/Tools/TrfTestsART/test/test_trf_q221_r2a_mt.sh +++ b/Tools/TrfTestsART/test/test_trf_q221_r2a_mt.sh @@ -8,10 +8,11 @@ Reco_tf.py \ --multithreaded='True' \ ---AMI=q221 --conditionsTag 'all:OFLCOND-MC16-SDR-RUN2-08' \ +--AMI=q221 \ +--conditionsTag "default:OFLCOND-MC16-SDR-RUN2-09" "RDOtoRDOTrigger:OFLCOND-MC16-SDR-RUN2-08-02" \ --steering "doRDO_TRIG" "doTRIGtoALL" \ --triggerConfig "RDOtoRDOTrigger=MCRECO:DBF:TRIGGERDBMC:2233,87,314" \ ---asetup "RDOtoRDOTrigger:Athena,21.0.129" \ +--asetup "RDOtoRDOTrigger:Athena,21.0.131" \ --imf="False" \ --maxEvents 1000 diff --git a/Tools/TrfTestsART/test/test_trf_q221_r2e_mt.sh b/Tools/TrfTestsART/test/test_trf_q221_r2e_mt.sh index 99861dfc682eb96b22c340f04464fd411c476d3f..e48cf1b021fc2fc5cde316ec2677d3c05c9f1fe9 100755 --- a/Tools/TrfTestsART/test/test_trf_q221_r2e_mt.sh +++ b/Tools/TrfTestsART/test/test_trf_q221_r2e_mt.sh @@ -9,10 +9,10 @@ Reco_tf.py \ --multithreaded='True' \ --AMI=q221 \ ---AMI=q221 --conditionsTag 'all:OFLCOND-MC16-SDR-RUN2-08' \ +--conditionsTag "default:OFLCOND-MC16-SDR-RUN2-09" "RDOtoRDOTrigger:OFLCOND-MC16-SDR-RUN2-08-02" \ --steering "doRDO_TRIG" \ --triggerConfig "RDOtoRDOTrigger=MCRECO:DBF:TRIGGERDBMC:2233,87,314" \ ---asetup "RDOtoRDOTrigger:Athena,21.0.129" \ +--asetup "RDOtoRDOTrigger:Athena,21.0.131" \ --imf="False" \ --maxEvents 1000 diff --git a/Tools/TrfTestsART/test/test_trf_q431_r2a_mt.sh b/Tools/TrfTestsART/test/test_trf_q431_r2a_mt.sh index 020d7411f3b1550a4199072ea73c24133af1f653..920f51d34a67db0acea821f6e690e051f66b15fc 100755 --- a/Tools/TrfTestsART/test/test_trf_q431_r2a_mt.sh +++ b/Tools/TrfTestsART/test/test_trf_q431_r2a_mt.sh @@ -8,7 +8,7 @@ Reco_tf.py \ --AMI q431 \ ---conditionsTag 'all:CONDBR2-BLKPA-RUN2-08' \ +--conditionsTag 'all:CONDBR2-BLKPA-RUN2-09' \ --multithreaded="True" \ --steering doRAWtoALL \ --maxEvents -1 diff --git a/Tools/TrfTestsART/test/test_trf_q431_r2e_mt.sh b/Tools/TrfTestsART/test/test_trf_q431_r2e_mt.sh index 09f70c4d23424ae3d0fc13b2a021f6b7497c0cb8..28e33ec6f7bf784447505ae0c9c86ac7cc78db13 100755 --- a/Tools/TrfTestsART/test/test_trf_q431_r2e_mt.sh +++ b/Tools/TrfTestsART/test/test_trf_q431_r2e_mt.sh @@ -8,7 +8,7 @@ Reco_tf.py \ --AMI q431 \ ---conditionsTag 'all:CONDBR2-BLKPA-RUN2-08' \ +--conditionsTag 'all:CONDBR2-BLKPA-RUN2-09' \ --multithreaded="True" \ --maxEvents -1 diff --git a/Tracking/Acts/ActsGeantFollowing/CMakeLists.txt b/Tracking/Acts/ActsGeantFollowing/CMakeLists.txt new file mode 100755 index 0000000000000000000000000000000000000000..04e13d87ff52ba58d360eab4f4438e7f480f2419 --- /dev/null +++ b/Tracking/Acts/ActsGeantFollowing/CMakeLists.txt @@ -0,0 +1,38 @@ +# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration + +# Declare the package name: +atlas_subdir( ActsGeantFollowing ) + +# External dependencies: +find_package( Acts COMPONENTS Core ) +find_package( Boost ) +find_package( ROOT COMPONENTS Core Tree RIO ) + +atlas_add_component( ActsGeantFollowing + src/*.cxx + src/components/*.cxx + INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} + LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} + ActsCore + ActsGeometryInterfacesLib + ActsGeometryLib + ActsInteropLib + EventPrimitives + GeoPrimitives + AthenaBaseComps + AthenaKernel + CaloDetDescrLib + EventInfo + G4AtlasInterfaces + G4AtlasToolsLib + GaudiKernel + StoreGateLib + TRT_ReadoutGeometry + TrkGeometry + TrkExInterfaces + TrkParameters + TrkSurfaces) + +# Install files from the package: +atlas_install_joboptions( share/*.py ) +atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} ) \ No newline at end of file diff --git a/Tracking/Acts/ActsGeantFollowing/python/ActsGeantFollowingConfig.py b/Tracking/Acts/ActsGeantFollowing/python/ActsGeantFollowingConfig.py new file mode 100644 index 0000000000000000000000000000000000000000..1ff1104b0f42574820a3dc88fbe5fedf24487c7a --- /dev/null +++ b/Tracking/Acts/ActsGeantFollowing/python/ActsGeantFollowingConfig.py @@ -0,0 +1,13 @@ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator +from AthenaConfiguration.ComponentFactory import CompFactory + +def ActsGeantFollowerToolCfg(configFlags, name="ActsGeantFollowerTool", **kwargs): + THistSvc= CompFactory.THistSvc + result = ComponentAccumulator() + histsvc = THistSvc(name="THistSvc") + histsvc.Output = ["val DATAFILE='GeantFollowing.root' OPT='RECREATE'"] + result.addService(histsvc) + result.setPrivateTools(CompFactory.ActsGeantFollowerTool(name, **kwargs)) + + return result diff --git a/Tracking/Acts/ActsGeantFollowing/python/__init__.py b/Tracking/Acts/ActsGeantFollowing/python/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/Tracking/Acts/ActsGeometry/share/ActsGeantFollowing_jobOptions.py b/Tracking/Acts/ActsGeantFollowing/share/ActsGeantFollowing_jobOptions.py similarity index 61% rename from Tracking/Acts/ActsGeometry/share/ActsGeantFollowing_jobOptions.py rename to Tracking/Acts/ActsGeantFollowing/share/ActsGeantFollowing_jobOptions.py index 58dfcf968c0642c667df12e6363fe1a7f8c89b9e..b4de2a3cc0a2813cbe1c3c708da7ffe9fd46cef7 100644 --- a/Tracking/Acts/ActsGeometry/share/ActsGeantFollowing_jobOptions.py +++ b/Tracking/Acts/ActsGeantFollowing/share/ActsGeantFollowing_jobOptions.py @@ -12,6 +12,8 @@ from AthenaCommon.AlgSequence import AlgSequence topSeq = AlgSequence() +from AthenaCommon.AlgSequence import AthSequencer +condSeq = AthSequencer("AthCondSeq") #topSeq.ContinueEventloopOnFPE = True from RecExConfig.RecFlags import rec as rec rec.doFloatingPointException.set_Value_and_Lock(True) @@ -135,93 +137,10 @@ from AthenaCommon.AppMgr import ToolSvc from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags from TrkDetDescrSvc.AtlasTrackingGeometrySvc import AtlasTrackingGeometrySvc -# PROPAGATOR DEFAULTS -------------------------------------------------------------------------------------- - -TestEnergyLossUpdator = [] -from TrkExTools.TrkExToolsConf import Trk__EnergyLossUpdator -AtlasEnergyLossUpdator = Trk__EnergyLossUpdator(name="AtlasEnergyLossUpdator") -ToolSvc += AtlasEnergyLossUpdator -ToolSvc.AtlasEnergyLossUpdator.DetailedEloss = True -TestEnergyLossUpdator += [AtlasEnergyLossUpdator] - -TestPropagators = [] - -from TrkExRungeKuttaPropagator.TrkExRungeKuttaPropagatorConf import Trk__RungeKuttaPropagator as Propagator -TestPropagator = Propagator(name = 'TestPropagator') -ToolSvc += TestPropagator - -TestPropagators += [ TestPropagator ] - -from TrkExSTEP_Propagator.TrkExSTEP_PropagatorConf import Trk__STEP_Propagator as STEP_Propagator -TestSTEP_Propagator = STEP_Propagator(name = 'TestSTEP_Propagator') -ToolSvc += TestSTEP_Propagator -TestSTEP_Propagator.DetailedEloss = True - -TestPropagators += [TestSTEP_Propagator] - -# UPDATOR DEFAULTS ----------------------------------------------------------------------------------------- - -TestUpdators = [] - -from TrkExTools.TrkExToolsConf import Trk__MaterialEffectsUpdator as MaterialEffectsUpdator -TestMaterialEffectsUpdator = MaterialEffectsUpdator(name = 'TestMaterialEffectsUpdator') -ToolSvc += TestMaterialEffectsUpdator -if myPDG == 998 or myPDG == 999: - TestMaterialEffectsUpdator.EnergyLoss = False - TestMaterialEffectsUpdator.MultipleScattering = False - -TestUpdators += [ TestMaterialEffectsUpdator ] - -TestMaterialEffectsUpdatorLandau = MaterialEffectsUpdator(name = 'TestMaterialEffectsUpdatorLandau') -TestMaterialEffectsUpdatorLandau.LandauMode = True -ToolSvc += TestMaterialEffectsUpdatorLandau -if myPDG == 998 or myPDG == 999 : - TestMaterialEffectsUpdatorLandau.EnergyLoss = False - TestMaterialEffectsUpdatorLandau.MultipleScattering = False - -##TestUpdators += [ TestMaterialEffectsUpdatorLandau ] - -# the UNIQUE NAVIGATOR ( === UNIQUE GEOMETRY) -------------------------------------------------------------- -from TrkExTools.TrkExToolsConf import Trk__Navigator -TestNavigator = Trk__Navigator(name = 'TestNavigator') -TestNavigator.TrackingGeometrySvc = "Trk::TrackingGeometrySvc/AtlasTrackingGeometrySvc" -ToolSvc += TestNavigator - -# CONFIGURE PROPAGATORS/UPDATORS ACCORDING TO GEOMETRY SIGNATURE - -TestSubPropagators = [] -TestSubUpdators = [] - -# -------------------- set it depending on the geometry ---------------------------------------------------- -# default for ID is (Rk,Mat) -TestSubPropagators += [ TestPropagator.name() ] -TestSubUpdators += [ TestMaterialEffectsUpdator.name() ] - -# default for Calo is (Rk,MatLandau) -TestSubPropagators += [ TestPropagator.name() ] -TestSubUpdators += [ TestMaterialEffectsUpdator.name() ] - -TestSubPropagators += [ TestPropagator.name() ] -TestSubUpdators += [ TestMaterialEffectsUpdator.name() ] - -# default for MS is (STEP,Mat) -TestSubPropagators += [ TestSTEP_Propagator.name() ] -TestSubUpdators += [ TestMaterialEffectsUpdator.name() ] - -TestSubPropagators += [ TestSTEP_Propagator.name() ] -TestSubUpdators += [ TestMaterialEffectsUpdator.name() ] - -TestSubPropagators += [ TestPropagator.name() ] -TestSubUpdators += [ TestMaterialEffectsUpdator.name() ] -# ---------------------------------------------------------------------------------------------------------- - - # SET UP ALIGNMENT CONDITIONS ALGORITHM from IOVSvc.IOVSvcConf import CondSvc -svcMgr += CondSvc( OutputLevel=INFO ) +ServiceMgr += CondSvc( OutputLevel=INFO ) from ActsGeometry import ActsGeometryConf -from AthenaCommon.AlgSequence import AthSequencer -condSeq = AthSequencer("AthCondSeq") condSeq += ActsGeometryConf.NominalAlignmentCondAlg("NominalAlignmentCondAlg", OutputLevel=INFO) @@ -229,22 +148,9 @@ condSeq += ActsGeometryConf.NominalAlignmentCondAlg("NominalAlignmentCondAlg", # We need the Magnetic fiels import MagFieldServices.SetupField -# call the base class constructor -from TrkExTools.TrkExToolsConf import Trk__Extrapolator -TestExtrapolator = Trk__Extrapolator('TestExtrapolator',\ - Navigator = TestNavigator,\ - MaterialEffectsUpdators = TestUpdators,\ - Propagators = TestPropagators,\ - EnergyLossUpdators = TestEnergyLossUpdator,\ - STEP_Propagator = TestSTEP_Propagator.name(),\ - SubPropagators = TestSubPropagators,\ - SubMEUpdators = TestSubUpdators) -ToolSvc += TestExtrapolator - -from AthenaCommon.AppMgr import ServiceMgr # set up and configure the acts geometry construction from ActsGeometry.ActsGeometryConf import ActsTrackingGeometrySvc -trkGeomSvc = ActsTrackingGeometrySvc() +trkGeomSvc = ActsTrackingGeometrySvc("ActsTrackingGeometrySvc") # used for the proxies during material mapping trkGeomSvc.OutputLevel = INFO trkGeomSvc.BuildSubDetectors = [ @@ -253,8 +159,10 @@ trkGeomSvc.BuildSubDetectors = [ "TRT", "Calo" ] +from AthenaConfiguration.ComponentFactory import CompFactory +trkGeomSvc.CaloVolumeBuilder = CompFactory.ActsCaloTrackingVolumeBuilder() trkGeomSvc.UseMaterialMap = True -trkGeomSvc.MaterialMapInputFile = "material-maps.json" +trkGeomSvc.MaterialMapInputFile = "/eos/project-a/acts/public/MaterialMaps/ATLAS-material-maps.json" ServiceMgr += trkGeomSvc # sets up the extrapolation tool @@ -277,13 +185,20 @@ if myPDG == 998 or myPDG == 999 : # For each event, the GAS for the IOV needs to be set from the algorithm. trkGeomTool = CfgMgr.ActsTrackingGeometryTool("ActsTrackingGeometryTool") trkGeomTool.OutputLevel = INFO +ToolSvc += trkGeomTool + ActsExtrapolator.TrackingGeometryTool = trkGeomTool ToolSvc += ActsExtrapolator -from ActsGeometry.ActsGeometryConf import ActsGeantFollowerHelper + +from TrkExEngine.AtlasExtrapolationEngine import AtlasExtrapolationEngine +ExtrapolationEngine = AtlasExtrapolationEngine(name='Extrapolation', nameprefix='Atlas') +ToolSvc += ExtrapolationEngine + +from ActsGeantFollowing.ActsGeantFollowingConf import ActsGeantFollowerHelper ActsGeantFollowerHelper = ActsGeantFollowerHelper(name="ActsGeantFollowerHelper") -ActsGeantFollowerHelper.Extrapolator = TestExtrapolator ActsGeantFollowerHelper.ActsExtrapolator = ActsExtrapolator +ActsGeantFollowerHelper.ExtrapolationEngine = ExtrapolationEngine ActsGeantFollowerHelper.ExtrapolateDirectly = False ActsGeantFollowerHelper.ExtrapolateIncrementally = False ActsGeantFollowerHelper.OutputLevel = INFO @@ -294,9 +209,10 @@ simFlags.OptionalUserActionList.addAction('ActsGeantFollowerTool') ############### The output collection ####################### from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream - -from GaudiSvc.GaudiSvcConf import THistSvc -ServiceMgr += THistSvc() +from AthenaCommon.AppMgr import ServiceMgr +if not hasattr(ServiceMgr, 'THistSvc'): + from GaudiSvc.GaudiSvcConf import THistSvc + ServiceMgr += THistSvc() ServiceMgr.THistSvc.Output += [ "val DATAFILE='GeantFollowing.root' TYPE='ROOT' OPT='RECREATE'" ] ############################################################## @@ -311,15 +227,16 @@ topSeq += getAlgorithm("BeamEffectsAlg", tryDefaultConfigurable=True) topSeq += getAlgorithm("G4AtlasAlg",tryDefaultConfigurable=True) # Conditions sequence for Athena MT +from AthenaCommon.AlgSequence import AthSequencer if not hasattr(condSeq, "BeamSpotCondAlg"): from BeamSpotConditions.BeamSpotConditionsConf import BeamSpotCondAlg condSeq += BeamSpotCondAlg( "BeamSpotCondAlg" ) -TestSTEP_Propagator.Straggling = False +# TestSTEP_Propagator.Straggling = False -if myPDG == 998 or myPDG == 999 : - TestSTEP_Propagator.MultipleScattering = False - TestSTEP_Propagator.EnergyLoss = False +# if myPDG == 998 or myPDG == 999 : +# TestSTEP_Propagator.MultipleScattering = False +# TestSTEP_Propagator.EnergyLoss = False from AthenaCommon.ConfigurationShelve import saveToAscii saveToAscii("config.txt") diff --git a/Tracking/Acts/ActsGeantFollowing/share/ActsGeantFollowing_jobOptions_ITk.py b/Tracking/Acts/ActsGeantFollowing/share/ActsGeantFollowing_jobOptions_ITk.py new file mode 100644 index 0000000000000000000000000000000000000000..8fabcb68b512fe24ceeb2ccea441e4a57dfa524a --- /dev/null +++ b/Tracking/Acts/ActsGeantFollowing/share/ActsGeantFollowing_jobOptions_ITk.py @@ -0,0 +1,226 @@ +#============================================================== +# +# +# This job option runs the G4 simulation +# of the ATLAS detector and the GeantFollower in ID (and MS) +# It can be run using athena.py +# +#============================================================== + + +from __future__ import print_function + +import sys +from argparse import ArgumentParser + +from AthenaCommon.Configurable import Configurable +from AthenaCommon.Constants import INFO, VERBOSE +from AthenaConfiguration.AllConfigFlags import ConfigFlags +from AthenaConfiguration.MainServicesConfig import MainServicesCfg +from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator +from AthenaConfiguration.ComponentFactory import CompFactory + +from ActsGeometry.ActsGeometryConfig import ActsAlignmentCondAlgCfg +from ActsGeometry.ActsGeometryConfig import ActsExtrapolationToolCfg + +# Set up logging and new style config +Configurable.configurableRun3Behavior = True + +def defaultTestFlags(configFlags, args): + + + ## Just enable ID for the moment. + ConfigFlags.Input.isMC = True + ConfigFlags.GeoModel.useLocalGeometry = False + detectors = [ + "ITkPixel", + "ITkStrip", + "Bpipe" + ] + + from AthenaConfiguration.DetectorConfigFlags import setupDetectorsFromList + setupDetectorsFromList(ConfigFlags, detectors, toggle_geometry=True) + + + ConfigFlags.GeoModel.AtlasVersion = "ATLAS-P2-ITK-24-00-00" + ConfigFlags.IOVDb.GlobalTag = "OFLCOND-SIM-00-00-00" + ConfigFlags.GeoModel.Align.Dynamic = False + #ConfigFlags.TrackingGeometry.MaterialSource = "Input" + # ConfigFlags.TrackingGeometry.MaterialSource = "material-maps.json" + ConfigFlags.Beam.Type ='' + + ConfigFlags.Detector.GeometryCalo = False + ConfigFlags.Detector.GeometryMuon = False + + # # This should run serially for the moment. + # ConfigFlags.Concurrency.NumThreads = 1 + ConfigFlags.Concurrency.NumConcurrentEvents = 1 + + configFlags.Input.Files = [args.inputevntfile] + + configFlags.Output.HITSFileName = args.outputhitsfile + + configFlags.Sim.CalibrationRun = "Off" + configFlags.Sim.RecordStepInfo = False + configFlags.Sim.CavernBG = "Signal" + configFlags.Sim.ISFRun = False + configFlags.Sim.BeamPipeSimMode = 'FastSim' + configFlags.Sim.ReleaseGeoModel = False + + + configFlags.Input.RunNumber = [284500] + configFlags.Input.OverrideRunNumber = True + configFlags.Input.LumiBlockNumber = [1] + +def printAndRun(accessor, configFlags, args): + """debugging and execution""" + # Dump config + if args.verboseAccumulators: + accessor.printConfig(withDetails=True) + if args.verboseStoreGate: + accessor.getService("StoreGateSvc").Dump = True + configFlags.dump() + + # Execute and finish + sc = accessor.run(maxEvents=args.maxEvents) + + # Dump config summary + accessor.printConfig(withDetails=False) + + # Success should be 0 + return not sc.isSuccess() + + +def ITkCfg(configFlags): + acc = MainServicesCfg(configFlags) + from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg + from AthenaPoolCnvSvc.PoolWriteConfig import PoolWriteCfg + acc.merge(PoolReadCfg(configFlags)) + acc.merge(PoolWriteCfg(configFlags)) + + # add BeamEffectsAlg + from BeamEffects.BeamEffectsAlgConfig import BeamEffectsAlgCfg + acc.merge(BeamEffectsAlgCfg(configFlags)) + + from PixelGeoModelXml.ITkPixelGeoModelConfig import ITkPixelReadoutGeometryCfg + itkPixel = ITkPixelReadoutGeometryCfg(ConfigFlags) + acc.merge(itkPixel) + + from StripGeoModelXml.ITkStripGeoModelConfig import ITkStripReadoutGeometryCfg + itkStrip = ITkStripReadoutGeometryCfg(ConfigFlags) + acc.merge(itkStrip) + + from BeamPipeGeoModel.BeamPipeGMConfig import BeamPipeGeometryCfg + acc.merge(BeamPipeGeometryCfg(ConfigFlags)) + + from AtlasGeoModel.GeoModelConfig import GeoModelCfg + gmsAcc = GeoModelCfg(configFlags) + acc.merge(gmsAcc) + + return acc + +def ActsGeantFollowerCfg(configFlags, name="ActsGeantFollowerTool", **kwargs): + + result = ComponentAccumulator() + + import InDetRecExample.TrackingCommon as TrackingCommon + + from TrkConfig.AtlasTrackingGeometrySvcConfig import TrackingGeometrySvcCfg + result.merge(TrackingGeometrySvcCfg(configFlags)) + + from ActsGeometry.ActsGeometryConfig import NominalAlignmentCondAlgCfg + nomAli = NominalAlignmentCondAlgCfg(configFlags, OutputLevel=INFO) + result.merge(nomAli) + + from ActsGeometry.ActsGeometryConfig import ActsTrackingGeometrySvcCfg, ActsPropStepRootWriterSvcCfg, ActsExtrapolationAlgCfg + tgSvc = ActsTrackingGeometrySvcCfg(configFlags, OutputLevel=INFO) + result.merge(tgSvc) + + print('DEF WRITER : ') + Actsextrapol = ActsExtrapolationToolCfg(ConfigFlags, + InteractionMultiScatering = True, + InteractionEloss = True, + InteractionRecord=True, + OutputLevel=INFO) + result.merge(Actsextrapol) + + from TrkConfig.AtlasExtrapolationEngineConfig import AtlasExtrapolationEngineCfg + extrapAcc = AtlasExtrapolationEngineCfg(configFlags) + AtlasExtrapolationEngine = extrapAcc.getPrimary() + result.merge(extrapAcc) + + + #Setup Helper + followingHelper = CompFactory.ActsGeantFollowerHelper("ActsGeantFollowerHelper", + **kwargs, + ExtrapolationEngine=AtlasExtrapolationEngine, + ActsExtrapolator=Actsextrapol.getPrimary(), + ExtrapolateDirectly=False, + ExtrapolateIncrementally=True, + OutputLevel=INFO) + result.addPublicTool(followingHelper) + + #Setting up the CA for the ActsGeantFollower + from ActsGeantFollowing.ActsGeantFollowingConfig import ActsGeantFollowerToolCfg + actionAcc = ComponentAccumulator() + actions = [] + actions += [actionAcc.popToolsAndMerge(ActsGeantFollowerToolCfg(configFlags))] + actionAcc.setPrivateTools(actions) + ActsGeantFollowerAction = result.popToolsAndMerge(actionAcc) + + #Retrieving the default action list + from G4AtlasServices.G4AtlasUserActionConfigNew import getDefaultActions + defaultActions = result.popToolsAndMerge(getDefaultActions(configFlags)) + + #Adding LengthIntegrator to defaults + actionList = (defaultActions + ActsGeantFollowerAction) + + #Setting up UserActionsService + kwargs.setdefault("UserActionTools",actionList) + result.addService(CompFactory.G4UA.UserActionSvc(name, **kwargs)) + + return result + + +# Argument parsing +parser = ArgumentParser("ActsGeantFollowing_jobOption_ITk.py") +parser.add_argument("--simulate", default=True, action="store_true", + help="Run Simulation") +parser.add_argument("-V", "--verboseAccumulators", default=False, + action="store_true", + help="Print full details of the AlgSequence") +parser.add_argument("-S", "--verboseStoreGate", default=False, + action="store_true", + help="Dump the StoreGate(s) each event iteration") +parser.add_argument("--maxEvents",default=-1, type=int, + help="The number of events to run. 0 skips execution") +parser.add_argument("--inputevntfile", + # default="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/SimCoreTests/e_E50_eta0-25.evgen.pool.root", + default="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/InDetSLHC_Example/inputs/pgun_2M_10GeV_geantinos_Eta6_v2_EVNT.root", + # default="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/InDetSLHC_Example/inputs/EVNT.09244569._000001.pool.root.1", + help="The input EVNT file to use") +parser.add_argument("--outputhitsfile",default="myHITS.pool.root", type=str, + help="The output HITS filename") +args = parser.parse_args() + +# Configure +defaultTestFlags(ConfigFlags, args) +ConfigFlags.lock() + +# Construct our accumulator to run +acc = ITkCfg(ConfigFlags) +kwargs = {} + +svcName = "ActsGeantFollowerTool" +acc.merge(ActsGeantFollowerCfg(ConfigFlags,svcName,**kwargs)) +kwargs.update(UserActionSvc=svcName) + +from G4AtlasAlg.G4AtlasAlgConfigNew import G4AtlasAlgCfg +acc.merge(G4AtlasAlgCfg(ConfigFlags, "ITkG4AtlasAlg", **kwargs)) + +# dump pickle +with open("ITkTest.pkl", "wb") as f: + acc.store(f) + +# Print and run +sys.exit(printAndRun(acc, ConfigFlags, args)) diff --git a/Tracking/Acts/ActsGeometry/src/ActsGeantFollower.cxx b/Tracking/Acts/ActsGeantFollowing/src/ActsGeantFollower.cxx similarity index 75% rename from Tracking/Acts/ActsGeometry/src/ActsGeantFollower.cxx rename to Tracking/Acts/ActsGeantFollowing/src/ActsGeantFollower.cxx index 64fc63fad6cb998b52b7e9db33988e12b11f93a8..78ec0a5039aae02e82a48f2bc9ff30863c30d0bb 100755 --- a/Tracking/Acts/ActsGeometry/src/ActsGeantFollower.cxx +++ b/Tracking/Acts/ActsGeantFollowing/src/ActsGeantFollower.cxx @@ -6,8 +6,8 @@ // GeantFollower.cxx, (c) ATLAS Detector software /////////////////////////////////////////////////////////////////// -#include "ActsGeometry/ActsGeantFollower.h" -#include "ActsGeometry/IActsGeantFollowerHelper.h" +#include "ActsGeantFollower.h" +#include "IActsGeantFollowerHelper.h" #include "CxxUtils/AthUnlikelyMacros.h" #include "G4Event.hh" @@ -18,6 +18,7 @@ #include "G4LogicalVolume.hh" #include "G4DynamicParticle.hh" #include "G4Track.hh" +#include "G4VSensitiveDetector.hh" ActsGeantFollower::ActsGeantFollower(){} @@ -48,6 +49,15 @@ void ActsGeantFollower::UserSteppingAction(const G4Step* aStep) // kill secondaries and low momentum particles if (aStep->GetTrack()->GetParentID() || aStep->GetPreStepPoint()->GetMomentum().mag()<500 ) { + std::cout << "low pt" << std::endl; + aStep->GetTrack()->SetTrackStatus(fStopAndKill); + return; + } + + // kill Particles outiside the tracking volume + if (aStep->GetPreStepPoint()->GetPosition().z()>3000 || sqrt(aStep->GetPreStepPoint()->GetPosition().x()*aStep->GetPreStepPoint()->GetPosition().x()+aStep->GetPreStepPoint()->GetPosition().y()*aStep->GetPreStepPoint()->GetPosition().y())>1050 ) + { + std::cout << "out" << std::endl; aStep->GetTrack()->SetTrackStatus(fStopAndKill); return; } @@ -73,8 +83,11 @@ void ActsGeantFollower::UserSteppingAction(const G4Step* aStep) double steplength = aStep->GetStepLength(); // the position information double X0 = mat->GetRadlen(); - // update the track follower - m_helper->trackParticle(g4Position,g4Momentum,g4DynParticle->GetPDGcode(),g4DynParticle->GetCharge(),steplength,X0); + // update the track follower when a sensor is encountered + // bool isSensitive = (lv->GetSensitiveDetector() != nullptr); + bool isSensitive = true; + m_helper->trackParticle(g4Position, g4Momentum, g4DynParticle->GetPDGcode(), g4DynParticle->GetCharge(), steplength, X0, isSensitive); + } else { diff --git a/Tracking/Acts/ActsGeometry/ActsGeometry/ActsGeantFollower.h b/Tracking/Acts/ActsGeantFollowing/src/ActsGeantFollower.h similarity index 95% rename from Tracking/Acts/ActsGeometry/ActsGeometry/ActsGeantFollower.h rename to Tracking/Acts/ActsGeantFollowing/src/ActsGeantFollower.h index e8abe75cb1a40f4a57f1dd1e524185754e302382..ffe549cd6656fd8ce9bc1d1bd51fe843d96fa70e 100755 --- a/Tracking/Acts/ActsGeometry/ActsGeometry/ActsGeantFollower.h +++ b/Tracking/Acts/ActsGeantFollowing/src/ActsGeantFollower.h @@ -9,7 +9,7 @@ #include "AthenaBaseComps/AthAlgTool.h" #include "GaudiKernel/ToolHandle.h" -#include "ActsGeometry/IActsGeantFollowerHelper.h" +#include "IActsGeantFollowerHelper.h" #include <string> #include <vector> diff --git a/Tracking/Acts/ActsGeometry/src/ActsGeantFollowerHelper.cxx b/Tracking/Acts/ActsGeantFollowing/src/ActsGeantFollowerHelper.cxx similarity index 77% rename from Tracking/Acts/ActsGeometry/src/ActsGeantFollowerHelper.cxx rename to Tracking/Acts/ActsGeantFollowing/src/ActsGeantFollowerHelper.cxx index e8efa2b0c89cb75a4897ce7acbaa259211d43a57..a58b8d02ec27bdf084d295fcc1e2e632870bf7f6 100755 --- a/Tracking/Acts/ActsGeometry/src/ActsGeantFollowerHelper.cxx +++ b/Tracking/Acts/ActsGeantFollowing/src/ActsGeantFollowerHelper.cxx @@ -7,7 +7,7 @@ /////////////////////////////////////////////////////////////////// // StoreGate -#include "ActsGeometry/ActsGeantFollowerHelper.h" +#include "ActsGeantFollowerHelper.h" #include "TTree.h" #include "GaudiKernel/ITHistSvc.h" #include "GaudiKernel/EventContext.h" @@ -22,6 +22,7 @@ #include "GeoPrimitives/GeoPrimitives.h" //other #include "ActsGeometryInterfaces/IActsExtrapolationTool.h" +#include "TrkExInterfaces/IExtrapolationEngine.h" #include "Acts/Surfaces/PerigeeSurface.hpp" #include "Acts/Surfaces/PlaneSurface.hpp" @@ -33,21 +34,24 @@ // constructor ActsGeantFollowerHelper::ActsGeantFollowerHelper(const std::string& t, const std::string& n, const IInterface* p) : base_class(t,n,p), - m_extrapolator(""), + m_extrapolationEngine(""), m_actsExtrapolator(""), m_extrapolateDirectly(true), m_extrapolateIncrementally(true), m_parameterCache(nullptr), m_actsParameterCache(nullptr), m_tX0Cache(0.), + m_tX0NonSensitiveCache(0.), + m_tNonSensitiveCache(0.), m_tX0CacheActs(0.), + m_tX0CacheATLAS(0.), m_validationTreeName("G4Follower_"+n), m_validationTreeDescription("Output of the G4Follower_"), m_validationTreeFolder("/val/G4Follower_"+n), m_validationTree(nullptr) { // properties - declareProperty("Extrapolator", m_extrapolator); + declareProperty("ExtrapolationEngine", m_extrapolationEngine); declareProperty("ActsExtrapolator", m_actsExtrapolator); declareProperty("ExtrapolateDirectly", m_extrapolateDirectly); declareProperty("ExtrapolateIncrementally", m_extrapolateIncrementally); @@ -63,11 +67,14 @@ StatusCode ActsGeantFollowerHelper::initialize() { m_treeData = std::make_unique<TreeData>(); - if (m_extrapolator.retrieve().isFailure()){ - ATH_MSG_ERROR("Could not retrieve Extrapolator " << m_extrapolator << " . Abort."); + // if (m_extrapolator.retrieve().isFailure()){ + // ATH_MSG_ERROR("Could not retrieve Extrapolator " << m_extrapolator << " . Abort."); + // return StatusCode::FAILURE; + // } + if (m_extrapolationEngine.retrieve().isFailure()){ + ATH_MSG_ERROR("Could not retrieve Extrapolator Engine " << m_extrapolationEngine << " . Abort."); return StatusCode::FAILURE; } - if (m_actsExtrapolator.retrieve().isFailure()){ ATH_MSG_ERROR("Could not retrieve ActsExtrapolator " << m_actsExtrapolator << " . Abort."); @@ -110,6 +117,10 @@ StatusCode ActsGeantFollowerHelper::initialize() m_validationTree->Branch("TrkStepZ", m_treeData->m_trk_z, "trkstepZ[g4steps]/F"); m_validationTree->Branch("TrkStepLocX", m_treeData->m_trk_lx, "trkstepLX[g4steps]/F"); m_validationTree->Branch("TrkStepLocY", m_treeData->m_trk_ly, "trkstepLY[g4steps]/F"); + m_validationTree->Branch("TrkStepTX0", m_treeData->m_trk_tX0, "trkstepTX0[g4steps]/F"); + m_validationTree->Branch("TrkAccumX0", m_treeData->m_trk_accX0, "trkstepAccTX0[g4steps]/F"); + m_validationTree->Branch("TrkStepT", m_treeData->m_trk_t, "trkstepTX[g4steps]/F"); + m_validationTree->Branch("TrkStepX0", m_treeData->m_trk_X0, "trkstepX0[g4steps]/F"); m_validationTree->Branch("ActsStepStatus",m_treeData->m_acts_status, "actsstepStatus[g4steps]/I"); m_validationTree->Branch("ActsVolumeId", m_treeData->m_acts_volumeID,"actsvolumeid[g4steps]/I"); @@ -158,21 +169,25 @@ void ActsGeantFollowerHelper::beginEvent() const m_treeData->m_t_pdg = 0; m_treeData->m_g4_steps = 0; m_tX0Cache = 0.; + m_tX0NonSensitiveCache = 0.; + m_tNonSensitiveCache = 0.; m_tX0CacheActs = 0.; + m_tX0CacheATLAS = 0.; } void ActsGeantFollowerHelper::trackParticle(const G4ThreeVector& pos, const G4ThreeVector& mom, int pdg, double charge, - float t, float X0) const + float t, float X0, bool isSensitive) const { + // const EventContext ctx; const EventContext &ctx = Gaudi::Hive::currentContext(); - const ActsGeometryContext& gctx = m_actsExtrapolator->trackingGeometryTool()->getGeometryContext(ctx); + const ActsGeometryContext &gctx = m_actsExtrapolator->trackingGeometryTool()->getGeometryContext(ctx); auto trackingGeometry = m_actsExtrapolator->trackingGeometryTool()->trackingGeometry(); // construct the initial parameters Amg::Vector3D npos(pos.x(),pos.y(),pos.z()); Amg::Vector3D nmom(mom.x(),mom.y(),mom.z()); - if (!m_treeData->m_g4_steps){ + if(m_treeData->m_g4_steps == 0 && m_tNonSensitiveCache == 0){ ATH_MSG_INFO("Initial step ... preparing event cache."); m_treeData->m_t_x = pos.x(); m_treeData->m_t_y = pos.y(); @@ -196,6 +211,16 @@ void ActsGeantFollowerHelper::trackParticle(const G4ThreeVector& pos, Acts::Vector3 dir = nmom.normalized(); m_actsParameterCache = std::make_unique<const Acts::BoundTrackParameters>(Acts::BoundTrackParameters::create(surface, gctx.context(), actsStart, dir, mom.mag()/1000, charge).value()); } + + // Store material in cache + float tX0 = X0 > 10e-5 ? t/X0 : 0.; + m_tX0NonSensitiveCache += tX0; + m_tNonSensitiveCache += t; + if (!isSensitive) + { + return; + } + // jumping over inital step m_treeData->m_g4_steps = (m_treeData->m_g4_steps == -1) ? 0 : m_treeData->m_g4_steps; @@ -208,7 +233,6 @@ void ActsGeantFollowerHelper::trackParticle(const G4ThreeVector& pos, ATH_MSG_WARNING("Maximum number of " << MAXPROBES << " reached, step is ignored."); return; } - // Use the G4 pdgId as the particle hypothesis Trk::ParticleHypothesis particleHypo = m_pdgToParticleHypothesis.convert(m_treeData->m_t_pdg, m_treeData->m_t_charge); // parameters of the G4 step point @@ -216,9 +240,19 @@ void ActsGeantFollowerHelper::trackParticle(const G4ThreeVector& pos, // destination surface const Trk::PlaneSurface& destinationSurface = g4Parameters->associatedSurface(); // extrapolate to the destination surface - const Trk::TrackParameters* trkParameters = m_extrapolateDirectly ? - m_extrapolator->extrapolateDirectly(*m_parameterCache,destinationSurface,Trk::alongMomentum,false, particleHypo) : - m_extrapolator->extrapolate(*m_parameterCache,destinationSurface,Trk::alongMomentum,false, particleHypo); + Trk::ExtrapolationCell<Trk::TrackParameters> ecc(*m_parameterCache); + ecc.setParticleHypothesis((Trk::ParticleHypothesis) particleHypo); + ecc.addConfigurationMode(Trk::ExtrapolationMode::StopAtBoundary); + ecc.addConfigurationMode(Trk::ExtrapolationMode::CollectMaterial); + // call the extrapolation engine + auto eCodeSteps = m_extrapolationEngine->extrapolate(ecc, &destinationSurface); + const Trk::TrackParameters *trkParameters = ecc.endParameters; + float X0ATLAS = ecc.materialX0; + + if(eCodeSteps.code != 2 ){ + ATH_MSG_ERROR("Error in the Extrapolator Engine, skip the current step"); + return; + } // create a Acts::Surface that correspond to the Trk::Surface auto destinationSurfaceActs = Acts::Surface::makeShared<Acts::PlaneSurface>(destinationSurface.center(), destinationSurface.normal()); @@ -228,12 +262,18 @@ void ActsGeantFollowerHelper::trackParticle(const G4ThreeVector& pos, Acts::forward, std::numeric_limits<double>::max(), particleHypo); - double X0Acts = m_actsExtrapolator->propagationSteps(ctx, + + float X0Acts = m_actsExtrapolator->propagationSteps(ctx, *m_actsParameterCache, *destinationSurfaceActs, Acts::forward, std::numeric_limits<double>::max(), particleHypo).second.materialInX0; + + if(actsParameters == nullptr){ + ATH_MSG_ERROR("Error in the Acts extrapolation, skip the current step"); + return; + } int volID = trackingGeometry->lowestTrackingVolume(gctx.context(), actsParameters->position(gctx.context()))->geometryId().volume(); // fill the geant information and the trk information @@ -244,12 +284,12 @@ void ActsGeantFollowerHelper::trackParticle(const G4ThreeVector& pos, m_treeData->m_g4_x[m_treeData->m_g4_steps] = pos.x(); m_treeData->m_g4_y[m_treeData->m_g4_steps] = pos.y(); m_treeData->m_g4_z[m_treeData->m_g4_steps] = pos.z(); - float tX0 = X0 > 10e-5 ? t/X0 : 0.; - m_tX0Cache += tX0; - m_treeData->m_g4_tX0[m_treeData->m_g4_steps] = tX0; + + m_tX0Cache += m_tX0NonSensitiveCache; + m_treeData->m_g4_tX0[m_treeData->m_g4_steps] = m_tX0NonSensitiveCache; m_treeData->m_g4_accX0[m_treeData->m_g4_steps] = m_tX0Cache; - m_treeData->m_g4_t[m_treeData->m_g4_steps] = t; - m_treeData->m_g4_X0[m_treeData->m_g4_steps] = X0; + m_treeData->m_g4_t[m_treeData->m_g4_steps] = m_tNonSensitiveCache; + m_treeData->m_g4_X0[m_treeData->m_g4_steps] = m_tNonSensitiveCache/m_tX0NonSensitiveCache; m_treeData->m_trk_status[m_treeData->m_g4_steps] = trkParameters ? 1 : 0; m_treeData->m_trk_pt[m_treeData->m_g4_steps] = trkParameters ? trkParameters->pT() : 0.; @@ -261,6 +301,26 @@ void ActsGeantFollowerHelper::trackParticle(const G4ThreeVector& pos, m_treeData->m_trk_z[m_treeData->m_g4_steps] = trkParameters ? trkParameters->position().z() : 0.; m_treeData->m_trk_lx[m_treeData->m_g4_steps] = trkParameters ? trkParameters->parameters()[Trk::locX] : 0.; m_treeData->m_trk_ly[m_treeData->m_g4_steps] = trkParameters ? trkParameters->parameters()[Trk::locY] : 0.; + // Incremental extrapolation, the extrapolation correspond to one step + if(m_extrapolateIncrementally || m_treeData->m_g4_steps == 0){ + float tATLAS = (trkParameters->position() - m_parameterCache->position()).norm(); + m_tX0CacheATLAS += X0ATLAS; + m_treeData->m_trk_tX0[m_treeData->m_g4_steps] = X0ATLAS; + m_treeData->m_trk_accX0[m_treeData->m_g4_steps] = m_tX0CacheATLAS; + m_treeData->m_trk_t[m_treeData->m_g4_steps] = tATLAS; + m_treeData->m_trk_X0[m_treeData->m_g4_steps] = tATLAS/X0ATLAS; + } + // Extrapolation perform from the start, step varaible need to be computed by comparing to the last extrapolation. + else{ + Amg::Vector3D previousPos(m_treeData->m_trk_x[m_treeData->m_g4_steps-1], + m_treeData->m_trk_y[m_treeData->m_g4_steps-1], + m_treeData->m_trk_z[m_treeData->m_g4_steps-1]); + float tATLAS = (trkParameters->position() - previousPos).norm(); + m_treeData->m_trk_tX0[m_treeData->m_g4_steps] = X0ATLAS - m_treeData->m_trk_accX0[m_treeData->m_g4_steps-1] ; + m_treeData->m_trk_accX0[m_treeData->m_g4_steps] = X0ATLAS; + m_treeData->m_trk_t[m_treeData->m_g4_steps] = tATLAS; + m_treeData->m_trk_X0[m_treeData->m_g4_steps] = tATLAS/m_treeData->m_trk_tX0[m_treeData->m_g4_steps]; + } m_treeData->m_acts_status[m_treeData->m_g4_steps] = actsParameters ? 1 : 0; m_treeData->m_acts_volumeID[m_treeData->m_g4_steps] = actsParameters ? volID : 0; @@ -274,7 +334,7 @@ void ActsGeantFollowerHelper::trackParticle(const G4ThreeVector& pos, // Incremental extrapolation, the extrapolation correspond to one step if(m_extrapolateIncrementally || m_treeData->m_g4_steps == 0){ float tActs = (actsParameters->position(gctx.context()) - m_actsParameterCache->position(gctx.context())).norm(); - m_tX0CacheActs += X0Acts; + m_tX0CacheActs += X0Acts; m_treeData->m_acts_tX0[m_treeData->m_g4_steps] = X0Acts; m_treeData->m_acts_accX0[m_treeData->m_g4_steps] = m_tX0CacheActs; m_treeData->m_acts_t[m_treeData->m_g4_steps] = tActs; @@ -282,9 +342,9 @@ void ActsGeantFollowerHelper::trackParticle(const G4ThreeVector& pos, } // Extrapolation perform from the start, step varaible need to be computed by comparing to the last extrapolation. else{ - Acts::Vector3 previousPos(m_treeData->m_trk_x[m_treeData->m_g4_steps-1], - m_treeData->m_trk_y[m_treeData->m_g4_steps-1], - m_treeData->m_trk_z[m_treeData->m_g4_steps-1]); + Acts::Vector3 previousPos(m_treeData->m_acts_x[m_treeData->m_g4_steps-1], + m_treeData->m_acts_y[m_treeData->m_g4_steps-1], + m_treeData->m_acts_z[m_treeData->m_g4_steps-1]); float tActs = (actsParameters->position(gctx.context()) - previousPos).norm(); m_treeData->m_acts_tX0[m_treeData->m_g4_steps] = X0Acts - m_treeData->m_acts_accX0[m_treeData->m_g4_steps-1] ; m_treeData->m_acts_accX0[m_treeData->m_g4_steps] = X0Acts; @@ -302,13 +362,18 @@ void ActsGeantFollowerHelper::trackParticle(const G4ThreeVector& pos, // delete cache and increment delete g4Parameters; destinationSurfaceActs.reset(); + m_tX0NonSensitiveCache = 0.; + m_tNonSensitiveCache = 0.; ++m_treeData->m_g4_steps; } void ActsGeantFollowerHelper::endEvent() const { - // fill the validation tree - m_validationTree->Fill(); - delete m_parameterCache; - m_actsParameterCache.reset(); + if (m_tX0Cache != 0) + { + // fill the validation tree + m_validationTree->Fill(); + delete m_parameterCache; + m_actsParameterCache.reset(); + } } diff --git a/Tracking/Acts/ActsGeometry/ActsGeometry/ActsGeantFollowerHelper.h b/Tracking/Acts/ActsGeantFollowing/src/ActsGeantFollowerHelper.h similarity index 89% rename from Tracking/Acts/ActsGeometry/ActsGeometry/ActsGeantFollowerHelper.h rename to Tracking/Acts/ActsGeantFollowing/src/ActsGeantFollowerHelper.h index 756d9333ddbed202598e57f2a328739c383dc6d5..84f4dcf9ad5c1def771cfd48514074ef5e513b65 100755 --- a/Tracking/Acts/ActsGeometry/ActsGeometry/ActsGeantFollowerHelper.h +++ b/Tracking/Acts/ActsGeantFollowing/src/ActsGeantFollowerHelper.h @@ -8,7 +8,7 @@ #include "AthenaBaseComps/AthAlgTool.h" #include "GaudiKernel/ToolHandle.h" #include "TrkParameters/TrackParameters.h" //typedef, can't fwd declare -#include "ActsGeometry/IActsGeantFollowerHelper.h" +#include "IActsGeantFollowerHelper.h" #include "G4ThreeVector.hh" //typedef, can't fwd declare #include "TrkEventPrimitives/ParticleHypothesis.h" #include "TrkEventPrimitives/PdgToParticleHypothesis.h" @@ -27,7 +27,8 @@ class TTree; namespace Trk { class IExtrapolator; -} + class IExtrapolationEngine; +} // namespace Trk class IActsExtrapolationTool; @@ -47,13 +48,14 @@ class ActsGeantFollowerHelper : public extends<AthAlgTool, IActsGeantFollowerHel // a) begin event - initialize follower process void beginEvent() const; // b) track the particle - void trackParticle(const G4ThreeVector& pos, const G4ThreeVector& mom, int pdg, double charge, float t, float X0) const; + void trackParticle(const G4ThreeVector& pos, const G4ThreeVector& mom, int pdg, double charge, float t, float X0, bool isSensitive) const; // c) end event - ntuple writing void endEvent() const; private: - ToolHandle<Trk::IExtrapolator> m_extrapolator; + // ToolHandle<Trk::IExtrapolator> m_extrapolator; + ToolHandle<Trk::IExtrapolationEngine> m_extrapolationEngine; ToolHandle<IActsExtrapolationTool> m_actsExtrapolator; bool m_extrapolateDirectly; bool m_extrapolateIncrementally; @@ -65,7 +67,10 @@ class ActsGeantFollowerHelper : public extends<AthAlgTool, IActsGeantFollowerHel // Hypothesis to pdg converter Trk::PdgToParticleHypothesis m_pdgToParticleHypothesis; mutable float m_tX0Cache; + mutable float m_tX0NonSensitiveCache; + mutable float m_tNonSensitiveCache; mutable float m_tX0CacheActs; + mutable float m_tX0CacheATLAS; // put some validation code is std::string m_validationTreeName; //!< validation tree name - to be acessed by this from root @@ -111,6 +116,10 @@ class ActsGeantFollowerHelper : public extends<AthAlgTool, IActsGeantFollowerHel mutable float m_trk_z[MAXPROBES] {0}; mutable float m_trk_lx[MAXPROBES] {0}; mutable float m_trk_ly[MAXPROBES] {0}; + mutable float m_trk_tX0[MAXPROBES] {0}; + mutable float m_trk_accX0[MAXPROBES] {0}; + mutable float m_trk_t[MAXPROBES] {0}; + mutable float m_trk_X0[MAXPROBES] {0}; /** Ntuple variables : acts follow up parameters */ mutable int m_acts_status[MAXPROBES] {0}; mutable int m_acts_volumeID[MAXPROBES] {0}; diff --git a/Tracking/Acts/ActsGeometry/src/ActsGeantFollowerTool.cxx b/Tracking/Acts/ActsGeantFollowing/src/ActsGeantFollowerTool.cxx similarity index 94% rename from Tracking/Acts/ActsGeometry/src/ActsGeantFollowerTool.cxx rename to Tracking/Acts/ActsGeantFollowing/src/ActsGeantFollowerTool.cxx index e150edefd14efac1a2a6d4cf621aead94fbbeb61..3336c561250eb856d2f8dc2b832e0d1f480d89f7 100755 --- a/Tracking/Acts/ActsGeometry/src/ActsGeantFollowerTool.cxx +++ b/Tracking/Acts/ActsGeantFollowing/src/ActsGeantFollowerTool.cxx @@ -2,7 +2,7 @@ Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ -#include "ActsGeometry/ActsGeantFollowerTool.h" +#include "ActsGeantFollowerTool.h" ActsGeantFollowerTool::ActsGeantFollowerTool(const std::string& type, const std::string& name, diff --git a/Tracking/Acts/ActsGeometry/ActsGeometry/ActsGeantFollowerTool.h b/Tracking/Acts/ActsGeantFollowing/src/ActsGeantFollowerTool.h similarity index 94% rename from Tracking/Acts/ActsGeometry/ActsGeometry/ActsGeantFollowerTool.h rename to Tracking/Acts/ActsGeantFollowing/src/ActsGeantFollowerTool.h index d0a85862809180a387c7555362434e6256da5695..962f7ab010056132bffb15756f6fc424690fc212 100755 --- a/Tracking/Acts/ActsGeometry/ActsGeometry/ActsGeantFollowerTool.h +++ b/Tracking/Acts/ActsGeantFollowing/src/ActsGeantFollowerTool.h @@ -9,7 +9,7 @@ #include "G4AtlasTools/UserActionToolBase.h" // Local includes -#include "ActsGeometry/ActsGeantFollower.h" +#include "ActsGeantFollower.h" /// @class ActsGeantFollowerTool diff --git a/Tracking/Acts/ActsGeometry/ActsGeometry/IActsGeantFollowerHelper.h b/Tracking/Acts/ActsGeantFollowing/src/IActsGeantFollowerHelper.h similarity index 91% rename from Tracking/Acts/ActsGeometry/ActsGeometry/IActsGeantFollowerHelper.h rename to Tracking/Acts/ActsGeantFollowing/src/IActsGeantFollowerHelper.h index 6e5636b48df477ab870f3929397d67481b1f609c..c6190d05f28b054668186e141b76aaa72ee3051c 100644 --- a/Tracking/Acts/ActsGeometry/ActsGeometry/IActsGeantFollowerHelper.h +++ b/Tracking/Acts/ActsGeantFollowing/src/IActsGeantFollowerHelper.h @@ -26,7 +26,7 @@ class IActsGeantFollowerHelper : virtual public IAlgTool { // a) begin event - initialize follower process virtual void beginEvent() const = 0; // b) track the particle - virtual void trackParticle(const G4ThreeVector& pos, const G4ThreeVector& mom, int pdg, double charge, float t, float X0) const = 0; + virtual void trackParticle(const G4ThreeVector& pos, const G4ThreeVector& mom, int pdg, double charge, float t, float X0, bool isSensitive) const = 0; // c) end event - ntuple writing virtual void endEvent() const = 0; diff --git a/Tracking/Acts/ActsGeantFollowing/src/components/ActsFollowing_entries.cxx b/Tracking/Acts/ActsGeantFollowing/src/components/ActsFollowing_entries.cxx new file mode 100755 index 0000000000000000000000000000000000000000..d53176e3b0514fb37b5729b31556e1e9274b788d --- /dev/null +++ b/Tracking/Acts/ActsGeantFollowing/src/components/ActsFollowing_entries.cxx @@ -0,0 +1,9 @@ +/* + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration +*/ + +#include "../ActsGeantFollowerHelper.h" +#include "../ActsGeantFollowerTool.h" + +DECLARE_COMPONENT( ActsGeantFollowerHelper ) +DECLARE_COMPONENT( ActsGeantFollowerTool ) \ No newline at end of file diff --git a/Tracking/Acts/ActsGeometry/ActsGeometry/ActsATLASConverterTool.h b/Tracking/Acts/ActsGeometry/ActsGeometry/ActsATLASConverterTool.h index b593f70dc133f3c4335fbc8a879f5c84e8633019..842c6dc35881e6751b7c2ecf0921f925baf5c106 100644 --- a/Tracking/Acts/ActsGeometry/ActsGeometry/ActsATLASConverterTool.h +++ b/Tracking/Acts/ActsGeometry/ActsGeometry/ActsATLASConverterTool.h @@ -11,6 +11,7 @@ #include "GaudiKernel/ServiceHandle.h" #include "Gaudi/Property.h" #include "GaudiKernel/EventContext.h" +#include "TrkParameters/TrackParameters.h" // PACKAGE #include "ActsGeometryInterfaces/IActsATLASConverterTool.h" diff --git a/Tracking/Acts/ActsGeometry/CMakeLists.txt b/Tracking/Acts/ActsGeometry/CMakeLists.txt index d0963d06a818bb574239a165da6b5a77defde39f..d28316142f91ca18472a8943bd10e07e0b57c0c0 100755 --- a/Tracking/Acts/ActsGeometry/CMakeLists.txt +++ b/Tracking/Acts/ActsGeometry/CMakeLists.txt @@ -7,7 +7,6 @@ atlas_subdir( ActsGeometry ) find_package( Acts COMPONENTS Core PluginJson ) find_package( Boost ) find_package( CLHEP ) -find_package( Geant4 ) find_package( GeoModel COMPONENTS GeoModelKernel ) find_package( ROOT COMPONENTS Core Tree RIO ) find_package( TBB ) @@ -21,8 +20,8 @@ atlas_add_library( ActsGeometryLib src/ActsTrackingGeometrySvc.cxx src/util/*.cxx PUBLIC_HEADERS ActsGeometry - INCLUDE_DIRS ${GEANT4_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${TBB_INCLUDE_DIRS} - LINK_LIBRARIES ${GEANT4_LIBRARIES} ${Boost_LIBRARIES} ${ROOT_LIBRARIES} ${TBB_LIBRARIES} + INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${TBB_INCLUDE_DIRS} + LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} ${TBB_LIBRARIES} ActsCore ActsGeometryInterfacesLib ActsInteropLib @@ -68,9 +67,6 @@ atlas_add_component( ActsGeometry src/ActsTrackingGeometryTool.cxx src/ActsPropStepRootWriterSvc.cxx src/ActsCaloTrackingVolumeBuilder.cxx - src/ActsGeantFollower.cxx - src/ActsGeantFollowerHelper.cxx - src/ActsGeantFollowerTool.cxx src/ActsATLASConverterTool.cxx src/components/*.cxx INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${GEOMODEL_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} diff --git a/Tracking/Acts/ActsGeometry/src/components/ActsGeometry_entries.cxx b/Tracking/Acts/ActsGeometry/src/components/ActsGeometry_entries.cxx index e48cac1707854d115e2e313f6fb63c68c3e20965..c96e5c7c1fe36154a82eb1bf991eac38331c5064 100755 --- a/Tracking/Acts/ActsGeometry/src/components/ActsGeometry_entries.cxx +++ b/Tracking/Acts/ActsGeometry/src/components/ActsGeometry_entries.cxx @@ -1,9 +1,7 @@ /* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ -#include "ActsGeometry/ActsGeantFollowerHelper.h" -#include "ActsGeometry/ActsGeantFollowerTool.h" #include "ActsGeometry/ActsATLASConverterTool.h" #include "ActsGeometry/ActsExtrapolationAlg.h" @@ -52,7 +50,4 @@ DECLARE_COMPONENT( ActsPropStepRootWriterSvc ) DECLARE_COMPONENT( ActsAlignmentCondAlg ) DECLARE_COMPONENT( ActsCaloTrackingVolumeBuilder ) -DECLARE_COMPONENT( ActsGeantFollowerTool ) -DECLARE_COMPONENT( ActsGeantFollowerHelper ) - DECLARE_COMPONENT( ActsATLASConverterTool ) \ No newline at end of file diff --git a/Tracking/Acts/ActsTrkFitting/share/postInclude_ActsRefitting.py b/Tracking/Acts/ActsTrkFitting/share/postInclude_ActsRefitting.py index dccbfccf8c94ad7acf9579ce553d08a15b2f4894..b9e3c59667616300ca1adc0bafc4acbad88ef5a2 100644 --- a/Tracking/Acts/ActsTrkFitting/share/postInclude_ActsRefitting.py +++ b/Tracking/Acts/ActsTrkFitting/share/postInclude_ActsRefitting.py @@ -17,10 +17,13 @@ class ConfiguredActsRefittingTrackingGeometry( ActsTrackingGeometryTool ) : subDetectors += ["SCT"] subDetectors += ["TRT"] subDetectors += ["Calo"] - + from ActsGeometry.ActsGeometryConf import ActsTrackingGeometrySvc ActsTrackingGeometrySvc = ActsTrackingGeometrySvc(name = "ActsTrackingGeometrySvc", BuildSubDetectors=subDetectors) + + from AthenaConfiguration.ComponentFactory import CompFactory + ActsTrackingGeometrySvc.CaloVolumeBuilder = CompFactory.ActsCaloTrackingVolumeBuilder() ActsTrackingGeometrySvc.UseMaterialMap = True ActsTrackingGeometrySvc.MaterialMapInputFile = "/eos/project-a/acts/public/MaterialMaps/ATLAS-material-maps.json" from AthenaCommon.AppMgr import ServiceMgr diff --git a/Tracking/TrkConditions/TrackingGeometryCondAlg/python/AtlasTrackingGeometryCondAlg.py b/Tracking/TrkConditions/TrackingGeometryCondAlg/python/AtlasTrackingGeometryCondAlg.py index 3168de231737a0ddb487b74440a3bf96dcf382a3..9afa7ce795baf39e573df7b5afbb87c96d18cc3a 100644 --- a/Tracking/TrkConditions/TrackingGeometryCondAlg/python/AtlasTrackingGeometryCondAlg.py +++ b/Tracking/TrkConditions/TrackingGeometryCondAlg/python/AtlasTrackingGeometryCondAlg.py @@ -75,11 +75,18 @@ class ConfiguredTrackingGeometryCondAlg( Trk__TrackingGeometryCondAlg ) : # if hasattr(ToolSvc, TrkDetFlags.InDetTrackingGeometryBuilderName()): # InDetTrackingGeometryBuilder = getattr(ToolSvc, TrkDetFlags.InDetTrackingGeometryBuilderName()) # else: + if not TrkDetFlags.InDetStagedGeometryBuilder(): - from InDetTrackingGeometry.ConfiguredInDetTrackingGeometryBuilderCond import ConfiguredInDetTrackingGeometryBuilderCond as IDGeometryBuilder + from InDetTrackingGeometry.ConfiguredInDetTrackingGeometryBuilderCond import( + ConfiguredInDetTrackingGeometryBuilderCond as IDGeometryBuilder) else: - from InDetTrackingGeometry.ConfiguredStagedTrackingGeometryBuilderCond import ConfiguredStagedTrackingGeometryBuilderCond as IDGeometryBuilder - InDetTrackingGeometryBuilder = IDGeometryBuilder(name ='InDetTrackingGeometryBuilder'+nameSuffix,nameSuffix=nameSuffix) + from InDetTrackingGeometry.ConfiguredStagedTrackingGeometryBuilderCond import ( + ConfiguredStagedTrackingGeometryBuilderCond as IDGeometryBuilder) + from AthenaCommon.BeamFlags import jobproperties + InDetTrackingGeometryBuilder = IDGeometryBuilder( + name='InDetTrackingGeometryBuilder'+nameSuffix, + nameSuffix=nameSuffix, + buildTrtStrawLayers=(jobproperties.Beam.beamType == "cosmics")) InDetTrackingGeometryBuilder.EnvelopeDefinitionSvc = AtlasEnvelopeSvc InDetTrackingGeometryBuilder.OutputLevel = TrkDetFlags.InDetBuildingOutputLevel() diff --git a/Tracking/TrkConditions/TrackingGeometryCondAlg/python/AtlasTrackingGeometryCondAlgConfig.py b/Tracking/TrkConditions/TrackingGeometryCondAlg/python/AtlasTrackingGeometryCondAlgConfig.py index 098ded2296af39da27fe660c0856f1e76594fa23..f638d1162bd44494791a413befa532318630d2ed 100644 --- a/Tracking/TrkConditions/TrackingGeometryCondAlg/python/AtlasTrackingGeometryCondAlgConfig.py +++ b/Tracking/TrkConditions/TrackingGeometryCondAlg/python/AtlasTrackingGeometryCondAlgConfig.py @@ -61,6 +61,14 @@ def _getInDetTrackingGeometryBuilder(name, flags, binnings = [] colors = [] + # Material due to InDet services + if (flags.Detector.GeometryPixel + or flags.Detector.GeometrySCT + or flags.Detector.GeometryTRT): + from InDetServMatGeoModel.InDetServMatGeoModelConfig import ( + InDetServiceMaterialCfg) + result.merge(InDetServiceMaterialCfg(flags)) + # Pixel if flags.Detector.GeometryPixel: # for Pixel DetectorElement conditions data : @@ -98,7 +106,8 @@ def _getInDetTrackingGeometryBuilder(name, flags, binnings += [PixelLayerBinning] colors += [3] - # add artifical dependencies to Pixel DetectorElement conditions algs to ensure that the IOV + # add artifical dependencies to Pixel DetectorElement + # conditions algs to ensure that the IOV # is identical to the IOV of the tracking geoemtry cond alg from PixelConditionsAlgorithms.PixelConditionsConfig import PixelDetectorElementCondAlgCfg result.merge(PixelDetectorElementCondAlgCfg( @@ -145,7 +154,8 @@ def _getInDetTrackingGeometryBuilder(name, flags, binnings += [SCT_LayerBinning] colors += [4] - from SCT_ConditionsAlgorithms.SCT_ConditionsAlgorithmsConfig import SCT_DetectorElementCondAlgCfg + from SCT_ConditionsAlgorithms.SCT_ConditionsAlgorithmsConfig import ( + SCT_DetectorElementCondAlgCfg) result.merge(SCT_DetectorElementCondAlgCfg( flags, MuonManagerKey=[ @@ -577,7 +587,7 @@ def TrackingGeometryCondAlgCfg(flags, name='AtlasTrackingGeometryCondAlg', doMat # Depending on the job configuration, setup the various detector builders, and add to atlas_geometry_builder if flags.Detector.GeometryID: - # TODO Not sure how to handle TrkDetFlags, specifically + # TODO Not sure how to handle TrkDetFlags, specifically # ISF_FatrasCustomGeometry, XMLFastCustomGeometry # So, here we only setup the default InDet geometry builder! inDetTrackingGeometryBuilder = _getInDetTrackingGeometryBuilder( @@ -635,7 +645,7 @@ def TrackingGeometryCondAlgCfg(flags, name='AtlasTrackingGeometryCondAlg', doMat atlas_geometry_builder.CaloTrackingGeometryBuilder = caloTrackingGeometryBuilder if flags.Detector.GeometryMuon: - # Copied from from MuonTrackingGeometry.ConfiguredMuonTrackingGeometry + # Copied from from MuonTrackingGeometry.ConfiguredMuonTrackingGeometry # import MuonTrackingGeometryBuilder # Add the muon geometry model to the CA from MuonConfig.MuonGeometryConfig import MuonGeoModelCfg diff --git a/Tracking/TrkExtrapolation/TrkExTools/TrkExTools/DummyMaterialEffectsUpdator.h b/Tracking/TrkExtrapolation/TrkExTools/TrkExTools/DummyMaterialEffectsUpdator.h deleted file mode 100755 index da39213793ad3051c008b9aa913177084488b5b1..0000000000000000000000000000000000000000 --- a/Tracking/TrkExtrapolation/TrkExTools/TrkExTools/DummyMaterialEffectsUpdator.h +++ /dev/null @@ -1,214 +0,0 @@ -/* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration - */ - -/////////////////////////////////////////////////////////////////// -// DummyMaterialEffectsUpdator.h, c) ATLAS Detector software -/////////////////////////////////////////////////////////////////// - -#ifndef TRKEXTOOLS_DUMMYMATERIALEFFECTSUPDATOR_H -#define TRKEXTOOLS_DUMMYMATERIALEFFECTSUPDATOR_H - -// Gaudi -#include "AthenaBaseComps/AthAlgTool.h" -#include "GaudiKernel/ToolHandle.h" -#include "GaudiKernel/MsgStream.h" -// Trk -#include "TrkExInterfaces/IMaterialEffectsUpdator.h" -#include "TrkEventPrimitives/PropDirection.h" -#include "TrkEventPrimitives/ParticleHypothesis.h" -#include "TrkParameters/TrackParameters.h" - -namespace Trk { -class Layer; -//class TrackParameters; -class MaterialProperties; -class IMaterialMapper; - -/** @class DummyMaterialEffectsUpdator - - Debug tool for navigation tests - - @author Andreas.Salzburger@cern.ch - */ -class DummyMaterialEffectsUpdator : public AthAlgTool, - virtual public IMaterialEffectsUpdator { - public: - - /** AlgTool like constructor */ - DummyMaterialEffectsUpdator(const std::string&,const std::string&,const IInterface*); - - /**Virtual destructor*/ - virtual ~DummyMaterialEffectsUpdator(); - - /** AlgTool initailize method.*/ - StatusCode initialize() override; - /** AlgTool finalize method */ - StatusCode finalize() override; - - /** Updator interface (full update for a layer): Dummy full update - */ - std::unique_ptr<TrackParameters> update( - const TrackParameters* parm, - const Layer& sf, - PropDirection dir = alongMomentum, - ParticleHypothesis particle = pion, - MaterialUpdateMode matupmode = addNoise - ) const override; - - /** User updator interface (full update for a layer): - The parmeters are given as a pointer, they are deleted inside the update method. - Update occurs on the place where the parameters parm are according to the specified MaterialEffectsOnTrack - */ - virtual std::unique_ptr<TrackParameters> update( - const TrackParameters* parm, - const MaterialEffectsOnTrack& meff, - ParticleHypothesis particle = pion, - MaterialUpdateMode matupmode = addNoise - ) const override { - (void)meff; - (void)particle; - (void)matupmode; - return std::unique_ptr<TrackParameters>(parm->clone()); - } - - /** Updator interface (pre-update for a layer): Dummy pre update - */ - virtual std::unique_ptr<TrackParameters> preUpdate( - const TrackParameters* parm, - const Layer& sf, - PropDirection dir = alongMomentum, - ParticleHypothesis particle = pion, - MaterialUpdateMode matupmode = addNoise - ) const override; - - /** Updator interface (post-update for a layer): Dummy post update - */ - virtual std::unique_ptr<TrackParameters> postUpdate( - const TrackParameters& parm, - const Layer& sf, - PropDirection dir = alongMomentum, - ParticleHypothesis particle = pion, - MaterialUpdateMode matupmode = addNoise - ) const override; - - /** Updator interface: - The parmeters are given as a pointer, they are delete inside the update method. - MaterialProperties based material update - - used by all Layer-based methods - */ - virtual std::unique_ptr<TrackParameters> update( - const TrackParameters& parm, - const MaterialProperties& mprop, - double pathcorrection, - PropDirection dir = alongMomentum, - ParticleHypothesis particle = pion, - MaterialUpdateMode matupmode = addNoise - ) const override; - - virtual void validationAction() const override {}; - - virtual void modelAction(const TrackParameters* parm=nullptr) const override{ - if(parm) return; - } - - typedef IMaterialEffectsUpdator::ICache ICache; - class Cache : public ICache - { - public: - virtual MaterialCacheType type() const override final - { - return ICache::DummyMaterialEffects; - } - }; - - virtual std::unique_ptr<ICache> getCache() const override{ - return std::make_unique<Cache>(); - } - - virtual std::unique_ptr<TrackParameters> update( - ICache& icache, - const TrackParameters* parm, - const Layer& sf, - PropDirection dir = alongMomentum, - ParticleHypothesis particle = pion, - MaterialUpdateMode matupmode = addNoise - ) const override { - (void)icache; - return update(parm, sf, dir, particle, matupmode); - } - - virtual std::unique_ptr<TrackParameters> update( - ICache& icache, - const TrackParameters* parm, - const MaterialEffectsOnTrack& meff, - Trk::ParticleHypothesis particle = pion, - MaterialUpdateMode matupmode = addNoise - ) const override { - (void)icache; - return update(parm, meff, particle, matupmode); - } - - virtual std::unique_ptr<TrackParameters> preUpdate( - ICache& icache, - const TrackParameters* parm, - const Layer& sf, - PropDirection dir = alongMomentum, - ParticleHypothesis particle = pion, - MaterialUpdateMode matupmode = addNoise - ) const override { - (void)icache; - return preUpdate(parm, sf, dir, particle, matupmode); - } - - virtual std::unique_ptr<TrackParameters> postUpdate( - ICache& icache, - const TrackParameters& parm, - const Layer& sf, - PropDirection dir = alongMomentum, - ParticleHypothesis particle = pion, - MaterialUpdateMode matupmode = addNoise - ) const override { - (void)icache; - return postUpdate(parm,sf,dir,particle,matupmode); - } - - virtual std::unique_ptr<TrackParameters> update( - ICache& icache, const TrackParameters& parm, - const MaterialProperties& mprop, - double pathcorrection, - PropDirection dir=alongMomentum, - ParticleHypothesis particle=pion, - MaterialUpdateMode matupmode=addNoise - ) const override { - (void) icache; - return update(parm,mprop,pathcorrection,dir,particle,matupmode); - } - - /** Validation Action: */ - virtual void validationAction(ICache& icache) const override { - (void) icache; - validationAction(); - } - - /** Model Action:*/ - virtual void modelAction(ICache& icache,const TrackParameters* parm=nullptr) const override{ - (void) icache; - modelAction(parm); - } - - - private: - - // ---------------- validation mode ------------------ - bool m_validationMode; //!< boolean switch for the validation mode - int m_validationDirectionSwitch; //!< jO switch for PropDirection - PropDirection m_validationDirection; //!< distinction between forward and backward validation - ToolHandle< IMaterialMapper > m_materialMapper; //!< the material mapper for recording the layer material - }; - -} // end of namespace - - -#endif // TRKEXTOOLS_DUMMYMATERIALEFFECTSUPDATOR_H - diff --git a/Tracking/TrkExtrapolation/TrkExTools/src/DummyMaterialEffectsUpdator.cxx b/Tracking/TrkExtrapolation/TrkExTools/src/DummyMaterialEffectsUpdator.cxx deleted file mode 100755 index 6d6ecf806df553d6f7983333903661ece305a4cc..0000000000000000000000000000000000000000 --- a/Tracking/TrkExtrapolation/TrkExTools/src/DummyMaterialEffectsUpdator.cxx +++ /dev/null @@ -1,227 +0,0 @@ -/* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration -*/ - -/////////////////////////////////////////////////////////////////// -// DummyMaterialEffectsUpdator.cxx, (c) ATLAS Detector software -/////////////////////////////////////////////////////////////////// - -// Trk include -#include "TrkExTools/DummyMaterialEffectsUpdator.h" -#include "TrkExInterfaces/IEnergyLossUpdator.h" -#include "TrkExInterfaces/IMultipleScatteringUpdator.h" -#include "TrkParameters/TrackParameters.h" -#include "TrkEventPrimitives/ParamDefs.h" -#include "TrkSurfaces/Surface.h" -#include "TrkGeometry/Layer.h" -#include "TrkGeometry/MaterialProperties.h" -#include "TrkGeometry/AssociatedMaterial.h" -#include "TrkGeometry/TrackingVolume.h" -#include "TrkDetDescrInterfaces/IMaterialMapper.h" - -// constructor -Trk::DummyMaterialEffectsUpdator::DummyMaterialEffectsUpdator(const std::string &t, const std::string &n, - const IInterface *p) : - AthAlgTool(t, n, p), - m_validationMode(false), - m_validationDirectionSwitch(1), - m_validationDirection(Trk::alongMomentum), - m_materialMapper("Trk::MaterialMapper"){ - declareInterface<IMaterialEffectsUpdator>(this); - declareProperty("ValidationMode", m_validationMode); - declareProperty("ValidationDirection", m_validationDirectionSwitch); - declareProperty("ValidationMaterialMapper", m_materialMapper); -} - -// destructor -Trk::DummyMaterialEffectsUpdator::~DummyMaterialEffectsUpdator() = default; - -// Athena standard methods -// initialize -StatusCode -Trk::DummyMaterialEffectsUpdator::initialize() { - if (m_materialMapper.retrieve().isFailure()) { - ATH_MSG_FATAL("Failed to retrieve tool " << m_materialMapper); - return StatusCode::FAILURE; - } - ATH_MSG_INFO("Retrieved tool " << m_materialMapper); - - - // set the validation switch - m_validationDirection = (m_validationDirectionSwitch == 1) ? Trk::alongMomentum : Trk::oppositeMomentum; - - ATH_MSG_INFO("initialize() successful"); - return StatusCode::SUCCESS; -} - -// finalize -StatusCode -Trk::DummyMaterialEffectsUpdator::finalize() { - ATH_MSG_INFO("finalize() successful"); - return StatusCode::SUCCESS; -} - -std::unique_ptr<Trk::TrackParameters> -Trk::DummyMaterialEffectsUpdator::update( - const TrackParameters *parm, - const Layer &lay, - PropDirection, - ParticleHypothesis, - MaterialUpdateMode -) const { - if (m_validationMode && parm) { - // get the numbers according - const Trk::TrackingVolume *tvol = lay.enclosingTrackingVolume(); - const Trk::MaterialProperties *mprop = lay.fullUpdateMaterialProperties(*parm); - - const Trk::MaterialProperties *updateProperties - = dynamic_cast<const Trk::MaterialProperties *>(mprop); - - if (tvol && updateProperties) { - double correctionFactor = fabs(lay.surfaceRepresentation().pathCorrection(parm->position(), parm->momentum())); - // material properties - double pathInX0 = updateProperties->thicknessInX0(); - double x0 = updateProperties->x0(); - double l0 = updateProperties->l0(); - double A = updateProperties->averageA(); - double Z = updateProperties->averageZ(); - double rho = updateProperties->averageRho(); - // correct - pathInX0 *= fabs(correctionFactor); - // create the extended material step - Trk::AssociatedMaterial assMatHit(parm->position(), - pathInX0, - x0, l0, A, Z, rho, - correctionFactor, - lay.enclosingTrackingVolume(), - &lay); - - // record it - m_materialMapper->recordMaterialHit(assMatHit, parm->momentum()); - }else { - ATH_MSG_WARNING("update() ... dynamic cast to MaterialProperties failed!"); - } - } - return std::unique_ptr<TrackParameters>(parm->clone()); -} - -std::unique_ptr<Trk::TrackParameters> -Trk::DummyMaterialEffectsUpdator::preUpdate( - const TrackParameters *parm, - const Layer &lay, - PropDirection dir, - ParticleHypothesis, - MaterialUpdateMode -) const { - if (m_validationMode && dir == m_validationDirection && parm) { - // get the numbers according - const Trk::TrackingVolume *tvol = lay.enclosingTrackingVolume(); - // the preFactor - double preFactor = lay.preUpdateMaterialFactor(*parm, dir); - // return if the preFactor is too small - if (preFactor < 0.1) { - return std::unique_ptr<TrackParameters>(parm->clone()); - } - - double correctionFactor = fabs(lay.surfaceRepresentation().pathCorrection(parm->position(), parm->momentum())); - /** surfaceValidation is never used - bool surfaceValidation = false; - **/ - // get the material properties - const Trk::MaterialProperties *updateProperties = lay.fullUpdateMaterialProperties(*parm); - - correctionFactor *= preFactor; - - if (tvol && updateProperties) { - // material properties - double pathInX0 = updateProperties->thicknessInX0(); - double x0 = updateProperties->x0(); - double l0 = updateProperties->l0(); - double A = updateProperties->averageA(); - double Z = updateProperties->averageZ(); - double rho = updateProperties->averageRho(); - // correct - pathInX0 *= fabs(correctionFactor) * preFactor; - // create the extended material step - Trk::AssociatedMaterial assMatHit(parm->position(), - pathInX0, - x0, l0, A, Z, rho, - correctionFactor, - lay.enclosingTrackingVolume(), - &lay); - // record it - m_materialMapper->recordMaterialHit(assMatHit, parm->momentum()); - // and if it was a reference material : the SurfaceValidation - /** sroe: surfaceValidation must be false at this point, so the following line is redundant **/ - // if (surfaceValidation) m_materialMapper->recordSurfaceHit(parm->localPosition(),assMatHit); - } else { - ATH_MSG_WARNING("preUpdate() ... dynamic cast to MaterialProperties failed!"); - } - } - return std::unique_ptr<TrackParameters>(parm->clone()); -} - -std::unique_ptr<Trk::TrackParameters> -Trk::DummyMaterialEffectsUpdator::postUpdate( - const TrackParameters &parm, - const Layer &lay, - PropDirection dir, - ParticleHypothesis, - MaterialUpdateMode -) const { - if (m_validationMode && dir == m_validationDirection) { - const Trk::TrackingVolume *tvol = lay.enclosingTrackingVolume(); - - // get the quantities - double postFactor = lay.postUpdateMaterialFactor(parm, dir); - - if (postFactor < 0.1) { - return nullptr; - } - - // the correction Factor to the layer - double correctionFactor = fabs(lay.surfaceRepresentation().pathCorrection(parm.position(), parm.momentum())); - // get the material properties - const Trk::MaterialProperties *updateProperties = lay.fullUpdateMaterialProperties(parm); - correctionFactor *= postFactor; - - if (tvol && updateProperties) { - // material properties - double pathInX0 = updateProperties->thicknessInX0(); - double x0 = updateProperties->x0(); - double l0 = updateProperties->l0(); - double A = updateProperties->averageA(); - double Z = updateProperties->averageZ(); - double rho = updateProperties->averageRho(); - // correct - pathInX0 *= fabs(correctionFactor); - // create the extended material step - Trk::AssociatedMaterial assMatHit(parm.position(), - pathInX0, - x0, l0, A, Z, rho, - correctionFactor, - lay.enclosingTrackingVolume(), - &lay); - // record it - m_materialMapper->recordMaterialHit(assMatHit, parm.momentum()); - }else { - ATH_MSG_WARNING("postUpdate() ... dynamic cast to MaterialProperties failed!"); - } - } - return std::unique_ptr<TrackParameters>(parm.clone()); -} - -// actual update method -std::unique_ptr<Trk::TrackParameters> -Trk::DummyMaterialEffectsUpdator::update( - const TrackParameters &parm, - const MaterialProperties &, - double, - PropDirection, - ParticleHypothesis, - MaterialUpdateMode -) const { - return std::unique_ptr<TrackParameters>(parm.clone()); -} - - diff --git a/Tracking/TrkExtrapolation/TrkExTools/src/components/TrkExTools_entries.cxx b/Tracking/TrkExtrapolation/TrkExTools/src/components/TrkExTools_entries.cxx index c31296adb1f4aad2f14436b42094e6b144fb7bf6..ecca772c41c908614d4bccf92485de7a0604098b 100644 --- a/Tracking/TrkExtrapolation/TrkExTools/src/components/TrkExTools_entries.cxx +++ b/Tracking/TrkExtrapolation/TrkExTools/src/components/TrkExTools_entries.cxx @@ -1,7 +1,6 @@ #include "TrkExTools/Extrapolator.h" #include "TrkExTools/Navigator.h" #include "TrkExTools/MaterialEffectsUpdator.h" -#include "TrkExTools/DummyMaterialEffectsUpdator.h" #include "TrkExTools/EnergyLossUpdator.h" #include "TrkExTools/MultipleScatteringUpdator.h" #include "TrkExTools/TimedExtrapolator.h" @@ -12,7 +11,6 @@ using namespace Trk; DECLARE_COMPONENT( Extrapolator ) DECLARE_COMPONENT( Navigator ) DECLARE_COMPONENT( MaterialEffectsUpdator ) -DECLARE_COMPONENT( DummyMaterialEffectsUpdator ) DECLARE_COMPONENT( EnergyLossUpdator ) DECLARE_COMPONENT( MultipleScatteringUpdator ) DECLARE_COMPONENT( NIMatEffUpdator ) diff --git a/Trigger/TrigAlgorithms/TrigFastTrackFinder/src/TrigFastTrackFinder.cxx b/Trigger/TrigAlgorithms/TrigFastTrackFinder/src/TrigFastTrackFinder.cxx index d708ef8f7fd28b88bda252c3efaeb89ef5ab1eb0..23057ee236b9490d30175d7c01439da6e01dedba 100644 --- a/Trigger/TrigAlgorithms/TrigFastTrackFinder/src/TrigFastTrackFinder.cxx +++ b/Trigger/TrigAlgorithms/TrigFastTrackFinder/src/TrigFastTrackFinder.cxx @@ -419,6 +419,7 @@ StatusCode TrigFastTrackFinder::execute(const EventContext& ctx) const { unsigned int origin_l1Id = originRoI.l1Id() ; unsigned int origin_roiWord = originRoI.roiWord(); internalRoI = TrigRoiDescriptor(origin_roiWord, origin_l1Id, origin_roiId, origin_eta, origin_etaMinus, origin_etaPlus, origin_phi, origin_phiMinus, origin_phiPlus, zVTX, new_zedMinus, new_zedPlus); + if (originRoI.isFullscan()) internalRoI.setFullscan(true); } else internalRoI = **roiCollection->begin(); // we have a more narrow zed range in RoI, no need to update. }else{ //Not converged, set to the fullScan RoI diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/python/TrigL2MuonSAConfig.py b/Trigger/TrigAlgorithms/TrigL2MuonSA/python/TrigL2MuonSAConfig.py index 34c3e1f6abdf58365cd8e5058e8b8d41fa881629..58fd8233a20605b51cde341652d05b949213202f 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/python/TrigL2MuonSAConfig.py +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/python/TrigL2MuonSAConfig.py @@ -10,6 +10,9 @@ from AthenaCommon.Logging import logging log = logging.getLogger('TrigL2MuonSAConfig') theStationFitter = MuonSA.TrigL2MuonSA__MuFastStationFitter(PtFromAlphaBeta = MuonSA.TrigL2MuonSA__PtFromAlphaBeta()) +from AtlasGeoModel.MuonGMJobProperties import MuonGeometryFlags +if not MuonGeometryFlags.hasSTGC() and not MuonGeometryFlags.hasMM(): + theStationFitter.NswStationFitter="" from TrigT1MuonRecRoiTool.TrigT1MuonRecRoiToolConf import LVL1__TrigT1RPCRecRoiTool trigRpcRoiTool = LVL1__TrigT1RPCRecRoiTool("RPCRecRoiTool", UseRun3Config=ConfigFlags.Trigger.enableL1MuonPhase1) @@ -21,7 +24,6 @@ theDataPreparator.TGCDataPreparator = MuonSA.TrigL2MuonSA__TgcDataPreparator() theDataPreparator.RpcRoadDefiner = MuonSA.TrigL2MuonSA__RpcRoadDefiner() theDataPreparator.TgcRoadDefiner = MuonSA.TrigL2MuonSA__TgcRoadDefiner() -from AtlasGeoModel.MuonGMJobProperties import MuonGeometryFlags if MuonGeometryFlags.hasSTGC(): theDataPreparator.STGCDataPreparator = MuonSA.TrigL2MuonSA__StgcDataPreparator() else: diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/python/TrigL2MuonSAConfig_newJO.py b/Trigger/TrigAlgorithms/TrigL2MuonSA/python/TrigL2MuonSAConfig_newJO.py index e004eeeccd0592e0792ad03ebbec8c76fec5b4ac..8ccac7a30743e61e6baa8c8256122bd94418207a 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/python/TrigL2MuonSAConfig_newJO.py +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/python/TrigL2MuonSAConfig_newJO.py @@ -201,6 +201,9 @@ def muFastSteeringCfg( flags, roisKey, setup="" ): MuCalStreamerTool = TrigL2MuonSA__MuCalStreamerTool() CscSegmentMaker = TrigL2MuonSA__CscSegmentMaker() + if not MuonGeometryFlags.hasSTGC() and not MuonGeometryFlags.hasMM(): + MuFastStationFitter.NswStationFitter="" + # Set Reco alg of muFast step #from TrigL2MuonSA.TrigL2MuonSAMonitoring import TrigL2MuonSAMonitoring MuFastSteering=CompFactory.MuFastSteering diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastStationFitter.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastStationFitter.cxx index 212e8ca1e8e4b644b85d64689695d5c426eafff2..b97f9be3e59ceee8973caf5c91dfa7457e93b3e7 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastStationFitter.cxx +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastStationFitter.cxx @@ -43,7 +43,7 @@ StatusCode TrigL2MuonSA::MuFastStationFitter::initialize() ATH_CHECK( m_ptFromAlphaBeta.retrieve() ); ATH_MSG_DEBUG("Retrieved service " << m_ptFromAlphaBeta); - ATH_CHECK( m_nswStationFitter.retrieve() ); + ATH_CHECK( m_nswStationFitter.retrieve(DisableTool{m_nswStationFitter.empty()}) ); return StatusCode::SUCCESS; } @@ -136,7 +136,8 @@ StatusCode TrigL2MuonSA::MuFastStationFitter::findSuperPointsSimple(const TrigRo ATH_CHECK( superPointFitter(itTrack) ); - ATH_CHECK( m_nswStationFitter->superPointFitter(p_roids, itTrack) ); + if(!m_nswStationFitter.empty()) + ATH_CHECK( m_nswStationFitter->superPointFitter(p_roids, itTrack) ); } // return StatusCode::SUCCESS; @@ -176,7 +177,8 @@ StatusCode TrigL2MuonSA::MuFastStationFitter::findSuperPoints(const TrigRoiDescr double aw = muonRoad.aw[3][0]; if(exInnerA !=0 ) updateInnSP(itTrack, exInnerA, aw,bw); - ATH_CHECK( m_nswStationFitter->superPointFitter(p_roids, itTrack) ); + if(!m_nswStationFitter.empty()) + ATH_CHECK( m_nswStationFitter->superPointFitter(p_roids, itTrack) ); } // diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/NswStationFitter.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/NswStationFitter.cxx index fd9b432f04f7223cce3d8faddad24ff5cba34c03..f566d5a98734e1a63906d066a22c88d3d54ee01d 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/NswStationFitter.cxx +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/NswStationFitter.cxx @@ -232,7 +232,7 @@ StatusCode TrigL2MuonSA::NswStationFitter::calcWeightedSumHit(TrigL2MuonSA::Trac StatusCode TrigL2MuonSA::NswStationFitter::findStgcHitsInSegment(TrigL2MuonSA::StgcHits& stgcHits) const { if(stgcHits.size() < 9) { - ATH_MSG_WARNING("Number of STGC hits is too small, at least 9 hits required : "<<stgcHits.size()<<" hits"); + ATH_MSG_INFO("Number of STGC hits is too small, at least 9 hits required : "<<stgcHits.size()<<" hits"); return StatusCode::SUCCESS; } else if(stgcHits.size() > 100) { ATH_MSG_WARNING("Number of STGC hits is too large, at most (2^16 - 1) hits allowed : "<<stgcHits.size()<<" hits"); @@ -1019,7 +1019,7 @@ StatusCode TrigL2MuonSA::NswStationFitter::calcMergedHit(TrigL2MuonSA::TrackPatt StatusCode TrigL2MuonSA::NswStationFitter::findMmHitsInSegment(TrigL2MuonSA::MmHits& mmHits) const { if(mmHits.size() < 6) { - ATH_MSG_WARNING("Number of MM hits is too small, at least 6 hits required : "<<mmHits.size()<<" hits"); + ATH_MSG_INFO("Number of MM hits is too small, at least 6 hits required : "<<mmHits.size()<<" hits"); return StatusCode::SUCCESS; } else if(mmHits.size() > 100) { ATH_MSG_WARNING("Number of MM hits is too large, at most (2^16 - 1) hits allowed : "<<mmHits.size()<<" hits"); diff --git a/Trigger/TrigAlgorithms/TrigT2BeamSpot/python/T2VertexBeamSpotConfig.py b/Trigger/TrigAlgorithms/TrigT2BeamSpot/python/T2VertexBeamSpotConfig.py index 457a087203eaf71b11733ef95fa31818a6b896c7..2d4655e8ee4ec3a1fd704163a65890641dbced3c 100644 --- a/Trigger/TrigAlgorithms/TrigT2BeamSpot/python/T2VertexBeamSpotConfig.py +++ b/Trigger/TrigAlgorithms/TrigT2BeamSpot/python/T2VertexBeamSpotConfig.py @@ -19,7 +19,7 @@ bsAlgMonitoring = T2VertexBeamSpotMonitoring() # track filter tool used by vertex tool trackFilterForVertex = PESA__T2BSTrackFilterTool( name = "TrackFilterVtx", - MonTool = filtermon, + MonTool = filtermon(), TrackMinPt = 0.5, # Minimum track pT to be considered for vertexing TrackMaxEta = 2.5, # Maximum absolute value of eta TrackMaxZ0 = 200.0, # Maximum track Z0 to be considered for vertexing @@ -42,7 +42,7 @@ trackFilterForVertex = PESA__T2BSTrackFilterTool( # track filter tool used by track tool trackFilterForTrack = PESA__T2BSTrackFilterTool( name = "TrackFilterTrk", - MonTool = filtermon, + MonTool = filtermon(), TrackMinPt = 0.5, # Minimum track pT to be considered for vertexing TrackMaxEta = 2.5, # Maximum absolute value of eta TrackMaxZ0 = 200.0, # Maximum track Z0 to be considered for vertexing @@ -65,7 +65,7 @@ trackFilterForTrack = PESA__T2BSTrackFilterTool( #TODO: create an instance which can be called and adjusted InDetTrigMTBeamSpotTool = PESA__T2VertexBeamSpotTool( name = "T2VertexBeamSpotTool", - MonTool = bsToolMonitoring, + MonTool = bsToolMonitoring(), TrackFilter = trackFilterForVertex, PrimaryVertexFitter = primaryVertexFitter, @@ -93,7 +93,7 @@ InDetTrigMTBeamSpotTool = PESA__T2VertexBeamSpotTool( InDetTrigMTTrackBeamSpotTool = PESA__T2TrackBeamSpotTool( name = "T2TrackBeamSpotTool", TrackFilter = trackFilterForTrack, - MonTool = trackBSmon, + MonTool = trackBSmon(), doLeastSquares = True, doLogLikelihood = True, beamSizeLS = 0.01, # Approximate beam size, mm @@ -106,7 +106,7 @@ class T2VertexBeamSpot_Fex ( PESA__T2VertexBeamSpot ) : self.doTrackBeamSpot = True # run track-based calibration tool self.TrackBeamSpotTool = InDetTrigMTTrackBeamSpotTool self.BeamSpotTool = InDetTrigMTBeamSpotTool - self.MonTool = bsAlgMonitoring + self.MonTool = bsAlgMonitoring() # Setup for relaxed cuts at 900 GeV LHC center-of-mass class T2VertexBeamSpot_loose ( T2VertexBeamSpot_Fex ) : diff --git a/Trigger/TrigAlgorithms/TrigT2BeamSpot/python/T2VertexBeamSpotMonitoring.py b/Trigger/TrigAlgorithms/TrigT2BeamSpot/python/T2VertexBeamSpotMonitoring.py index 37c3f72ceeeca099650af6f819f1a999fa2cf712..bca834c78b3f911897c205dfaefa15c335a519e7 100644 --- a/Trigger/TrigAlgorithms/TrigT2BeamSpot/python/T2VertexBeamSpotMonitoring.py +++ b/Trigger/TrigAlgorithms/TrigT2BeamSpot/python/T2VertexBeamSpotMonitoring.py @@ -1,18 +1,25 @@ -# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration -from AthenaMonitoringKernel.GenericMonitoringTool import GenericMonitoringTool +from AthenaMonitoringKernel.GenericMonitoringTool import GenericMonitoringTool, defineHistogram -class BaseMonitoringTool(GenericMonitoringTool): +class BaseMonitoringTool: """Base class which defines few useful methods to cope with defineHistogram madness. """ + def __init__(self, name): + self.name = name + self.histograms = [] + + def __call__(self): + """Creates the actual monitoring tool instance""" + return GenericMonitoringTool(self.name, Histograms = self.histograms) def makeHisto1D(self, name, type, xbins, xmin, xmax, title, path='EXPERT', opt=None, **kw): - self.defineHistogram( + self.histograms += [defineHistogram( name, path=path, type=type, title=title, opt=opt, xbins=xbins, xmin=xmin, xmax=xmax, **kw - ) + )] def makeLBNHisto1D(self, name, type, xbins, xmin, xmax, title, path='EXPERT', opt="", **kw): opt = "kLBNHistoryDepth=1 " + opt if opt else "kLBNHistoryDepth=1" @@ -23,12 +30,12 @@ class BaseMonitoringTool(GenericMonitoringTool): def makeHisto2D(self, nameX, nameY, type, xbins, xmin, xmax, ybins, ymin, ymax, title, path='EXPERT', opt=None, **kw): name = ", ".join([nameX, nameY]) - self.defineHistogram( + self.histograms += [defineHistogram( name, path=path, type=type, title=title, opt=opt, xbins=xbins, xmin=xmin, xmax=xmax, ybins=ybins, ymin=ymin, ymax=ymax, **kw - ) + )] def makeLBNHisto2D(self, nameX, nameY, type, xbins, xmin, xmax, ybins, ymin, ymax, title, path='EXPERT', opt="", **kw): @@ -40,10 +47,10 @@ class BaseMonitoringTool(GenericMonitoringTool): def makeProfile(self, nameX, nameY, xbins, xmin, xmax, title, path='EXPERT', opt=None, **kw): name = ", ".join([nameX, nameY]) - self.defineHistogram( + self.histograms += [defineHistogram( name, path=path, type="TProfile", title=title, opt=opt, xbins=xbins, xmin=xmin, xmax=xmax, **kw, - ) + )] def makeLBNProfile(self, nameX, nameY, xbins, xmin, xmax, title, path='EXPERT', opt="", **kw): opt = "kLBNHistoryDepth=1 " + opt if opt else "kLBNHistoryDepth=1" diff --git a/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/ChainGroup.icc b/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/ChainGroup.icc index cf496ab7c5d496156917b1c932dd2bc491690ad5..8fdd463940ae166c0e45028931f2e6295a62d78f 100644 --- a/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/ChainGroup.icc +++ b/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/ChainGroup.icc @@ -107,7 +107,7 @@ std::vector< TrigCompositeUtils::LinkInfo<CONTAINER> > Trig::ChainGroup::feature // Obtain navigation routes for objects which fail if (condition == TrigDefs::includeFailedDecisions) { std::vector<const TrigCompositeUtils::Decision*> rejectedDecisionNodes = - TrigCompositeUtils::getRejectedDecisionNodes(eventStore, thisChainIDs); + TrigCompositeUtils::getRejectedDecisionNodes(eventStore, HLTSummaryKeyIn.key(), thisChainIDs); ATH_MSG_DEBUG("Chain " << chainID << " has " << rejectedDecisionNodes.size() << " dangling nodes in the graph from objects which were rejected."); diff --git a/Trigger/TrigAnalysis/TrigNavSlimmingMT/src/TrigNavSlimmingMTAlg.cxx b/Trigger/TrigAnalysis/TrigNavSlimmingMT/src/TrigNavSlimmingMTAlg.cxx index a209a1418a7a0e4af4ff82b97998491f1878ad4e..7a73963b8595fb4bb74dd051a2cf9d2c0722d5fe 100644 --- a/Trigger/TrigAnalysis/TrigNavSlimmingMT/src/TrigNavSlimmingMTAlg.cxx +++ b/Trigger/TrigAnalysis/TrigNavSlimmingMT/src/TrigNavSlimmingMTAlg.cxx @@ -84,9 +84,10 @@ StatusCode TrigNavSlimmingMTAlg::execute(const EventContext& ctx) const { // These branches do not connect to the terminusNode, so we have to go hunting them explicitly. // We need to pass in the evtStore as these nodes can be spread out over numerous collections. // Like with the terminus node, we can restrict this search to only nodes which were rejected by certain chains. - // We also want to restrict the search to exclue the output collections of any other TrigNavSlimminMTAlg instances.\\s + // We also want to restrict the search to exclue the output collections of any other TrigNavSlimminMTAlg instances + // and let the function know what the primary input collecion is - from the name of this we can tell if we need to search one or many containers. if (m_keepFailedBranches) { - std::vector<const Decision*> rejectedNodes = TrigCompositeUtils::getRejectedDecisionNodes(&*evtStore(), chainIDs, m_allOutputContainersSet); + std::vector<const Decision*> rejectedNodes = TrigCompositeUtils::getRejectedDecisionNodes(&*evtStore(), m_primaryInputCollection.key(), chainIDs, m_allOutputContainersSet); for (const Decision* rejectedNode : rejectedNodes) { // We do *not* enfoce that a member of chainIDs must be present in the starting node (rejectedNode) // specifically because we know that at least one of chainIDs was _rejected_ here, but is active in the rejected diff --git a/Trigger/TrigConfiguration/TrigConfMuctpi/python/XMLReader.py b/Trigger/TrigConfiguration/TrigConfMuctpi/python/XMLReader.py index 9e3377fb170677c75e5048fd0224dbdba1069ea4..f46d70109881d4e1d667bbe0ae27cc8b9e7c45b8 100644 --- a/Trigger/TrigConfiguration/TrigConfMuctpi/python/XMLReader.py +++ b/Trigger/TrigConfiguration/TrigConfMuctpi/python/XMLReader.py @@ -2,7 +2,7 @@ import xml.etree.cElementTree as ET -from PyUtils.Decorators import memoize +from functools import cache class TrigXMLElement: def __init__(self,element): @@ -60,7 +60,7 @@ class MioctGeometryXMLReader(TrigXMLDocumentReader): def getMIOCTs(self): return self.MuCTPiGeometry.MIOCTs - @memoize + @cache def getMIOCT(self, id): for mioct in self.MuCTPiGeometry.MIOCTs: if int(mioct["id"]) == id: diff --git a/Trigger/TrigConfiguration/TrigConfigSvc/python/TrigConfigSvcCfg.py b/Trigger/TrigConfiguration/TrigConfigSvc/python/TrigConfigSvcCfg.py index 8d5f41f3166155d8153624b77f0924634d978d4b..869c74d6af5751e7a58dcf3b3c50bcc4e2370976 100644 --- a/Trigger/TrigConfiguration/TrigConfigSvc/python/TrigConfigSvcCfg.py +++ b/Trigger/TrigConfiguration/TrigConfigSvc/python/TrigConfigSvcCfg.py @@ -6,12 +6,22 @@ from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from AthenaConfiguration.AccumulatorCache import AccumulatorCache from collections import OrderedDict as odict -from functools import lru_cache +from functools import cache import json log = logging.getLogger('TrigConfigSvcCfg') -@lru_cache(maxsize=None) +# To avoid accidental overrwrite of the L1 JSON menu, only allow one L1 menu generation. +# Either via JSON conversion from Run-1&2 or native Run-3 (see ATR-24531). +def l1menu_generated(): + try: + return l1menu_generated._hasRun + except AttributeError: + l1menu_generated._hasRun = True + return False + + +@cache def getTrigConfFromCool(runNumber, lumiBlock): from TrigConfStorage.TriggerCoolUtil import TriggerCoolUtil db = TriggerCoolUtil.GetConnection('CONDBR2' if runNumber > 230000 else 'COMP200') @@ -47,11 +57,15 @@ def getTrigConfFromCool(runNumber, lumiBlock): return d -@lru_cache(maxsize=None) +@cache def createJsonMenuFiles(run, lb): """Retrieve Run-2 trigger configuration from the DB and save as Run3 .JSON files""" import subprocess + if l1menu_generated(): + log.error("L1 menu has already been generated") + return None + log.info("Configuring Run-1&2 to Run-3 configuration metadata conversion") triggerDBKeys = getTrigConfFromCool(run, lb) triggerDBKeys['DB'] = 'TRIGGERDB' if run > 230000 else 'TRIGGERDB_RUN1' @@ -176,6 +190,10 @@ def createL1PrescalesFileFromMenu( flags ): # L1 menu generation def generateL1Menu( flags ): + if l1menu_generated(): + log.error("L1 menu has already been generated") + return + log.info("Generating L1 menu %s", flags.Trigger.triggerMenuSetup) from TriggerMenuMT.L1.L1MenuConfig import L1MenuConfig l1cfg = L1MenuConfig(menuName = flags.Trigger.triggerMenuSetup) @@ -321,6 +339,10 @@ if __name__ == "__main__": class Tests(unittest.TestCase): + def setUp(self): + # Allow multiple L1 menu generations for these tests + l1menu_generated._hasRun = False + def test_currentMenu(self): from AthenaConfiguration.AllConfigFlags import _createCfgFlags ConfigFlags = _createCfgFlags() diff --git a/Trigger/TrigCost/TrigCostAnalysis/share/RunTrigCostAnalysis.py b/Trigger/TrigCost/TrigCostAnalysis/share/RunTrigCostAnalysis.py index 3ba5575977dc4af9306ea5844a2e00d4817d7726..2a9e1d27e854ed40b3e5e2556a7af870e9380ad2 100755 --- a/Trigger/TrigCost/TrigCostAnalysis/share/RunTrigCostAnalysis.py +++ b/Trigger/TrigCost/TrigCostAnalysis/share/RunTrigCostAnalysis.py @@ -45,7 +45,6 @@ def trigCostAnalysisCfg(flags, args, isMC=False): trigCostAnalysis.UseSingleTimeRange = isMC or args.useEBWeights trigCostAnalysis.ROSToROBMap = ROSToROBMap().get_mapping() trigCostAnalysis.DoMonitorChainAlgorithm = args.monitorChainAlgorithm - trigCostAnalysis.DoMonitorThreadOccupancy = args.monitorThreads trigCostAnalysis.CostMetadataWriteHandleKey = "HLT_RuntimeMetadata" if args.oksMetadata else "" trigCostAnalysis.AdditionalHashList = readHashes(args.joFile, args.smk, args.dbAlias) @@ -196,7 +195,6 @@ if __name__=='__main__': parser.add_argument('--outputHist', type=str, default='TrigCostRoot_Results.root', help='Histogram output ROOT file') parser.add_argument('--oksMetadata', action='store_true', help='Retrieve additional metadata from OKS for Cost CPU studies') parser.add_argument('--monitorChainAlgorithm', action='store_true', help='Turn on Chain Algorithm monitoring') - parser.add_argument('--monitorThreads', action='store_true', help='Turn on Thread Occupancy monitoring. Should only be used with TrigCostSvc.EnableMultiSlot=true') parser.add_argument('--baseWeight', type=float, default=1.0, help='Base events weight') parser.add_argument('--useEBWeights', type=bool, default=False, help='Apply Enhanced Bias weights') parser.add_argument('--joFile', type=str, help='Optional HLTJobOptions file to add more hashes') diff --git a/Trigger/TrigCost/TrigCostAnalysis/src/MonitorBase.cxx b/Trigger/TrigCost/TrigCostAnalysis/src/MonitorBase.cxx index dfa71116c004931140aa70d450fa0f6c1789893b..a02579924bfcf90a07e00e6a30d1e3eb3a824195 100644 --- a/Trigger/TrigCost/TrigCostAnalysis/src/MonitorBase.cxx +++ b/Trigger/TrigCost/TrigCostAnalysis/src/MonitorBase.cxx @@ -6,10 +6,13 @@ #include "MonitorBase.h" #include "CounterBase.h" +#include "AthenaKernel/getMessageSvc.h" + MonitorBase::MonitorBase(const std::string& name, const MonitoredRange* parent) : m_msgStream(nullptr, name.c_str()), m_name(name), m_parent(parent) { + m_msgStream.setMsgSvc(Athena::getMessageSvc()); } @@ -60,4 +63,12 @@ CounterBase* MonitorBase::getCounter(const std::string& name) { MsgStream& MonitorBase::msg() { return m_msgStream; +} + +MsgStream& MonitorBase::msg(const MSG::Level lvl) { + return m_msgStream << lvl; +} + +bool MonitorBase::msgLvl(const MSG::Level lvl){ + return lvl >= m_msgStream.level(); } \ No newline at end of file diff --git a/Trigger/TrigCost/TrigCostAnalysis/src/MonitorBase.h b/Trigger/TrigCost/TrigCostAnalysis/src/MonitorBase.h index 2471d18da0c176147ada96c3df215d238c8b0329..99c55393f15f2e767ca6a56050b7a8868e3a3697 100644 --- a/Trigger/TrigCost/TrigCostAnalysis/src/MonitorBase.h +++ b/Trigger/TrigCost/TrigCostAnalysis/src/MonitorBase.h @@ -111,6 +111,20 @@ class MonitorBase{ */ MsgStream& msg(); + /** + * @brief Logging on a given level + * @param[in] lvl Verbosity level + * @return Message stream reference. + */ + MsgStream& msg(const MSG::Level lvl); + + /** + * @brief Returns if requested level is same or higher than logging level + * @param[in] lvl Verbosity level + * @return If requested level is same or higher than logging level + */ + bool msgLvl(const MSG::Level lvl); + protected: /** diff --git a/Trigger/TrigCost/TrigCostAnalysis/src/TrigCostAnalysis.cxx b/Trigger/TrigCost/TrigCostAnalysis/src/TrigCostAnalysis.cxx index 41385d36c3fe6e7592df5bf2cbd713aa33000a63..ca51845022e9fb0158fe09aacf4671446178529d 100644 --- a/Trigger/TrigCost/TrigCostAnalysis/src/TrigCostAnalysis.cxx +++ b/Trigger/TrigCost/TrigCostAnalysis/src/TrigCostAnalysis.cxx @@ -327,17 +327,23 @@ StatusCode TrigCostAnalysis::registerMonitors(MonitoredRange* range) { } if (m_doMonitorChain) { ATH_CHECK( range->addMonitor(std::make_unique<MonitorChain>("Chain_HLT", range)) ); - ATH_MSG_INFO("Registering Chain_HLT Monitor for range " << range->getName() << ". Size:" << range->getMonitors().size()); + ATH_MSG_DEBUG("Registering Chain_HLT Monitor for range " << range->getName() << ". Size:" << range->getMonitors().size()); } if (m_doMonitorChainAlgorithm) { ATH_CHECK( range->addMonitor(std::make_unique<MonitorChainAlgorithm>("Chain_Algorithm_HLT", range)) ); - ATH_MSG_INFO("Registering Chain_Algorihtm_HLT Monitor for range " << range->getName() << ". Size:" << range->getMonitors().size()); + ATH_MSG_DEBUG("Registering Chain_Algorihtm_HLT Monitor for range " << range->getName() << ". Size:" << range->getMonitors().size()); } if (m_doMonitorSequence) { ATH_CHECK( range->addMonitor(std::make_unique<MonitorSequence>("Sequence_HLT", range)) ); - ATH_MSG_INFO("Registering Sequence_HLT Monitor for range " << range->getName() << ". Size:" << range->getMonitors().size()); + ATH_MSG_DEBUG("Registering Sequence_HLT Monitor for range " << range->getName() << ". Size:" << range->getMonitors().size()); } // if (m_do...) {} + + // Set the verbosity for the monitors + for (const std::unique_ptr<MonitorBase>& monitor : range->getMonitors()){ + monitor->msg().setLevel(msg().level()); + } + return StatusCode::SUCCESS; } diff --git a/Trigger/TrigCost/TrigCostAnalysis/src/TrigCostAnalysis.h b/Trigger/TrigCost/TrigCostAnalysis/src/TrigCostAnalysis.h index affee7a258821a05481a0c3f649bd9e05fcd8f98..8f123fb1692b50603d830ce7f1360a1bb9583bbb 100644 --- a/Trigger/TrigCost/TrigCostAnalysis/src/TrigCostAnalysis.h +++ b/Trigger/TrigCost/TrigCostAnalysis/src/TrigCostAnalysis.h @@ -103,7 +103,7 @@ class TrigCostAnalysis: public ::AthAlgorithm { Gaudi::Property<bool> m_doMonitorGlobal { this, "DoMonitorGlobal", true, "Monitor global event properties" }; - Gaudi::Property<bool> m_doMonitorThreadOccupancy { this, "DoMonitorThreadOccupancy", false, + Gaudi::Property<bool> m_doMonitorThreadOccupancy { this, "DoMonitorThreadOccupancy", true, "Monitor algorithm occupancy load of individual threads in an MT execution environment" }; Gaudi::Property<bool> m_doMonitorROS { this, "DoMonitorROS", true, diff --git a/Trigger/TrigCost/TrigCostAnalysis/src/monitors/MonitorROS.cxx b/Trigger/TrigCost/TrigCostAnalysis/src/monitors/MonitorROS.cxx index fed64ed406efaf42449d9bdd59f27a803ce4192e..e24b0569b8ebd7125be14dd1d585c360488238f8 100644 --- a/Trigger/TrigCost/TrigCostAnalysis/src/monitors/MonitorROS.cxx +++ b/Trigger/TrigCost/TrigCostAnalysis/src/monitors/MonitorROS.cxx @@ -24,13 +24,17 @@ StatusCode MonitorROS::newEvent(const CostData& data, const float weight) { } } + if (data.rosCollection().empty()){ + ATH_MSG_DEBUG("The ROS collection is empty!"); + } + for (const xAOD::TrigComposite* tc : data.rosCollection()) { auto robIds = tc->getDetail<std::vector<uint32_t>>("robs_id"); // Create set of unique ROS for this request std::set<std::string> rosPerRequest; for (uint32_t robId : robIds) { if (!m_robToRos.count(robId)){ - msg() << MSG::WARNING << "ROS for ROB 0x" << std::hex << robId << " is missing" << endmsg; + ATH_MSG_WARNING("ROS for ROB 0x" << std::hex << robId << " is missing"); continue; } rosPerRequest.insert(m_robToRos.at(robId)); diff --git a/Trigger/TrigCost/TrigCostAnalysis/src/monitors/MonitorThreadOccupancy.cxx b/Trigger/TrigCost/TrigCostAnalysis/src/monitors/MonitorThreadOccupancy.cxx index 3d41ef052d84b6a4eb6e418743fab5cb2d450d19..6cfadb69584a821771791f9d752df23927b35d18 100644 --- a/Trigger/TrigCost/TrigCostAnalysis/src/monitors/MonitorThreadOccupancy.cxx +++ b/Trigger/TrigCost/TrigCostAnalysis/src/monitors/MonitorThreadOccupancy.cxx @@ -12,12 +12,26 @@ MonitorThreadOccupancy::MonitorThreadOccupancy(const std::string& name, const Mo StatusCode MonitorThreadOccupancy::newEvent(const CostData& data, const float weight) { - // Only look at events in the master slot if (not data.isMasterSlot()) { return StatusCode::SUCCESS; } + // Check if we ran with EnableMultiSlot=true - in the master slot (online slot) there are algorithms executed on different slot + bool isMultiSlot = false; + for (const xAOD::TrigComposite* tc : data.costCollection()) { + const uint32_t slot = tc->getDetail<uint32_t>("slot"); + if (slot != data.onlineSlot()){ + isMultiSlot = true; + break; + } + } + + if (!isMultiSlot){ + ATH_MSG_DEBUG("Saving data from multiple slots to master slot was not enabled - ThreadOccupancy Monitoring won't be executed"); + return StatusCode::SUCCESS; + } + for (const xAOD::TrigComposite* tc : data.costCollection()) { const uint32_t threadID = tc->getDetail<uint32_t>("thread"); if (m_threadToCounterMap.count(threadID) == 0) { diff --git a/Trigger/TrigHypothesis/TrigCaloHypo/CMakeLists.txt b/Trigger/TrigHypothesis/TrigCaloHypo/CMakeLists.txt index 25fc0e964d41137fb00100894dd30d0a9e49d6de..cb56f21452df15bd0b4fe8319800d8bee4e58902 100644 --- a/Trigger/TrigHypothesis/TrigCaloHypo/CMakeLists.txt +++ b/Trigger/TrigHypothesis/TrigCaloHypo/CMakeLists.txt @@ -16,3 +16,8 @@ atlas_add_component( TrigCaloHypo # Install files from the package: atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} --extend-extensions=ATL900,ATL901 ) + +# Install IS schema files: +atlas_install_generic( schema/Larg.LArNoiseBurstCandidates.is.schema.xml + DESTINATION share/schema +) diff --git a/Trigger/TrigHypothesis/TrigCaloHypo/schema/Larg.LArNoiseBurstCandidates.is.schema.xml b/Trigger/TrigHypothesis/TrigCaloHypo/schema/Larg.LArNoiseBurstCandidates.is.schema.xml new file mode 100644 index 0000000000000000000000000000000000000000..eb5b3aafc02fd81c166109a3dd5ec8d202db701e --- /dev/null +++ b/Trigger/TrigHypothesis/TrigCaloHypo/schema/Larg.LArNoiseBurstCandidates.is.schema.xml @@ -0,0 +1,96 @@ +<?xml version="1.0" encoding="ASCII"?> + +<!-- oks-schema version 2.0 --> + + +<!DOCTYPE oks-schema [ + <!ELEMENT oks-schema (info, (include)?, (comments)?, (class)+)> + <!ELEMENT info EMPTY> + <!ATTLIST info + name CDATA #REQUIRED + type CDATA #REQUIRED + num-of-items CDATA #REQUIRED + oks-format CDATA #FIXED "schema" + oks-version CDATA #REQUIRED + created-by CDATA #REQUIRED + created-on CDATA #REQUIRED + creation-time CDATA #REQUIRED + last-modified-by CDATA #REQUIRED + last-modified-on CDATA #REQUIRED + last-modification-time CDATA #REQUIRED + > + <!ELEMENT include (file)+> + <!ELEMENT file EMPTY> + <!ATTLIST file + path CDATA #REQUIRED + > + <!ELEMENT comments (comment)+> + <!ELEMENT comment EMPTY> + <!ATTLIST comment + creation-time CDATA #REQUIRED + created-by CDATA #REQUIRED + created-on CDATA #REQUIRED + author CDATA #REQUIRED + text CDATA #REQUIRED + > + <!ELEMENT class (superclass | attribute | relationship | method)*> + <!ATTLIST class + name CDATA #REQUIRED + description CDATA "" + is-abstract (yes|no) "no" + > + <!ELEMENT superclass EMPTY> + <!ATTLIST superclass name CDATA #REQUIRED> + <!ELEMENT attribute EMPTY> + <!ATTLIST attribute + name CDATA #REQUIRED + description CDATA "" + type (bool|s8|u8|s16|u16|s32|u32|s64|u64|float|double|date|time|string|uid|enum|class) #REQUIRED + range CDATA "" + format (dec|hex|oct) "dec" + is-multi-value (yes|no) "no" + multi-value-implementation (list|vector) "list" + init-value CDATA "" + is-not-null (yes|no) "no" + > + <!ELEMENT relationship EMPTY> + <!ATTLIST relationship + name CDATA #REQUIRED + description CDATA "" + class-type CDATA #REQUIRED + low-cc (zero|one) #REQUIRED + high-cc (one|many) #REQUIRED + is-composite (yes|no) #REQUIRED + is-exclusive (yes|no) #REQUIRED + is-dependent (yes|no) #REQUIRED + multi-value-implementation (list|vector) "list" + > + <!ELEMENT method (method-implementation*)> + <!ATTLIST method + name CDATA #REQUIRED + description CDATA "" + > + <!ELEMENT method-implementation EMPTY> + <!ATTLIST method-implementation + language CDATA #REQUIRED + prototype CDATA #REQUIRED + body CDATA "" + > +]> + +<oks-schema> + +<info name="" type="" num-of-items="1" oks-format="schema" oks-version="oks-06-07-02 built "Jul 14 2014"" created-by="wlampl" created-on="pcaz004.cern.ch" creation-time="20141114T094813" last-modified-by="wlampl" last-modified-on="pcaz004.cern.ch" last-modification-time="20141117T134615"/> + + <include> + <file path="is/is.xml"/> + </include> + + <class name="LArNoiseBurstCandidates"> + <superclass name="Info"/> + <attribute name="TimeStamp" description="Time stamps of noise-burst canidates" type="u32" is-multi-value="yes"/> + <attribute name="Flag" description="Flag describing a noise-burst candidate" type="u8" is-multi-value="yes"/> + <attribute name="TimeStamp_ns" description="time stamp of noise burst candidate (nanoseconds offset)" type="u32" is-multi-value="yes"/> + </class> + +</oks-schema> diff --git a/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigMuonTLAHypoAlg.cxx b/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigMuonTLAHypoAlg.cxx index 21edba55afd04c6c39063c67876c79c84e63d773..0238a8a9e49266504d44ed7537828cecb00484f2 100644 --- a/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigMuonTLAHypoAlg.cxx +++ b/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigMuonTLAHypoAlg.cxx @@ -75,8 +75,7 @@ StatusCode TrigMuonTLAHypoAlg::execute(const EventContext &ctx) const // now go on with the normal Hypo, linking new decision with previous one auto newDecision = newDecisionIn( outputDecisions, hypoAlgNodeName() ); TrigCompositeUtils::linkToPrevious( newDecision, previousDecision, ctx ); - // do we need to re-link the feature? - //newDecision->setObjectLink(featureString(), prevMuons); + newDecision->setObjectLink(featureString(), ElementLink<xAOD::MuonContainer>(*h_TLAMuons, h_TLAMuons->size()-1, ctx)); HypoInputs.push_back( std::make_pair(newDecision, previousDecision) ); nDecision++; diff --git a/Trigger/TrigMonitoring/TrigEgammaMonitoring/python/TrigEgammaMonitoringMTConfig.py b/Trigger/TrigMonitoring/TrigEgammaMonitoring/python/TrigEgammaMonitoringMTConfig.py index 3bfe8da5815a5fdc22178e06da28074819c3094d..807240b516291d2eee5e746923951cb6d30662f5 100644 --- a/Trigger/TrigMonitoring/TrigEgammaMonitoring/python/TrigEgammaMonitoringMTConfig.py +++ b/Trigger/TrigMonitoring/TrigEgammaMonitoring/python/TrigEgammaMonitoringMTConfig.py @@ -668,8 +668,6 @@ class TrigEgammaMonAlgBuilder: self.basePath+'/'+trigger+'/Distributions/' + (level if online else "Offline") ) - self.addHistogram(monGroup, TH1F("ethad", "ethad; ethad ; Count", 20, -1, 1)) - self.addHistogram(monGroup, TH1F("ethad1", "ethad1; ethad1 ; Count", 20, -1, 1)) self.addHistogram(monGroup, TH1F("Rhad", "Rhad; Rhad ; Count", 35, -0.3, 0.3)) self.addHistogram(monGroup, TH1F("Rhad1", "Rhad1; Rhad1 ; Count", 30, -0.3, 0.3)) self.addHistogram(monGroup, TH1F("Reta", "Reta; Reta ; Count", 15, 0.4, 1.2)) @@ -680,7 +678,7 @@ class TrigEgammaMonAlgBuilder: self.addHistogram(monGroup, TH1F("f3", "f3; f3 ; Count", 21, -0.05, 0.1)) self.addHistogram(monGroup, TH1F("eratio","eratio; eratio; Count",20, 0, 2)) self.addHistogram(monGroup, TH1F("et", "ET; ET [GeV] ; Count", 100, 0., 100.)) - self.addHistogram(monGroup, TH1F("highet", "Offline E_{T}; E_{T} [GeV] ; Count", 100, 0., 2000.)) + self.addHistogram(monGroup, TH1F("highet", "Offline E_{T}; E_{T} [GeV] ; Count", 100, 0., 500.)) self.addHistogram(monGroup, TH1F("eta", "eta; eta ; Count", self._nEtabins, self._etabins)) self.addHistogram(monGroup, TH1F("phi", "phi; phi ; Count", 20, -3.2, 3.2)) self.addHistogram(monGroup, TH1F("topoetcone20", "topoetcone20; topoetcone20 [GeV] ; Count", 100, -10.0, 10.0)) @@ -739,7 +737,7 @@ class TrigEgammaMonAlgBuilder: # Numerator self.addHistogram(monGroup, TH1F("match_pt", "Trigger Matched Offline p_{T}; p_{T} [GeV] ; Count", self._nEtbins, self._etbins)) self.addHistogram(monGroup, TH1F("match_et", "Trigger Matched Offline E_{T}; E_{T} [GeV]; Count", self._nEtbins, self._etbins)) - self.addHistogram(monGroup, TH1F("match_highet", "Trigger Matched Offline E_{T}; E_{T} [GeV]; Count", 40, 0., 1000.)) + self.addHistogram(monGroup, TH1F("match_highet", "Trigger Matched Offline E_{T}; E_{T} [GeV]; Count", 40, 0., 500.)) self.addHistogram(monGroup, TH1F("match_eta", "Trigger Matched Offline #eta; #eta ; Count", self._nEtabins, self._etabins)) self.addHistogram(monGroup, TH1F("match_phi", "Trigger Matched #phi; #phi ; Count", 20, -3.2, 3.2)) self.addHistogram(monGroup, TH1F("match_avgmu", "Trigger Matched <#mu>; <#mu> ; Count", 16, 0, 80)) @@ -748,7 +746,7 @@ class TrigEgammaMonAlgBuilder: # Denominator self.addHistogram(monGroup, TH1F("pt", "Offline p_{T}; p_{T} [GeV] ; Count", self._nEtbins, self._etbins)) self.addHistogram(monGroup, TH1F("et", "Offline E_{T}; E_{T} [GeV] ; Count", self._nEtbins, self._etbins)) - self.addHistogram(monGroup, TH1F("highet", "Offline E_{T}; E_{T} [GeV] ; Count", 40, 0., 1000.)) + self.addHistogram(monGroup, TH1F("highet", "Offline E_{T}; E_{T} [GeV] ; Count", 40, 0., 500.)) self.addHistogram(monGroup, TH1F("eta", "Offline #eta; #eta ; Count", self._nEtabins, self._etabins)) self.addHistogram(monGroup, TH1F("phi", "Offline #phi; #phi ; Count", 20, -3.2, 3.2)) self.addHistogram(monGroup, TH1F("avgmu", "<#mu>; <#mu> ; Count", 16, 0, 80)) @@ -757,12 +755,18 @@ class TrigEgammaMonAlgBuilder: # Efficiency self.addHistogram(monGroup, TProfile("pt,pt_passed", "#epsilon(p_T); p_{T} ; Efficiency", self._nEtbins, self._etbins)) self.addHistogram(monGroup, TProfile("et,et_passed", "#epsilon(E_T); E_{T} [GeV] ; Efficiency", self._nEtbins, self._etbins)) - self.addHistogram(monGroup, TProfile("highet,highet_passed", "#epsilon(E_T); E_{T} [GeV] ; Efficiency", 40, 0., 1000.)) + self.addHistogram(monGroup, TProfile("highet,highet_passed", "#epsilon(E_T); E_{T} [GeV] ; Efficiency", 40, 0., 500.)) self.addHistogram(monGroup, TProfile("eta,eta_passed", "#epsilon(#eta); #eta ; Efficiency", self._nEtabins, self._etabins)) self.addHistogram(monGroup, TProfile("phi,phi_passed", "#epsilon(#phi); #phi ; Efficiency", 20, -3.2, 3.2)) self.addHistogram(monGroup, TProfile("avgmu,avgmu_passed", "#epsilon(<#mu>); <#mu> ; Efficiency", 16, 0, 80)) self.addHistogram(monGroup, TProfile("npvtx,npvtx_passed", "#epsilon(npvtx); npvtx ; Efficiency", 16, 0, 80)) + # Efficiency ET in eta slices + if self.detailedHistograms: + self.addHistogram(monGroup, TProfile("et_slice0,et_slice0_passed", "#epsilon(E_T) in [|#eta| <= 0.8]; E_{T} [GeV] ; Efficiency", self._nEtbins, self._etbins)) + self.addHistogram(monGroup, TProfile("et_slice1,et_slice1_passed", "#epsilon(E_T) in [0.8 < |#eta| <= 1.37]; E_{T} [GeV] ; Efficiency", self._nEtbins, self._etbins)) + self.addHistogram(monGroup, TProfile("et_slice2,et_slice2_passed", "#epsilon(E_T) in [1.37 < |#eta| <= 1.54]; E_{T} [GeV] ; Efficiency", self._nEtbins, self._etbins)) + self.addHistogram(monGroup, TProfile("et_slice3,et_slice3_passed", "#epsilon(E_T) in [1.54 < |#eta| <= 2.50]; E_{T} [GeV] ; Efficiency", self._nEtbins, self._etbins)) def bookL1CaloResolutions(self, monAlg, trigger): diff --git a/Trigger/TrigMonitoring/TrigEgammaMonitoring/src/TrigEgammaMonitorAnalysisAlgorithm.cxx b/Trigger/TrigMonitoring/TrigEgammaMonitoring/src/TrigEgammaMonitorAnalysisAlgorithm.cxx index 53a7fdb37bc61c905938914df5fc2424d2ad04d1..7a9654788ae74987ae0c5d8077979c84da273b4e 100644 --- a/Trigger/TrigMonitoring/TrigEgammaMonitoring/src/TrigEgammaMonitorAnalysisAlgorithm.cxx +++ b/Trigger/TrigMonitoring/TrigEgammaMonitoring/src/TrigEgammaMonitorAnalysisAlgorithm.cxx @@ -162,9 +162,10 @@ void TrigEgammaMonitorAnalysisAlgorithm::fillEfficiency( const std::string &subg auto monGroup = getGroup( trigger + "_"+dirname+"_" + subgroup ); - std::vector<float> et_vec, highet_vec, pt_vec, eta_vec, phi_vec, avgmu_vec, npvtx_vec; + std::vector<float> et_vec, highet_vec, pt_vec, eta_vec, phi_vec, avgmu_vec, npvtx_vec,et_slice0_vec,et_slice1_vec,et_slice2_vec,et_slice3_vec; std::vector<float> match_et_vec, match_highet_vec, match_pt_vec, match_eta_vec, match_phi_vec, match_avgmu_vec, match_npvtx_vec; std::vector<bool> et_passed_vec, highet_passed_vec, pt_passed_vec, eta_passed_vec, phi_passed_vec, avgmu_passed_vec, npvtx_passed_vec; + std::vector<bool> et_slice0_passed_vec,et_slice1_passed_vec,et_slice2_passed_vec,et_slice3_passed_vec; auto et_col = Monitored::Collection( "et" , et_vec ); auto highet_col = Monitored::Collection( "highet" , highet_vec ); @@ -189,6 +190,17 @@ void TrigEgammaMonitorAnalysisAlgorithm::fillEfficiency( const std::string &subg auto phi_passed_col = Monitored::Collection( "phi_passed" , phi_passed_vec ); auto avgmu_passed_col = Monitored::Collection( "avgmu_passed" , avgmu_passed_vec ); auto npvtx_passed_col = Monitored::Collection( "npvtx_passed" , npvtx_passed_vec ); + + // For ET efficiency analysis in eta slices + auto et_slice0_col = Monitored::Collection( "et_slice0" , et_slice0_vec ); + auto et_slice1_col = Monitored::Collection( "et_slice1" , et_slice1_vec ); + auto et_slice2_col = Monitored::Collection( "et_slice2" , et_slice2_vec ); + auto et_slice3_col = Monitored::Collection( "et_slice3" , et_slice3_vec ); + + auto et_slice0_passed_col = Monitored::Collection( "et_slice0_passed" , et_slice0_passed_vec ); + auto et_slice1_passed_col = Monitored::Collection( "et_slice1_passed" , et_slice1_passed_vec ); + auto et_slice2_passed_col = Monitored::Collection( "et_slice2_passed" , et_slice2_passed_vec ); + auto et_slice3_passed_col = Monitored::Collection( "et_slice3_passed" , et_slice3_passed_vec ); unsigned iObj=0; @@ -228,6 +240,16 @@ void TrigEgammaMonitorAnalysisAlgorithm::fillEfficiency( const std::string &subg npvtx_vec.push_back(npvtx); } + if(abs(eta)<=0.8){ + et_slice0_vec.push_back(et); + }else if( abs(eta) > 0.80 && abs(eta) <= 1.37 ){ + et_slice1_vec.push_back(et); + }else if( abs(eta) > 1.37 && abs(eta) <= 1.54 ){ + et_slice2_vec.push_back(et); + }else if( abs(eta) > 1.54 && abs(eta) <= 2.50 ){ + et_slice3_vec.push_back(et); + } + if(isPassed) { match_et_vec.push_back( et ); match_pt_vec.push_back( pt ); @@ -244,6 +266,16 @@ void TrigEgammaMonitorAnalysisAlgorithm::fillEfficiency( const std::string &subg pt_passed_vec.push_back( true ); highet_passed_vec.push_back( true ); + if(abs(eta)<=0.8){ + et_slice0_passed_vec.push_back(true); + }else if( abs(eta) > 0.80 && abs(eta) <= 1.37 ){ + et_slice1_passed_vec.push_back(true); + }else if( abs(eta) > 1.37 && abs(eta) <= 1.54 ){ + et_slice2_passed_vec.push_back(true); + }else if( abs(eta) > 1.54 && abs(eta) <= 2.50 ){ + et_slice3_passed_vec.push_back(true); + } + if(et > etthr+1.0){ eta_passed_vec.push_back( true ); phi_passed_vec.push_back( true ); @@ -255,7 +287,17 @@ void TrigEgammaMonitorAnalysisAlgorithm::fillEfficiency( const std::string &subg et_passed_vec.push_back( false ); pt_passed_vec.push_back( false ); - highet_passed_vec.push_back( false ); + highet_passed_vec.push_back( false ); + + if(abs(eta)<=0.8){ + et_slice0_passed_vec.push_back(false); + }else if( abs(eta) > 0.80 && abs(eta) <= 1.37 ){ + et_slice1_passed_vec.push_back(false); + }else if( abs(eta) > 1.37 && abs(eta) <= 1.54 ){ + et_slice2_passed_vec.push_back(false); + }else if( abs(eta) > 1.54 && abs(eta) <= 2.50 ){ + et_slice3_passed_vec.push_back(false); + } if(et > etthr+1.0){ eta_passed_vec.push_back( false ); @@ -273,7 +315,8 @@ void TrigEgammaMonitorAnalysisAlgorithm::fillEfficiency( const std::string &subg fill( monGroup, et_col, highet_col, pt_col, eta_col, phi_col, avgmu_col, npvtx_col, match_et_col, match_highet_col, match_pt_col, match_eta_col, match_phi_col, match_avgmu_col, match_npvtx_col, - et_passed_col, highet_passed_col, pt_passed_col, eta_passed_col, phi_passed_col, avgmu_passed_col, npvtx_passed_col); + et_passed_col, highet_passed_col, pt_passed_col, eta_passed_col, phi_passed_col, avgmu_passed_col, npvtx_passed_col, + et_slice0_col,et_slice1_col,et_slice2_col,et_slice3_col,et_slice0_passed_col,et_slice1_passed_col,et_slice2_passed_col,et_slice3_passed_col); } @@ -550,13 +593,11 @@ void TrigEgammaMonitorAnalysisAlgorithm::fillShowerShapes(const std::string &tri ATH_MSG_DEBUG("Fill SS distributions: " << trigger); auto monGroup = getGroup( trigger + ( online ? "_Distributions_HLT" : "_Distributions_Offline") ); - std::vector<float> ethad_vec, ethad1_vec, Rhad_vec, Rhad1_vec, Reta_vec, Rphi_vec, weta1_vec, weta2_vec, + std::vector<float> Rhad_vec, Rhad1_vec, Reta_vec, Rphi_vec, weta1_vec, weta2_vec, f1_vec, f3_vec, eratio_vec, et_vec, highet_vec , eta_vec, phi_vec, topoetcone20_vec, topoetcone40_shift_vec, topoetcone20_rel_vec, topoetcone40_shift_rel_vec; - auto ethad_col = Monitored::Collection("ethad" , ethad_vec ); - auto ethad1_col = Monitored::Collection("ethad1" , ethad1_vec ); auto Rhad_col = Monitored::Collection("Rhad" , Rhad_vec ); auto Rhad1_col = Monitored::Collection("Rhad1" , Rhad1_vec ); auto Reta_col = Monitored::Collection("Reta" , Reta_vec ); @@ -579,8 +620,6 @@ void TrigEgammaMonitorAnalysisAlgorithm::fillShowerShapes(const std::string &tri if(!eg) continue; - ethad_vec.push_back( getShowerShape_ethad(eg)/Gaudi::Units::GeV); - ethad1_vec.push_back( getShowerShape_ethad1(eg)/Gaudi::Units::GeV); Rhad_vec.push_back( getShowerShape_Rhad(eg)); Rhad1_vec.push_back( getShowerShape_Rhad(eg)); Reta_vec.push_back( getShowerShape_Reta(eg)); @@ -604,7 +643,7 @@ void TrigEgammaMonitorAnalysisAlgorithm::fillShowerShapes(const std::string &tri }// Loop over egamma objects - fill( monGroup, ethad_col, ethad1_col, Rhad_col, Rhad1_col, Reta_col, Rphi_col, weta1_col, weta2_col, + fill( monGroup, Rhad_col, Rhad1_col, Reta_col, Rphi_col, weta1_col, weta2_col, f1_col, f3_col, eratio_col, et_col, highet_col , eta_col, phi_col, topoetcone20_col, topoetcone40_shift_col, topoetcone20_rel_col, topoetcone40_shift_rel_col ); diff --git a/Trigger/TrigMonitoring/TrigMETMonitoring/python/TrigMETMonitorAlgorithm.py b/Trigger/TrigMonitoring/TrigMETMonitoring/python/TrigMETMonitorAlgorithm.py index 7482c17a734a7664c343a0444a39acb2f73f6ba2..dc438f627194359e30c88ce457b658f80c2250be 100644 --- a/Trigger/TrigMonitoring/TrigMETMonitoring/python/TrigMETMonitorAlgorithm.py +++ b/Trigger/TrigMonitoring/TrigMETMonitoring/python/TrigMETMonitorAlgorithm.py @@ -65,6 +65,7 @@ def TrigMETMonConfig(inputFlags): moniAccess=getHLTMonitoringAccess(inputFlags) metChains=moniAccess.monitoredChains(signatures="metMon",monLevels=["val","shifter"]) + ### container name selection if mt_chains: # these are temporary, needs to be changed TrigMETMonAlg.hlt_electron_key = 'HLT_egamma_Electrons' @@ -144,7 +145,9 @@ def TrigMETMonConfig(inputFlags): HLTChains[12] = "HLT_xe110_pfsum_cssk_L1XE50" HLTChains[13] = "HLT_xe110_pfsum_vssk_L1XE50" ## mon group test - HLTChains[13] = metChains[0] + size = len (metChains) + if size > 0: + HLTChains[13] = metChains[0] ### these are default chains ###### #TrigMETMonAlg.L1Chain02 = 'L1_XE50' #TrigMETMonAlg.L1Chain02 = 'L1_jXENC50' diff --git a/Trigger/TrigMonitoring/TrigMinBiasMonitoring/python/TrigMBTSMonitoringMT.py b/Trigger/TrigMonitoring/TrigMinBiasMonitoring/python/TrigMBTSMonitoringMT.py index 5e76fa726cc3b922a6fafaad175ba6d00e018885..767c34d6e2459ecfe85d54d179510647f0030463 100644 --- a/Trigger/TrigMonitoring/TrigMinBiasMonitoring/python/TrigMBTSMonitoringMT.py +++ b/Trigger/TrigMonitoring/TrigMinBiasMonitoring/python/TrigMBTSMonitoringMT.py @@ -14,7 +14,7 @@ def TrigMBTS(configFlags): from AthenaConfiguration.ComponentFactory import CompFactory alg = monConfig.addAlgorithm( CompFactory.HLTMBTSMonitoringAlgMT, 'HLTMBTSMonitoringAlgMT') - alg.triggerList = ["HLT_mb_mbts_L1MBTS_1_EMPTY"] + alg.triggerList = ["HLT_mb_mbts_L1MBTS_1", "HLT_mb_mbts_L1RD0_FILLED", "HLT_mb_mbts_L1MBTS_1_EMPTY"] alg.MBTS_channelID = [f'A{i:0>2d}' for i in range(16)] alg.MBTS_channelID += [f'C{i:0>2d}' for i in range(16)] @@ -68,7 +68,6 @@ def TrigMBTS(configFlags): return monConfig.result() - if __name__ == '__main__': # Setup the Run III behavior from AthenaCommon.Configurable import Configurable @@ -79,8 +78,8 @@ if __name__ == '__main__': # Set the Athena configuration flags from AthenaConfiguration.AllConfigFlags import ConfigFlags - ConfigFlags.Input.Files = ['myAOD.pool.root'] ConfigFlags.Output.HISTFileName = 'TestMBTSMonitorOutput.root' + ConfigFlags.fillFromArgs() ConfigFlags.lock() # Initialize configuration object, add accumulator, merge, and run. @@ -97,4 +96,4 @@ if __name__ == '__main__': cfg.run() # use cfg.run(20) to only run on first 20 events # to run: - # python -m TrigMinBiasMonitoring.TrigMBTSMonitoringMT + # python -m TrigMinBiasMonitoring.TrigMBTSMonitoringMT --filesInput= diff --git a/Trigger/TrigMonitoring/TrigMinBiasMonitoring/python/TrigSPTRKMonitoringMT.py b/Trigger/TrigMonitoring/TrigMinBiasMonitoring/python/TrigSPTRKMonitoringMT.py index c2511e74e0fe0e508fe7d1094855e0349c514313..8eac00ff1514abcffddb55c9d3f8db1ec37a3499 100644 --- a/Trigger/TrigMonitoring/TrigMinBiasMonitoring/python/TrigSPTRKMonitoringMT.py +++ b/Trigger/TrigMonitoring/TrigMinBiasMonitoring/python/TrigSPTRKMonitoringMT.py @@ -5,7 +5,7 @@ """ @brief configuration for the min bias monitoring """ - +import math def TrigSPTRK(configFlags, highGranularity=False): @@ -58,6 +58,14 @@ def TrigSPTRK(configFlags, highGranularity=False): mbEffGroup.defineHistogram( "trkPt", cutmask="trkMask", title="Offline selected tracks pt;p_{T} [GeV]", xbins=100, xmin=0, xmax=10) mbEffGroup.defineHistogram( "trkEta", cutmask="trkMask", title="Offline selected tracks eta;#eta", xbins=50, xmin=-2.5, xmax=2.5) + mbEffGroup.defineHistogram( "trkPhi", cutmask="trkMask", title="Offline selected tracks phi;#phi", xbins=64, xmin=-math.pi, xmax=math.pi) + mbEffGroup.defineHistogram( "trkHits", title="Offline selected tracks, hits per track;number of hits", xbins=15, xmin=-0.5, xmax=15-0.5) + + mbEffGroup.defineHistogram( "onlTrkPt", title="Online tracks pt;p_{T} [GeV]", xbins=100, xmin=0, xmax=10) + mbEffGroup.defineHistogram( "onlTrkEta", title="Online tracks eta;#eta", xbins=50, xmin=-2.5, xmax=2.5) + mbEffGroup.defineHistogram( "onlTrkPhi", title="Online tracks phi;#phi", xbins=64, xmin=-math.pi, xmax=math.pi) + mbEffGroup.defineHistogram( "onlTrkHits", title="Online hits per track;number of hits", xbins=15, xmin=-0.5, xmax=15-0.5) + mbEffGroup.defineHistogram( "trkD0", cutmask="trkMask", title="Offline selected tracks D0;d_{0} [mm]", xbins=40, xmin=-20, xmax=20) mbEffGroup.defineHistogram( "trkZ0", cutmask="trkMask", title="Offline selected tracks Z0;z_{0}[mm]", xbins=40, xmin=-20, xmax=20) mbEffGroup.defineHistogram( "trkZ0;trackZdWideRange", cutmask="trkMask", title="Offline selected tracks Z0;z_{0}[mm]", xbins=40, xmin=-200, xmax=200) @@ -101,17 +109,12 @@ if __name__ == "__main__": from AthenaConfiguration.AllConfigFlags import ConfigFlags ConfigFlags.DQ.Environment = "AOD" ConfigFlags.Concurrency.NumConcurrentEvents = 5 - # ConfigFlags.Input.Files = ['/scratch/somadutt/valid1.361238.Pythia8EvtGen_A3NNPDF23LO_minbias_inelastic_low.recon.AOD.e4981_s3454_s3089_d1617_r12430_tid24359040_00/AOD.24359040._000041.pool.root.1'] #Local HI-UPC file - import glob - #ConfigFlags.Input.Files = glob.glob("/ATLAS/tbold/DATA/data18_13TeV.00341615.physics_EnhancedBias.merge.AOD.r12635_p4534_tid25577237_00/*")[:1] - ConfigFlags.Input.Files = glob.glob("/ATLAS/tbold/athena/add-view-to-zfinder-output-config/*/*AOD._lb*") - #ConfigFlags.Input.Files = glob.glob('/scratch/somadutt/valid1.361238.Pythia8EvtGen_A3NNPDF23LO_minbias_inelastic_low.recon.AOD.e4981_s3454_s3089_d1617_r12430_tid24359040_00/*') - # data AOD file -# ConfigFlags.Input.Files = ["myAOD.pool.root"] - # ConfigFlags.Input.isMC = True #un-Comment this line for MC AOD files, comment for data-AOD files ConfigFlags.Output.HISTFileName = "TestMonitorOutput.root" - + ConfigFlags.fillFromArgs() + from AthenaCommon.Logging import logging + log = logging.getLogger(__name__) + log.info("Input %s", str(ConfigFlags.Input.Files)) ConfigFlags.lock() # Initialize configuration object, add accumulator, merge, and run. @@ -132,4 +135,4 @@ if __name__ == "__main__": cfg.run() # use cfg.run(20) to only run on first 20 events # to run: - # python -m TrigMinBiasMonitoring.TrigMinBiasMonitoringMT + # python -m TrigMinBiasMonitoring.TrigMinBiasMonitoringMT --filesInput= diff --git a/Trigger/TrigMonitoring/TrigMinBiasMonitoring/src/HLTMBTSMonitoringAlgMT.cxx b/Trigger/TrigMonitoring/TrigMinBiasMonitoring/src/HLTMBTSMonitoringAlgMT.cxx index b7979db5d7c56f6863d022507ef6105cbe6ad610..215c11c219cfd8a7f8aa4c247a754b6228500f33 100644 --- a/Trigger/TrigMonitoring/TrigMinBiasMonitoring/src/HLTMBTSMonitoringAlgMT.cxx +++ b/Trigger/TrigMonitoring/TrigMinBiasMonitoring/src/HLTMBTSMonitoringAlgMT.cxx @@ -100,7 +100,7 @@ StatusCode HLTMBTSMonitoringAlgMT::fillHistograms(const EventContext &context) c channelID = i; mbtsTime = mbtsHitTimes.at(i); mbtsEnergy = mbtsHitEnergies.at(i); - + ATH_MSG_DEBUG( "MBTS module " << i << " time " << mbtsHitTimes.at(i) << " energies: " << mbtsHitEnergies.at(i)); fill(trig + "_shifter", channelID, mbtsTime, mbtsEnergy); if (i < 16) diff --git a/Trigger/TrigMonitoring/TrigMinBiasMonitoring/src/HLTMinBiasTrkMonAlg.cxx b/Trigger/TrigMonitoring/TrigMinBiasMonitoring/src/HLTMinBiasTrkMonAlg.cxx index bec2bf7d9280d45db6b0930ca649837540d0868b..dbb7ea8d24cfef80788e104f9c3b88b68b3c8a69 100644 --- a/Trigger/TrigMonitoring/TrigMinBiasMonitoring/src/HLTMinBiasTrkMonAlg.cxx +++ b/Trigger/TrigMonitoring/TrigMinBiasMonitoring/src/HLTMinBiasTrkMonAlg.cxx @@ -18,7 +18,7 @@ StatusCode HLTMinBiasTrkMonAlg::initialize() ATH_CHECK(m_trkCountsKey.initialize()); ATH_CHECK(m_offlineTrkKey.initialize()); ATH_CHECK(m_onlineTrkKey.initialize()); - ATH_CHECK(m_lvl1EnergySumROIKey.initialize()); + ATH_CHECK(m_lvl1EnergySumROIKey.initialize()); return AthMonitorAlgorithm::initialize(); } @@ -107,8 +107,6 @@ StatusCode HLTMinBiasTrkMonAlg::monitorTrkCounts(const EventContext& context) co auto nTrkOnline = Scalar("nTrkOnline", trkCountsHandle->at(0)->getDetail<int>("ntrks")); auto offlineTrkHandle = SG::makeHandle(m_offlineTrkKey, context); - // TODO, instead counting all tracks need to count tracks passing offline min-bias selection - int countPassing = 0; for (const auto trk : *offlineTrkHandle) { @@ -117,13 +115,32 @@ StatusCode HLTMinBiasTrkMonAlg::monitorTrkCounts(const EventContext& context) co } ATH_MSG_DEBUG("::monitorTrkCounts countPassing = " << countPassing); + auto onlineTrkHandle = SG::makeHandle(m_onlineTrkKey, context); + + + auto nTrkOffline = Scalar("nTrkOffline", countPassing); auto nAllTrkOffline = Scalar("nAllTrkOffline", offlineTrkHandle->size()); auto trkMask = Collection("trkMask", *offlineTrkHandle, [&](const auto& trk) { return static_cast<bool>(m_trackSelectionTool->accept(*trk)); }); auto trkPt = Collection("trkPt", *offlineTrkHandle, [](const auto& trk) { return trk->pt() * 1.e-3; }); auto trkEta = Collection("trkEta", *offlineTrkHandle, [](const auto& trk) { return trk->eta(); }); + auto trkPhi = Collection("trkPhi", *offlineTrkHandle, [](const auto& trk) { return trk->phi(); }); auto trkD0 = Collection("trkD0", *offlineTrkHandle, [](const auto& trk) { return trk->d0(); }); auto trkZ0 = Collection("trkZ0", *offlineTrkHandle, [](const auto& trk) { return trk->z0(); }); + auto getNhits = [](const xAOD::TrackParticle* trk) { + int nhits = 0; + uint32_t pattern = trk->hitPattern(); + for ( int bit = 0; bit < 32; bit++) + nhits += (pattern & (1<<bit) ? 1 : 0); + return nhits; + }; + auto trkHits = Collection("trkHits", *offlineTrkHandle, getNhits); + + auto onlTrkPt = Collection("onlTrkPt", *onlineTrkHandle, [](const auto& trk) { return trk->pt() * 1.e-3; }); + auto onlTrkEta = Collection("onlTrkEta", *onlineTrkHandle, [](const auto& trk) { return trk->eta(); }); + auto onlTrkPhi = Collection("onlTrkPhi", *onlineTrkHandle, [](const auto& trk) { return trk->phi(); }); + auto onlTrkHits = Collection("onlTrkHits", *onlineTrkHandle, getNhits); + auto nMBTrkTrkOfflineRatio = Scalar("trkSelOfflineRatio", (offlineTrkHandle->size() == 0 ? -1 : static_cast<double>(nTrkOffline) / offlineTrkHandle->size())); @@ -167,7 +184,11 @@ StatusCode HLTMinBiasTrkMonAlg::monitorTrkCounts(const EventContext& context) co double nTrkRatio = offlineTrkHandle->size() > 0 ? static_cast<double>(offlineTrkHandle->size()) / static_cast<double>(trkCountsHandle->at(0)->getDetail<int>("ntrks")) : -1.0; auto trkRatio = Scalar("nTrkRatio", nTrkRatio); fill(trig + "_Tracking", nTrkOffline, nAllTrkOffline, nTrkOnline, trkRatio, nMBTrkTrkOfflineRatio, pixelCL, - PixBarr_SP, PixECA_SP, PixECC_SP, SctTot, SctBarr_SP, SctECA_SP, SctECC_SP, L1sumEt, trkMask, trkPt, trkEta, trkD0, trkZ0); + PixBarr_SP, PixECA_SP, PixECC_SP, + SctTot, SctBarr_SP, SctECA_SP, SctECC_SP, + L1sumEt, + trkMask, trkPt, trkEta, trkPhi, trkD0, trkZ0, trkHits, + onlTrkPt, onlTrkEta, onlTrkPhi, onlTrkHits); } // measure eff wrt the L1 diff --git a/Trigger/TrigMonitoring/TrigTauMonitoring/src/TrigTauMonitorAlgorithm.cxx b/Trigger/TrigMonitoring/TrigTauMonitoring/src/TrigTauMonitorAlgorithm.cxx index 0527d8490683b0143d3a50730d06b7f2fba40397..8a6d2c59e0b2c505141b494acdc6416e3b2044e1 100644 --- a/Trigger/TrigMonitoring/TrigTauMonitoring/src/TrigTauMonitorAlgorithm.cxx +++ b/Trigger/TrigMonitoring/TrigTauMonitoring/src/TrigTauMonitorAlgorithm.cxx @@ -118,6 +118,8 @@ StatusCode TrigTauMonitorAlgorithm::executeNavigation( const EventContext& ctx, }else if(trigItem.find("ptonly") != std::string::npos) tauContainerName="HLT_TrigTauRecMerged_CaloOnly"; + auto vec = m_trigDecTool->features<xAOD::TauJetContainer>(trigItem,TrigDefs::Physics , tauContainerName ); + for(const auto *const Tau : *offTaus ){ const TrigCompositeUtils::Decision *dec=nullptr; @@ -125,7 +127,6 @@ StatusCode TrigTauMonitorAlgorithm::executeNavigation( const EventContext& ctx, // consider only offline taus which pass RNN medium WP if( !Tau->isTau(xAOD::TauJetParameters::JetRNNSigMedium)) continue; - auto vec = m_trigDecTool->features<xAOD::TauJetContainer>(trigItem,TrigDefs::Physics , tauContainerName ); for( auto &featLinkInfo : vec ){ if(! featLinkInfo.isValid() ) continue; const auto *feat = *(featLinkInfo.link); diff --git a/Trigger/TrigSteer/HLTSeeding/src/PrescalingTool.cxx b/Trigger/TrigSteer/HLTSeeding/src/PrescalingTool.cxx index 1f879d3a947a7167cc3df8ece8b90f41523ca4eb..d5068013e139f316203246da6cc253131df6a967 100644 --- a/Trigger/TrigSteer/HLTSeeding/src/PrescalingTool.cxx +++ b/Trigger/TrigSteer/HLTSeeding/src/PrescalingTool.cxx @@ -169,21 +169,23 @@ StatusCode PrescalingTool::prescaleChains( const EventContext& ctx, // this group is seeded std::vector<ChainAndPrescale> psValueSorted; for ( const HLT::Identifier& ch: chainIDs ) { - psValueSorted.emplace_back( ChainAndPrescale({ch, getPrescale(ch)}) ); + auto ps = getPrescale(ch); + if ( ps.enabled ) // exclude prescaled out chains + psValueSorted.emplace_back( ChainAndPrescale({ch, ps}) ); + } + if ( psValueSorted.empty() ) { // sometimes all chains may be presscaled out/disabled + break; } - std::sort(psValueSorted.begin(), psValueSorted.end(), [](const ChainAndPrescale& a, const ChainAndPrescale& b){ - if ( a.ps.enabled and b.ps.enabled ) {return a.ps.prescale < b.ps.prescale;} - if ( !a.ps.enabled and b.ps.enabled ) {return false;} - if ( a.ps.enabled and !b.ps.enabled ) {return true;} - // both not enabled - irrelevant but sorting needs consistent ordering return a.ps.prescale < b.ps.prescale; }); // setup relative prescales // the first chain (with the lowest PS is relative w.r.t the all events) psValueSorted.front().relativePrescale = psValueSorted.front().ps.prescale; - for ( auto i = psValueSorted.begin()+1; i < psValueSorted.end(); ++i ) { - i->relativePrescale = i->ps.prescale / (i-1)->ps.prescale ; + if ( psValueSorted.size() > 1 ) { + for ( auto i = psValueSorted.begin()+1; i < psValueSorted.end(); ++i ) { + i->relativePrescale = i->ps.prescale / (i-1)->ps.prescale ; + } } if (msgLvl(MSG::DEBUG)) { ATH_MSG_DEBUG("Chains in CPS group '"<< groupName <<"' sorted by PS : "); @@ -195,7 +197,6 @@ StatusCode PrescalingTool::prescaleChains( const EventContext& ctx, } // do actual prescaling for ( const ChainAndPrescale& ch: psValueSorted ) { - if ( not ch.ps.enabled ) {break;} const bool decision = decisionPerChain(ch.id, ch.relativePrescale); if ( not decision ) {break;} remainActive.push_back( ch.id ); diff --git a/Trigger/TrigSteer/HLTSeeding/src/TAURoIsUnpackingTool.cxx b/Trigger/TrigSteer/HLTSeeding/src/TAURoIsUnpackingTool.cxx index 7722264cae35ce59e370b939435e98a0e7777f75..78e5f9d790c37c0f5940cb2387385f0cc2e4347c 100644 --- a/Trigger/TrigSteer/HLTSeeding/src/TAURoIsUnpackingTool.cxx +++ b/Trigger/TrigSteer/HLTSeeding/src/TAURoIsUnpackingTool.cxx @@ -71,8 +71,8 @@ StatusCode TAURoIsUnpackingTool::unpack(const EventContext& ctx, trigRoIs->push_back( std::make_unique<TrigRoiDescriptor>( roIWord, 0u ,0u, - recRoI->eta(), recRoI->eta()-m_roIWidth, recRoI->eta()+m_roIWidth, - recRoI->phi(), recRoI->phi()-m_roIWidth, recRoI->phi()+m_roIWidth) ); + recRoI->eta(), recRoI->eta()-m_roIWidthEta, recRoI->eta()+m_roIWidthEta, + recRoI->phi(), recRoI->phi()-m_roIWidthPhi, recRoI->phi()+m_roIWidthPhi) ); ATH_MSG_DEBUG( "RoI word: 0x" << MSG::hex << std::setw( 8 ) << roIWord << MSG::dec ); diff --git a/Trigger/TrigSteer/HLTSeeding/src/TAURoIsUnpackingTool.h b/Trigger/TrigSteer/HLTSeeding/src/TAURoIsUnpackingTool.h index 2e8e9e7d4f692651ef15f82db4e8b04cf180390b..4369fec1f167c754b1c946b978d5458c23e749a5 100644 --- a/Trigger/TrigSteer/HLTSeeding/src/TAURoIsUnpackingTool.h +++ b/Trigger/TrigSteer/HLTSeeding/src/TAURoIsUnpackingTool.h @@ -25,8 +25,11 @@ private: SG::WriteHandleKey<DataVector<LVL1::RecEmTauRoI>> m_recRoIsKey{ this, "OutputRecRoIs", "HLT_RecTAURoIs", "Name of the RoIs object produced by the unpacker"}; - Gaudi::Property<float> m_roIWidth{ - this, "RoIWidth", 0.4, "Size of RoI in eta/ phi"}; + Gaudi::Property<float> m_roIWidthEta { + this, "RoIWidthEta", 0.4, "Size of RoI in eta"}; + + Gaudi::Property<float> m_roIWidthPhi { + this, "RoIWidthPhi", M_PI/8., "Size of RoI in phi"}; }; #endif //> !HLTSEEDING_TAUROISUNPACKINGTOOL_H diff --git a/Trigger/TrigSteer/HLTSeeding/src/eFexTauRoIsUnpackingTool.cxx b/Trigger/TrigSteer/HLTSeeding/src/eFexTauRoIsUnpackingTool.cxx index dea281926d6c42d14c9ba746009f172c9e4d5687..64dec1e7fd53fe819b51f3f3ef0c08ef537fabb3 100644 --- a/Trigger/TrigSteer/HLTSeeding/src/eFexTauRoIsUnpackingTool.cxx +++ b/Trigger/TrigSteer/HLTSeeding/src/eFexTauRoIsUnpackingTool.cxx @@ -61,8 +61,8 @@ StatusCode eFexTauRoIsUnpackingTool::unpack(const EventContext& ctx, for (const xAOD::eFexTauRoI* roi : rois) { // Create new RoI descriptor roiDescriptors->push_back(std::make_unique<TrigRoiDescriptor>( - roi->eta(), roi->eta()-m_roiWidth, roi->eta()+m_roiWidth, - roi->phi(), roi->phi()-m_roiWidth, roi->phi()+m_roiWidth + roi->eta(), roi->eta()-m_roiWidthEta, roi->eta()+m_roiWidthEta, + roi->phi(), roi->phi()-m_roiWidthPhi, roi->phi()+m_roiWidthPhi )); // Create new decision and link the RoI objects diff --git a/Trigger/TrigSteer/HLTSeeding/src/eFexTauRoIsUnpackingTool.h b/Trigger/TrigSteer/HLTSeeding/src/eFexTauRoIsUnpackingTool.h index e989d8d8cd2b637fe6fbb856134372c43ba1e945..55ee0aa719be8e1d899df88d1811356354fe4872 100644 --- a/Trigger/TrigSteer/HLTSeeding/src/eFexTauRoIsUnpackingTool.h +++ b/Trigger/TrigSteer/HLTSeeding/src/eFexTauRoIsUnpackingTool.h @@ -31,8 +31,12 @@ private: this, "eFexTauRoIThresholdPatternsKey", "L1_eTauRoI.thresholdPatterns", "Name of the eFexTauRoI container decoration for the threshold patterns"}; - Gaudi::Property<float> m_roiWidth{ - this, "RoIWidth", 0.4, "Size of RoI in eta/phi"}; + Gaudi::Property<float> m_roiWidthEta { + this, "RoIWidthEta", 0.4, "Size of RoI in eta"}; + + Gaudi::Property<float> m_roiWidthPhi { + this, "RoIWidthPhi", M_PI/8., "Size of RoI in phi"}; + }; #endif //> !HLTSEEDING_EFEXTAUROISUNPACKINGTOOL_H diff --git a/Trigger/TrigSteer/HLTSeeding/src/jFexTauRoIsUnpackingTool.cxx b/Trigger/TrigSteer/HLTSeeding/src/jFexTauRoIsUnpackingTool.cxx index 93bdb682a29483596276477cd4faf731e4624e51..a8beb5196d2772a93f99949fa216e841659564f7 100644 --- a/Trigger/TrigSteer/HLTSeeding/src/jFexTauRoIsUnpackingTool.cxx +++ b/Trigger/TrigSteer/HLTSeeding/src/jFexTauRoIsUnpackingTool.cxx @@ -61,8 +61,8 @@ StatusCode jFexTauRoIsUnpackingTool::unpack(const EventContext& ctx, for (const xAOD::jFexTauRoI* roi : rois) { // Create new RoI descriptor roiDescriptors->push_back(std::make_unique<TrigRoiDescriptor>( - roi->eta(), roi->eta()-m_roiWidth, roi->eta()+m_roiWidth, - roi->phi(), roi->phi()-m_roiWidth, roi->phi()+m_roiWidth + roi->eta(), roi->eta()-m_roiWidthEta, roi->eta()+m_roiWidthEta, + roi->phi(), roi->phi()-m_roiWidthPhi, roi->phi()+m_roiWidthPhi )); // Create new decision and link the RoI objects diff --git a/Trigger/TrigSteer/HLTSeeding/src/jFexTauRoIsUnpackingTool.h b/Trigger/TrigSteer/HLTSeeding/src/jFexTauRoIsUnpackingTool.h index d9917caeeb3d00b0199fd56ec901ae114f7a86fe..c87b97e5a4e3069d9fd57936d4314871c157ab47 100644 --- a/Trigger/TrigSteer/HLTSeeding/src/jFexTauRoIsUnpackingTool.h +++ b/Trigger/TrigSteer/HLTSeeding/src/jFexTauRoIsUnpackingTool.h @@ -31,8 +31,11 @@ private: this, "jFexTauRoIThresholdPatternsKey", "L1_jFexTauRoI.thresholdPatterns", "Name of the jFexTauRoI container decoration for the threshold patterns"}; - Gaudi::Property<float> m_roiWidth{ - this, "RoIWidth", 0.4, "Size of RoI in eta/phi"}; + Gaudi::Property<float> m_roiWidthEta { + this, "RoIWidthEta", 0.4, "Size of RoI in eta"}; + + Gaudi::Property<float> m_roiWidthPhi { + this, "RoIWidthPhi", M_PI/8., "Size of RoI in phi"}; }; #endif //> !HLTSEEDING_JFEXTAUROISUNPACKINGTOOL_H diff --git a/Trigger/TrigSteer/TrigCompositeUtils/Root/TrigCompositeUtilsRoot.cxx b/Trigger/TrigSteer/TrigCompositeUtils/Root/TrigCompositeUtilsRoot.cxx index a834f764f3d3b61dea7989d532fe3f1ef7d2283a..26db0c60b5b16dd19fea38650aaf786541115e93 100644 --- a/Trigger/TrigSteer/TrigCompositeUtils/Root/TrigCompositeUtilsRoot.cxx +++ b/Trigger/TrigSteer/TrigCompositeUtils/Root/TrigCompositeUtilsRoot.cxx @@ -237,30 +237,52 @@ namespace TrigCompositeUtils { } std::vector<const Decision*> getRejectedDecisionNodes(asg::EventStoreType* eventStore, + const std::string& summaryCollectionKey, const DecisionIDContainer& ids, const std::set<std::string>& keysToIgnore) { - std::vector<const Decision*> output; - // The list of containers we need to read can change on a file-by-file basis (it depends on the SMK) - // Hence we query SG for all collections rather than maintain a large and ever changing ReadHandleKeyArray + // The following list contains all known summary store identifiers where the graph nodes are spread out over O(100s) or O(1000s) + // of different SG collections. This is the raw output from running the trigger online. + // When dealing with this, we need to query eventStore->keys in every event to obtain the full set of collections to process. + static const std::vector<std::string> knownDistributedSummaryStores{"HLTNav_Summary"}; - static std::vector<std::string> keys ATLAS_THREAD_SAFE; - static std::mutex keysMutex; - // TODO TODO TODO NEED TO REPLACE THIS WITH A STANDALONE-FRIENDLY VERSION + // The following list contains all known summary store identifiers where all nodes from the graph have been compactified / condensed + // down into a single container. Here we just have to search this one container. + static const std::vector<std::string> knownCompactSummaryStores{"HLTNav_Summary_OnlineSlimmed", + "HLTNav_Summary_ESDSlimmed", + "HLTNav_Summary_AODSlimmed", + "HLTNav_Summary_DAODSlimmed"}; + + std::vector<std::string> keys; // The SG keys we will be exploring to find rejected decision nodes + + if (std::find(knownDistributedSummaryStores.cbegin(), knownDistributedSummaryStores.cend(), summaryCollectionKey) != knownDistributedSummaryStores.end() or summaryCollectionKey == "") { + + // If we have a distributed store then we need to query SG to find all keys. + // This should be a rare case now that we run compactification "online" (i.e. immediately after the trigger has executed) #ifndef XAOD_STANDALONE - { - std::lock_guard<std::mutex> lock(keysMutex); - if (keys.size() == 0) { - // In theory this can change from file to file, - // the use case for this function is monitoring, and this is typically over a single run. - eventStore->keys(static_cast<CLID>( ClassID_traits< DecisionContainer >::ID() ), keys); - } - } + // The list of containers we need to read can change on a file-by-file basis (it depends on the SMK) + // Hence we query SG for all collections rather than maintain a large and ever changing ReadHandleKeyArray + eventStore->keys(static_cast<CLID>( ClassID_traits< DecisionContainer >::ID() ), keys); #else - eventStore->event(); // Avoid unused warning - throw std::runtime_error("Cannot yet obtain rejected HLT features in AnalysisBase"); + eventStore->event(); // Avoid unused warning + throw std::runtime_error("Cannot obtain rejected HLT features in AnalysisBase when reading from uncompactified navigation containers, run trigger navigation slimming first if you really need this."); #endif + } else if (std::find(knownCompactSummaryStores.cbegin(), knownCompactSummaryStores.cend(), summaryCollectionKey) != knownCompactSummaryStores.end()) { + + keys.push_back(summaryCollectionKey); + + } else { + + using namespace msgRejected; + ANA_MSG_WARNING("getRejectedDecisionNodes has not been told about final collection " << summaryCollectionKey << " please update this function. Assuming that it is already compact."); + // Safest to assume that this is a compact summary store + keys.push_back(summaryCollectionKey); + + } + + std::vector<const Decision*> output; // The return vector of identified nodes where one of the chains in 'ids' was rejected + // Loop over each DecisionContainer, for (const std::string& key : keys) { // Get and check this container @@ -311,7 +333,7 @@ namespace TrigCompositeUtils { DecisionIDContainer chainsToCheck; if (ids.size() == 0) { // We care about *all* chains chainsToCheck = activeChainsIntoThisDecision; - } else { // We care about sepcified chains + } else { // We care about specified chains chainsToCheck = ids; } // We have found a rejected decision node *iff* a chainID to check is *not* present here diff --git a/Trigger/TrigSteer/TrigCompositeUtils/TrigCompositeUtils/TrigCompositeUtils.h b/Trigger/TrigSteer/TrigCompositeUtils/TrigCompositeUtils/TrigCompositeUtils.h index 4a679615795501517630ad8f53a820dc1400b85e..1e1db3ab8915c649615df16b0fa71fb189caf7f5 100644 --- a/Trigger/TrigSteer/TrigCompositeUtils/TrigCompositeUtils/TrigCompositeUtils.h +++ b/Trigger/TrigSteer/TrigCompositeUtils/TrigCompositeUtils/TrigCompositeUtils.h @@ -276,7 +276,7 @@ namespace TrigCompositeUtils { /** - * @brief Returns the terminus navigation node from a collection, assuming that the passed collection contains the termninus node + * @brief Returns the terminus navigation node from a collection, assuming that the passed collection contains the terminus node * @param[in] Collection of navigation nodes which contains the terminus node * @return The terminus node, or a nullptr if the node is not found **/ @@ -286,11 +286,13 @@ namespace TrigCompositeUtils { /** * @brief Query all DecisionCollections in the event store, locate all Decision nodes in the graph where an object failed selection for a given chain. * @param[in] eventStore Pointer to event store within current event context + * @param[in] summaryCollectionKey The primary source of navigation data in the event (i.e the collection which contains the navigation terminus node). * @param[in] ids IDs of chain (if multi-leg chain, include all legs) to located failed decision nodes for. Passing an empty set returns all decision nodes which failed at least one chain. * @param[in] keysToIgnore Set of SG keys of containers which should not be explored by getRejectedDecisionNodes. * @return Vector of Decision nodes whose attached feature failed the trigger chain logic for chain with DecisionID id **/ std::vector<const Decision*> getRejectedDecisionNodes(asg::EventStoreType* eventStore, + const std::string& summaryCollectionKey, const DecisionIDContainer& ids = {}, const std::set<std::string>& keysToIgnore = std::set<std::string>()); diff --git a/Trigger/TrigSteer/TrigCompositeUtils/share/TrigTraversal_test.ref b/Trigger/TrigSteer/TrigCompositeUtils/share/TrigTraversal_test.ref index a2af1e9795d065bcfe182c92f3771df786bc736b..928f4178cf35445adceb6affd640cf8445ca3323 100644 --- a/Trigger/TrigSteer/TrigCompositeUtils/share/TrigTraversal_test.ref +++ b/Trigger/TrigSteer/TrigCompositeUtils/share/TrigTraversal_test.ref @@ -1,142 +1,150 @@ +Initializing Gaudi ApplicationMgr using job opts ../share/ +ApplicationMgr SUCCESS +==================================================================================================================================== + Welcome to ApplicationMgr (GaudiCoreSvc v36r2) + running on pc-tbed-pub-21.cern.ch on Fri Nov 12 10:31:56 2021 +==================================================================================================================================== ApplicationMgr INFO Application Manager Configured successfully EventLoopMgr WARNING Unable to locate service "EventSelector" EventLoopMgr WARNING No events will be processed from external input. ApplicationMgr INFO Application Manager Initialized successfully ApplicationMgr Ready +ClassIDSvc INFO getRegistryEntries: read 7409 CLIDRegistry entries for module ALL +ClassIDSvc INFO getRegistryEntries: read 379 CLIDRegistry entries for module ALL TrigTraversal INFO HLT_mufast_chain -TrigTraversal INFO |-> HLTNav_DC #3 Name(HLTPassRaw) Passing(1,2,3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #13 Name(SF) Passing(1) IParticles() -TrigTraversal INFO |-> HLTNav_DC #12 Name(H) Passing(1,2,3) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #11 Name(IM) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #9 Name(F) Passing(1,2) IParticles() -TrigTraversal INFO |-> HLTNav_DC #1 Name(L1) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #3 Name(HLTPassRaw) Passing(1,2,3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #13 Name(SF) Passing(1) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #12 Name(H) Passing(1,2,3) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #11 Name(IM) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #9 Name(F) Passing(1,2) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #1 Name(L1) Passing(1,2,3) IParticles() TrigTraversal INFO HLT_mu_chain -TrigTraversal INFO |-> HLTNav_DC #3 Name(HLTPassRaw) Passing(1,2,3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #19 Name(SF) Passing(2) IParticles() -TrigTraversal INFO |-> HLTNav_DC #18 Name(H) Passing(2,3) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #17 Name(IM) Passing(2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #15 Name(F) Passing(2) IParticles() -TrigTraversal INFO |-> HLTNav_DC #12 Name(H) Passing(1,2,3) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #11 Name(IM) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #9 Name(F) Passing(1,2) IParticles() -TrigTraversal INFO |-> HLTNav_DC #1 Name(L1) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #3 Name(HLTPassRaw) Passing(1,2,3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #19 Name(SF) Passing(2) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #18 Name(H) Passing(2,3) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #17 Name(IM) Passing(2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #15 Name(F) Passing(2) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #12 Name(H) Passing(1,2,3) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #11 Name(IM) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #9 Name(F) Passing(1,2) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #1 Name(L1) Passing(1,2,3) IParticles() TrigTraversal INFO HLT_mu_em_chain -TrigTraversal INFO |-> HLTNav_DC #3 Name(HLTPassRaw) Passing(1,2,3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #21 Name(SF) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #20 Name(CH) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #18 Name(H) Passing(2,3) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #17 Name(IM) Passing(2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #16 Name(F) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #14 Name(CH) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #12 Name(H) Passing(1,2,3) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #11 Name(IM) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #10 Name(F) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #1 Name(L1) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #33 Name(SF) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #32 Name(CH) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #30 Name(H) Passing(3,4) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #29 Name(IM) Passing(3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #28 Name(F) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #26 Name(CH) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #25 Name(H) Passing(3,4) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #24 Name(IM) Passing(3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #23 Name(F) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #2 Name(L1) Passing(3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #3 Name(HLTPassRaw) Passing(1,2,3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #21 Name(SF) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #20 Name(CH) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #18 Name(H) Passing(2,3) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #17 Name(IM) Passing(2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #16 Name(F) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #14 Name(CH) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #12 Name(H) Passing(1,2,3) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #11 Name(IM) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #10 Name(F) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #1 Name(L1) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #33 Name(SF) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #32 Name(CH) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #30 Name(H) Passing(3,4) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #29 Name(IM) Passing(3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #28 Name(F) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #26 Name(CH) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #25 Name(H) Passing(3,4) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #24 Name(IM) Passing(3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #23 Name(F) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #2 Name(L1) Passing(3,4) IParticles() TrigTraversal INFO HLT_em_chain -TrigTraversal INFO |-> HLTNav_DC #3 Name(HLTPassRaw) Passing(1,2,3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #31 Name(SF) Passing(4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #30 Name(H) Passing(3,4) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #29 Name(IM) Passing(3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #27 Name(F) Passing(4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #25 Name(H) Passing(3,4) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #24 Name(IM) Passing(3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #22 Name(F) Passing(4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #2 Name(L1) Passing(3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #3 Name(HLTPassRaw) Passing(1,2,3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #31 Name(SF) Passing(4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #30 Name(H) Passing(3,4) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #29 Name(IM) Passing(3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #27 Name(F) Passing(4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #25 Name(H) Passing(3,4) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #24 Name(IM) Passing(3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #22 Name(F) Passing(4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #2 Name(L1) Passing(3,4) IParticles() TrigTraversal INFO All -TrigTraversal INFO |-> HLTNav_DC #3 Name(HLTPassRaw) Passing(1,2,3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #13 Name(SF) Passing(1) IParticles() -TrigTraversal INFO |-> HLTNav_DC #12 Name(H) Passing(1,2,3) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #11 Name(IM) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #9 Name(F) Passing(1,2) IParticles() -TrigTraversal INFO |-> HLTNav_DC #1 Name(L1) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #10 Name(F) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #1 Name(L1) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #19 Name(SF) Passing(2) IParticles() -TrigTraversal INFO |-> HLTNav_DC #18 Name(H) Passing(2,3) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #17 Name(IM) Passing(2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #15 Name(F) Passing(2) IParticles() -TrigTraversal INFO |-> HLTNav_DC #12 Name(H) Passing(1,2,3) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #11 Name(IM) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #9 Name(F) Passing(1,2) IParticles() -TrigTraversal INFO |-> HLTNav_DC #1 Name(L1) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #10 Name(F) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #1 Name(L1) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #16 Name(F) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #14 Name(CH) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #12 Name(H) Passing(1,2,3) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #11 Name(IM) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #9 Name(F) Passing(1,2) IParticles() -TrigTraversal INFO |-> HLTNav_DC #1 Name(L1) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #10 Name(F) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #1 Name(L1) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #21 Name(SF) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #20 Name(CH) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #18 Name(H) Passing(2,3) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #17 Name(IM) Passing(2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #15 Name(F) Passing(2) IParticles() -TrigTraversal INFO |-> HLTNav_DC #12 Name(H) Passing(1,2,3) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #11 Name(IM) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #9 Name(F) Passing(1,2) IParticles() -TrigTraversal INFO |-> HLTNav_DC #1 Name(L1) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #10 Name(F) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #1 Name(L1) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #16 Name(F) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #14 Name(CH) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #12 Name(H) Passing(1,2,3) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #11 Name(IM) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #9 Name(F) Passing(1,2) IParticles() -TrigTraversal INFO |-> HLTNav_DC #1 Name(L1) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #10 Name(F) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #1 Name(L1) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #31 Name(SF) Passing(4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #30 Name(H) Passing(3,4) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #29 Name(IM) Passing(3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #27 Name(F) Passing(4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #25 Name(H) Passing(3,4) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #24 Name(IM) Passing(3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #22 Name(F) Passing(4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #2 Name(L1) Passing(3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #23 Name(F) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #2 Name(L1) Passing(3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #28 Name(F) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #26 Name(CH) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #25 Name(H) Passing(3,4) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #24 Name(IM) Passing(3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #22 Name(F) Passing(4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #2 Name(L1) Passing(3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #23 Name(F) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #2 Name(L1) Passing(3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #33 Name(SF) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #32 Name(CH) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #30 Name(H) Passing(3,4) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #29 Name(IM) Passing(3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #27 Name(F) Passing(4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #25 Name(H) Passing(3,4) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #24 Name(IM) Passing(3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #22 Name(F) Passing(4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #2 Name(L1) Passing(3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #23 Name(F) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #2 Name(L1) Passing(3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #28 Name(F) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #26 Name(CH) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #25 Name(H) Passing(3,4) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #24 Name(IM) Passing(3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #22 Name(F) Passing(4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #2 Name(L1) Passing(3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #23 Name(F) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #2 Name(L1) Passing(3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #3 Name(HLTPassRaw) Passing(1,2,3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #13 Name(SF) Passing(1) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #12 Name(H) Passing(1,2,3) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #11 Name(IM) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #9 Name(F) Passing(1,2) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #1 Name(L1) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #10 Name(F) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #1 Name(L1) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #19 Name(SF) Passing(2) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #18 Name(H) Passing(2,3) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #17 Name(IM) Passing(2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #15 Name(F) Passing(2) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #12 Name(H) Passing(1,2,3) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #11 Name(IM) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #9 Name(F) Passing(1,2) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #1 Name(L1) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #10 Name(F) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #1 Name(L1) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #16 Name(F) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #14 Name(CH) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #12 Name(H) Passing(1,2,3) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #11 Name(IM) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #9 Name(F) Passing(1,2) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #1 Name(L1) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #10 Name(F) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #1 Name(L1) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #21 Name(SF) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #20 Name(CH) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #18 Name(H) Passing(2,3) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #17 Name(IM) Passing(2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #15 Name(F) Passing(2) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #12 Name(H) Passing(1,2,3) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #11 Name(IM) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #9 Name(F) Passing(1,2) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #1 Name(L1) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #10 Name(F) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #1 Name(L1) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #16 Name(F) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #14 Name(CH) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #12 Name(H) Passing(1,2,3) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #11 Name(IM) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #9 Name(F) Passing(1,2) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #1 Name(L1) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #10 Name(F) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #1 Name(L1) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #31 Name(SF) Passing(4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #30 Name(H) Passing(3,4) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #29 Name(IM) Passing(3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #27 Name(F) Passing(4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #25 Name(H) Passing(3,4) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #24 Name(IM) Passing(3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #22 Name(F) Passing(4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #2 Name(L1) Passing(3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #23 Name(F) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #2 Name(L1) Passing(3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #28 Name(F) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #26 Name(CH) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #25 Name(H) Passing(3,4) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #24 Name(IM) Passing(3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #22 Name(F) Passing(4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #2 Name(L1) Passing(3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #23 Name(F) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #2 Name(L1) Passing(3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #33 Name(SF) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #32 Name(CH) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #30 Name(H) Passing(3,4) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #29 Name(IM) Passing(3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #27 Name(F) Passing(4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #25 Name(H) Passing(3,4) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #24 Name(IM) Passing(3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #22 Name(F) Passing(4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #2 Name(L1) Passing(3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #23 Name(F) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #2 Name(L1) Passing(3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #28 Name(F) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #26 Name(CH) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #25 Name(H) Passing(3,4) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #24 Name(IM) Passing(3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #22 Name(F) Passing(4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #2 Name(L1) Passing(3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #23 Name(F) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #2 Name(L1) Passing(3,4) IParticles() TrigTraversal INFO [All passing features] HLT_mufast_chain features size:1 Feature pt:20, state:ACTIVE @@ -180,155 +188,155 @@ TrigTraversal INFO [Final passing feature] All chains features size:3 ---------- Now Include Failing Features TrigTraversal INFO HLT_mufast_chain -TrigTraversal INFO |-> HLTNav_DC #7 Name(H) Passing() IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #6 Name(IM) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #4 Name(F) Passing(1,2) IParticles() -TrigTraversal INFO |-> HLTNav_DC #0 Name(L1) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #3 Name(HLTPassRaw) Passing(1,2,3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #13 Name(SF) Passing(1) IParticles() -TrigTraversal INFO |-> HLTNav_DC #12 Name(H) Passing(1,2,3) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #11 Name(IM) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #9 Name(F) Passing(1,2) IParticles() -TrigTraversal INFO |-> HLTNav_DC #1 Name(L1) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #7 Name(H) Passing() IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #6 Name(IM) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #4 Name(F) Passing(1,2) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #0 Name(L1) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #3 Name(HLTPassRaw) Passing(1,2,3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #13 Name(SF) Passing(1) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #12 Name(H) Passing(1,2,3) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #11 Name(IM) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #9 Name(F) Passing(1,2) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #1 Name(L1) Passing(1,2,3) IParticles() TrigTraversal INFO HLT_mu_chain -TrigTraversal INFO |-> HLTNav_DC #7 Name(H) Passing() IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #6 Name(IM) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #4 Name(F) Passing(1,2) IParticles() -TrigTraversal INFO |-> HLTNav_DC #0 Name(L1) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #3 Name(HLTPassRaw) Passing(1,2,3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #19 Name(SF) Passing(2) IParticles() -TrigTraversal INFO |-> HLTNav_DC #18 Name(H) Passing(2,3) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #17 Name(IM) Passing(2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #15 Name(F) Passing(2) IParticles() -TrigTraversal INFO |-> HLTNav_DC #12 Name(H) Passing(1,2,3) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #11 Name(IM) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #9 Name(F) Passing(1,2) IParticles() -TrigTraversal INFO |-> HLTNav_DC #1 Name(L1) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #7 Name(H) Passing() IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #6 Name(IM) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #4 Name(F) Passing(1,2) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #0 Name(L1) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #3 Name(HLTPassRaw) Passing(1,2,3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #19 Name(SF) Passing(2) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #18 Name(H) Passing(2,3) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #17 Name(IM) Passing(2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #15 Name(F) Passing(2) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #12 Name(H) Passing(1,2,3) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #11 Name(IM) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #9 Name(F) Passing(1,2) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #1 Name(L1) Passing(1,2,3) IParticles() TrigTraversal INFO HLT_mu_em_chain -TrigTraversal INFO |-> HLTNav_DC #7 Name(H) Passing() IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #6 Name(IM) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #5 Name(F) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #0 Name(L1) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #3 Name(HLTPassRaw) Passing(1,2,3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #21 Name(SF) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #20 Name(CH) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #18 Name(H) Passing(2,3) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #17 Name(IM) Passing(2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #16 Name(F) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #14 Name(CH) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #12 Name(H) Passing(1,2,3) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #11 Name(IM) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #10 Name(F) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #1 Name(L1) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #33 Name(SF) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #32 Name(CH) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #30 Name(H) Passing(3,4) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #29 Name(IM) Passing(3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #28 Name(F) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #26 Name(CH) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #25 Name(H) Passing(3,4) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #24 Name(IM) Passing(3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #23 Name(F) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #2 Name(L1) Passing(3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #7 Name(H) Passing() IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #6 Name(IM) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #5 Name(F) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #0 Name(L1) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #3 Name(HLTPassRaw) Passing(1,2,3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #21 Name(SF) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #20 Name(CH) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #18 Name(H) Passing(2,3) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #17 Name(IM) Passing(2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #16 Name(F) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #14 Name(CH) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #12 Name(H) Passing(1,2,3) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #11 Name(IM) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #10 Name(F) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #1 Name(L1) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #33 Name(SF) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #32 Name(CH) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #30 Name(H) Passing(3,4) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #29 Name(IM) Passing(3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #28 Name(F) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #26 Name(CH) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #25 Name(H) Passing(3,4) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #24 Name(IM) Passing(3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #23 Name(F) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #2 Name(L1) Passing(3,4) IParticles() TrigTraversal INFO HLT_em_chain -TrigTraversal INFO |-> HLTNav_DC #3 Name(HLTPassRaw) Passing(1,2,3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #31 Name(SF) Passing(4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #30 Name(H) Passing(3,4) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #29 Name(IM) Passing(3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #27 Name(F) Passing(4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #25 Name(H) Passing(3,4) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #24 Name(IM) Passing(3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #22 Name(F) Passing(4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #2 Name(L1) Passing(3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #3 Name(HLTPassRaw) Passing(1,2,3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #31 Name(SF) Passing(4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #30 Name(H) Passing(3,4) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #29 Name(IM) Passing(3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #27 Name(F) Passing(4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #25 Name(H) Passing(3,4) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #24 Name(IM) Passing(3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #22 Name(F) Passing(4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #2 Name(L1) Passing(3,4) IParticles() TrigTraversal INFO All -TrigTraversal INFO |-> HLTNav_DC #7 Name(H) Passing() IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #6 Name(IM) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #4 Name(F) Passing(1,2) IParticles() -TrigTraversal INFO |-> HLTNav_DC #0 Name(L1) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #5 Name(F) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #0 Name(L1) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #3 Name(HLTPassRaw) Passing(1,2,3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #13 Name(SF) Passing(1) IParticles() -TrigTraversal INFO |-> HLTNav_DC #12 Name(H) Passing(1,2,3) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #11 Name(IM) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #9 Name(F) Passing(1,2) IParticles() -TrigTraversal INFO |-> HLTNav_DC #1 Name(L1) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #10 Name(F) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #1 Name(L1) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #19 Name(SF) Passing(2) IParticles() -TrigTraversal INFO |-> HLTNav_DC #18 Name(H) Passing(2,3) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #17 Name(IM) Passing(2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #15 Name(F) Passing(2) IParticles() -TrigTraversal INFO |-> HLTNav_DC #12 Name(H) Passing(1,2,3) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #11 Name(IM) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #9 Name(F) Passing(1,2) IParticles() -TrigTraversal INFO |-> HLTNav_DC #1 Name(L1) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #10 Name(F) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #1 Name(L1) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #16 Name(F) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #14 Name(CH) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #12 Name(H) Passing(1,2,3) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #11 Name(IM) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #9 Name(F) Passing(1,2) IParticles() -TrigTraversal INFO |-> HLTNav_DC #1 Name(L1) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #10 Name(F) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #1 Name(L1) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #21 Name(SF) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #20 Name(CH) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #18 Name(H) Passing(2,3) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #17 Name(IM) Passing(2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #15 Name(F) Passing(2) IParticles() -TrigTraversal INFO |-> HLTNav_DC #12 Name(H) Passing(1,2,3) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #11 Name(IM) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #9 Name(F) Passing(1,2) IParticles() -TrigTraversal INFO |-> HLTNav_DC #1 Name(L1) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #10 Name(F) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #1 Name(L1) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #16 Name(F) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #14 Name(CH) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #12 Name(H) Passing(1,2,3) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #11 Name(IM) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #9 Name(F) Passing(1,2) IParticles() -TrigTraversal INFO |-> HLTNav_DC #1 Name(L1) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #10 Name(F) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #1 Name(L1) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #31 Name(SF) Passing(4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #30 Name(H) Passing(3,4) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #29 Name(IM) Passing(3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #27 Name(F) Passing(4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #25 Name(H) Passing(3,4) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #24 Name(IM) Passing(3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #22 Name(F) Passing(4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #2 Name(L1) Passing(3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #23 Name(F) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #2 Name(L1) Passing(3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #28 Name(F) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #26 Name(CH) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #25 Name(H) Passing(3,4) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #24 Name(IM) Passing(3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #22 Name(F) Passing(4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #2 Name(L1) Passing(3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #23 Name(F) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #2 Name(L1) Passing(3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #33 Name(SF) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #32 Name(CH) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #30 Name(H) Passing(3,4) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #29 Name(IM) Passing(3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #27 Name(F) Passing(4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #25 Name(H) Passing(3,4) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #24 Name(IM) Passing(3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #22 Name(F) Passing(4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #2 Name(L1) Passing(3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #23 Name(F) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #2 Name(L1) Passing(3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #28 Name(F) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #26 Name(CH) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #25 Name(H) Passing(3,4) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #24 Name(IM) Passing(3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #22 Name(F) Passing(4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #2 Name(L1) Passing(3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #23 Name(F) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #2 Name(L1) Passing(3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #7 Name(H) Passing() IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #6 Name(IM) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #4 Name(F) Passing(1,2) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #0 Name(L1) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #5 Name(F) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #0 Name(L1) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #3 Name(HLTPassRaw) Passing(1,2,3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #13 Name(SF) Passing(1) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #12 Name(H) Passing(1,2,3) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #11 Name(IM) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #9 Name(F) Passing(1,2) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #1 Name(L1) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #10 Name(F) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #1 Name(L1) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #19 Name(SF) Passing(2) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #18 Name(H) Passing(2,3) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #17 Name(IM) Passing(2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #15 Name(F) Passing(2) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #12 Name(H) Passing(1,2,3) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #11 Name(IM) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #9 Name(F) Passing(1,2) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #1 Name(L1) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #10 Name(F) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #1 Name(L1) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #16 Name(F) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #14 Name(CH) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #12 Name(H) Passing(1,2,3) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #11 Name(IM) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #9 Name(F) Passing(1,2) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #1 Name(L1) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #10 Name(F) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #1 Name(L1) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #21 Name(SF) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #20 Name(CH) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #18 Name(H) Passing(2,3) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #17 Name(IM) Passing(2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #15 Name(F) Passing(2) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #12 Name(H) Passing(1,2,3) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #11 Name(IM) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #9 Name(F) Passing(1,2) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #1 Name(L1) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #10 Name(F) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #1 Name(L1) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #16 Name(F) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #14 Name(CH) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #12 Name(H) Passing(1,2,3) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #11 Name(IM) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #9 Name(F) Passing(1,2) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #1 Name(L1) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #10 Name(F) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #1 Name(L1) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #31 Name(SF) Passing(4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #30 Name(H) Passing(3,4) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #29 Name(IM) Passing(3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #27 Name(F) Passing(4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #25 Name(H) Passing(3,4) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #24 Name(IM) Passing(3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #22 Name(F) Passing(4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #2 Name(L1) Passing(3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #23 Name(F) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #2 Name(L1) Passing(3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #28 Name(F) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #26 Name(CH) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #25 Name(H) Passing(3,4) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #24 Name(IM) Passing(3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #22 Name(F) Passing(4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #2 Name(L1) Passing(3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #23 Name(F) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #2 Name(L1) Passing(3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #33 Name(SF) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #32 Name(CH) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #30 Name(H) Passing(3,4) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #29 Name(IM) Passing(3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #27 Name(F) Passing(4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #25 Name(H) Passing(3,4) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #24 Name(IM) Passing(3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #22 Name(F) Passing(4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #2 Name(L1) Passing(3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #23 Name(F) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #2 Name(L1) Passing(3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #28 Name(F) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #26 Name(CH) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #25 Name(H) Passing(3,4) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #24 Name(IM) Passing(3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #22 Name(F) Passing(4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #2 Name(L1) Passing(3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #23 Name(F) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #2 Name(L1) Passing(3,4) IParticles() TrigTraversal INFO [All passing/failing features] HLT_mufast_chain features size:2 Feature pt:20, state:ACTIVE Feature pt:5, state:INACTIVE @@ -383,179 +391,180 @@ TrigTraversal INFO [Final passing/failing feature] All chains features si ---------- ---------- ---------- Thinning out 'F' nodes. +---------- TrigTraversal INFO HLT_mufast_chain goes from 10 nodes, 11 edges, to 8 nodes, 6 edges. -TrigTraversal INFO |-> HLTNav_DC #7 Name(H) Passing() IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #6 Name(IM) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #0 Name(L1) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #3 Name(HLTPassRaw) Passing(1,2,3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #13 Name(SF) Passing(1) IParticles() -TrigTraversal INFO |-> HLTNav_DC #12 Name(H) Passing(1,2,3) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #11 Name(IM) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #1 Name(L1) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #7 Name(H) Passing() IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #6 Name(IM) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #0 Name(L1) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #3 Name(HLTPassRaw) Passing(1,2,3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #13 Name(SF) Passing(1) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #12 Name(H) Passing(1,2,3) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #11 Name(IM) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #1 Name(L1) Passing(1,2,3) IParticles() TrigTraversal INFO HLT_mu_chain goes from 13 nodes, 11 edges, to 10 nodes, 8 edges. -TrigTraversal INFO |-> HLTNav_DC #7 Name(H) Passing() IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #6 Name(IM) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #0 Name(L1) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #3 Name(HLTPassRaw) Passing(1,2,3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #19 Name(SF) Passing(2) IParticles() -TrigTraversal INFO |-> HLTNav_DC #18 Name(H) Passing(2,3) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #17 Name(IM) Passing(2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #12 Name(H) Passing(1,2,3) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #11 Name(IM) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #1 Name(L1) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #7 Name(H) Passing() IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #6 Name(IM) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #0 Name(L1) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #3 Name(HLTPassRaw) Passing(1,2,3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #19 Name(SF) Passing(2) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #18 Name(H) Passing(2,3) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #17 Name(IM) Passing(2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #12 Name(H) Passing(1,2,3) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #11 Name(IM) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #1 Name(L1) Passing(1,2,3) IParticles() TrigTraversal INFO HLT_mu_em_chain goes from 25 nodes, 23 edges, to 20 nodes, 18 edges. -TrigTraversal INFO |-> HLTNav_DC #7 Name(H) Passing() IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #6 Name(IM) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #0 Name(L1) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #3 Name(HLTPassRaw) Passing(1,2,3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #21 Name(SF) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #20 Name(CH) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #18 Name(H) Passing(2,3) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #17 Name(IM) Passing(2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #14 Name(CH) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #12 Name(H) Passing(1,2,3) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #11 Name(IM) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #1 Name(L1) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #33 Name(SF) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #32 Name(CH) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #30 Name(H) Passing(3,4) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #29 Name(IM) Passing(3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #26 Name(CH) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #25 Name(H) Passing(3,4) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #24 Name(IM) Passing(3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #2 Name(L1) Passing(3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #7 Name(H) Passing() IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #6 Name(IM) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #0 Name(L1) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #3 Name(HLTPassRaw) Passing(1,2,3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #21 Name(SF) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #20 Name(CH) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #18 Name(H) Passing(2,3) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #17 Name(IM) Passing(2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #14 Name(CH) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #12 Name(H) Passing(1,2,3) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #11 Name(IM) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #1 Name(L1) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #33 Name(SF) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #32 Name(CH) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #30 Name(H) Passing(3,4) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #29 Name(IM) Passing(3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #26 Name(CH) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #25 Name(H) Passing(3,4) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #24 Name(IM) Passing(3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #2 Name(L1) Passing(3,4) IParticles() TrigTraversal INFO HLT_em_chain goes from 9 nodes, 8 edges, to 7 nodes, 6 edges. -TrigTraversal INFO |-> HLTNav_DC #3 Name(HLTPassRaw) Passing(1,2,3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #31 Name(SF) Passing(4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #30 Name(H) Passing(3,4) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #29 Name(IM) Passing(3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #25 Name(H) Passing(3,4) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #24 Name(IM) Passing(3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #2 Name(L1) Passing(3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #3 Name(HLTPassRaw) Passing(1,2,3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #31 Name(SF) Passing(4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #30 Name(H) Passing(3,4) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #29 Name(IM) Passing(3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #25 Name(H) Passing(3,4) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #24 Name(IM) Passing(3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #2 Name(L1) Passing(3,4) IParticles() TrigTraversal INFO All goes from 33 nodes, 39 edges, to 23 nodes, 26 edges. -TrigTraversal INFO |-> HLTNav_DC #7 Name(H) Passing() IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #6 Name(IM) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #0 Name(L1) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #3 Name(HLTPassRaw) Passing(1,2,3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #13 Name(SF) Passing(1) IParticles() -TrigTraversal INFO |-> HLTNav_DC #12 Name(H) Passing(1,2,3) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #11 Name(IM) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #1 Name(L1) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #19 Name(SF) Passing(2) IParticles() -TrigTraversal INFO |-> HLTNav_DC #18 Name(H) Passing(2,3) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #17 Name(IM) Passing(2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #12 Name(H) Passing(1,2,3) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #11 Name(IM) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #1 Name(L1) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #14 Name(CH) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #12 Name(H) Passing(1,2,3) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #11 Name(IM) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #1 Name(L1) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #21 Name(SF) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #20 Name(CH) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #18 Name(H) Passing(2,3) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #17 Name(IM) Passing(2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #12 Name(H) Passing(1,2,3) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #11 Name(IM) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #1 Name(L1) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #14 Name(CH) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #12 Name(H) Passing(1,2,3) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #11 Name(IM) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #1 Name(L1) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #31 Name(SF) Passing(4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #30 Name(H) Passing(3,4) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #29 Name(IM) Passing(3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #25 Name(H) Passing(3,4) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #24 Name(IM) Passing(3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #2 Name(L1) Passing(3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #26 Name(CH) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #25 Name(H) Passing(3,4) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #24 Name(IM) Passing(3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #2 Name(L1) Passing(3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #33 Name(SF) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #32 Name(CH) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #30 Name(H) Passing(3,4) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #29 Name(IM) Passing(3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #25 Name(H) Passing(3,4) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #24 Name(IM) Passing(3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #2 Name(L1) Passing(3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #26 Name(CH) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #25 Name(H) Passing(3,4) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #24 Name(IM) Passing(3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #2 Name(L1) Passing(3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #7 Name(H) Passing() IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #6 Name(IM) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #0 Name(L1) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #3 Name(HLTPassRaw) Passing(1,2,3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #13 Name(SF) Passing(1) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #12 Name(H) Passing(1,2,3) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #11 Name(IM) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #1 Name(L1) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #19 Name(SF) Passing(2) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #18 Name(H) Passing(2,3) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #17 Name(IM) Passing(2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #12 Name(H) Passing(1,2,3) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #11 Name(IM) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #1 Name(L1) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #14 Name(CH) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #12 Name(H) Passing(1,2,3) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #11 Name(IM) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #1 Name(L1) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #21 Name(SF) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #20 Name(CH) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #18 Name(H) Passing(2,3) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #17 Name(IM) Passing(2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #12 Name(H) Passing(1,2,3) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #11 Name(IM) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #1 Name(L1) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #14 Name(CH) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #12 Name(H) Passing(1,2,3) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #11 Name(IM) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #1 Name(L1) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #31 Name(SF) Passing(4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #30 Name(H) Passing(3,4) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #29 Name(IM) Passing(3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #25 Name(H) Passing(3,4) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #24 Name(IM) Passing(3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #2 Name(L1) Passing(3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #26 Name(CH) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #25 Name(H) Passing(3,4) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #24 Name(IM) Passing(3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #2 Name(L1) Passing(3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #33 Name(SF) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #32 Name(CH) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #30 Name(H) Passing(3,4) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #29 Name(IM) Passing(3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #25 Name(H) Passing(3,4) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #24 Name(IM) Passing(3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #2 Name(L1) Passing(3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #26 Name(CH) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #25 Name(H) Passing(3,4) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #24 Name(IM) Passing(3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #2 Name(L1) Passing(3,4) IParticles() ---------- ---------- Thinning with mode 'keepOnlyFinalFeatures'. ---------- TrigTraversal INFO HLT_mufast_chain goes from 8 nodes, 8 edges, to 8 nodes, 6 edges. -TrigTraversal INFO |-> HLTNav_DC #7 Name(H) Passing() IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #6 Name(IM) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #0 Name(L1) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #3 Name(HLTPassRaw) Passing(1,2,3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #13 Name(SF) Passing(1) IParticles() -TrigTraversal INFO |-> HLTNav_DC #12 Name(H) Passing(1,2,3) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #11 Name(IM) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #1 Name(L1) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #7 Name(H) Passing() IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #6 Name(IM) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #0 Name(L1) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #3 Name(HLTPassRaw) Passing(1,2,3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #13 Name(SF) Passing(1) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #12 Name(H) Passing(1,2,3) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #11 Name(IM) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #1 Name(L1) Passing(1,2,3) IParticles() TrigTraversal INFO HLT_mu_chain goes from 10 nodes, 8 edges, to 8 nodes, 6 edges. -TrigTraversal INFO |-> HLTNav_DC #7 Name(H) Passing() IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #6 Name(IM) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #0 Name(L1) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #3 Name(HLTPassRaw) Passing(1,2,3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #19 Name(SF) Passing(2) IParticles() -TrigTraversal INFO |-> HLTNav_DC #18 Name(H) Passing(2,3) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #17 Name(IM) Passing(2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #1 Name(L1) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #7 Name(H) Passing() IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #6 Name(IM) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #0 Name(L1) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #3 Name(HLTPassRaw) Passing(1,2,3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #19 Name(SF) Passing(2) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #18 Name(H) Passing(2,3) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #17 Name(IM) Passing(2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #1 Name(L1) Passing(1,2,3) IParticles() TrigTraversal INFO [HLT_mu_em_chain goes from 20 nodes, 18 edges, to 14 nodes, 12 edges. -TrigTraversal INFO |-> HLTNav_DC #7 Name(H) Passing() IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #6 Name(IM) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #0 Name(L1) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #3 Name(HLTPassRaw) Passing(1,2,3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #21 Name(SF) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #20 Name(CH) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #18 Name(H) Passing(2,3) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #17 Name(IM) Passing(2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #1 Name(L1) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #33 Name(SF) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #32 Name(CH) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #30 Name(H) Passing(3,4) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #29 Name(IM) Passing(3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #2 Name(L1) Passing(3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #7 Name(H) Passing() IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #6 Name(IM) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #0 Name(L1) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #3 Name(HLTPassRaw) Passing(1,2,3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #21 Name(SF) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #20 Name(CH) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #18 Name(H) Passing(2,3) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #17 Name(IM) Passing(2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #1 Name(L1) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #33 Name(SF) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #32 Name(CH) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #30 Name(H) Passing(3,4) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #29 Name(IM) Passing(3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #2 Name(L1) Passing(3,4) IParticles() TrigTraversal INFO HLT_em_chain goes from 9 nodes, 6 edges, to 5 nodes, 4 edges. -TrigTraversal INFO |-> HLTNav_DC #3 Name(HLTPassRaw) Passing(1,2,3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #31 Name(SF) Passing(4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #30 Name(H) Passing(3,4) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #29 Name(IM) Passing(3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #2 Name(L1) Passing(3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #3 Name(HLTPassRaw) Passing(1,2,3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #31 Name(SF) Passing(4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #30 Name(H) Passing(3,4) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #29 Name(IM) Passing(3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #2 Name(L1) Passing(3,4) IParticles() TrigTraversal INFO All goes from 23 nodes, 26 edges, to 19 nodes, 20 edges. -TrigTraversal INFO |-> HLTNav_DC #7 Name(H) Passing() IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #6 Name(IM) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #0 Name(L1) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #3 Name(HLTPassRaw) Passing(1,2,3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #13 Name(SF) Passing(1) IParticles() -TrigTraversal INFO |-> HLTNav_DC #12 Name(H) Passing(1,2,3) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #11 Name(IM) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #1 Name(L1) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #19 Name(SF) Passing(2) IParticles() -TrigTraversal INFO |-> HLTNav_DC #18 Name(H) Passing(2,3) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #17 Name(IM) Passing(2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #12 Name(H) Passing(1,2,3) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #11 Name(IM) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #1 Name(L1) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #21 Name(SF) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #20 Name(CH) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #18 Name(H) Passing(2,3) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #17 Name(IM) Passing(2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #12 Name(H) Passing(1,2,3) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #11 Name(IM) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #1 Name(L1) Passing(1,2,3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #31 Name(SF) Passing(4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #30 Name(H) Passing(3,4) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #29 Name(IM) Passing(3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #2 Name(L1) Passing(3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #33 Name(SF) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #32 Name(CH) Passing(3) IParticles() -TrigTraversal INFO |-> HLTNav_DC #30 Name(H) Passing(3,4) IParticles(feature) -TrigTraversal INFO |-> HLTNav_DC #29 Name(IM) Passing(3,4) IParticles() -TrigTraversal INFO |-> HLTNav_DC #2 Name(L1) Passing(3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #7 Name(H) Passing() IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #6 Name(IM) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #0 Name(L1) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #3 Name(HLTPassRaw) Passing(1,2,3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #13 Name(SF) Passing(1) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #12 Name(H) Passing(1,2,3) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #11 Name(IM) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #1 Name(L1) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #19 Name(SF) Passing(2) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #18 Name(H) Passing(2,3) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #17 Name(IM) Passing(2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #12 Name(H) Passing(1,2,3) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #11 Name(IM) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #1 Name(L1) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #21 Name(SF) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #20 Name(CH) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #18 Name(H) Passing(2,3) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #17 Name(IM) Passing(2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #12 Name(H) Passing(1,2,3) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #11 Name(IM) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #1 Name(L1) Passing(1,2,3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #31 Name(SF) Passing(4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #30 Name(H) Passing(3,4) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #29 Name(IM) Passing(3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #2 Name(L1) Passing(3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #33 Name(SF) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #32 Name(CH) Passing(3) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #30 Name(H) Passing(3,4) IParticles(feature) +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #29 Name(IM) Passing(3,4) IParticles() +TrigTraversal INFO |-> HLTNav_Summary_OnlineSlimmed #2 Name(L1) Passing(3,4) IParticles() ---------- ---------- Check Explicit Type ---------- diff --git a/Trigger/TrigSteer/TrigCompositeUtils/test/TrigTraversal_test.cxx b/Trigger/TrigSteer/TrigCompositeUtils/test/TrigTraversal_test.cxx index f839542e65a1e5b366621844d07e28f635c799bd..5f3a23d4756c1020fa086cd2ab8530054d9b28ef 100644 --- a/Trigger/TrigSteer/TrigCompositeUtils/test/TrigTraversal_test.cxx +++ b/Trigger/TrigSteer/TrigCompositeUtils/test/TrigTraversal_test.cxx @@ -56,7 +56,7 @@ int main ATLAS_NOT_THREAD_SAFE () { const EventContext& ctx1 = Gaudi::Hive::currentContext(); log << "Current context: " << ctx1 << endmsg; - SG::WriteHandleKey<DecisionContainer> decisionContainerKey("HLTNav_DC"); + SG::WriteHandleKey<DecisionContainer> decisionContainerKey("HLTNav_Summary_OnlineSlimmed"); // We have a single collection, so we use the same name as the online compactified collection SG::WriteHandleKey<xAOD::ElectronContainer> electronContainerKey("MyElectronContainer"); SG::WriteHandleKey<xAOD::MuonContainer> muonContainerKey("MyMuonContainer"); @@ -382,11 +382,11 @@ int main ATLAS_NOT_THREAD_SAFE () { std::cout << " ---------- Now Include Failing Features " << std::endl; - std::vector<const Decision*> extraStart_HLT_mufast_chain = getRejectedDecisionNodes(pSG, {HLT_mufast_chain}); - std::vector<const Decision*> extraStart_HLT_mu_chain = getRejectedDecisionNodes(pSG, {HLT_mu_chain}); - std::vector<const Decision*> extraStart_HLT_mu_em_chain = getRejectedDecisionNodes(pSG, {HLT_mu_em_chain}); - std::vector<const Decision*> extraStart_HLT_em_chain = getRejectedDecisionNodes(pSG, {HLT_em_chain}); - std::vector<const Decision*> extraStart_HLT_all = getRejectedDecisionNodes(pSG, {}); + std::vector<const Decision*> extraStart_HLT_mufast_chain = getRejectedDecisionNodes(pSG, decisionContainerKey.key(), {HLT_mufast_chain}); + std::vector<const Decision*> extraStart_HLT_mu_chain = getRejectedDecisionNodes(pSG, decisionContainerKey.key(), {HLT_mu_chain}); + std::vector<const Decision*> extraStart_HLT_mu_em_chain = getRejectedDecisionNodes(pSG, decisionContainerKey.key(), {HLT_mu_em_chain}); + std::vector<const Decision*> extraStart_HLT_em_chain = getRejectedDecisionNodes(pSG, decisionContainerKey.key(), {HLT_em_chain}); + std::vector<const Decision*> extraStart_HLT_all = getRejectedDecisionNodes(pSG, decisionContainerKey.key(), {}); for (const Decision* d : extraStart_HLT_mufast_chain) { recursiveGetDecisions(d, graph_HLT_mufast_chain, {HLT_mufast_chain}, false); @@ -540,7 +540,7 @@ int main ATLAS_NOT_THREAD_SAFE () { // Check retrieval of a link which does NOT derive from IParticle END->setObjectLink<DecisionContainer>("notAnIParticle", end_link); - EXPECT_EXCEPTION (SG::ExcCLIDMismatch, END->objectLink<xAOD::IParticleContainer>("notAnIParticle")); + EXPECT_EXCEPTION (xAOD::ExcNotIParticleContainer, END->objectLink<xAOD::IParticleContainer>("notAnIParticle")); return 0; diff --git a/Trigger/TrigSteer/TrigOutputHandling/TrigOutputHandling/TriggerEDMAuxAccessors.h b/Trigger/TrigSteer/TrigOutputHandling/TrigOutputHandling/TriggerEDMAuxAccessors.h index b9013e09f82d2a0de7f2acbab188755e627d9ff7..d6a9bf2d8334b12cecfcfe7989237bbb6fb20bdf 100644 --- a/Trigger/TrigSteer/TrigOutputHandling/TrigOutputHandling/TriggerEDMAuxAccessors.h +++ b/Trigger/TrigSteer/TrigOutputHandling/TrigOutputHandling/TriggerEDMAuxAccessors.h @@ -96,6 +96,12 @@ auto floatAccessors = initAccessors<float>( "dipsLoose20210517_pb", "dipsLoose20210517_pc", "dipsLoose20210517_pu", + "DL1dv00_pb", + "DL1dv00_pc", + "DL1dv00_pu", + "dipsLoose20210729_pb", + "dipsLoose20210729_pc", + "dipsLoose20210729_pu", "DetectorEta", "DetectorPhi", "EMFrac", "HECFrac", "JVFCorr", "seed_eta", "seed_phi", "trk_a0beam", "btagIp_d0", "btagIp_d0Uncertainty", "btagIp_z0SinTheta", "btagIp_z0SinThetaUncertainty", diff --git a/Trigger/TrigT1/L1Topo/L1TopoCoreSim/Root/TopoSteeringStructure.cxx b/Trigger/TrigT1/L1Topo/L1TopoCoreSim/Root/TopoSteeringStructure.cxx index a059550d303730d0da589ec334dc4fa02f4090e6..792f564225cff444894308fba413d7d65c5ca47c 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoCoreSim/Root/TopoSteeringStructure.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoCoreSim/Root/TopoSteeringStructure.cxx @@ -237,10 +237,13 @@ TCS::TopoSteeringStructure::setupFromMenu(const TrigConf::L1Menu& l1menu, bool l const string & tlName = tl.name(); auto & algo = l1menu.algorithmFromTriggerline(tlName); - string *foundAlgo = std::find(std::begin(AvailableMultAlgs), std::end(AvailableMultAlgs), algo.klass()); + string algo_klass = algo.klass(); + if(algo_klass=="eEmVarMultiplicity") algo_klass="eEmMultiplicity"; // in sim, use the same multiplicity algo for fixed and variable thresholds + + string *foundAlgo = std::find(std::begin(AvailableMultAlgs), std::end(AvailableMultAlgs), algo_klass); if (foundAlgo == std::end(AvailableMultAlgs)) cout << "TopoSteeringStructure: No L1Topo algorithm matching the configured multiplicity algorithm in the menu!" << endl; - if ( (algo.klass() != "eEmMultiplicity") && (algo.klass() != "eTauMultiplicity") && (algo.klass() != "jJetMultiplicity") ) continue; // Only available multiplicity algorithms so far + if ( (algo_klass != "eEmMultiplicity") && (algo_klass != "eTauMultiplicity") && (algo_klass != "jJetMultiplicity") ) continue; // Only available multiplicity algorithms so far auto it = find(storedConn.begin(), storedConn.end(), algo.name()); if (it == storedConn.end()) { // Algorithm/Connector does not exist: create and store it @@ -249,7 +252,7 @@ TCS::TopoSteeringStructure::setupFromMenu(const TrigConf::L1Menu& l1menu, bool l if(debug) cout << "L1TopoSteering: Multiplicity algo( " << algo.name() << " ) has as input " << algo.inputs().at(0) << endl; - CountingConnector * conn = new CountingConnector(algo.name(), algo.inputs().at(0), algo.klass()+"/"+algo.name(), algo.outputs().at(0)); + CountingConnector * conn = new CountingConnector(algo.name(), algo.inputs().at(0), algo_klass+"/"+algo.name(), algo.outputs().at(0)); conn->m_count.setNBits( tl.nbits() ); conn->m_count.setFirstBit( tl.startbit() ); @@ -372,7 +375,7 @@ TCS::TopoSteeringStructure::setupFromMenu(const TrigConf::L1Menu& l1menu, bool l auto & l1algo = l1menu.algorithm(multAlgo, "MULTTOPO"); - if ( (l1algo.klass() != "eEmMultiplicity") && (l1algo.klass() != "eTauMultiplicity") && (l1algo.klass() != "jJetMultiplicity") ) continue; // Only available multiplicities for now + if ( (l1algo.klass() != "eEmMultiplicity") && (l1algo.klass() != "eEmVarMultiplicity") && (l1algo.klass() != "eTauMultiplicity") && (l1algo.klass() != "jJetMultiplicity") ) continue; // Only available multiplicities for now ConfigurableAlg * alg = AlgFactory::instance().algorithm(l1algo.name()); diff --git a/Trigger/TrigT1/TrigT1MuctpiPhase1/src/MuonSectorProcessor.cxx b/Trigger/TrigT1/TrigT1MuctpiPhase1/src/MuonSectorProcessor.cxx index 5098e91b113dc10ecdc858f6f2dff9c0af96797a..ae7ff8c5af96c8abcc4d948fc33bba2086f425c5 100644 --- a/Trigger/TrigT1/TrigT1MuctpiPhase1/src/MuonSectorProcessor.cxx +++ b/Trigger/TrigT1/TrigT1MuctpiPhase1/src/MuonSectorProcessor.cxx @@ -385,6 +385,8 @@ namespace LVL1MUCTPIPHASE1 { int ptword = sectorData->pt(icand); if (ptword < 0) continue; + // the following doesn't quite follow the correct nomenclature, should be (side, isub, isec, roiID) thus there was a typo chain in L399+ using isub instead of the correct isys + // see: https://gitlab.cern.ch/atlas/athena/-/blob/master/Trigger/TrigT1/TrigT1MuctpiPhase1/src/L1TopoLUT.cxx#L161 L1TopoCoordinates coord = m_l1topoLUT->getCoordinates(isub, isys, isec, roiID); //check for invalid decoding @@ -396,13 +398,13 @@ namespace LVL1MUCTPIPHASE1 { } int ptValue = 0; - auto enc = m_ptEncoding[isub].find(ptword); - if (enc == m_ptEncoding[isub].end()) + auto enc = m_ptEncoding[isys].find(ptword); + if (enc == m_ptEncoding[isys].end()) { - auto last_enc = m_ptEncoding[isub].rbegin(); - if (last_enc != m_ptEncoding[isub].rend() && ptword > last_enc->first) + auto last_enc = m_ptEncoding[isys].rbegin(); + if (last_enc != m_ptEncoding[isys].rend() && ptword > last_enc->first) { - ptValue = m_ptEncoding[isub].rbegin()->second; + ptValue = m_ptEncoding[isys].rbegin()->second; } else { diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/src/TriggerProcessorTool.cxx b/Trigger/TrigT1/TrigT1NSWSimTools/src/TriggerProcessorTool.cxx index 1121547fe8a4b43309d6aa7bfd9994319ec54857..be31bc4ff1af608ae3dac7e833f3bf533176ac5a 100644 --- a/Trigger/TrigT1/TrigT1NSWSimTools/src/TriggerProcessorTool.cxx +++ b/Trigger/TrigT1/TrigT1NSWSimTools/src/TriggerProcessorTool.cxx @@ -26,7 +26,8 @@ namespace NSWL1 { for ( const Muon::NSW_PadTriggerData* padTriggerData : *padTriggerContainer ) { ATH_MSG_DEBUG("Pad Trigger data: " << *padTriggerData); - Muon::NSW_TrigRawData* trigRawData = new Muon::NSW_TrigRawData(padTriggerData->sectorID(),padTriggerData->BCID()); + char sectorSide = (padTriggerData->endcap() == Muon::NSW_PadTriggerData::Endcap::A) ? 'A' : 'C'; + Muon::NSW_TrigRawData* trigRawData = new Muon::NSW_TrigRawData(padTriggerData->sectorID(), sectorSide, padTriggerData->BCID()); for ( const Muon::NSW_PadTriggerSegment* padTriggerSegment : *padTriggerData) { ATH_MSG_DEBUG("Pad Trigger segment: " << *padTriggerSegment); diff --git a/Trigger/TrigT1/TrigT1ResultByteStream/python/TrigT1ResultByteStreamConfig.py b/Trigger/TrigT1/TrigT1ResultByteStream/python/TrigT1ResultByteStreamConfig.py index f98578da96084c7e4b59bd63407b9264ee312d25..e8fd56a1bd9f9c44e45b115f113348b276efb994 100644 --- a/Trigger/TrigT1/TrigT1ResultByteStream/python/TrigT1ResultByteStreamConfig.py +++ b/Trigger/TrigT1/TrigT1ResultByteStream/python/TrigT1ResultByteStreamConfig.py @@ -125,6 +125,12 @@ def L1TriggerByteStreamDecoderCfg(flags): # L1Topo may be missing in some runs of Run 2 when it was under commissioning for module_id in roibResultTool.L1TopoModuleIds: maybeMissingRobs.append(int(SourceIdentifier(SubDetector.TDAQ_CALO_TOPO_PROC, module_id))) + if flags.Trigger.EDMVersion == 2 and not flags.Trigger.doHLT: + # L1Calo occasional readout errors weren't caught by HLT in 2015 - ignore these in offline reco, see ATR-24493 + for module_id in roibResultTool.JetModuleIds: + maybeMissingRobs.append(int(SourceIdentifier(SubDetector.TDAQ_CALO_JET_PROC_ROI, module_id))) + for module_id in roibResultTool.EMModuleIds: + maybeMissingRobs.append(int(SourceIdentifier(SubDetector.TDAQ_CALO_CLUSTER_PROC_ROI, module_id))) # Run-3 L1Muon decoding if flags.Trigger.enableL1MuonPhase1: diff --git a/Trigger/TrigTools/TrigByteStreamTools/bin/trigbs_dumpHLTContentInBS.py b/Trigger/TrigTools/TrigByteStreamTools/bin/trigbs_dumpHLTContentInBS.py index 5e9bc88579e5b154be57b7c2cd23fa3965cd3870..a35e1a6afc708ba04f538bf49902b3bb13dcdefd 100755 --- a/Trigger/TrigTools/TrigByteStreamTools/bin/trigbs_dumpHLTContentInBS.py +++ b/Trigger/TrigTools/TrigByteStreamTools/bin/trigbs_dumpHLTContentInBS.py @@ -1,13 +1,11 @@ #!/usr/bin/env python -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration -from __future__ import print_function import eformat import argparse import operator - -from PyUtils.Decorators import memoize +from functools import cache __doc__ = """\ Dump content of the HLT result and HLT related details from the event header. @@ -129,7 +127,7 @@ def CTP_Info(event, module_id=1): print("ROB 0x%0x, %s: %s" % (rob.source_id(), w, printL1Items(items,smk))) -@memoize +@cache def getL1Menu(smk): from CoolRunQuery.utils.AtlRunQueryTriggerUtils import getL1Menu return getL1Menu(str(smk)) diff --git a/Trigger/TrigTools/TrigInDetConfig/python/TrigInDetConfig.py b/Trigger/TrigTools/TrigInDetConfig/python/TrigInDetConfig.py index b36d170491db97d306083917744cce881a305b07..c0647616a0c9ddae090bff3a9f300c8aa2a2400f 100644 --- a/Trigger/TrigTools/TrigInDetConfig/python/TrigInDetConfig.py +++ b/Trigger/TrigTools/TrigInDetConfig/python/TrigInDetConfig.py @@ -930,7 +930,12 @@ def FitterToolCfg(flags): from TrkConfig.AtlasTrackingGeometrySvcConfig import TrackingGeometrySvcCfg from TrkConfig.AtlasExtrapolatorToolsConfig import AtlasNavigatorCfg from TrkConfig.AtlasExtrapolatorConfig import InDetExtrapolatorCfg - cond_alg = None #TODO may need to pull AtlasTrackingGeometryCondAlg and use it later + from TrackingGeometryCondAlg.AtlasTrackingGeometryCondAlgConfig import ( + TrackingGeometryCondAlgCfg) + cond_alg = TrackingGeometryCondAlgCfg(flags) + geom_cond_key = cond_alg.getPrimary().TrackingGeometryWriteKey + acc.merge(cond_alg) + fitter = CompFactory.Trk.GlobalChi2Fitter(name = 'InDetTrigTrackFitter', ExtrapolationTool = acc.getPrimaryAndMerge(InDetExtrapolatorCfg(flags, name="InDetTrigExtrapolator")), NavigatorTool = acc.getPrimaryAndMerge(AtlasNavigatorCfg(flags, name="InDetTrigNavigator")), @@ -952,7 +957,7 @@ def FitterToolCfg(flags): Acceleration = True, #Momentum=1000., Momentum=0., - TrackingGeometryReadKey=cond_alg.TrackingGeometryWriteKey if cond_alg is not None else '' + TrackingGeometryReadKey=geom_cond_key ) acc.addPublicTool(fitter, primary=True) #TODO come back to these settings diff --git a/Trigger/TrigTools/TrigInDetPattRecoTools/src/TrigTrackSeedGenerator.cxx b/Trigger/TrigTools/TrigInDetPattRecoTools/src/TrigTrackSeedGenerator.cxx index 8722b90b8b3a09c915406784bd48dd88b4d8d5df..d1eaea446b44a049ffc0fad587a514c425813e7e 100644 --- a/Trigger/TrigTools/TrigInDetPattRecoTools/src/TrigTrackSeedGenerator.cxx +++ b/Trigger/TrigTools/TrigInDetPattRecoTools/src/TrigTrackSeedGenerator.cxx @@ -727,6 +727,12 @@ void TrigTrackSeedGenerator::createTriplets(const TrigSiSpacePointBase* pS, int if(nInner==0 || nOuter==0) return; + /// NB: the EDM classes store variuables as floats, therefore the double to float conversion + /// looses precision and as float(M_PI))>M_PI in the 7th decimal place we get problems + /// at the pi boundary + /// prefer std::fabs here for explicit double precision + bool fullPhi = ( roiDescriptor->isFullscan() || ( std::fabs( roiDescriptor->phiPlus() - roiDescriptor->phiMinus() - 2*M_PI ) < 1e-6 ) ); + int nSP = nInner + nOuter; const double pS_r = pS->r(); @@ -879,7 +885,7 @@ void TrigTrackSeedGenerator::createTriplets(const TrigSiSpacePointBase* pS, int //5. phi0 cut - if (!roiDescriptor->isFullscan()) { + if ( !fullPhi ) { const double uc = 2*B*pS_r - A; const double phi0 = atan2(sinA - uc*cosA, cosA + uc*sinA); @@ -920,6 +926,10 @@ void TrigTrackSeedGenerator::createTripletsNew(const TrigSiSpacePointBase* pS, i if(nInner==0 || nOuter==0) return; + /// prefer std::fabs here for explicit double precision + bool fullPhi = ( roiDescriptor->isFullscan() || ( std::fabs( roiDescriptor->phiPlus() - roiDescriptor->phiMinus() - 2*M_PI ) < 1e-6 ) ); + + int nSP = nInner + nOuter; output.reserve(m_settings.m_maxTripletBufferLength); @@ -1137,8 +1147,7 @@ void TrigTrackSeedGenerator::createTripletsNew(const TrigSiSpacePointBase* pS, i //5. phi0 cut - if (!roiDescriptor->isFullscan()) { - + if ( !fullPhi ) { const double uc = 2*d0_partial; const double phi0 = atan2(sinA - uc*cosA, cosA + uc*sinA); @@ -1202,6 +1211,10 @@ void TrigTrackSeedGenerator::createConfirmedTriplets(const TrigSiSpacePointBase* if(nInner==0 || nOuter==0) return; + /// prefer std::fabs here for explicit double precision + bool fullPhi = ( roiDescriptor->isFullscan() || ( std::fabs( roiDescriptor->phiPlus() - roiDescriptor->phiMinus() - 2*M_PI ) < 1e-6 ) ); + + int nSP = nInner + nOuter; const double pS_r = pS->r(); @@ -1348,7 +1361,7 @@ void TrigTrackSeedGenerator::createConfirmedTriplets(const TrigSiSpacePointBase* //5. phi0 cut - if (!roiDescriptor->isFullscan()) { + if ( !fullPhi ) { const double uc = 2*B*pS_r - A; const double phi0 = atan2(sinA - uc*cosA, cosA + uc*sinA); diff --git a/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref b/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref index 0094b96bf4359e579fe4cb076ed0653907c5f213..346d6daadeb3377e0ea566f0cf4f8e82c421b285 100644 --- a/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref +++ b/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref @@ -1,5 +1,7 @@ HLT_10j40_L14J15: eventCount: 0 +HLT_10j40_L14jJ15: + eventCount: 0 HLT_10j40_ftf_presel7j30_L14J15: eventCount: 0 stepCounts: @@ -18,6 +20,12 @@ HLT_10j40_pf_ftf_presel7j30_L14J15: 0: 5 stepFeatures: 0: 5 +HLT_10j40_pf_ftf_presel7j30_L14jJ15: + eventCount: 0 + stepCounts: + 0: 5 + stepFeatures: + 0: 5 HLT_2e12_lhloose_mu10_L12EM8VH_MU8F: eventCount: 0 stepCounts: @@ -68,6 +76,8 @@ HLT_2e5_lhmedium_j70_0eta320_j50_0eta490_j0_DJMASS900j50_L1MJJ-500-NFF: 2: 5 3: 4 4: 1 +HLT_2e5_lhmedium_j70_0eta320_j50_0eta490_j0_DJMASS900j50_L1jMJJ-500-NFF: + eventCount: 0 HLT_2e5_lhvloose_bBeeM6000_L12EM3: eventCount: 0 stepCounts: @@ -378,6 +388,8 @@ HLT_2j110_a10sd_pf_nojcalib_ftf_0eta200_TracklessdR1p2_L1J50: 1: 18 HLT_2j120_mb_afprec_afpdijet_L1AFP_A_AND_C_TOF_J50: eventCount: 0 +HLT_2j120_mb_afprec_afpdijet_L1AFP_A_AND_C_TOF_jJ50: + eventCount: 0 HLT_2j120_mb_afprec_afpdijet_L1CEP-CjJ50: eventCount: 0 HLT_2j135_mb_afprec_afpdijet_L1CEP-CjJ60: @@ -470,6 +482,8 @@ HLT_2j175_a10sd_pf_nojcalib_ftf_0eta200_TracklessdR1p2_L1J100: 1: 4 HLT_2j175_mb_afprec_afpdijet_L1AFP_A_AND_C_TOF_J75: eventCount: 0 +HLT_2j175_mb_afprec_afpdijet_L1AFP_A_AND_C_TOF_jJ75: + eventCount: 0 HLT_2j20_mb_afprec_afpdijet_L1RD0_FILLED: eventCount: 0 HLT_2j250_ftf_0eta240_j120_ftf_0eta240_presel2j180XXj80_L1J100: @@ -496,6 +510,14 @@ HLT_2j250_pf_ftf_0eta240_j120_pf_ftf_0eta240_presel2j180XXj80_L1J100: stepFeatures: 0: 4 1: 7 +HLT_2j250_pf_ftf_0eta240_j120_pf_ftf_0eta240_presel2j180XXj80_L1jJ100: + eventCount: 1 + stepCounts: + 0: 2 + 1: 1 + stepFeatures: + 0: 4 + 1: 7 HLT_2j330_a10sd_cssk_pf_jes_ftf_35smcINF_L1J100: eventCount: 0 stepCounts: @@ -532,6 +554,18 @@ HLT_2j330_a10sd_cssk_pf_jes_ftf_35smcINF_presel2j225_L1SC111-CJ15: 0: 3 stepFeatures: 0: 3 +HLT_2j330_a10sd_cssk_pf_jes_ftf_35smcINF_presel2j225_L1SC111-CjJ15: + eventCount: 0 + stepCounts: + 0: 2 + stepFeatures: + 0: 2 +HLT_2j330_a10sd_cssk_pf_jes_ftf_35smcINF_presel2j225_L1jJ100: + eventCount: 0 + stepCounts: + 0: 3 + stepFeatures: + 0: 3 HLT_2j330_a10sd_cssk_pf_nojcalib_ftf_35smcINF_L1J100: eventCount: 1 stepCounts: @@ -552,6 +586,18 @@ HLT_2j330_a10t_lcw_jes_35smcINF_L1SC111-CJ15: 0: 1 stepFeatures: 0: 2 +HLT_2j330_a10t_lcw_jes_35smcINF_L1SC111-CjJ15: + eventCount: 1 + stepCounts: + 0: 1 + stepFeatures: + 0: 2 +HLT_2j330_a10t_lcw_jes_35smcINF_L1jJ100: + eventCount: 1 + stepCounts: + 0: 1 + stepFeatures: + 0: 2 HLT_2j330_a10t_lcw_nojcalib_35smcINF_L1J100: eventCount: 1 stepCounts: @@ -586,6 +632,16 @@ HLT_2j35_0eta240_020jvt_pf_ftf_bdl1r60_2j35_0eta240_020jvt_pf_ftf_presel4j25_L14 0: 18 1: 80 2: 5 +HLT_2j35_0eta240_020jvt_pf_ftf_bdl1r60_2j35_0eta240_020jvt_pf_ftf_presel4j25_L14jJ15p0ETA25: + eventCount: 1 + stepCounts: + 0: 14 + 1: 8 + 2: 1 + stepFeatures: + 0: 28 + 1: 80 + 2: 5 HLT_2j35_0eta240_2j35_0eta240_L14J15p0ETA25: eventCount: 8 stepCounts: @@ -610,6 +666,16 @@ HLT_2j35_0eta290_020jvt_pf_ftf_bdl1r60_3j35_pf_ftf_0eta320_presel5j25_L15J15p0ET 0: 6 1: 35 2: 1 +HLT_2j35_0eta290_020jvt_pf_ftf_bdl1r60_3j35_pf_ftf_0eta320_presel5j25_L15jJ15p0ETA25: + eventCount: 1 + stepCounts: + 0: 8 + 1: 6 + 2: 1 + stepFeatures: + 0: 16 + 1: 70 + 2: 3 HLT_2j35_0eta290_020jvt_pf_ftf_bdl1r70_2j35_0eta290_020jvt_pf_ftf_bdl1r85_L14J15p0ETA25: eventCount: 0 stepCounts: @@ -628,6 +694,15 @@ HLT_2j35_0eta290_020jvt_pf_ftf_bdl1r70_2j35_0eta290_020jvt_pf_ftf_bdl1r85_presel 0: 18 1: 86 2: 15 +HLT_2j35_0eta290_020jvt_pf_ftf_bdl1r70_2j35_0eta290_020jvt_pf_ftf_bdl1r85_presel4j25_L14jJ15p0ETA25: + eventCount: 0 + stepCounts: + 0: 14 + 1: 10 + stepFeatures: + 0: 28 + 1: 104 + 2: 21 HLT_2j45_0eta290_020jvt_pf_ftf_bdl1r60_2j45_pf_ftf_L14J15p0ETA25: eventCount: 1 stepCounts: @@ -648,6 +723,16 @@ HLT_2j45_0eta290_020jvt_pf_ftf_bdl1r60_2j45_pf_ftf_presel4j25_L14J15p0ETA25: 0: 18 1: 48 2: 4 +HLT_2j45_0eta290_020jvt_pf_ftf_bdl1r60_2j45_pf_ftf_presel4j25_L14jJ15p0ETA25: + eventCount: 1 + stepCounts: + 0: 14 + 1: 8 + 2: 1 + stepFeatures: + 0: 28 + 1: 71 + 2: 6 HLT_2j45_0eta290_020jvt_pf_ftf_bdl1r60_3j45_pf_ftf_0eta320_L15J15p0ETA25: eventCount: 0 stepCounts: @@ -664,6 +749,16 @@ HLT_2j45_0eta290_020jvt_pf_ftf_bdl1r60_3j45_pf_ftf_0eta320_presel5j25_L15J15p0ET stepFeatures: 0: 6 1: 22 +HLT_2j45_0eta290_020jvt_pf_ftf_bdl1r60_3j45_pf_ftf_0eta320_presel5j25_L15jJ15p0ETA25: + eventCount: 1 + stepCounts: + 0: 8 + 1: 3 + 2: 1 + stepFeatures: + 0: 16 + 1: 32 + 2: 2 HLT_2j45_pf_ftf_bdl1r60_xe50_cell_xe85_pfopufit_L12J15_XE55: eventCount: 1 stepCounts: @@ -694,6 +789,8 @@ HLT_2j45_pf_ftf_bdl1r70_j0_pf_ftf_HT300_j0_pf_ftf_DJMASS700j35_L1HT150-J20s5pETA 0: 3 1: 12 2: 2 +HLT_2j45_pf_ftf_bdl1r70_j0_pf_ftf_HT300_j0_pf_ftf_DJMASS700j35_L1jHT150-jJ20s5pETA31_jMJJ-400-CF: + eventCount: 0 HLT_2j55_0eta290_020jvt_pf_ftf_bdl1r60_2j55_pf_ftf_0eta320_L14J15p0ETA25: eventCount: 0 stepCounts: @@ -712,6 +809,15 @@ HLT_2j55_0eta290_020jvt_pf_ftf_bdl1r60_2j55_pf_ftf_0eta320_presel4j25_L14J15p0ET 0: 18 1: 33 2: 2 +HLT_2j55_0eta290_020jvt_pf_ftf_bdl1r60_2j55_pf_ftf_0eta320_presel4j25_L14jJ15p0ETA25: + eventCount: 0 + stepCounts: + 0: 14 + 1: 6 + stepFeatures: + 0: 28 + 1: 48 + 2: 3 HLT_2mu10_bJpsimumu_L12MU8F: eventCount: 0 stepCounts: @@ -1062,6 +1168,8 @@ HLT_2mu6_10invmAA70_L1MU5VF: 3: 5 HLT_2mu6_2j50_0eta490_j0_DJMASS900j50_L1MJJ-500-NFF: eventCount: 0 +HLT_2mu6_2j50_0eta490_j0_DJMASS900j50_L1jMJJ-500-NFF: + eventCount: 0 HLT_2mu6_L12MU5VF: eventCount: 2 stepCounts: @@ -1221,6 +1329,12 @@ HLT_3j200_L1J100: 0: 1 stepFeatures: 0: 3 +HLT_3j200_L1jJ100: + eventCount: 1 + stepCounts: + 0: 1 + stepFeatures: + 0: 3 HLT_3j200_ftf_presel3j150_L1J100: eventCount: 1 stepCounts: @@ -1245,6 +1359,14 @@ HLT_3j200_pf_ftf_presel3j150_L1J100: stepFeatures: 0: 1 1: 3 +HLT_3j200_pf_ftf_presel3j150_L1jJ100: + eventCount: 1 + stepCounts: + 0: 1 + 1: 1 + stepFeatures: + 0: 1 + 1: 3 HLT_3j20_pf_ftf_020jvt_j20_0eta290_pf_ftf_boffperf_L1HT190-J15s5pETA21: eventCount: 5 stepCounts: @@ -1273,6 +1395,15 @@ HLT_3j35_0eta290_020jvt_pf_ftf_bdl1r70_j35_pf_ftf_0eta320_presel4j25_L14J15p0ETA 0: 18 1: 90 2: 6 +HLT_3j35_0eta290_020jvt_pf_ftf_bdl1r70_j35_pf_ftf_0eta320_presel4j25_L14jJ15p0ETA25: + eventCount: 0 + stepCounts: + 0: 14 + 1: 12 + stepFeatures: + 0: 28 + 1: 124 + 2: 10 HLT_3j35_pf_ftf_bdl1r60_xe50_cell_xe70_pfopufit_L13J15p0ETA25_XE40: eventCount: 0 stepCounts: @@ -1336,6 +1467,15 @@ HLT_3j65_0eta290_020jvt_pf_ftf_bdl1r77_presel3j45_L13J35p0ETA23: 0: 5 1: 17 2: 5 +HLT_3j65_0eta290_020jvt_pf_ftf_bdl1r77_presel3j45_L13jJ35p0ETA23: + eventCount: 0 + stepCounts: + 0: 11 + 1: 7 + stepFeatures: + 0: 11 + 1: 23 + 2: 6 HLT_3j65_0eta290_020jvt_pf_ftf_bdl1r85_L1J45p0ETA21_3J15p0ETA25: eventCount: 0 stepCounts: @@ -1429,12 +1569,26 @@ HLT_4j115_pf_ftf_presel4j85_L13J50: stepFeatures: 0: 1 1: 4 +HLT_4j115_pf_ftf_presel4j85_L13jJ50: + eventCount: 1 + stepCounts: + 0: 1 + 1: 1 + stepFeatures: + 0: 1 + 1: 4 HLT_4j120_L13J50: eventCount: 1 stepCounts: 0: 1 stepFeatures: 0: 4 +HLT_4j120_L13jJ50: + eventCount: 1 + stepCounts: + 0: 1 + stepFeatures: + 0: 4 HLT_4j20_0eta290_pf_ftf_boffperf_L1HT190-J15s5pETA21: eventCount: 5 stepCounts: @@ -1510,6 +1664,15 @@ HLT_4j35_0eta290_020jvt_pf_ftf_bdl1r77_presel4j25_L14J15p0ETA25: 0: 9 1: 43 2: 6 +HLT_4j35_0eta290_020jvt_pf_ftf_bdl1r77_presel4j25_L14jJ15p0ETA25: + eventCount: 0 + stepCounts: + 0: 14 + 1: 10 + stepFeatures: + 0: 14 + 1: 52 + 2: 9 HLT_4j35_0eta290_020jvt_pf_ftf_bdl1r85_L1J45p0ETA21_3J15p0ETA25: eventCount: 0 stepCounts: @@ -1563,6 +1726,16 @@ HLT_5j35_pf_ftf_0eta240_020jvt_j25_pf_ftf_0eta240_020jvt_bdl1r60_presel6c25_L14J 0: 24 1: 59 2: 2 +HLT_5j35_pf_ftf_0eta240_020jvt_j25_pf_ftf_0eta240_020jvt_bdl1r60_presel6c25_L14jJ15: + eventCount: 2 + stepCounts: + 0: 13 + 1: 5 + 2: 2 + stepFeatures: + 0: 26 + 1: 59 + 2: 2 HLT_5j45_pf_ftf_0eta240_020jvt_j25_pf_ftf_0eta240_020jvt_bdl1r60_L14J15: eventCount: 0 stepCounts: @@ -1579,8 +1752,18 @@ HLT_5j45_pf_ftf_0eta240_020jvt_j25_pf_ftf_0eta240_020jvt_bdl1r60_presel6c25_L14J stepFeatures: 0: 24 1: 11 +HLT_5j45_pf_ftf_0eta240_020jvt_j25_pf_ftf_0eta240_020jvt_bdl1r60_presel6c25_L14jJ15: + eventCount: 0 + stepCounts: + 0: 13 + 1: 1 + stepFeatures: + 0: 26 + 1: 11 HLT_5j70_0eta240_L14J15: eventCount: 0 +HLT_5j70_0eta240_L14jJ15: + eventCount: 0 HLT_5j70_ftf_0eta240_presel5j50_L14J15: eventCount: 0 stepCounts: @@ -1599,8 +1782,16 @@ HLT_5j70_pf_ftf_0eta240_presel5j50_L14J15: 0: 2 stepFeatures: 0: 2 +HLT_5j70_pf_ftf_0eta240_presel5j50_L14jJ15: + eventCount: 0 + stepCounts: + 0: 2 + stepFeatures: + 0: 2 HLT_5j85_L14J15: eventCount: 0 +HLT_5j85_L14jJ15: + eventCount: 0 HLT_5j85_ftf_presel5j50_L14J15: eventCount: 0 stepCounts: @@ -1619,6 +1810,12 @@ HLT_5j85_pf_ftf_presel5j50_L14J15: 0: 2 stepFeatures: 0: 2 +HLT_5j85_pf_ftf_presel5j50_L14jJ15: + eventCount: 0 + stepCounts: + 0: 2 + stepFeatures: + 0: 2 HLT_6j25_0eta240_L14J15: eventCount: 12 stepCounts: @@ -1739,6 +1936,14 @@ HLT_6j35_pf_ftf_0eta240_020jvt_presel6c25_L14J15: stepFeatures: 0: 12 1: 6 +HLT_6j35_pf_ftf_0eta240_020jvt_presel6c25_L14jJ15: + eventCount: 1 + stepCounts: + 0: 13 + 1: 1 + stepFeatures: + 0: 13 + 1: 6 HLT_6j35_pf_ftf_0eta240_050jvt_L14J15: eventCount: 1 stepCounts: @@ -1799,6 +2004,12 @@ HLT_6j45_pf_ftf_0eta240_020jvt_presel6c25_L14J15: 0: 12 stepFeatures: 0: 12 +HLT_6j45_pf_ftf_0eta240_020jvt_presel6c25_L14jJ15: + eventCount: 0 + stepCounts: + 0: 13 + stepFeatures: + 0: 13 HLT_6j45_pf_ftf_0eta240_050jvt_L14J15: eventCount: 0 stepCounts: @@ -1813,6 +2024,8 @@ HLT_6j45_pf_ftf_0eta240_L14J15: 0: 13 HLT_6j55_0eta240_L14J15: eventCount: 0 +HLT_6j55_0eta240_L14jJ15: + eventCount: 0 HLT_6j55_ftf_0eta240_presel6j40_L14J15: eventCount: 0 stepCounts: @@ -1831,8 +2044,16 @@ HLT_6j55_pf_ftf_0eta240_presel6j40_L14J15: 0: 2 stepFeatures: 0: 2 +HLT_6j55_pf_ftf_0eta240_presel6j40_L14jJ15: + eventCount: 0 + stepCounts: + 0: 2 + stepFeatures: + 0: 2 HLT_6j70_L14J15: eventCount: 0 +HLT_6j70_L14jJ15: + eventCount: 0 HLT_6j70_ftf_presel6j40_L14J15: eventCount: 0 stepCounts: @@ -1851,12 +2072,24 @@ HLT_6j70_pf_ftf_presel6j40_L14J15: 0: 2 stepFeatures: 0: 2 +HLT_6j70_pf_ftf_presel6j40_L14jJ15: + eventCount: 0 + stepCounts: + 0: 2 + stepFeatures: + 0: 2 HLT_7j45_L14J15: eventCount: 1 stepCounts: 0: 1 stepFeatures: 0: 7 +HLT_7j45_L14jJ15: + eventCount: 1 + stepCounts: + 0: 1 + stepFeatures: + 0: 7 HLT_7j45_ftf_presel7j30_L14J15: eventCount: 1 stepCounts: @@ -1881,6 +2114,14 @@ HLT_7j45_pf_ftf_presel7j30_L14J15: stepFeatures: 0: 5 1: 7 +HLT_7j45_pf_ftf_presel7j30_L14jJ15: + eventCount: 1 + stepCounts: + 0: 5 + 1: 1 + stepFeatures: + 0: 5 + 1: 7 HLT_beamspot_allTE_trkfast_BeamSpotPEB_L1J15: eventCount: 0 HLT_beamspot_trkFS_trkfast_BeamSpotPEB_L1J15: @@ -1913,6 +2154,8 @@ HLT_e10_lhmedium_ivarloose_j70_0eta320_j50_0eta490_j0_DJMASS900j50_L1MJJ-500-NFF 2: 2 3: 2 4: 1 +HLT_e10_lhmedium_ivarloose_j70_0eta320_j50_0eta490_j0_DJMASS900j50_L1jMJJ-500-NFF: + eventCount: 0 HLT_e10_lhvloose_L1EM7: eventCount: 7 stepCounts: @@ -2593,10 +2836,10 @@ HLT_e26_lhtight_e15_etcut_50invmAB130_L1eEM22M: 3: 2 4: 2 stepFeatures: - 0: 17 - 1: 50 - 2: 10 - 3: 17 + 0: 19 + 1: 55 + 2: 11 + 3: 20 4: 2 HLT_e26_lhtight_e15_etcut_L1EM22VHI: eventCount: 4 @@ -2621,10 +2864,10 @@ HLT_e26_lhtight_e15_etcut_idperf_50invmAB130_L1eEM22M: 3: 2 4: 2 stepFeatures: - 0: 17 - 1: 13 - 2: 11 - 3: 18 + 0: 19 + 1: 14 + 2: 12 + 3: 21 4: 2 HLT_e26_lhtight_e15_etcut_idperf_probe_50invmAB130_L1eEM22M: eventCount: 2 @@ -2644,10 +2887,10 @@ HLT_e26_lhtight_e15_etcut_idperf_probe_50invmAB130_L1eEM22M: 2: 2 3: 2 4: 2 - 5: 9 - 6: 9 - 7: 9 - 8: 16 + 5: 10 + 6: 10 + 7: 10 + 8: 19 HLT_e26_lhtight_e15_etcut_probe_50invmAB130_L1EM22VHI: eventCount: 4 stepCounts: @@ -2688,10 +2931,10 @@ HLT_e26_lhtight_e15_etcut_probe_50invmAB130_L1eEM22M: 2: 2 3: 2 4: 2 - 5: 9 - 6: 46 - 7: 8 - 8: 15 + 5: 10 + 6: 51 + 7: 9 + 8: 18 HLT_e26_lhtight_gsf_L1EM22VHI: eventCount: 5 stepCounts: @@ -3963,6 +4206,8 @@ HLT_e5_lhvloose_j70_0eta320_j50_0eta490_j0_DJMASS1000j50_xe50_tcpufit_L1MJJ-500- 2: 6 3: 8 4: 2 +HLT_e5_lhvloose_j70_0eta320_j50_0eta490_j0_DJMASS1000j50_xe50_tcpufit_L1jMJJ-500-NFF: + eventCount: 0 HLT_e5_lhvloose_nopix_lrtloose_idperf_probe_g25_medium_L1EM20VH: eventCount: 6 stepCounts: @@ -4398,6 +4643,8 @@ HLT_g20_tight_icaloloose_j35_pf_ftf_bdl1r77_3j35_pf_ftf_0eta490_j0_pf_ftf_DJMASS 4: 12 5: 31 6: 3 +HLT_g20_tight_icaloloose_j35_pf_ftf_bdl1r77_3j35_pf_ftf_0eta490_j0_pf_ftf_DJMASS500j35_L1eEM18M_jMJJ-300-NFF: + eventCount: 0 HLT_g22_tight_L1EM15VHI: eventCount: 6 stepCounts: @@ -4462,6 +4709,18 @@ HLT_g25_medium_4j35_0eta490_j0_DJMASS1000j35_L1EM22VHI: 1: 10 2: 10 3: 6 +HLT_g25_medium_4j35_0eta490_j0_DJMASS1000j35_L1eEM22M: + eventCount: 0 + stepCounts: + 0: 3 + 1: 3 + 2: 3 + 3: 2 + stepFeatures: + 0: 7 + 1: 6 + 2: 6 + 3: 2 HLT_g25_medium_L1EM20VH: eventCount: 6 stepCounts: @@ -5099,6 +5358,18 @@ HLT_g45_loose_6j45_L14J15p0ETA25: 1: 8 2: 8 3: 4 +HLT_g45_loose_6j45_L14jJ15p0ETA25: + eventCount: 0 + stepCounts: + 0: 8 + 1: 6 + 2: 6 + 3: 5 + stepFeatures: + 0: 13 + 1: 9 + 2: 9 + 3: 5 HLT_g45_tight_icaloloose_2j55_pf_ftf_0eta200_ExoticPTF0p0dR0p4_L1EM22VHI: eventCount: 0 stepCounts: @@ -5541,13 +5812,25 @@ HLT_j0_HT1000_L1HT190-J15s5pETA21: 0: 1 stepFeatures: 0: 5 -HLT_j0_HT1000_L1J100: +HLT_j0_HT1000_L1HT190-jJ15s5pETA21: eventCount: 1 stepCounts: 0: 1 stepFeatures: 0: 5 -HLT_j0_HT1000_L1J20: +HLT_j0_HT1000_L1J100: + eventCount: 1 + stepCounts: + 0: 1 + stepFeatures: + 0: 5 +HLT_j0_HT1000_L1J20: + eventCount: 1 + stepCounts: + 0: 1 + stepFeatures: + 0: 5 +HLT_j0_HT1000_L1jJ100: eventCount: 1 stepCounts: 0: 1 @@ -5583,6 +5866,14 @@ HLT_j0_HT1000_pf_ftf_preselj180_L1HT190-J15s5pETA21: stepFeatures: 0: 4 1: 5 +HLT_j0_HT1000_pf_ftf_preselj180_L1HT190-jJ15s5pETA21: + eventCount: 1 + stepCounts: + 0: 4 + 1: 1 + stepFeatures: + 0: 4 + 1: 5 HLT_j0_HT1000_pf_ftf_preselj180_L1J100: eventCount: 1 stepCounts: @@ -5591,6 +5882,14 @@ HLT_j0_HT1000_pf_ftf_preselj180_L1J100: stepFeatures: 0: 5 1: 5 +HLT_j0_HT1000_pf_ftf_preselj180_L1jJ100: + eventCount: 1 + stepCounts: + 0: 5 + 1: 1 + stepFeatures: + 0: 5 + 1: 5 HLT_j0_HT500XX30et_L1J20: eventCount: 5 stepCounts: @@ -5651,6 +5950,16 @@ HLT_j100_0eta290_020jvt_pf_ftf_boffperf_preselj80_L1J50: 0: 11 1: 18 2: 18 +HLT_j100_0eta290_020jvt_pf_ftf_boffperf_preselj80_L1jJ50: + eventCount: 9 + stepCounts: + 0: 11 + 1: 9 + 2: 9 + stepFeatures: + 0: 11 + 1: 17 + 2: 17 HLT_j100_pf_ftf_0eta320_j20_0eta290_pf_ftf_boffperf_L1HT190-J15s5pETA21: eventCount: 5 stepCounts: @@ -5683,6 +5992,8 @@ HLT_j100_pf_ftf_bdl1r60_xe50_cell_xe85_tcpufit_L1XE55: 2: 2 HLT_j110_320eta490_L1J30p31ETA49: eventCount: 0 +HLT_j110_320eta490_L1jJ30p31ETA49: + eventCount: 0 HLT_j110_a10r_subjesIS_ftf_0eta200_ExoticPTF0p0dR1p2_L1J100: eventCount: 0 stepCounts: @@ -5819,6 +6130,14 @@ HLT_j110_a10sd_cssk_pf_jes_ftf_preselj80_L1J30: stepFeatures: 0: 16 1: 21 +HLT_j110_a10sd_cssk_pf_jes_ftf_preselj80_L1jJ30: + eventCount: 14 + stepCounts: + 0: 19 + 1: 14 + stepFeatures: + 0: 19 + 1: 22 HLT_j110_a10sd_pf_nojcalib_ftf_0eta200_TracklessdR1p2_L1J50: eventCount: 0 stepCounts: @@ -5833,6 +6152,12 @@ HLT_j110_a10t_lcw_jes_L1J30: 0: 16 stepFeatures: 0: 56 +HLT_j110_a10t_lcw_jes_L1jJ30: + eventCount: 19 + stepCounts: + 0: 19 + stepFeatures: + 0: 71 HLT_j110_pf_ftf_preselj80_L1J30: eventCount: 10 stepCounts: @@ -5841,6 +6166,14 @@ HLT_j110_pf_ftf_preselj80_L1J30: stepFeatures: 0: 12 1: 17 +HLT_j110_pf_ftf_preselj80_L1jJ30: + eventCount: 10 + stepCounts: + 0: 12 + 1: 10 + stepFeatures: + 0: 12 + 1: 17 HLT_j110_subjesgscIS_ftf_bdl1r60_j45_subjesgscIS_ftf_bdl1r70_L1J50: eventCount: 1 stepCounts: @@ -5875,6 +6208,16 @@ HLT_j150_0eta290_020jvt_pf_ftf_boffperf_preselj120_L1J100: 0: 5 1: 9 2: 9 +HLT_j150_0eta290_020jvt_pf_ftf_boffperf_preselj120_L1jJ100: + eventCount: 5 + stepCounts: + 0: 8 + 1: 5 + 2: 5 + stepFeatures: + 0: 8 + 1: 9 + 2: 9 HLT_j150_0eta320_pf_ftf_2j55_0eta290_020jvt_pf_ftf_bdl1r70_L1J85_3J30: eventCount: 1 stepCounts: @@ -5895,6 +6238,16 @@ HLT_j150_0eta320_pf_ftf_2j55_0eta290_020jvt_pf_ftf_bdl1r70_preselj80XX2j45_L1J85 0: 10 1: 27 2: 4 +HLT_j150_0eta320_pf_ftf_2j55_0eta290_020jvt_pf_ftf_bdl1r70_preselj80XX2j45_L1jJ85_3jJ30: + eventCount: 1 + stepCounts: + 0: 8 + 1: 5 + 2: 1 + stepFeatures: + 0: 16 + 1: 27 + 2: 4 HLT_j15_320eta490_L1RD0_FILLED: eventCount: 6 stepCounts: @@ -5929,8 +6282,19 @@ HLT_j175_0eta290_020jvt_pf_ftf_bdl1r60_j60_0eta290_020jvt_pf_ftf_bdl1r60_preselj 0: 10 1: 20 2: 5 +HLT_j175_0eta290_020jvt_pf_ftf_bdl1r60_j60_0eta290_020jvt_pf_ftf_bdl1r60_preselj140XXj45_L1jJ100: + eventCount: 0 + stepCounts: + 0: 6 + 1: 4 + stepFeatures: + 0: 12 + 1: 20 + 2: 5 HLT_j175_320eta490_L1J50p31ETA49: eventCount: 0 +HLT_j175_320eta490_L1jJ50p31ETA49: + eventCount: 0 HLT_j175_a10r_subjesIS_ftf_0eta200_ExoticPTF0p0dR1p2_L1J100: eventCount: 0 stepCounts: @@ -6067,6 +6431,14 @@ HLT_j175_a10sd_cssk_pf_jes_ftf_preselj140_L1J50: stepFeatures: 0: 12 1: 10 +HLT_j175_a10sd_cssk_pf_jes_ftf_preselj140_L1jJ50: + eventCount: 7 + stepCounts: + 0: 13 + 1: 7 + stepFeatures: + 0: 13 + 1: 10 HLT_j175_a10sd_pf_nojcalib_ftf_0eta200_TracklessdR1p2_L1J100: eventCount: 0 stepCounts: @@ -6081,6 +6453,12 @@ HLT_j175_a10t_lcw_jes_L1J50: 0: 9 stepFeatures: 0: 14 +HLT_j175_a10t_lcw_jes_L1jJ50: + eventCount: 9 + stepCounts: + 0: 9 + stepFeatures: + 0: 15 HLT_j175_pf_ftf_preselj140_L1J50: eventCount: 4 stepCounts: @@ -6089,6 +6467,14 @@ HLT_j175_pf_ftf_preselj140_L1J50: stepFeatures: 0: 6 1: 7 +HLT_j175_pf_ftf_preselj140_L1jJ50: + eventCount: 4 + stepCounts: + 0: 6 + 1: 4 + stepFeatures: + 0: 6 + 1: 7 HLT_j180_a10_tc_em_nojcalib_L1J100: eventCount: 5 stepCounts: @@ -6111,6 +6497,16 @@ HLT_j200_0eta290_020jvt_pf_ftf_boffperf_preselj140_L1J100: 0: 5 1: 6 2: 6 +HLT_j200_0eta290_020jvt_pf_ftf_boffperf_preselj140_L1jJ100: + eventCount: 4 + stepCounts: + 0: 6 + 1: 4 + 2: 4 + stepFeatures: + 0: 6 + 1: 6 + 2: 6 HLT_j20_0eta290_020jvt_pf_ftf_boffperf_L1J15: eventCount: 20 stepCounts: @@ -6141,6 +6537,16 @@ HLT_j20_PhysicsTLA_L1HT190-J15s5pETA21: 0: 57 1: 57 2: 5 +HLT_j20_PhysicsTLA_L1HT190-jJ15s5pETA21: + eventCount: 6 + stepCounts: + 0: 6 + 1: 6 + 2: 6 + stepFeatures: + 0: 67 + 1: 67 + 2: 6 HLT_j20_PhysicsTLA_L1J100: eventCount: 5 stepCounts: @@ -6161,6 +6567,26 @@ HLT_j20_PhysicsTLA_L1J50_DETA20-J50J: 0: 111 1: 111 2: 10 +HLT_j20_PhysicsTLA_L1jJ100: + eventCount: 11 + stepCounts: + 0: 11 + 1: 11 + 2: 11 + stepFeatures: + 0: 110 + 1: 110 + 2: 11 +HLT_j20_PhysicsTLA_L1jJ50_DETA20-jJ50J: + eventCount: 10 + stepCounts: + 0: 10 + 1: 10 + 2: 10 + stepFeatures: + 0: 98 + 1: 98 + 2: 10 HLT_j225_0eta290_020jvt_pf_ftf_bmv2c1040_L1J100: eventCount: 1 stepCounts: @@ -6211,6 +6637,16 @@ HLT_j225_0eta290_pf_ftf_bdl1r70_preselj180_L1J100: 0: 5 1: 5 2: 2 +HLT_j225_0eta290_pf_ftf_bdl1r70_preselj180_L1jJ100: + eventCount: 1 + stepCounts: + 0: 5 + 1: 3 + 2: 1 + stepFeatures: + 0: 5 + 1: 5 + 2: 2 HLT_j225_0eta290_pf_ftf_bdl1r77_L1J100: eventCount: 1 stepCounts: @@ -6231,6 +6667,16 @@ HLT_j225_0eta290_pf_ftf_bdl1r77_preselj180_L1J100: 0: 5 1: 5 2: 2 +HLT_j225_0eta290_pf_ftf_bdl1r77_preselj180_L1jJ100: + eventCount: 1 + stepCounts: + 0: 5 + 1: 3 + 2: 1 + stepFeatures: + 0: 5 + 1: 5 + 2: 2 HLT_j225_0eta290_pf_ftf_bdl1r85_L1J100: eventCount: 1 stepCounts: @@ -6275,6 +6721,8 @@ HLT_j260_320eta490_L1J20: eventCount: 0 HLT_j260_320eta490_L1J75p31ETA49: eventCount: 0 +HLT_j260_320eta490_L1jJ75p31ETA49: + eventCount: 0 HLT_j260_a10r_subjesIS_ftf_0eta200_ExoticPTF0p0dR1p2_L1J100: eventCount: 0 stepCounts: @@ -6347,12 +6795,26 @@ HLT_j260_a10sd_cssk_pf_jes_ftf_preselj200_L1J75: stepFeatures: 0: 6 1: 4 +HLT_j260_a10sd_cssk_pf_jes_ftf_preselj200_L1jJ75: + eventCount: 3 + stepCounts: + 0: 6 + 1: 3 + stepFeatures: + 0: 6 + 1: 4 HLT_j260_a10t_lcw_jes_L1J75: eventCount: 4 stepCounts: 0: 4 stepFeatures: 0: 5 +HLT_j260_a10t_lcw_jes_L1jJ75: + eventCount: 4 + stepCounts: + 0: 4 + stepFeatures: + 0: 5 HLT_j260_pf_ftf_preselj200_L1J75: eventCount: 1 stepCounts: @@ -6361,6 +6823,14 @@ HLT_j260_pf_ftf_preselj200_L1J75: stepFeatures: 0: 4 1: 3 +HLT_j260_pf_ftf_preselj200_L1jJ75: + eventCount: 1 + stepCounts: + 0: 4 + 1: 1 + stepFeatures: + 0: 4 + 1: 3 HLT_j275_0eta290_020jvt_pf_ftf_bdl1r60_L1J100: eventCount: 1 stepCounts: @@ -6381,6 +6851,16 @@ HLT_j275_0eta290_020jvt_pf_ftf_bdl1r60_preselj225_L1J100: 0: 1 1: 3 2: 1 +HLT_j275_0eta290_020jvt_pf_ftf_bdl1r60_preselj225_L1jJ100: + eventCount: 1 + stepCounts: + 0: 1 + 1: 1 + 2: 1 + stepFeatures: + 0: 1 + 1: 3 + 2: 1 HLT_j275_0eta290_pf_ftf_bdl1r70_L1J100: eventCount: 1 stepCounts: @@ -6421,6 +6901,16 @@ HLT_j275_0eta290_pf_ftf_bdl1r85_preselj225_L1J100: 0: 1 1: 3 2: 2 +HLT_j275_0eta290_pf_ftf_bdl1r85_preselj225_L1jJ100: + eventCount: 1 + stepCounts: + 0: 1 + 1: 1 + 2: 1 + stepFeatures: + 0: 1 + 1: 3 + 2: 2 HLT_j275_subjesgscIS_ftf_bdl1r60_L1J100: eventCount: 1 stepCounts: @@ -6433,6 +6923,8 @@ HLT_j275_subjesgscIS_ftf_bdl1r60_L1J100: 2: 1 HLT_j280_320eta490_L1J75p31ETA49: eventCount: 0 +HLT_j280_320eta490_L1jJ75p31ETA49: + eventCount: 0 HLT_j300_0eta290_020jvt_pf_ftf_bdl1r70_L1J100: eventCount: 1 stepCounts: @@ -6453,6 +6945,16 @@ HLT_j300_0eta290_020jvt_pf_ftf_bdl1r70_preselj225_L1J100: 0: 1 1: 2 2: 1 +HLT_j300_0eta290_020jvt_pf_ftf_bdl1r70_preselj225_L1jJ100: + eventCount: 1 + stepCounts: + 0: 1 + 1: 1 + 2: 1 + stepFeatures: + 0: 1 + 1: 2 + 2: 1 HLT_j300_0eta290_020jvt_pf_ftf_boffperf_preselj225_L1J100: eventCount: 1 stepCounts: @@ -6463,6 +6965,16 @@ HLT_j300_0eta290_020jvt_pf_ftf_boffperf_preselj225_L1J100: 0: 1 1: 2 2: 2 +HLT_j300_0eta290_020jvt_pf_ftf_boffperf_preselj225_L1jJ100: + eventCount: 1 + stepCounts: + 0: 1 + 1: 1 + 2: 1 + stepFeatures: + 0: 1 + 1: 2 + 2: 2 HLT_j300_0eta290_pf_ftf_bdl1r60_L1J100: eventCount: 0 stepCounts: @@ -6501,8 +7013,20 @@ HLT_j300_0eta290_pf_ftf_bdl1r85_preselj225_L1J100: 0: 1 1: 2 2: 1 +HLT_j300_0eta290_pf_ftf_bdl1r85_preselj225_L1jJ100: + eventCount: 1 + stepCounts: + 0: 1 + 1: 1 + 2: 1 + stepFeatures: + 0: 1 + 1: 2 + 2: 1 HLT_j300_320eta490_L1J75p31ETA49: eventCount: 0 +HLT_j300_320eta490_L1jJ75p31ETA49: + eventCount: 0 HLT_j300_subjesgscIS_ftf_bdl1r70_L1J100: eventCount: 1 stepCounts: @@ -6523,6 +7047,16 @@ HLT_j30_0eta290_020jvt_pf_ftf_boffperf_L1J20: 0: 20 1: 88 2: 88 +HLT_j30_0eta290_020jvt_pf_ftf_boffperf_L1jJ20: + eventCount: 20 + stepCounts: + 0: 20 + 1: 20 + 2: 20 + stepFeatures: + 0: 20 + 1: 88 + 2: 88 HLT_j35_320eta490_L1RD0_FILLED: eventCount: 1 stepCounts: @@ -6557,6 +7091,16 @@ HLT_j360_0eta290_020jvt_pf_ftf_bdl1r77_preselj225_L1J100: 0: 1 1: 2 2: 1 +HLT_j360_0eta290_020jvt_pf_ftf_bdl1r77_preselj225_L1jJ100: + eventCount: 1 + stepCounts: + 0: 1 + 1: 1 + 2: 1 + stepFeatures: + 0: 1 + 1: 2 + 2: 1 HLT_j360_0eta290_pf_ftf_bdl1r60_L1J100: eventCount: 0 stepCounts: @@ -6601,6 +7145,14 @@ HLT_j360_a10sd_cssk_pf_jes_ftf_60smcINF_j360_a10sd_cssk_pf_jes_ftf_presel2j225_L stepFeatures: 0: 6 1: 3 +HLT_j360_a10sd_cssk_pf_jes_ftf_60smcINF_j360_a10sd_cssk_pf_jes_ftf_presel2j225_L1SC111-CjJ15: + eventCount: 1 + stepCounts: + 0: 2 + 1: 1 + stepFeatures: + 0: 4 + 1: 3 HLT_j360_a10sd_cssk_pf_jes_ftf_preselj225_L1J100: eventCount: 1 stepCounts: @@ -6617,19 +7169,53 @@ HLT_j360_a10sd_cssk_pf_jes_ftf_preselj225_L1SC111-CJ15: stepFeatures: 0: 5 1: 2 -HLT_j360_a10t_lcw_jes_60smcINF_j360_a10t_lcw_jes_L1SC111-CJ15: +HLT_j360_a10sd_cssk_pf_jes_ftf_preselj225_L1SC111-CjJ15: eventCount: 1 stepCounts: - 0: 1 + 0: 4 + 1: 1 stepFeatures: - 0: 3 -HLT_j360_a10t_lcw_jes_L1SC111-CJ15: + 0: 4 + 1: 2 +HLT_j360_a10sd_cssk_pf_jes_ftf_preselj225_L1jJ100: eventCount: 1 stepCounts: - 0: 1 + 0: 6 + 1: 1 stepFeatures: - 0: 2 -HLT_j360_a10t_lcw_jes_preselj225_L1J100: + 0: 6 + 1: 2 +HLT_j360_a10t_lcw_jes_60smcINF_j360_a10t_lcw_jes_L1SC111-CJ15: + eventCount: 1 + stepCounts: + 0: 1 + stepFeatures: + 0: 3 +HLT_j360_a10t_lcw_jes_60smcINF_j360_a10t_lcw_jes_L1SC111-CjJ15: + eventCount: 1 + stepCounts: + 0: 1 + stepFeatures: + 0: 3 +HLT_j360_a10t_lcw_jes_L1SC111-CJ15: + eventCount: 1 + stepCounts: + 0: 1 + stepFeatures: + 0: 2 +HLT_j360_a10t_lcw_jes_L1SC111-CjJ15: + eventCount: 1 + stepCounts: + 0: 1 + stepFeatures: + 0: 2 +HLT_j360_a10t_lcw_jes_preselj225_L1J100: + eventCount: 1 + stepCounts: + 0: 1 + stepFeatures: + 0: 2 +HLT_j360_a10t_lcw_jes_preselj225_L1jJ100: eventCount: 1 stepCounts: 0: 1 @@ -6643,6 +7229,14 @@ HLT_j360_pf_ftf_preselj225_L1J100: stepFeatures: 0: 1 1: 2 +HLT_j360_pf_ftf_preselj225_L1jJ100: + eventCount: 1 + stepCounts: + 0: 1 + 1: 1 + stepFeatures: + 0: 1 + 1: 2 HLT_j360_subjesgscIS_ftf_bdl1r77_L1J100: eventCount: 1 stepCounts: @@ -6669,12 +7263,26 @@ HLT_j370_a10sd_cssk_pf_jes_ftf_35smcINF_j370_a10sd_cssk_pf_jes_ftf_presel2j225_L stepFeatures: 0: 6 1: 3 +HLT_j370_a10sd_cssk_pf_jes_ftf_35smcINF_j370_a10sd_cssk_pf_jes_ftf_presel2j225_L1SC111-CjJ15: + eventCount: 1 + stepCounts: + 0: 2 + 1: 1 + stepFeatures: + 0: 4 + 1: 3 HLT_j370_a10t_lcw_jes_35smcINF_j370_a10t_lcw_jes_L1SC111-CJ15: eventCount: 1 stepCounts: 0: 1 stepFeatures: 0: 4 +HLT_j370_a10t_lcw_jes_35smcINF_j370_a10t_lcw_jes_L1SC111-CjJ15: + eventCount: 1 + stepCounts: + 0: 1 + stepFeatures: + 0: 4 HLT_j380_pf_ftf_preselj225_L1J100: eventCount: 1 stepCounts: @@ -6683,6 +7291,14 @@ HLT_j380_pf_ftf_preselj225_L1J100: stepFeatures: 0: 1 1: 2 +HLT_j380_pf_ftf_preselj225_L1jJ100: + eventCount: 1 + stepCounts: + 0: 1 + 1: 1 + stepFeatures: + 0: 1 + 1: 2 HLT_j400_a10sd_cssk_pf_jes_ftf_preselj225_L1J100: eventCount: 1 stepCounts: @@ -6699,18 +7315,46 @@ HLT_j400_a10sd_cssk_pf_jes_ftf_preselj225_L1SC111-CJ15: stepFeatures: 0: 5 1: 2 +HLT_j400_a10sd_cssk_pf_jes_ftf_preselj225_L1SC111-CjJ15: + eventCount: 1 + stepCounts: + 0: 4 + 1: 1 + stepFeatures: + 0: 4 + 1: 2 +HLT_j400_a10sd_cssk_pf_jes_ftf_preselj225_L1jJ100: + eventCount: 1 + stepCounts: + 0: 6 + 1: 1 + stepFeatures: + 0: 6 + 1: 2 HLT_j400_a10t_lcw_jes_L1SC111-CJ15: eventCount: 1 stepCounts: 0: 1 stepFeatures: 0: 2 +HLT_j400_a10t_lcw_jes_L1SC111-CjJ15: + eventCount: 1 + stepCounts: + 0: 1 + stepFeatures: + 0: 2 HLT_j400_a10t_lcw_jes_preselj225_L1J100: eventCount: 1 stepCounts: 0: 1 stepFeatures: 0: 2 +HLT_j400_a10t_lcw_jes_preselj225_L1jJ100: + eventCount: 1 + stepCounts: + 0: 1 + stepFeatures: + 0: 2 HLT_j400_pf_ftf_preselj225_L1J100: eventCount: 1 stepCounts: @@ -6719,6 +7363,14 @@ HLT_j400_pf_ftf_preselj225_L1J100: stepFeatures: 0: 1 1: 2 +HLT_j400_pf_ftf_preselj225_L1jJ100: + eventCount: 1 + stepCounts: + 0: 1 + 1: 1 + stepFeatures: + 0: 1 + 1: 2 HLT_j40_LArPEBHLT_L1J20: eventCount: 0 HLT_j40_j0_HT50XX10etXX0eta320_L1J20: @@ -6739,6 +7391,12 @@ HLT_j420_L1J100: 0: 1 stepFeatures: 0: 2 +HLT_j420_L1jJ100: + eventCount: 1 + stepCounts: + 0: 1 + stepFeatures: + 0: 2 HLT_j420_a10sd_cssk_pf_jes_ftf_35smcINF_L1J100: eventCount: 1 stepCounts: @@ -6787,6 +7445,22 @@ HLT_j420_a10sd_cssk_pf_jes_ftf_35smcINF_preselj225_L1SC111-CJ15: stepFeatures: 0: 5 1: 1 +HLT_j420_a10sd_cssk_pf_jes_ftf_35smcINF_preselj225_L1SC111-CjJ15: + eventCount: 1 + stepCounts: + 0: 4 + 1: 1 + stepFeatures: + 0: 4 + 1: 1 +HLT_j420_a10sd_cssk_pf_jes_ftf_35smcINF_preselj225_L1jJ100: + eventCount: 1 + stepCounts: + 0: 6 + 1: 1 + stepFeatures: + 0: 6 + 1: 1 HLT_j420_a10sd_cssk_pf_jes_ftf_preselj225_L1J100: eventCount: 1 stepCounts: @@ -6803,6 +7477,22 @@ HLT_j420_a10sd_cssk_pf_jes_ftf_preselj225_L1SC111-CJ15: stepFeatures: 0: 5 1: 2 +HLT_j420_a10sd_cssk_pf_jes_ftf_preselj225_L1SC111-CjJ15: + eventCount: 1 + stepCounts: + 0: 4 + 1: 1 + stepFeatures: + 0: 4 + 1: 2 +HLT_j420_a10sd_cssk_pf_jes_ftf_preselj225_L1jJ100: + eventCount: 1 + stepCounts: + 0: 6 + 1: 1 + stepFeatures: + 0: 6 + 1: 2 HLT_j420_a10t_lcw_jes_35smcINF_L1J100: eventCount: 1 stepCounts: @@ -6815,6 +7505,18 @@ HLT_j420_a10t_lcw_jes_35smcINF_L1SC111-CJ15: 0: 1 stepFeatures: 0: 2 +HLT_j420_a10t_lcw_jes_35smcINF_L1SC111-CjJ15: + eventCount: 1 + stepCounts: + 0: 1 + stepFeatures: + 0: 2 +HLT_j420_a10t_lcw_jes_35smcINF_L1jJ100: + eventCount: 1 + stepCounts: + 0: 1 + stepFeatures: + 0: 2 HLT_j420_a10t_lcw_jes_L1J100: eventCount: 1 stepCounts: @@ -6827,6 +7529,18 @@ HLT_j420_a10t_lcw_jes_L1SC111-CJ15: 0: 1 stepFeatures: 0: 2 +HLT_j420_a10t_lcw_jes_L1SC111-CjJ15: + eventCount: 1 + stepCounts: + 0: 1 + stepFeatures: + 0: 2 +HLT_j420_a10t_lcw_jes_L1jJ100: + eventCount: 1 + stepCounts: + 0: 1 + stepFeatures: + 0: 2 HLT_j420_ftf_preselj225_L1J100: eventCount: 1 stepCounts: @@ -6851,6 +7565,14 @@ HLT_j420_pf_ftf_preselj225_L1J100: stepFeatures: 0: 1 1: 2 +HLT_j420_pf_ftf_preselj225_L1jJ100: + eventCount: 1 + stepCounts: + 0: 1 + 1: 1 + stepFeatures: + 0: 1 + 1: 2 HLT_j440_pf_ftf_preselj225_L1J100: eventCount: 1 stepCounts: @@ -6859,6 +7581,14 @@ HLT_j440_pf_ftf_preselj225_L1J100: stepFeatures: 0: 1 1: 2 +HLT_j440_pf_ftf_preselj225_L1jJ100: + eventCount: 1 + stepCounts: + 0: 1 + 1: 1 + stepFeatures: + 0: 1 + 1: 2 HLT_j450_pf_ftf_preselj225_L1J100: eventCount: 1 stepCounts: @@ -6867,6 +7597,14 @@ HLT_j450_pf_ftf_preselj225_L1J100: stepFeatures: 0: 1 1: 2 +HLT_j450_pf_ftf_preselj225_L1jJ100: + eventCount: 1 + stepCounts: + 0: 1 + 1: 1 + stepFeatures: + 0: 1 + 1: 2 HLT_j45_0eta290_020jvt_020jvt_pf_ftf_bdl1r70_L1J20: eventCount: 11 stepCounts: @@ -6887,6 +7625,16 @@ HLT_j45_0eta290_020jvt_pf_ftf_boffperf_L1J20: 0: 20 1: 62 2: 62 +HLT_j45_0eta290_020jvt_pf_ftf_boffperf_L1jJ20: + eventCount: 19 + stepCounts: + 0: 20 + 1: 19 + 2: 19 + stepFeatures: + 0: 20 + 1: 62 + 2: 62 HLT_j45_0eta290_020jvt_pf_ftf_boffperf_split_L1J20: eventCount: 19 stepCounts: @@ -6899,6 +7647,8 @@ HLT_j45_0eta290_020jvt_pf_ftf_boffperf_split_L1J20: 2: 62 HLT_j45_320eta490_L1J15p31ETA49: eventCount: 0 +HLT_j45_320eta490_L1jJ15p31ETA49: + eventCount: 0 HLT_j45_L1J15: eventCount: 0 HLT_j45_cssk_nojcalib_L1J15: @@ -6977,6 +7727,14 @@ HLT_j45_pf_ftf_preselj20_L1RD0_FILLED: stepFeatures: 0: 20 1: 65 +HLT_j45_pf_ftf_preselj20_L1jJ15: + eventCount: 19 + stepCounts: + 0: 20 + 1: 19 + stepFeatures: + 0: 20 + 1: 65 HLT_j45_pf_nojcalib_ftf_L1J15: eventCount: 19 stepCounts: @@ -7087,6 +7845,18 @@ HLT_j460_a10_lcw_subjes_L1SC111-CJ15: 0: 1 stepFeatures: 0: 2 +HLT_j460_a10_lcw_subjes_L1SC111-CjJ15: + eventCount: 1 + stepCounts: + 0: 1 + stepFeatures: + 0: 2 +HLT_j460_a10_lcw_subjes_L1jJ100: + eventCount: 1 + stepCounts: + 0: 1 + stepFeatures: + 0: 2 HLT_j460_a10r_L1J100: eventCount: 1 stepCounts: @@ -7101,6 +7871,18 @@ HLT_j460_a10r_L1SC111-CJ15: 0: 1 stepFeatures: 0: 2 +HLT_j460_a10r_L1SC111-CjJ15: + eventCount: 1 + stepCounts: + 0: 1 + stepFeatures: + 0: 2 +HLT_j460_a10r_L1jJ100: + eventCount: 1 + stepCounts: + 0: 1 + stepFeatures: + 0: 2 HLT_j460_a10sd_cssk_pf_jes_ftf_preselj140_L1J100: eventCount: 1 stepCounts: @@ -7149,6 +7931,22 @@ HLT_j460_a10sd_cssk_pf_jes_ftf_preselj225_L1SC111-CJ15: stepFeatures: 0: 5 1: 2 +HLT_j460_a10sd_cssk_pf_jes_ftf_preselj225_L1SC111-CjJ15: + eventCount: 1 + stepCounts: + 0: 4 + 1: 1 + stepFeatures: + 0: 4 + 1: 2 +HLT_j460_a10sd_cssk_pf_jes_ftf_preselj225_L1jJ100: + eventCount: 1 + stepCounts: + 0: 6 + 1: 1 + stepFeatures: + 0: 6 + 1: 2 HLT_j460_a10sd_cssk_pf_nojcalib_ftf_35smcINF_L1J100: eventCount: 1 stepCounts: @@ -7191,6 +7989,18 @@ HLT_j460_a10t_lcw_jes_L1SC111-CJ15: 0: 1 stepFeatures: 0: 2 +HLT_j460_a10t_lcw_jes_L1SC111-CjJ15: + eventCount: 1 + stepCounts: + 0: 1 + stepFeatures: + 0: 2 +HLT_j460_a10t_lcw_jes_L1jJ100: + eventCount: 1 + stepCounts: + 0: 1 + stepFeatures: + 0: 2 HLT_j460_a10t_lcw_nojcalib_35smcINF_L1J100: eventCount: 1 stepCounts: @@ -7211,6 +8021,14 @@ HLT_j460_pf_ftf_preselj225_L1J100: stepFeatures: 0: 1 1: 2 +HLT_j460_pf_ftf_preselj225_L1jJ100: + eventCount: 1 + stepCounts: + 0: 1 + 1: 1 + stepFeatures: + 0: 1 + 1: 2 HLT_j480_a10sd_cssk_pf_jes_ftf_preselj225_L1J100: eventCount: 1 stepCounts: @@ -7227,6 +8045,22 @@ HLT_j480_a10sd_cssk_pf_jes_ftf_preselj225_L1SC111-CJ15: stepFeatures: 0: 5 1: 2 +HLT_j480_a10sd_cssk_pf_jes_ftf_preselj225_L1SC111-CjJ15: + eventCount: 1 + stepCounts: + 0: 4 + 1: 1 + stepFeatures: + 0: 4 + 1: 2 +HLT_j480_a10sd_cssk_pf_jes_ftf_preselj225_L1jJ100: + eventCount: 1 + stepCounts: + 0: 6 + 1: 1 + stepFeatures: + 0: 6 + 1: 2 HLT_j480_a10t_lcw_jes_L1J100: eventCount: 1 stepCounts: @@ -7239,6 +8073,18 @@ HLT_j480_a10t_lcw_jes_L1SC111-CJ15: 0: 1 stepFeatures: 0: 2 +HLT_j480_a10t_lcw_jes_L1SC111-CjJ15: + eventCount: 1 + stepCounts: + 0: 1 + stepFeatures: + 0: 2 +HLT_j480_a10t_lcw_jes_L1jJ100: + eventCount: 1 + stepCounts: + 0: 1 + stepFeatures: + 0: 2 HLT_j480_pf_ftf_preselj225_L1J100: eventCount: 1 stepCounts: @@ -7247,6 +8093,14 @@ HLT_j480_pf_ftf_preselj225_L1J100: stepFeatures: 0: 1 1: 2 +HLT_j480_pf_ftf_preselj225_L1jJ100: + eventCount: 1 + stepCounts: + 0: 1 + 1: 1 + stepFeatures: + 0: 1 + 1: 2 HLT_j500_pf_ftf_preselj225_L1J100: eventCount: 1 stepCounts: @@ -7255,6 +8109,14 @@ HLT_j500_pf_ftf_preselj225_L1J100: stepFeatures: 0: 1 1: 2 +HLT_j500_pf_ftf_preselj225_L1jJ100: + eventCount: 1 + stepCounts: + 0: 1 + 1: 1 + stepFeatures: + 0: 1 + 1: 2 HLT_j520_pf_ftf_preselj225_L1J100: eventCount: 1 stepCounts: @@ -7263,10 +8125,22 @@ HLT_j520_pf_ftf_preselj225_L1J100: stepFeatures: 0: 1 1: 2 +HLT_j520_pf_ftf_preselj225_L1jJ100: + eventCount: 1 + stepCounts: + 0: 1 + 1: 1 + stepFeatures: + 0: 1 + 1: 2 HLT_j55_0eta240_xe50_cell_L1J30_EMPTY: eventCount: 0 HLT_j55_0eta240_xe50_cell_L1J30_FIRSTEMPTY: eventCount: 0 +HLT_j55_0eta240_xe50_cell_L1jJ30_EMPTY: + eventCount: 0 +HLT_j55_0eta240_xe50_cell_L1jJ30_FIRSTEMPTY: + eventCount: 0 HLT_j55_pf_ftf_0eta320_bdl1r70_2j45_pf_ftf_320eta490_L1J25p0ETA23_2J15p31ETA49: eventCount: 0 stepCounts: @@ -7275,6 +8149,8 @@ HLT_j55_pf_ftf_0eta320_bdl1r70_2j45_pf_ftf_320eta490_L1J25p0ETA23_2J15p31ETA49: 0: 8 HLT_j55_pf_ftf_0eta320_bdl1r70_2j45_pf_ftf_320eta490_preselj45XX2f40_L1J25p0ETA23_2J15p31ETA49: eventCount: 0 +HLT_j55_pf_ftf_0eta320_bdl1r70_2j45_pf_ftf_320eta490_preselj45XX2f40_L1jJ25p0ETA23_2jJ15p31ETA49: + eventCount: 0 HLT_j60_0eta290_020jvt_pf_ftf_boffperf_L1J50: eventCount: 14 stepCounts: @@ -7285,8 +8161,20 @@ HLT_j60_0eta290_020jvt_pf_ftf_boffperf_L1J50: 0: 14 1: 35 2: 35 +HLT_j60_0eta290_020jvt_pf_ftf_boffperf_L1jJ50: + eventCount: 18 + stepCounts: + 0: 18 + 1: 18 + 2: 18 + stepFeatures: + 0: 18 + 1: 46 + 2: 46 HLT_j60_320eta490_L1J20p31ETA49: eventCount: 0 +HLT_j60_320eta490_L1jJ20p31ETA49: + eventCount: 0 HLT_j60_j0_FBDJSHARED_L1J20: eventCount: 8 stepCounts: @@ -7311,12 +8199,24 @@ HLT_j60_pf_ftf_preselj50_L1J20: stepFeatures: 0: 19 1: 48 +HLT_j60_pf_ftf_preselj50_L1jJ20: + eventCount: 19 + stepCounts: + 0: 19 + 1: 19 + stepFeatures: + 0: 19 + 1: 48 HLT_j70_0eta320_j50_0eta490_j0_DJMASS1000j50dphi200x400deta_L1MJJ-500-NFF: eventCount: 0 +HLT_j70_0eta320_j50_0eta490_j0_DJMASS1000j50dphi200x400deta_L1jMJJ-500-NFF: + eventCount: 0 HLT_j70_0eta320_j50_0eta490_j0_DJMASS1000j50dphi240_xe90_tcpufit_xe50_cell_L1MJJ-500-NFF: eventCount: 0 stepFeatures: 0: 3 +HLT_j70_0eta320_j50_0eta490_j0_DJMASS1000j50dphi240_xe90_tcpufit_xe50_cell_L1jMJJ-500-NFF: + eventCount: 0 ? HLT_j70_pf_ftf_0eta490_j50_pf_ftf_0eta490_2j35_pf_ftf_0eta490_SHARED_2j35_pf_ftf_0eta290_bdl1r70_j0_pf_ftf_DJMASS1000j50_L1MJJ-500-NFF : eventCount: 1 stepCounts: @@ -7337,6 +8237,8 @@ HLT_j70_0eta320_j50_0eta490_j0_DJMASS1000j50dphi240_xe90_tcpufit_xe50_cell_L1MJJ 0: 15 1: 21 2: 2 +? HLT_j70_pf_ftf_0eta490_j50_pf_ftf_0eta490_2j35_pf_ftf_0eta490_SHARED_2j35_pf_ftf_0eta290_bdl1r70_j0_pf_ftf_presela60XXa40XX2a25_DJMASS1000j50_L1jMJJ-500-NFF +: eventCount: 0 HLT_j75_0eta290_020jvt_pf_ftf_bdl1r60_3j75_pf_ftf_L14J20: eventCount: 1 stepCounts: @@ -7357,6 +8259,16 @@ HLT_j75_0eta290_020jvt_pf_ftf_bdl1r60_3j75_pf_ftf_presel4j50_L14J20: 0: 8 1: 8 2: 1 +HLT_j75_0eta290_020jvt_pf_ftf_bdl1r60_3j75_pf_ftf_presel4j50_L14jJ20: + eventCount: 1 + stepCounts: + 0: 6 + 1: 1 + 2: 1 + stepFeatures: + 0: 12 + 1: 8 + 2: 1 HLT_j75_320eta490_LArPEBHLT_L1J30p31ETA49: eventCount: 0 ? HLT_j75_pf_ftf_0eta240_020jvt_j50_pf_ftf_0eta240_020jvt_j35_pf_ftf_0eta240_020jvt_j25_pf_ftf_0eta240_020jvt_L1J45p0ETA21_3J15p0ETA25 @@ -7407,6 +8319,16 @@ HLT_j75_320eta490_LArPEBHLT_L1J30p31ETA49: 0: 60 1: 171 2: 8 +? HLT_j75_pf_ftf_0eta240_020jvt_j50_pf_ftf_0eta240_020jvt_j35_pf_ftf_0eta240_020jvt_j25_pf_ftf_0eta240_020jvt_SHARED_2j25_pf_ftf_0eta240_020jvt_bdl1r77_preselc60XXc45XXc25XXc20_L1jJ45p0ETA21_3jJ15p0ETA25 +: eventCount: 2 + stepCounts: + 0: 15 + 1: 7 + 2: 2 + stepFeatures: + 0: 75 + 1: 156 + 2: 7 ? HLT_j75_pf_ftf_0eta240_020jvt_j50_pf_ftf_0eta240_020jvt_j35_pf_ftf_0eta240_020jvt_j25_pf_ftf_0eta240_020jvt_SHARED_2j25_pf_ftf_0eta240_020jvt_bdl1r85_L1J45p0ETA21_3J15p0ETA25 : eventCount: 4 stepCounts: @@ -7453,6 +8375,15 @@ HLT_j75_320eta490_LArPEBHLT_L1J30p31ETA49: 0: 60 1: 171 2: 11 +? HLT_j75_pf_ftf_0eta240_020jvt_j50_pf_ftf_0eta240_020jvt_j35_pf_ftf_0eta240_020jvt_j25_pf_ftf_0eta240_020jvt_SHARED_3j25_pf_ftf_0eta240_020jvt_bdl1r85_preselc60XXc45XXc25XXc20_L1jJ45p0ETA21_3jJ15p0ETA25 +: eventCount: 0 + stepCounts: + 0: 15 + 1: 7 + stepFeatures: + 0: 75 + 1: 156 + 2: 10 ? HLT_j75_pf_ftf_0eta240_020jvt_j50_pf_ftf_0eta240_020jvt_j35_pf_ftf_0eta240_020jvt_j25_pf_ftf_0eta240_020jvt_SHARED_j35_pf_ftf_0eta240_020jvt_bdl1r60_j25_pf_ftf_0eta240_020jvt_bdl1r60_L1J45p0ETA21_3J15p0ETA25 : eventCount: 1 stepCounts: @@ -7473,6 +8404,16 @@ HLT_j75_320eta490_LArPEBHLT_L1J30p31ETA49: 0: 72 1: 209 2: 12 +? HLT_j75_pf_ftf_0eta240_020jvt_j50_pf_ftf_0eta240_020jvt_j35_pf_ftf_0eta240_020jvt_j25_pf_ftf_0eta240_020jvt_SHARED_j35_pf_ftf_0eta240_020jvt_bdl1r60_j25_pf_ftf_0eta240_020jvt_bdl1r60_preselc60XXc45XXc25XXc20_L1jJ45p0ETA21_3jJ15p0ETA25 +: eventCount: 1 + stepCounts: + 0: 15 + 1: 7 + 2: 1 + stepFeatures: + 0: 90 + 1: 191 + 2: 10 ? HLT_j75_pf_ftf_0eta240_020jvt_j50_pf_ftf_0eta240_020jvt_j35_pf_ftf_0eta240_020jvt_j25_pf_ftf_0eta240_020jvt_SHARED_j35_pf_ftf_0eta240_020jvt_bdl1r70_j25_pf_ftf_0eta240_020jvt_bdl1r70_L1J45p0ETA21_3J15p0ETA25 : eventCount: 2 stepCounts: @@ -7542,6 +8483,16 @@ HLT_j80_0eta290_020jvt_pf_ftf_boffperf_L1J50: 0: 14 1: 25 2: 25 +HLT_j80_0eta290_020jvt_pf_ftf_boffperf_L1jJ50: + eventCount: 12 + stepCounts: + 0: 18 + 1: 12 + 2: 12 + stepFeatures: + 0: 18 + 1: 24 + 2: 24 HLT_j80_j60_SHARED_j40__L1J15: eventCount: 9 stepCounts: @@ -7612,6 +8563,16 @@ HLT_j80_pf_ftf_0eta240_020jvt_j55_pf_ftf_0eta240_020jvt_j28_pf_ftf_0eta240_020jv 0: 60 1: 189 2: 10 +? HLT_j80_pf_ftf_0eta240_020jvt_j55_pf_ftf_0eta240_020jvt_j28_pf_ftf_0eta240_020jvt_j20_pf_ftf_0eta240_020jvt_SHARED_2j20_pf_ftf_0eta240_020jvt_bdl1r77_preselc60XXc45XXc25XXc20_L1jJ45p0ETA21_3jJ15p0ETA25 +: eventCount: 3 + stepCounts: + 0: 15 + 1: 8 + 2: 3 + stepFeatures: + 0: 75 + 1: 189 + 2: 10 ? HLT_j80_pf_ftf_0eta240_020jvt_j55_pf_ftf_0eta240_020jvt_j28_pf_ftf_0eta240_020jvt_j20_pf_ftf_0eta240_020jvt_SHARED_2j20_pf_ftf_0eta240_020jvt_bdl1r85_L1J45p0ETA21_3J15p0ETA25 : eventCount: 4 stepCounts: @@ -7660,6 +8621,16 @@ HLT_j80_pf_ftf_0eta240_020jvt_j55_pf_ftf_0eta240_020jvt_j28_pf_ftf_0eta240_020jv 0: 60 1: 189 2: 13 +? HLT_j80_pf_ftf_0eta240_020jvt_j55_pf_ftf_0eta240_020jvt_j28_pf_ftf_0eta240_020jvt_j20_pf_ftf_0eta240_020jvt_SHARED_3j20_pf_ftf_0eta240_020jvt_bdl1r85_preselc60XXc45XXc25XXc20_L1jJ45p0ETA21_3jJ15p0ETA25 +: eventCount: 1 + stepCounts: + 0: 15 + 1: 8 + 2: 1 + stepFeatures: + 0: 75 + 1: 189 + 2: 13 ? HLT_j80_pf_ftf_0eta240_020jvt_j55_pf_ftf_0eta240_020jvt_j28_pf_ftf_0eta240_020jvt_j20_pf_ftf_0eta240_020jvt_SHARED_j28_pf_ftf_0eta240_020jvt_bdl1r60_j20_pf_ftf_0eta240_020jvt_bdl1r60_L1J45p0ETA21_3J15p0ETA25 : eventCount: 2 stepCounts: @@ -7680,6 +8651,16 @@ HLT_j80_pf_ftf_0eta240_020jvt_j55_pf_ftf_0eta240_020jvt_j28_pf_ftf_0eta240_020jv 0: 72 1: 230 2: 13 +? HLT_j80_pf_ftf_0eta240_020jvt_j55_pf_ftf_0eta240_020jvt_j28_pf_ftf_0eta240_020jvt_j20_pf_ftf_0eta240_020jvt_SHARED_j28_pf_ftf_0eta240_020jvt_bdl1r60_j20_pf_ftf_0eta240_020jvt_bdl1r60_preselc60XXc45XXc25XXc20_L1jJ45p0ETA21_3jJ15p0ETA25 +: eventCount: 2 + stepCounts: + 0: 15 + 1: 8 + 2: 2 + stepFeatures: + 0: 90 + 1: 230 + 2: 13 ? HLT_j80_pf_ftf_0eta240_020jvt_j55_pf_ftf_0eta240_020jvt_j28_pf_ftf_0eta240_020jvt_j20_pf_ftf_0eta240_020jvt_SHARED_j28_pf_ftf_0eta240_020jvt_bdl1r70_j20_pf_ftf_0eta240_020jvt_bdl1r70_L1J45p0ETA21_3J15p0ETA25 : eventCount: 3 stepCounts: @@ -7802,6 +8783,8 @@ HLT_j80_pf_ftf_0eta240_j55_pf_ftf_0eta240_j28_pf_ftf_0eta240_j20_pf_ftf_0eta240_ 0: 4 1: 12 2: 2 +? HLT_j80_pf_ftf_0eta240_j60_pf_ftf_0eta320_j45_pf_ftf_320eta490_SHARED_2j45_pf_ftf_0eta290_bdl1r60_preselc60XXj45XXf40_L1jJ40p0ETA25_2jJ25_jJ20p31ETA49 +: eventCount: 0 HLT_j80_pf_ftf_0eta320_bdl1r70_j60_pf_ftf_0eta320_bdl1r85_j45_pf_ftf_320eta490_L1J40p0ETA25_2J25_J20p31ETA49: eventCount: 0 stepCounts: @@ -7820,6 +8803,8 @@ HLT_j80_pf_ftf_0eta320_bdl1r70_j60_pf_ftf_0eta320_bdl1r85_j45_pf_ftf_320eta490_L 0: 3 1: 7 2: 2 +? HLT_j80_pf_ftf_0eta320_bdl1r70_j60_pf_ftf_0eta320_bdl1r85_j45_pf_ftf_320eta490_preselj60XXj45XXf40_L1jJ40p0ETA25_2jJ25_jJ20p31ETA49 +: eventCount: 0 HLT_j80_pf_ftf_bdl1r60_xe60_cell_L12J50_XE40: eventCount: 2 stepCounts: @@ -7854,6 +8839,8 @@ HLT_j85_050momemfrac100_L1J20: 0: 20 HLT_j85_320eta490_L1J20p31ETA49: eventCount: 0 +HLT_j85_320eta490_L1jJ20p31ETA49: + eventCount: 0 HLT_j85_CLEANlb_L1J20: eventCount: 11 stepCounts: @@ -7908,6 +8895,14 @@ HLT_j85_a10sd_cssk_pf_jes_ftf_preselj50_L1J20: stepFeatures: 0: 20 1: 41 +HLT_j85_a10sd_cssk_pf_jes_ftf_preselj50_L1jJ20: + eventCount: 20 + stepCounts: + 0: 20 + 1: 20 + stepFeatures: + 0: 20 + 1: 41 HLT_j85_a10sd_cssk_pf_nojcalib_ftf_preselj50_L1J20: eventCount: 16 stepCounts: @@ -7916,18 +8911,38 @@ HLT_j85_a10sd_cssk_pf_nojcalib_ftf_preselj50_L1J20: stepFeatures: 0: 20 1: 25 +HLT_j85_a10sd_cssk_pf_nojcalib_ftf_preselj50_L1jJ20: + eventCount: 16 + stepCounts: + 0: 20 + 1: 16 + stepFeatures: + 0: 20 + 1: 25 HLT_j85_a10t_lcw_jes_L1J20: eventCount: 20 stepCounts: 0: 20 stepFeatures: 0: 137 +HLT_j85_a10t_lcw_jes_L1jJ20: + eventCount: 20 + stepCounts: + 0: 20 + stepFeatures: + 0: 137 HLT_j85_a10t_lcw_nojcalib_L1J20: eventCount: 20 stepCounts: 0: 20 stepFeatures: 0: 124 +HLT_j85_a10t_lcw_nojcalib_L1jJ20: + eventCount: 20 + stepCounts: + 0: 20 + stepFeatures: + 0: 124 HLT_j85_ftf_L1J20: eventCount: 11 stepCounts: @@ -7966,6 +8981,14 @@ HLT_j85_pf_ftf_preselj50_L1J20: stepFeatures: 0: 19 1: 23 +HLT_j85_pf_ftf_preselj50_L1jJ20: + eventCount: 11 + stepCounts: + 0: 19 + 1: 11 + stepFeatures: + 0: 19 + 1: 23 HLT_l1topodebug_legacy_L1All: eventCount: 0 HLT_larnoiseburst_L1All: @@ -8026,6 +9049,22 @@ HLT_mb_afprec_L1AFP_A_AND_C_TOF_T0T1_J50: eventCount: 0 HLT_mb_afprec_L1AFP_A_AND_C_TOF_T0T1_J75: eventCount: 0 +HLT_mb_afprec_L1AFP_A_AND_C_TOF_T0T1_jJ20: + eventCount: 0 +HLT_mb_afprec_L1AFP_A_AND_C_TOF_T0T1_jJ30: + eventCount: 0 +HLT_mb_afprec_L1AFP_A_AND_C_TOF_T0T1_jJ50: + eventCount: 0 +HLT_mb_afprec_L1AFP_A_AND_C_TOF_T0T1_jJ75: + eventCount: 0 +HLT_mb_afprec_L1AFP_A_AND_C_TOF_jJ20: + eventCount: 0 +HLT_mb_afprec_L1AFP_A_AND_C_TOF_jJ30: + eventCount: 0 +HLT_mb_afprec_L1AFP_A_AND_C_TOF_jJ50: + eventCount: 0 +HLT_mb_afprec_L1AFP_A_AND_C_TOF_jJ75: + eventCount: 0 HLT_mb_afprec_L1CEP-CjJ50: eventCount: 0 HLT_mb_afprec_L1CEP-CjJ60: @@ -8184,6 +9223,8 @@ HLT_mu10_ivarmedium_j70_0eta320_j50_0eta490_j0_DJMASS900j50_L1MJJ-500-NFF: 3: 2 4: 1 5: 11 +HLT_mu10_ivarmedium_j70_0eta320_j50_0eta490_j0_DJMASS900j50_L1jMJJ-500-NFF: + eventCount: 0 HLT_mu10_ivarmedium_mu10_10invmAB70_L12MU8F: eventCount: 1 stepCounts: @@ -9966,6 +11007,24 @@ HLT_mu4_j20_0eta290_pf_ftf_boffperf_dRAB03_L1MU3V_J15: 4: 12 5: 105 6: 105 +HLT_mu4_j20_0eta290_pf_ftf_boffperf_dRAB03_L1MU3V_jJ15: + eventCount: 7 + stepCounts: + 0: 12 + 1: 12 + 2: 12 + 3: 12 + 4: 12 + 5: 12 + 6: 7 + stepFeatures: + 0: 17 + 1: 17 + 2: 21 + 3: 16 + 4: 12 + 5: 105 + 6: 105 HLT_mu4_j70_0eta320_j50_0eta490_j0_DJMASS1000j50_xe50_tcpufit_L1MJJ-500-NFF: eventCount: 1 stepCounts: @@ -9980,6 +11039,8 @@ HLT_mu4_j70_0eta320_j50_0eta490_j0_DJMASS1000j50_xe50_tcpufit_L1MJJ-500-NFF: 2: 2 3: 2 4: 12 +HLT_mu4_j70_0eta320_j50_0eta490_j0_DJMASS1000j50_xe50_tcpufit_L1jMJJ-500-NFF: + eventCount: 0 HLT_mu4_l2io_L1MU3V: eventCount: 12 stepCounts: @@ -10271,8 +11332,6 @@ HLT_mu8_L1MU5VF: 1: 12 2: 13 3: 12 -HLT_noalg_AlfaPEB_L1ALFA_ANY: - eventCount: 0 HLT_noalg_CIS_TilePEB_L1CALREQ1: eventCount: 0 HLT_noalg_CSCPEB_L1All: @@ -10415,88 +11474,12 @@ HLT_noalg_L1LAR-ZEE: eventCount: 0 HLT_noalg_L1LAR-ZEE-eEM: eventCount: 0 -HLT_noalg_L1MBTSA0: - eventCount: 0 -HLT_noalg_L1MBTSA1: - eventCount: 0 -HLT_noalg_L1MBTSA10: - eventCount: 0 -HLT_noalg_L1MBTSA11: - eventCount: 0 -HLT_noalg_L1MBTSA12: - eventCount: 0 -HLT_noalg_L1MBTSA13: - eventCount: 0 -HLT_noalg_L1MBTSA14: - eventCount: 0 -HLT_noalg_L1MBTSA15: - eventCount: 0 -HLT_noalg_L1MBTSA2: - eventCount: 0 -HLT_noalg_L1MBTSA3: - eventCount: 0 -HLT_noalg_L1MBTSA4: - eventCount: 0 -HLT_noalg_L1MBTSA5: - eventCount: 0 -HLT_noalg_L1MBTSA6: - eventCount: 0 -HLT_noalg_L1MBTSA7: - eventCount: 0 -HLT_noalg_L1MBTSA8: - eventCount: 0 -HLT_noalg_L1MBTSA9: - eventCount: 0 -HLT_noalg_L1MBTSC0: - eventCount: 0 -HLT_noalg_L1MBTSC1: - eventCount: 0 -HLT_noalg_L1MBTSC10: - eventCount: 0 -HLT_noalg_L1MBTSC11: - eventCount: 0 -HLT_noalg_L1MBTSC12: - eventCount: 0 -HLT_noalg_L1MBTSC13: - eventCount: 0 -HLT_noalg_L1MBTSC14: - eventCount: 0 -HLT_noalg_L1MBTSC15: - eventCount: 0 -HLT_noalg_L1MBTSC2: - eventCount: 0 -HLT_noalg_L1MBTSC3: - eventCount: 0 -HLT_noalg_L1MBTSC4: - eventCount: 0 -HLT_noalg_L1MBTSC5: - eventCount: 0 -HLT_noalg_L1MBTSC6: - eventCount: 0 -HLT_noalg_L1MBTSC7: - eventCount: 0 -HLT_noalg_L1MBTSC8: - eventCount: 0 -HLT_noalg_L1MBTSC9: - eventCount: 0 -HLT_noalg_L1MBTS_1: - eventCount: 0 -HLT_noalg_L1MBTS_1_1: - eventCount: 0 HLT_noalg_L1MBTS_1_1_EMPTY: eventCount: 0 -HLT_noalg_L1MBTS_1_1_UNPAIRED_ISO: - eventCount: 0 HLT_noalg_L1MBTS_1_EMPTY: eventCount: 0 -HLT_noalg_L1MBTS_1_UNPAIRED_ISO: - eventCount: 0 -HLT_noalg_L1MBTS_2: - eventCount: 0 HLT_noalg_L1MBTS_2_EMPTY: eventCount: 0 -HLT_noalg_L1MBTS_2_UNPAIRED_ISO: - eventCount: 0 HLT_noalg_L1MBTS_A: eventCount: 0 HLT_noalg_L1MBTS_C: @@ -10525,6 +11508,8 @@ HLT_noalg_L1RD0_FILLED: eventCount: 0 HLT_noalg_L1RD0_FIRSTEMPTY: eventCount: 0 +HLT_noalg_L1RD0_UNPAIRED_ISO: + eventCount: 0 HLT_noalg_L1RD1_EMPTY: eventCount: 0 HLT_noalg_L1RD2_EMPTY: @@ -10585,6 +11570,8 @@ HLT_noalg_L1cTAU25M: eventCount: 0 HLT_noalg_L1eEM10L: eventCount: 10 +HLT_noalg_L1eEM12: + eventCount: 17 HLT_noalg_L1eEM15: eventCount: 15 HLT_noalg_L1eEM15L: @@ -10593,10 +11580,10 @@ HLT_noalg_L1eEM15M: eventCount: 6 HLT_noalg_L1eEM18M: eventCount: 6 -HLT_noalg_L1eEM20: - eventCount: 13 HLT_noalg_L1eEM20L: eventCount: 8 +HLT_noalg_L1eEM20VM: + eventCount: 6 HLT_noalg_L1eEM22: eventCount: 13 HLT_noalg_L1eEM22L: @@ -10609,12 +11596,10 @@ HLT_noalg_L1eEM3: eventCount: 20 HLT_noalg_L1eEM5: eventCount: 20 -HLT_noalg_L1eEM8: +HLT_noalg_L1eEM7: eventCount: 18 HLT_noalg_L1eEM8L: eventCount: 10 -HLT_noalg_L1eEM8M: - eventCount: 8 HLT_noalg_L1eTAU100: eventCount: 3 HLT_noalg_L1eTAU12: @@ -10655,8 +11640,6 @@ HLT_noalg_L1jEM15: eventCount: 0 HLT_noalg_L1jEM15M: eventCount: 0 -HLT_noalg_L1jEM18M: - eventCount: 0 HLT_noalg_L1jJ100: eventCount: 11 HLT_noalg_L1jJ12: @@ -10689,6 +11672,8 @@ HLT_noalg_L1jJ40: eventCount: 18 HLT_noalg_L1jJ400: eventCount: 1 +HLT_noalg_L1jJ400_LAR: + eventCount: 1 HLT_noalg_L1jJ40p0ETA25: eventCount: 18 HLT_noalg_L1jJ45p0ETA21: @@ -10713,7 +11698,9 @@ HLT_noalg_L1jLJ80: eventCount: 0 HLT_noalg_L1jTAU12: eventCount: 0 -HLT_noalg_L1jTAU12M: +HLT_noalg_L1jTAU20: + eventCount: 0 +HLT_noalg_L1jTAU20M: eventCount: 0 HLT_noalg_L1jTE100: eventCount: 0 @@ -11118,7 +12105,7 @@ HLT_tau20_mediumRNN_tracktwoMVABDT_probe_j15_pf_ftf_03dRAB_L1RD0_FILLED: 3: 68 4: 68 5: 68 - 6: 12 + 6: 11 HLT_tau20_mediumRNN_tracktwoMVABDT_probe_xe65_cell_xe90_pfopufit_L1XE50: eventCount: 2 stepCounts: @@ -11184,19 +12171,19 @@ HLT_tau25_idperf_tracktwoMVA_L1TAU12IM: 3: 32 4: 32 HLT_tau25_looseRNN_tracktwoLLP_L1TAU12IM: - eventCount: 9 + eventCount: 8 stepCounts: 0: 17 1: 17 2: 17 3: 17 - 4: 9 + 4: 8 stepFeatures: 0: 32 1: 32 2: 32 3: 32 - 4: 11 + 4: 10 HLT_tau25_looseRNN_tracktwoMVABDT_L1TAU12IM: eventCount: 9 stepCounts: @@ -11541,6 +12528,19 @@ HLT_tau35_mediumRNN_tracktwoMVABDT_probe_xe65_cell_xe90_pfopufit_L1XE50: 4: 7 5: 7 6: 3 +HLT_tau35_mediumRNN_tracktwoMVABDT_tau25_mediumRNN_tracktwoMVABDT_03dRAB30_L1DR-TAU20ITAU12I: + eventCount: 0 + stepCounts: + 0: 7 + 1: 7 + 2: 7 + 3: 7 + stepFeatures: + 0: 37 + 1: 37 + 2: 37 + 3: 37 + 4: 12 HLT_tau35_mediumRNN_tracktwoMVABDT_tau25_mediumRNN_tracktwoMVABDT_03dRAB30_L1DR-TAU20ITAU12I-J25: eventCount: 0 stepCounts: @@ -11554,6 +12554,20 @@ HLT_tau35_mediumRNN_tracktwoMVABDT_tau25_mediumRNN_tracktwoMVABDT_03dRAB30_L1DR- 2: 37 3: 37 4: 12 +HLT_tau35_mediumRNN_tracktwoMVABDT_tau25_mediumRNN_tracktwoMVABDT_03dRAB_L1TAU20IM_2TAU12IM: + eventCount: 2 + stepCounts: + 0: 8 + 1: 8 + 2: 8 + 3: 8 + 4: 2 + stepFeatures: + 0: 41 + 1: 41 + 2: 41 + 3: 41 + 4: 12 HLT_tau35_mediumRNN_tracktwoMVABDT_tau25_mediumRNN_tracktwoMVABDT_03dRAB_L1TAU20IM_2TAU12IM_4J12p0ETA25: eventCount: 2 stepCounts: @@ -11600,6 +12614,19 @@ HLT_tau35_mediumRNN_tracktwoMVA_probe_xe65_cell_xe90_pfopufit_L1XE50: 4: 7 5: 7 6: 3 +HLT_tau35_mediumRNN_tracktwoMVA_tau25_mediumRNN_tracktwoMVA_03dRAB30_L1DR-TAU20ITAU12I: + eventCount: 0 + stepCounts: + 0: 7 + 1: 7 + 2: 7 + 3: 7 + stepFeatures: + 0: 37 + 1: 37 + 2: 37 + 3: 37 + 4: 12 HLT_tau35_mediumRNN_tracktwoMVA_tau25_mediumRNN_tracktwoMVA_03dRAB30_L1DR-TAU20ITAU12I-J25: eventCount: 0 stepCounts: @@ -11613,6 +12640,20 @@ HLT_tau35_mediumRNN_tracktwoMVA_tau25_mediumRNN_tracktwoMVA_03dRAB30_L1DR-TAU20I 2: 37 3: 37 4: 12 +HLT_tau35_mediumRNN_tracktwoMVA_tau25_mediumRNN_tracktwoMVA_03dRAB_L1TAU20IM_2TAU12IM: + eventCount: 2 + stepCounts: + 0: 8 + 1: 8 + 2: 8 + 3: 8 + 4: 2 + stepFeatures: + 0: 41 + 1: 41 + 2: 41 + 3: 41 + 4: 12 HLT_tau35_mediumRNN_tracktwoMVA_tau25_mediumRNN_tracktwoMVA_03dRAB_L1TAU20IM_2TAU12IM_4J12p0ETA25: eventCount: 2 stepCounts: @@ -11993,10 +13034,10 @@ HLT_tau80_mediumRNN_tracktwoMVABDT_tau35_mediumRNN_tracktwoMVABDT_03dRAB30_L1TAU 2: 4 3: 4 stepFeatures: - 0: 16 - 1: 16 - 2: 16 - 3: 16 + 0: 18 + 1: 18 + 2: 18 + 3: 18 4: 7 HLT_tau80_mediumRNN_tracktwoMVABDT_tau60_mediumRNN_tracktwoMVABDT_03dRAB_L1TAU60_2TAU40: eventCount: 1 @@ -12052,10 +13093,10 @@ HLT_tau80_mediumRNN_tracktwoMVA_tau35_mediumRNN_tracktwoMVA_03dRAB30_L1TAU60_DR- 2: 4 3: 4 stepFeatures: - 0: 16 - 1: 16 - 2: 16 - 3: 16 + 0: 18 + 1: 18 + 2: 18 + 3: 18 4: 7 HLT_tau80_mediumRNN_tracktwoMVA_tau60_mediumRNN_tracktwoMVA_03dRAB_L1TAU60_2TAU40: eventCount: 1 @@ -12125,6 +13166,14 @@ HLT_unconvtrk260_hitdv_medium_L1J100: stepFeatures: 0: 5 1: 5 +HLT_unconvtrk260_hitdv_medium_L1jJ100: + eventCount: 0 + stepCounts: + 0: 11 + 1: 11 + stepFeatures: + 0: 11 + 1: 11 HLT_unconvtrk260_hitdv_tight_L1J100: eventCount: 0 stepCounts: @@ -12133,6 +13182,14 @@ HLT_unconvtrk260_hitdv_tight_L1J100: stepFeatures: 0: 5 1: 5 +HLT_unconvtrk260_hitdv_tight_L1jJ100: + eventCount: 0 + stepCounts: + 0: 11 + 1: 11 + stepFeatures: + 0: 11 + 1: 11 HLT_unconvtrk50_isohpttrack_L1XE50: eventCount: 3 stepCounts: diff --git a/Trigger/TrigValidation/TrigAnalysisTest/test/test_trigAna_RDOtoDAOD_v1Dev_grid.py b/Trigger/TrigValidation/TrigAnalysisTest/test/test_trigAna_RDOtoDAOD_v1Dev_grid.py index 5b76c2787a5f0c07332c07efd65b6256f1ae0728..03d7362841ef88899269f0b30cc5c8ebda2ecba1 100755 --- a/Trigger/TrigValidation/TrigAnalysisTest/test/test_trigAna_RDOtoDAOD_v1Dev_grid.py +++ b/Trigger/TrigValidation/TrigAnalysisTest/test/test_trigAna_RDOtoDAOD_v1Dev_grid.py @@ -44,7 +44,7 @@ aod2daod.input = '' aod2daod.forks = 4 aod2daod.explicit_input = True aod2daod.args = '--inputAODFile=AOD.pool.root --sharedWriter=True --runNumber=300001 --digiSeedOffset1=1 --digiSeedOffset2=1 --outputDAODFile=DAOD.pool.root --reductionConf=PHYS' -aod2daod.args += ' --preExec="default:from AthenaCommon.DetFlags import DetFlags; DetFlags.detdescr.all_setOff(); DetFlags.detdescr.Calo_setOn(); DetFlags.BField_setOn(); DetFlags.pileup.all_setOff(); DetFlags.overlay.all_setOff(); from AthenaMP.AthenaMPFlags import jobproperties as ampjp; ampjp.AthenaMPFlags.ChunkSize=100;"' +aod2daod.args += ' --preExec="default:from AthenaCommon.DetFlags import DetFlags; DetFlags.detdescr.all_setOff(); DetFlags.detdescr.Calo_setOn(); DetFlags.BField_setOn(); DetFlags.pileup.all_setOff(); DetFlags.overlay.all_setOff(); DetFlags.digitize.all_setOff(); from AthenaMP.AthenaMPFlags import jobproperties as ampjp; ampjp.AthenaMPFlags.ChunkSize=100;"' aod2daod.args += ' --postExec="default:from IOVDbSvc.CondDB import conddb; conddb.addFolderSplitOnline(\\\"INDET\\\",\\\"/Indet/Onl/Beampos\\\",\\\"/Indet/Beampos\\\", className=\\\"AthenaAttributeList\\\"); from AthenaCommon.AlgSequence import AthSequencer; condSeq = AthSequencer(\\\"AthCondSeq\\\"); from BeamSpotConditions.BeamSpotConditionsConf import BeamSpotCondAlg; condSeq += BeamSpotCondAlg( \\\"BeamSpotCondAlg\\\" );"' test = Test.Test() diff --git a/Trigger/TrigValidation/TrigAnalysisTest/test/test_trigAna_RDOtoRun3DQ_v1Dev_build.py b/Trigger/TrigValidation/TrigAnalysisTest/test/test_trigAna_RDOtoRun3DQ_v1Dev_build.py index bf60492a57e509bbef6e4a52a93f549d1bf33f7c..b03331cfd15c8d58313ca1967b42e34fea6471aa 100755 --- a/Trigger/TrigValidation/TrigAnalysisTest/test/test_trigAna_RDOtoRun3DQ_v1Dev_build.py +++ b/Trigger/TrigValidation/TrigAnalysisTest/test/test_trigAna_RDOtoRun3DQ_v1Dev_build.py @@ -30,7 +30,7 @@ dq.executable = 'Run3DQTestingDriver.py' dq.input = '' dq.args = '--threads=4' dq.args += ' --dqOffByDefault' -dq.args += ' Input.Files="[\'AOD.pool.root\']" DQ.Steering.doHLTMon=True' +dq.args += ' Input.Files="[\'AOD.pool.root\']" DQ.Steering.doHLTMon=True Trigger.triggerMenuSetup=\'LS2_v1_TriggerValidation_prescale\'' test = Test.Test() test.art_type = 'build' diff --git a/Trigger/TrigValidation/TrigP1Test/share/ref_v1Dev_decodeBS_build.ref b/Trigger/TrigValidation/TrigP1Test/share/ref_v1Dev_decodeBS_build.ref index 9c5e5e12aa0850fe2bee8674269907b6b43b79ff..51f7482f724b1695fd3c034d299f6857ea5c21d9 100644 --- a/Trigger/TrigValidation/TrigP1Test/share/ref_v1Dev_decodeBS_build.ref +++ b/Trigger/TrigValidation/TrigP1Test/share/ref_v1Dev_decodeBS_build.ref @@ -1,11 +1,15 @@ HLT_10j40_L14J15: eventCount: 0 +HLT_10j40_L14jJ15: + eventCount: 0 HLT_10j40_ftf_presel7j30_L14J15: eventCount: 0 HLT_10j40_pf_ftf_L14J15: eventCount: 0 HLT_10j40_pf_ftf_presel7j30_L14J15: eventCount: 0 +HLT_10j40_pf_ftf_presel7j30_L14jJ15: + eventCount: 0 HLT_2e12_lhloose_mu10_L12EM8VH_MU8F: eventCount: 0 HLT_2e17_idperf_gsf_loose_L12EM15VHI: @@ -24,6 +28,8 @@ HLT_2e24_lhvloose_L12eEM20L: eventCount: 0 HLT_2e5_lhmedium_j70_0eta320_j50_0eta490_j0_DJMASS900j50_L1MJJ-500-NFF: eventCount: 0 +HLT_2e5_lhmedium_j70_0eta320_j50_0eta490_j0_DJMASS900j50_L1jMJJ-500-NFF: + eventCount: 0 HLT_2e5_lhvloose_bBeeM6000_L12EM3: eventCount: 0 stepCounts: @@ -177,6 +183,8 @@ HLT_2j110_a10sd_pf_nojcalib_ftf_0eta200_TracklessdR1p2_L1J50: 0: 4 HLT_2j120_mb_afprec_afpdijet_L1AFP_A_AND_C_TOF_J50: eventCount: 0 +HLT_2j120_mb_afprec_afpdijet_L1AFP_A_AND_C_TOF_jJ50: + eventCount: 0 HLT_2j120_mb_afprec_afpdijet_L1CEP-CjJ50: eventCount: 0 HLT_2j135_mb_afprec_afpdijet_L1CEP-CjJ60: @@ -215,6 +223,8 @@ HLT_2j175_a10sd_pf_nojcalib_ftf_0eta200_TracklessdR1p2_L1J100: eventCount: 0 HLT_2j175_mb_afprec_afpdijet_L1AFP_A_AND_C_TOF_J75: eventCount: 0 +HLT_2j175_mb_afprec_afpdijet_L1AFP_A_AND_C_TOF_jJ75: + eventCount: 0 HLT_2j20_mb_afprec_afpdijet_L1RD0_FILLED: eventCount: 0 HLT_2j250_ftf_0eta240_j120_ftf_0eta240_presel2j180XXj80_L1J100: @@ -223,6 +233,8 @@ HLT_2j250_pf_ftf_0eta240_j120_pf_ftf_0eta240_L1J100: eventCount: 0 HLT_2j250_pf_ftf_0eta240_j120_pf_ftf_0eta240_presel2j180XXj80_L1J100: eventCount: 0 +HLT_2j250_pf_ftf_0eta240_j120_pf_ftf_0eta240_presel2j180XXj80_L1jJ100: + eventCount: 0 HLT_2j330_a10sd_cssk_pf_jes_ftf_35smcINF_L1J100: eventCount: 0 HLT_2j330_a10sd_cssk_pf_jes_ftf_35smcINF_L1SC111-CJ15: @@ -235,12 +247,20 @@ HLT_2j330_a10sd_cssk_pf_jes_ftf_35smcINF_presel2j225_L1J100: eventCount: 0 HLT_2j330_a10sd_cssk_pf_jes_ftf_35smcINF_presel2j225_L1SC111-CJ15: eventCount: 0 +HLT_2j330_a10sd_cssk_pf_jes_ftf_35smcINF_presel2j225_L1SC111-CjJ15: + eventCount: 0 +HLT_2j330_a10sd_cssk_pf_jes_ftf_35smcINF_presel2j225_L1jJ100: + eventCount: 0 HLT_2j330_a10sd_cssk_pf_nojcalib_ftf_35smcINF_L1J100: eventCount: 0 HLT_2j330_a10t_lcw_jes_35smcINF_L1J100: eventCount: 0 HLT_2j330_a10t_lcw_jes_35smcINF_L1SC111-CJ15: eventCount: 0 +HLT_2j330_a10t_lcw_jes_35smcINF_L1SC111-CjJ15: + eventCount: 0 +HLT_2j330_a10t_lcw_jes_35smcINF_L1jJ100: + eventCount: 0 HLT_2j330_a10t_lcw_nojcalib_35smcINF_L1J100: eventCount: 0 HLT_2j35_0eta240_020jvt_pf_ftf_2j35_0eta240_020jvt_pf_ftf_L14J15p0ETA25: @@ -249,34 +269,72 @@ HLT_2j35_0eta240_020jvt_pf_ftf_bdl1r60_2j35_0eta240_020jvt_pf_ftf_L14J15p0ETA25: eventCount: 0 HLT_2j35_0eta240_020jvt_pf_ftf_bdl1r60_2j35_0eta240_020jvt_pf_ftf_presel4j25_L14J15p0ETA25: eventCount: 0 +HLT_2j35_0eta240_020jvt_pf_ftf_bdl1r60_2j35_0eta240_020jvt_pf_ftf_presel4j25_L14jJ15p0ETA25: + eventCount: 0 + stepCounts: + 0: 11 + stepFeatures: + 0: 22 HLT_2j35_0eta240_2j35_0eta240_L14J15p0ETA25: eventCount: 0 HLT_2j35_0eta290_020jvt_pf_ftf_bdl1r60_3j35_pf_ftf_0eta320_L15J15p0ETA25: eventCount: 0 HLT_2j35_0eta290_020jvt_pf_ftf_bdl1r60_3j35_pf_ftf_0eta320_presel5j25_L15J15p0ETA25: eventCount: 0 +HLT_2j35_0eta290_020jvt_pf_ftf_bdl1r60_3j35_pf_ftf_0eta320_presel5j25_L15jJ15p0ETA25: + eventCount: 0 + stepCounts: + 0: 5 + stepFeatures: + 0: 10 HLT_2j35_0eta290_020jvt_pf_ftf_bdl1r70_2j35_0eta290_020jvt_pf_ftf_bdl1r85_L14J15p0ETA25: eventCount: 0 HLT_2j35_0eta290_020jvt_pf_ftf_bdl1r70_2j35_0eta290_020jvt_pf_ftf_bdl1r85_presel4j25_L14J15p0ETA25: eventCount: 0 +HLT_2j35_0eta290_020jvt_pf_ftf_bdl1r70_2j35_0eta290_020jvt_pf_ftf_bdl1r85_presel4j25_L14jJ15p0ETA25: + eventCount: 0 + stepCounts: + 0: 11 + stepFeatures: + 0: 22 HLT_2j45_0eta290_020jvt_pf_ftf_bdl1r60_2j45_pf_ftf_L14J15p0ETA25: eventCount: 0 HLT_2j45_0eta290_020jvt_pf_ftf_bdl1r60_2j45_pf_ftf_presel4j25_L14J15p0ETA25: eventCount: 0 +HLT_2j45_0eta290_020jvt_pf_ftf_bdl1r60_2j45_pf_ftf_presel4j25_L14jJ15p0ETA25: + eventCount: 0 + stepCounts: + 0: 11 + stepFeatures: + 0: 22 HLT_2j45_0eta290_020jvt_pf_ftf_bdl1r60_3j45_pf_ftf_0eta320_L15J15p0ETA25: eventCount: 0 HLT_2j45_0eta290_020jvt_pf_ftf_bdl1r60_3j45_pf_ftf_0eta320_presel5j25_L15J15p0ETA25: eventCount: 0 +HLT_2j45_0eta290_020jvt_pf_ftf_bdl1r60_3j45_pf_ftf_0eta320_presel5j25_L15jJ15p0ETA25: + eventCount: 0 + stepCounts: + 0: 5 + stepFeatures: + 0: 10 HLT_2j45_pf_ftf_bdl1r60_xe50_cell_xe85_pfopufit_L12J15_XE55: eventCount: 0 HLT_2j45_pf_ftf_bdl1r60_xe50_cell_xe85_tcpufit_L12J15_XE55: eventCount: 0 HLT_2j45_pf_ftf_bdl1r70_j0_pf_ftf_HT300_j0_pf_ftf_DJMASS700j35_L1HT150-J20s5pETA31_MJJ-400-CF: eventCount: 0 +HLT_2j45_pf_ftf_bdl1r70_j0_pf_ftf_HT300_j0_pf_ftf_DJMASS700j35_L1jHT150-jJ20s5pETA31_jMJJ-400-CF: + eventCount: 0 HLT_2j55_0eta290_020jvt_pf_ftf_bdl1r60_2j55_pf_ftf_0eta320_L14J15p0ETA25: eventCount: 0 HLT_2j55_0eta290_020jvt_pf_ftf_bdl1r60_2j55_pf_ftf_0eta320_presel4j25_L14J15p0ETA25: eventCount: 0 +HLT_2j55_0eta290_020jvt_pf_ftf_bdl1r60_2j55_pf_ftf_0eta320_presel4j25_L14jJ15p0ETA25: + eventCount: 0 + stepCounts: + 0: 11 + stepFeatures: + 0: 22 HLT_2mu10_bJpsimumu_L12MU8F: eventCount: 0 HLT_2mu10_bUpsimumu_L12MU8F: @@ -435,6 +493,8 @@ HLT_2mu6_10invmAA70_L1MU5VF: 0: 2 HLT_2mu6_2j50_0eta490_j0_DJMASS900j50_L1MJJ-500-NFF: eventCount: 0 +HLT_2mu6_2j50_0eta490_j0_DJMASS900j50_L1jMJJ-500-NFF: + eventCount: 0 HLT_2mu6_L12MU5VF: eventCount: 0 stepCounts: @@ -497,18 +557,31 @@ HLT_2mu6_muonqual_L12MU5VF: 0: 2 HLT_3j200_L1J100: eventCount: 0 +HLT_3j200_L1jJ100: + eventCount: 0 HLT_3j200_ftf_presel3j150_L1J100: eventCount: 0 HLT_3j200_pf_ftf_L1J100: eventCount: 0 HLT_3j200_pf_ftf_presel3j150_L1J100: eventCount: 0 +HLT_3j200_pf_ftf_presel3j150_L1jJ100: + eventCount: 0 HLT_3j20_pf_ftf_020jvt_j20_0eta290_pf_ftf_boffperf_L1HT190-J15s5pETA21: eventCount: 0 HLT_3j35_0eta290_020jvt_pf_ftf_bdl1r70_j35_pf_ftf_0eta320_L14J15p0ETA25: eventCount: 0 HLT_3j35_0eta290_020jvt_pf_ftf_bdl1r70_j35_pf_ftf_0eta320_presel4j25_L14J15p0ETA25: eventCount: 0 +HLT_3j35_0eta290_020jvt_pf_ftf_bdl1r70_j35_pf_ftf_0eta320_presel4j25_L14jJ15p0ETA25: + eventCount: 0 + stepCounts: + 0: 11 + 1: 1 + stepFeatures: + 0: 22 + 1: 7 + 2: 1 HLT_3j35_pf_ftf_bdl1r60_xe50_cell_xe70_pfopufit_L13J15p0ETA25_XE40: eventCount: 0 HLT_3j35_pf_ftf_bdl1r60_xe50_cell_xe70_tcpufit_L13J15p0ETA25_XE40: @@ -523,6 +596,12 @@ HLT_3j65_0eta290_020jvt_pf_ftf_bdl1r77_L1J45p0ETA21_3J15p0ETA25: eventCount: 0 HLT_3j65_0eta290_020jvt_pf_ftf_bdl1r77_presel3j45_L13J35p0ETA23: eventCount: 0 +HLT_3j65_0eta290_020jvt_pf_ftf_bdl1r77_presel3j45_L13jJ35p0ETA23: + eventCount: 0 + stepCounts: + 0: 1 + stepFeatures: + 0: 1 HLT_3j65_0eta290_020jvt_pf_ftf_bdl1r85_L1J45p0ETA21_3J15p0ETA25: eventCount: 0 HLT_3mu4_b3mu_L1BPH-0M10C-3MU3V: @@ -563,8 +642,12 @@ HLT_4j115_pf_ftf_L13J50: eventCount: 0 HLT_4j115_pf_ftf_presel4j85_L13J50: eventCount: 0 +HLT_4j115_pf_ftf_presel4j85_L13jJ50: + eventCount: 0 HLT_4j120_L13J50: eventCount: 0 +HLT_4j120_L13jJ50: + eventCount: 0 HLT_4j20_0eta290_pf_ftf_boffperf_L1HT190-J15s5pETA21: eventCount: 0 HLT_4j20_pf_ftf_020jvt_boffperf_L1HT190-J15s5pETA21: @@ -581,6 +664,12 @@ HLT_4j35_0eta290_020jvt_pf_ftf_bdl1r77_L1J45p0ETA21_3J15p0ETA25: eventCount: 0 HLT_4j35_0eta290_020jvt_pf_ftf_bdl1r77_presel4j25_L14J15p0ETA25: eventCount: 0 +HLT_4j35_0eta290_020jvt_pf_ftf_bdl1r77_presel4j25_L14jJ15p0ETA25: + eventCount: 0 + stepCounts: + 0: 11 + stepFeatures: + 0: 11 HLT_4j35_0eta290_020jvt_pf_ftf_bdl1r85_L1J45p0ETA21_3J15p0ETA25: eventCount: 0 HLT_4mu4_L14MU3V: @@ -595,26 +684,46 @@ HLT_5j35_pf_ftf_0eta240_020jvt_j25_pf_ftf_0eta240_020jvt_bdl1r60_L14J15: eventCount: 0 HLT_5j35_pf_ftf_0eta240_020jvt_j25_pf_ftf_0eta240_020jvt_bdl1r60_presel6c25_L14J15: eventCount: 0 +HLT_5j35_pf_ftf_0eta240_020jvt_j25_pf_ftf_0eta240_020jvt_bdl1r60_presel6c25_L14jJ15: + eventCount: 0 + stepCounts: + 0: 1 + stepFeatures: + 0: 2 HLT_5j45_pf_ftf_0eta240_020jvt_j25_pf_ftf_0eta240_020jvt_bdl1r60_L14J15: eventCount: 0 HLT_5j45_pf_ftf_0eta240_020jvt_j25_pf_ftf_0eta240_020jvt_bdl1r60_presel6c25_L14J15: eventCount: 0 +HLT_5j45_pf_ftf_0eta240_020jvt_j25_pf_ftf_0eta240_020jvt_bdl1r60_presel6c25_L14jJ15: + eventCount: 0 + stepCounts: + 0: 1 + stepFeatures: + 0: 2 HLT_5j70_0eta240_L14J15: eventCount: 0 +HLT_5j70_0eta240_L14jJ15: + eventCount: 0 HLT_5j70_ftf_0eta240_presel5j50_L14J15: eventCount: 0 HLT_5j70_pf_ftf_0eta240_L14J15: eventCount: 0 HLT_5j70_pf_ftf_0eta240_presel5j50_L14J15: eventCount: 0 +HLT_5j70_pf_ftf_0eta240_presel5j50_L14jJ15: + eventCount: 0 HLT_5j85_L14J15: eventCount: 0 +HLT_5j85_L14jJ15: + eventCount: 0 HLT_5j85_ftf_presel5j50_L14J15: eventCount: 0 HLT_5j85_pf_ftf_L14J15: eventCount: 0 HLT_5j85_pf_ftf_presel5j50_L14J15: eventCount: 0 +HLT_5j85_pf_ftf_presel5j50_L14jJ15: + eventCount: 0 HLT_6j25_0eta240_L14J15: eventCount: 0 HLT_6j25_ftf_0eta240_010jvt_L14J15: @@ -647,6 +756,12 @@ HLT_6j35_pf_ftf_0eta240_010jvt_L14J15: eventCount: 0 HLT_6j35_pf_ftf_0eta240_020jvt_presel6c25_L14J15: eventCount: 0 +HLT_6j35_pf_ftf_0eta240_020jvt_presel6c25_L14jJ15: + eventCount: 0 + stepCounts: + 0: 1 + stepFeatures: + 0: 1 HLT_6j35_pf_ftf_0eta240_050jvt_L14J15: eventCount: 0 HLT_6j35_pf_ftf_0eta240_L14J15: @@ -667,34 +782,52 @@ HLT_6j45_pf_ftf_0eta240_020jvt_L14J15: eventCount: 0 HLT_6j45_pf_ftf_0eta240_020jvt_presel6c25_L14J15: eventCount: 0 +HLT_6j45_pf_ftf_0eta240_020jvt_presel6c25_L14jJ15: + eventCount: 0 + stepCounts: + 0: 1 + stepFeatures: + 0: 1 HLT_6j45_pf_ftf_0eta240_050jvt_L14J15: eventCount: 0 HLT_6j45_pf_ftf_0eta240_L14J15: eventCount: 0 HLT_6j55_0eta240_L14J15: eventCount: 0 +HLT_6j55_0eta240_L14jJ15: + eventCount: 0 HLT_6j55_ftf_0eta240_presel6j40_L14J15: eventCount: 0 HLT_6j55_pf_ftf_0eta240_L14J15: eventCount: 0 HLT_6j55_pf_ftf_0eta240_presel6j40_L14J15: eventCount: 0 +HLT_6j55_pf_ftf_0eta240_presel6j40_L14jJ15: + eventCount: 0 HLT_6j70_L14J15: eventCount: 0 +HLT_6j70_L14jJ15: + eventCount: 0 HLT_6j70_ftf_presel6j40_L14J15: eventCount: 0 HLT_6j70_pf_ftf_L14J15: eventCount: 0 HLT_6j70_pf_ftf_presel6j40_L14J15: eventCount: 0 +HLT_6j70_pf_ftf_presel6j40_L14jJ15: + eventCount: 0 HLT_7j45_L14J15: eventCount: 0 +HLT_7j45_L14jJ15: + eventCount: 0 HLT_7j45_ftf_presel7j30_L14J15: eventCount: 0 HLT_7j45_pf_ftf_L14J15: eventCount: 0 HLT_7j45_pf_ftf_presel7j30_L14J15: eventCount: 0 +HLT_7j45_pf_ftf_presel7j30_L14jJ15: + eventCount: 0 HLT_beamspot_allTE_trkfast_BeamSpotPEB_L1J15: eventCount: 0 HLT_beamspot_trkFS_trkfast_BeamSpotPEB_L1J15: @@ -703,6 +836,8 @@ HLT_e100_lhvloose_L1EM22VHI: eventCount: 0 HLT_e10_lhmedium_ivarloose_j70_0eta320_j50_0eta490_j0_DJMASS900j50_L1MJJ-500-NFF: eventCount: 0 +HLT_e10_lhmedium_ivarloose_j70_0eta320_j50_0eta490_j0_DJMASS900j50_L1jMJJ-500-NFF: + eventCount: 0 HLT_e10_lhvloose_L1EM7: eventCount: 0 stepCounts: @@ -1243,6 +1378,8 @@ HLT_e5_lhvloose_bBeeM6000_L1EM22VHI: 1: 9 HLT_e5_lhvloose_j70_0eta320_j50_0eta490_j0_DJMASS1000j50_xe50_tcpufit_L1MJJ-500-NFF: eventCount: 0 +HLT_e5_lhvloose_j70_0eta320_j50_0eta490_j0_DJMASS1000j50_xe50_tcpufit_L1jMJJ-500-NFF: + eventCount: 0 HLT_e5_lhvloose_nopix_lrtloose_idperf_probe_g25_medium_L1EM20VH: eventCount: 0 stepCounts: @@ -1421,6 +1558,8 @@ HLT_g20_tight_icaloloose_L1EM15VHI: 2: 5 HLT_g20_tight_icaloloose_j35_pf_ftf_bdl1r77_3j35_pf_ftf_0eta490_j0_pf_ftf_DJMASS500j35_L1EM18VHI_MJJ-300: eventCount: 0 +HLT_g20_tight_icaloloose_j35_pf_ftf_bdl1r77_3j35_pf_ftf_0eta490_j0_pf_ftf_DJMASS500j35_L1eEM18M_jMJJ-300-NFF: + eventCount: 0 HLT_g22_tight_L1EM15VHI: eventCount: 0 stepCounts: @@ -1471,6 +1610,8 @@ HLT_g25_medium_4j35_0eta490_j0_DJMASS1000j35_L1EM22VHI: 1: 3 2: 3 3: 1 +HLT_g25_medium_4j35_0eta490_j0_DJMASS1000j35_L1eEM22M: + eventCount: 0 HLT_g25_medium_L1EM20VH: eventCount: 1 stepCounts: @@ -1737,6 +1878,8 @@ HLT_g40_loose_mu40_msonly_L1MU14FCH: eventCount: 0 HLT_g45_loose_6j45_L14J15p0ETA25: eventCount: 0 +HLT_g45_loose_6j45_L14jJ15p0ETA25: + eventCount: 0 HLT_g45_tight_icaloloose_2j55_pf_ftf_0eta200_ExoticPTF0p0dR0p4_L1EM22VHI: eventCount: 0 HLT_g45_tight_icaloloose_2j55_pf_ftf_0eta200_ExoticPTF0p1dR0p4_L1EM22VHI: @@ -1839,10 +1982,14 @@ HLT_j0_HT1000XX30et_L1J20: eventCount: 0 HLT_j0_HT1000_L1HT190-J15s5pETA21: eventCount: 0 +HLT_j0_HT1000_L1HT190-jJ15s5pETA21: + eventCount: 0 HLT_j0_HT1000_L1J100: eventCount: 0 HLT_j0_HT1000_L1J20: eventCount: 0 +HLT_j0_HT1000_L1jJ100: + eventCount: 0 HLT_j0_HT1000_j0_DIJET80j12ptXX0j12eta240XX700djmass_L1J20: eventCount: 0 HLT_j0_HT1000_pf_ftf_L1HT190-J15s5pETA21: @@ -1851,8 +1998,12 @@ HLT_j0_HT1000_pf_ftf_L1J100: eventCount: 0 HLT_j0_HT1000_pf_ftf_preselj180_L1HT190-J15s5pETA21: eventCount: 0 +HLT_j0_HT1000_pf_ftf_preselj180_L1HT190-jJ15s5pETA21: + eventCount: 0 HLT_j0_HT1000_pf_ftf_preselj180_L1J100: eventCount: 0 +HLT_j0_HT1000_pf_ftf_preselj180_L1jJ100: + eventCount: 0 HLT_j0_HT500XX30et_L1J20: eventCount: 0 HLT_j0_HT500_L1J20: @@ -1905,6 +2056,16 @@ HLT_j100_0eta290_020jvt_pf_ftf_boffperf_preselj80_L1J50: 0: 4 1: 3 2: 3 +HLT_j100_0eta290_020jvt_pf_ftf_boffperf_preselj80_L1jJ50: + eventCount: 1 + stepCounts: + 0: 4 + 1: 1 + 2: 1 + stepFeatures: + 0: 4 + 1: 2 + 2: 2 HLT_j100_pf_ftf_0eta320_j20_0eta290_pf_ftf_boffperf_L1HT190-J15s5pETA21: eventCount: 0 HLT_j100_pf_ftf_bdl1r60_xe50_cell_xe85_pfopufit_L1XE55: @@ -1917,6 +2078,8 @@ HLT_j100_pf_ftf_bdl1r60_xe50_cell_xe85_tcpufit_L1XE55: 0: 2 HLT_j110_320eta490_L1J30p31ETA49: eventCount: 0 +HLT_j110_320eta490_L1jJ30p31ETA49: + eventCount: 0 HLT_j110_a10r_subjesIS_ftf_0eta200_ExoticPTF0p0dR1p2_L1J100: eventCount: 0 HLT_j110_a10r_subjesIS_ftf_0eta200_ExoticPTF0p0dR1p2_L1SC111-CJ15: @@ -1989,6 +2152,14 @@ HLT_j110_a10sd_cssk_pf_jes_ftf_preselj80_L1J30: stepFeatures: 0: 6 1: 3 +HLT_j110_a10sd_cssk_pf_jes_ftf_preselj80_L1jJ30: + eventCount: 2 + stepCounts: + 0: 9 + 1: 2 + stepFeatures: + 0: 9 + 1: 3 HLT_j110_a10sd_pf_nojcalib_ftf_0eta200_TracklessdR1p2_L1J50: eventCount: 0 stepCounts: @@ -2003,6 +2174,12 @@ HLT_j110_a10t_lcw_jes_L1J30: 0: 4 stepFeatures: 0: 6 +HLT_j110_a10t_lcw_jes_L1jJ30: + eventCount: 9 + stepCounts: + 0: 9 + stepFeatures: + 0: 12 HLT_j110_pf_ftf_preselj80_L1J30: eventCount: 2 stepCounts: @@ -2011,6 +2188,14 @@ HLT_j110_pf_ftf_preselj80_L1J30: stepFeatures: 0: 5 1: 2 +HLT_j110_pf_ftf_preselj80_L1jJ30: + eventCount: 2 + stepCounts: + 0: 5 + 1: 2 + stepFeatures: + 0: 5 + 1: 2 HLT_j110_subjesgscIS_ftf_bdl1r60_j45_subjesgscIS_ftf_bdl1r70_L1J50: eventCount: 0 stepCounts: @@ -2027,10 +2212,18 @@ HLT_j140_a10_tc_em_nojcalib_L1SC111-CJ15: eventCount: 0 HLT_j150_0eta290_020jvt_pf_ftf_boffperf_preselj120_L1J100: eventCount: 0 +HLT_j150_0eta290_020jvt_pf_ftf_boffperf_preselj120_L1jJ100: + eventCount: 0 + stepCounts: + 0: 1 + stepFeatures: + 0: 1 HLT_j150_0eta320_pf_ftf_2j55_0eta290_020jvt_pf_ftf_bdl1r70_L1J85_3J30: eventCount: 0 HLT_j150_0eta320_pf_ftf_2j55_0eta290_020jvt_pf_ftf_bdl1r70_preselj80XX2j45_L1J85_3J30: eventCount: 0 +HLT_j150_0eta320_pf_ftf_2j55_0eta290_020jvt_pf_ftf_bdl1r70_preselj80XX2j45_L1jJ85_3jJ30: + eventCount: 0 HLT_j15_320eta490_L1RD0_FILLED: eventCount: 10 stepCounts: @@ -2051,8 +2244,12 @@ HLT_j175_0eta290_020jvt_pf_ftf_bdl1r60_j60_0eta290_020jvt_pf_ftf_bdl1r60_L1J100: eventCount: 0 HLT_j175_0eta290_020jvt_pf_ftf_bdl1r60_j60_0eta290_020jvt_pf_ftf_bdl1r60_preselj140XXj45_L1J100: eventCount: 0 +HLT_j175_0eta290_020jvt_pf_ftf_bdl1r60_j60_0eta290_020jvt_pf_ftf_bdl1r60_preselj140XXj45_L1jJ100: + eventCount: 0 HLT_j175_320eta490_L1J50p31ETA49: eventCount: 0 +HLT_j175_320eta490_L1jJ50p31ETA49: + eventCount: 0 HLT_j175_a10r_subjesIS_ftf_0eta200_ExoticPTF0p0dR1p2_L1J100: eventCount: 0 HLT_j175_a10r_subjesIS_ftf_0eta200_ExoticPTF0p0dR1p2_L1SC111-CJ15: @@ -2095,18 +2292,26 @@ HLT_j175_a10sd_cssk_pf_jes_ftf_0eta200_ExoticPTF0p2dR1p2_L1J50: 0: 4 HLT_j175_a10sd_cssk_pf_jes_ftf_preselj140_L1J50: eventCount: 0 +HLT_j175_a10sd_cssk_pf_jes_ftf_preselj140_L1jJ50: + eventCount: 0 HLT_j175_a10sd_pf_nojcalib_ftf_0eta200_TracklessdR1p2_L1J100: eventCount: 0 HLT_j175_a10t_lcw_jes_L1J50: eventCount: 0 +HLT_j175_a10t_lcw_jes_L1jJ50: + eventCount: 0 HLT_j175_pf_ftf_preselj140_L1J50: eventCount: 0 +HLT_j175_pf_ftf_preselj140_L1jJ50: + eventCount: 0 HLT_j180_a10_tc_em_nojcalib_L1J100: eventCount: 0 HLT_j180_a10_tc_em_nojcalib_L1SC111-CJ15: eventCount: 0 HLT_j200_0eta290_020jvt_pf_ftf_boffperf_preselj140_L1J100: eventCount: 0 +HLT_j200_0eta290_020jvt_pf_ftf_boffperf_preselj140_L1jJ100: + eventCount: 0 HLT_j20_0eta290_020jvt_pf_ftf_boffperf_L1J15: eventCount: 20 stepCounts: @@ -2121,6 +2326,8 @@ HLT_j20_0eta290_pf_ftf_boffperf_L1HT190-J15s5pETA21: eventCount: 0 HLT_j20_PhysicsTLA_L1HT190-J15s5pETA21: eventCount: 0 +HLT_j20_PhysicsTLA_L1HT190-jJ15s5pETA21: + eventCount: 0 HLT_j20_PhysicsTLA_L1J100: eventCount: 0 HLT_j20_PhysicsTLA_L1J50_DETA20-J50J: @@ -2133,6 +2340,26 @@ HLT_j20_PhysicsTLA_L1J50_DETA20-J50J: 0: 6 1: 6 2: 1 +HLT_j20_PhysicsTLA_L1jJ100: + eventCount: 4 + stepCounts: + 0: 4 + 1: 4 + 2: 4 + stepFeatures: + 0: 16 + 1: 16 + 2: 4 +HLT_j20_PhysicsTLA_L1jJ50_DETA20-jJ50J: + eventCount: 3 + stepCounts: + 0: 3 + 1: 3 + 2: 3 + stepFeatures: + 0: 13 + 1: 13 + 2: 3 HLT_j225_0eta290_020jvt_pf_ftf_bmv2c1040_L1J100: eventCount: 0 HLT_j225_0eta290_020jvt_pf_ftf_bmv2c1040_preselj180_L1J100: @@ -2143,10 +2370,14 @@ HLT_j225_0eta290_pf_ftf_bdl1r70_L1J100: eventCount: 0 HLT_j225_0eta290_pf_ftf_bdl1r70_preselj180_L1J100: eventCount: 0 +HLT_j225_0eta290_pf_ftf_bdl1r70_preselj180_L1jJ100: + eventCount: 0 HLT_j225_0eta290_pf_ftf_bdl1r77_L1J100: eventCount: 0 HLT_j225_0eta290_pf_ftf_bdl1r77_preselj180_L1J100: eventCount: 0 +HLT_j225_0eta290_pf_ftf_bdl1r77_preselj180_L1jJ100: + eventCount: 0 HLT_j225_0eta290_pf_ftf_bdl1r85_L1J100: eventCount: 0 HLT_j225_a10_tc_em_nojcalib_L1J100: @@ -2175,6 +2406,8 @@ HLT_j260_320eta490_L1J20: eventCount: 0 HLT_j260_320eta490_L1J75p31ETA49: eventCount: 0 +HLT_j260_320eta490_L1jJ75p31ETA49: + eventCount: 0 HLT_j260_a10r_subjesIS_ftf_0eta200_ExoticPTF0p0dR1p2_L1J100: eventCount: 0 HLT_j260_a10r_subjesIS_ftf_0eta200_ExoticPTF0p0dR1p2_L1SC111-CJ15: @@ -2193,14 +2426,22 @@ HLT_j260_a10r_subjesIS_ftf_0eta200_TracklessdR1p2_L1SC111-CJ15: eventCount: 0 HLT_j260_a10sd_cssk_pf_jes_ftf_preselj200_L1J75: eventCount: 0 +HLT_j260_a10sd_cssk_pf_jes_ftf_preselj200_L1jJ75: + eventCount: 0 HLT_j260_a10t_lcw_jes_L1J75: eventCount: 0 +HLT_j260_a10t_lcw_jes_L1jJ75: + eventCount: 0 HLT_j260_pf_ftf_preselj200_L1J75: eventCount: 0 +HLT_j260_pf_ftf_preselj200_L1jJ75: + eventCount: 0 HLT_j275_0eta290_020jvt_pf_ftf_bdl1r60_L1J100: eventCount: 0 HLT_j275_0eta290_020jvt_pf_ftf_bdl1r60_preselj225_L1J100: eventCount: 0 +HLT_j275_0eta290_020jvt_pf_ftf_bdl1r60_preselj225_L1jJ100: + eventCount: 0 HLT_j275_0eta290_pf_ftf_bdl1r70_L1J100: eventCount: 0 HLT_j275_0eta290_pf_ftf_bdl1r77_L1J100: @@ -2209,16 +2450,24 @@ HLT_j275_0eta290_pf_ftf_bdl1r85_L1J100: eventCount: 0 HLT_j275_0eta290_pf_ftf_bdl1r85_preselj225_L1J100: eventCount: 0 +HLT_j275_0eta290_pf_ftf_bdl1r85_preselj225_L1jJ100: + eventCount: 0 HLT_j275_subjesgscIS_ftf_bdl1r60_L1J100: eventCount: 0 HLT_j280_320eta490_L1J75p31ETA49: eventCount: 0 +HLT_j280_320eta490_L1jJ75p31ETA49: + eventCount: 0 HLT_j300_0eta290_020jvt_pf_ftf_bdl1r70_L1J100: eventCount: 0 HLT_j300_0eta290_020jvt_pf_ftf_bdl1r70_preselj225_L1J100: eventCount: 0 +HLT_j300_0eta290_020jvt_pf_ftf_bdl1r70_preselj225_L1jJ100: + eventCount: 0 HLT_j300_0eta290_020jvt_pf_ftf_boffperf_preselj225_L1J100: eventCount: 0 +HLT_j300_0eta290_020jvt_pf_ftf_boffperf_preselj225_L1jJ100: + eventCount: 0 HLT_j300_0eta290_pf_ftf_bdl1r60_L1J100: eventCount: 0 HLT_j300_0eta290_pf_ftf_bdl1r77_L1J100: @@ -2227,8 +2476,12 @@ HLT_j300_0eta290_pf_ftf_bdl1r85_L1J100: eventCount: 0 HLT_j300_0eta290_pf_ftf_bdl1r85_preselj225_L1J100: eventCount: 0 +HLT_j300_0eta290_pf_ftf_bdl1r85_preselj225_L1jJ100: + eventCount: 0 HLT_j300_320eta490_L1J75p31ETA49: eventCount: 0 +HLT_j300_320eta490_L1jJ75p31ETA49: + eventCount: 0 HLT_j300_subjesgscIS_ftf_bdl1r70_L1J100: eventCount: 0 HLT_j30_0eta290_020jvt_pf_ftf_boffperf_L1J20: @@ -2241,6 +2494,16 @@ HLT_j30_0eta290_020jvt_pf_ftf_boffperf_L1J20: 0: 16 1: 28 2: 28 +HLT_j30_0eta290_020jvt_pf_ftf_boffperf_L1jJ20: + eventCount: 22 + stepCounts: + 0: 39 + 1: 22 + 2: 22 + stepFeatures: + 0: 39 + 1: 44 + 2: 44 HLT_j35_320eta490_L1RD0_FILLED: eventCount: 2 stepCounts: @@ -2259,6 +2522,8 @@ HLT_j360_0eta290_020jvt_pf_ftf_bdl1r77_L1J100: eventCount: 0 HLT_j360_0eta290_020jvt_pf_ftf_bdl1r77_preselj225_L1J100: eventCount: 0 +HLT_j360_0eta290_020jvt_pf_ftf_bdl1r77_preselj225_L1jJ100: + eventCount: 0 HLT_j360_0eta290_pf_ftf_bdl1r60_L1J100: eventCount: 0 HLT_j360_0eta290_pf_ftf_bdl1r70_L1J100: @@ -2269,38 +2534,68 @@ HLT_j360_a10sd_cssk_pf_jes_ftf_60smcINF_j360_a10sd_cssk_pf_jes_ftf_L1SC111-CJ15: eventCount: 0 HLT_j360_a10sd_cssk_pf_jes_ftf_60smcINF_j360_a10sd_cssk_pf_jes_ftf_presel2j225_L1SC111-CJ15: eventCount: 0 +HLT_j360_a10sd_cssk_pf_jes_ftf_60smcINF_j360_a10sd_cssk_pf_jes_ftf_presel2j225_L1SC111-CjJ15: + eventCount: 0 HLT_j360_a10sd_cssk_pf_jes_ftf_preselj225_L1J100: eventCount: 0 HLT_j360_a10sd_cssk_pf_jes_ftf_preselj225_L1SC111-CJ15: eventCount: 0 +HLT_j360_a10sd_cssk_pf_jes_ftf_preselj225_L1SC111-CjJ15: + eventCount: 0 +HLT_j360_a10sd_cssk_pf_jes_ftf_preselj225_L1jJ100: + eventCount: 0 HLT_j360_a10t_lcw_jes_60smcINF_j360_a10t_lcw_jes_L1SC111-CJ15: eventCount: 0 +HLT_j360_a10t_lcw_jes_60smcINF_j360_a10t_lcw_jes_L1SC111-CjJ15: + eventCount: 0 HLT_j360_a10t_lcw_jes_L1SC111-CJ15: eventCount: 0 +HLT_j360_a10t_lcw_jes_L1SC111-CjJ15: + eventCount: 0 HLT_j360_a10t_lcw_jes_preselj225_L1J100: eventCount: 0 +HLT_j360_a10t_lcw_jes_preselj225_L1jJ100: + eventCount: 0 HLT_j360_pf_ftf_preselj225_L1J100: eventCount: 0 +HLT_j360_pf_ftf_preselj225_L1jJ100: + eventCount: 0 HLT_j360_subjesgscIS_ftf_bdl1r77_L1J100: eventCount: 0 HLT_j370_a10sd_cssk_pf_jes_ftf_35smcINF_j370_a10sd_cssk_pf_jes_ftf_L1SC111-CJ15: eventCount: 0 HLT_j370_a10sd_cssk_pf_jes_ftf_35smcINF_j370_a10sd_cssk_pf_jes_ftf_presel2j225_L1SC111-CJ15: eventCount: 0 +HLT_j370_a10sd_cssk_pf_jes_ftf_35smcINF_j370_a10sd_cssk_pf_jes_ftf_presel2j225_L1SC111-CjJ15: + eventCount: 0 HLT_j370_a10t_lcw_jes_35smcINF_j370_a10t_lcw_jes_L1SC111-CJ15: eventCount: 0 +HLT_j370_a10t_lcw_jes_35smcINF_j370_a10t_lcw_jes_L1SC111-CjJ15: + eventCount: 0 HLT_j380_pf_ftf_preselj225_L1J100: eventCount: 0 +HLT_j380_pf_ftf_preselj225_L1jJ100: + eventCount: 0 HLT_j400_a10sd_cssk_pf_jes_ftf_preselj225_L1J100: eventCount: 0 HLT_j400_a10sd_cssk_pf_jes_ftf_preselj225_L1SC111-CJ15: eventCount: 0 +HLT_j400_a10sd_cssk_pf_jes_ftf_preselj225_L1SC111-CjJ15: + eventCount: 0 +HLT_j400_a10sd_cssk_pf_jes_ftf_preselj225_L1jJ100: + eventCount: 0 HLT_j400_a10t_lcw_jes_L1SC111-CJ15: eventCount: 0 +HLT_j400_a10t_lcw_jes_L1SC111-CjJ15: + eventCount: 0 HLT_j400_a10t_lcw_jes_preselj225_L1J100: eventCount: 0 +HLT_j400_a10t_lcw_jes_preselj225_L1jJ100: + eventCount: 0 HLT_j400_pf_ftf_preselj225_L1J100: eventCount: 0 +HLT_j400_pf_ftf_preselj225_L1jJ100: + eventCount: 0 HLT_j40_LArPEBHLT_L1J20: eventCount: 0 HLT_j40_j0_HT50XX10etXX0eta320_L1J20: @@ -2317,6 +2612,8 @@ HLT_j40_j0_HT50XX10ptXX0eta320_L1J20: 0: 216 HLT_j420_L1J100: eventCount: 0 +HLT_j420_L1jJ100: + eventCount: 0 HLT_j420_a10sd_cssk_pf_jes_ftf_35smcINF_L1J100: eventCount: 0 HLT_j420_a10sd_cssk_pf_jes_ftf_35smcINF_L1SC111-CJ15: @@ -2329,28 +2626,50 @@ HLT_j420_a10sd_cssk_pf_jes_ftf_35smcINF_preselj225_L1J100: eventCount: 0 HLT_j420_a10sd_cssk_pf_jes_ftf_35smcINF_preselj225_L1SC111-CJ15: eventCount: 0 +HLT_j420_a10sd_cssk_pf_jes_ftf_35smcINF_preselj225_L1SC111-CjJ15: + eventCount: 0 +HLT_j420_a10sd_cssk_pf_jes_ftf_35smcINF_preselj225_L1jJ100: + eventCount: 0 HLT_j420_a10sd_cssk_pf_jes_ftf_preselj225_L1J100: eventCount: 0 HLT_j420_a10sd_cssk_pf_jes_ftf_preselj225_L1SC111-CJ15: eventCount: 0 +HLT_j420_a10sd_cssk_pf_jes_ftf_preselj225_L1SC111-CjJ15: + eventCount: 0 +HLT_j420_a10sd_cssk_pf_jes_ftf_preselj225_L1jJ100: + eventCount: 0 HLT_j420_a10t_lcw_jes_35smcINF_L1J100: eventCount: 0 HLT_j420_a10t_lcw_jes_35smcINF_L1SC111-CJ15: eventCount: 0 +HLT_j420_a10t_lcw_jes_35smcINF_L1SC111-CjJ15: + eventCount: 0 +HLT_j420_a10t_lcw_jes_35smcINF_L1jJ100: + eventCount: 0 HLT_j420_a10t_lcw_jes_L1J100: eventCount: 0 HLT_j420_a10t_lcw_jes_L1SC111-CJ15: eventCount: 0 +HLT_j420_a10t_lcw_jes_L1SC111-CjJ15: + eventCount: 0 +HLT_j420_a10t_lcw_jes_L1jJ100: + eventCount: 0 HLT_j420_ftf_preselj225_L1J100: eventCount: 0 HLT_j420_pf_ftf_L1J100: eventCount: 0 HLT_j420_pf_ftf_preselj225_L1J100: eventCount: 0 +HLT_j420_pf_ftf_preselj225_L1jJ100: + eventCount: 0 HLT_j440_pf_ftf_preselj225_L1J100: eventCount: 0 +HLT_j440_pf_ftf_preselj225_L1jJ100: + eventCount: 0 HLT_j450_pf_ftf_preselj225_L1J100: eventCount: 0 +HLT_j450_pf_ftf_preselj225_L1jJ100: + eventCount: 0 HLT_j45_0eta290_020jvt_020jvt_pf_ftf_bdl1r70_L1J20: eventCount: 2 stepCounts: @@ -2371,6 +2690,16 @@ HLT_j45_0eta290_020jvt_pf_ftf_boffperf_L1J20: 0: 16 1: 20 2: 20 +HLT_j45_0eta290_020jvt_pf_ftf_boffperf_L1jJ20: + eventCount: 13 + stepCounts: + 0: 39 + 1: 13 + 2: 13 + stepFeatures: + 0: 39 + 1: 21 + 2: 21 HLT_j45_0eta290_020jvt_pf_ftf_boffperf_split_L1J20: eventCount: 12 stepCounts: @@ -2387,6 +2716,8 @@ HLT_j45_320eta490_L1J15p31ETA49: 0: 1 stepFeatures: 0: 1 +HLT_j45_320eta490_L1jJ15p31ETA49: + eventCount: 0 HLT_j45_L1J15: eventCount: 0 HLT_j45_cssk_nojcalib_L1J15: @@ -2465,6 +2796,14 @@ HLT_j45_pf_ftf_preselj20_L1RD0_FILLED: stepFeatures: 0: 44 1: 25 +HLT_j45_pf_ftf_preselj20_L1jJ15: + eventCount: 15 + stepCounts: + 0: 37 + 1: 15 + stepFeatures: + 0: 37 + 1: 24 HLT_j45_pf_nojcalib_ftf_L1J15: eventCount: 12 stepCounts: @@ -2565,12 +2904,20 @@ HLT_j460_a10_lcw_subjes_L1J20: eventCount: 0 HLT_j460_a10_lcw_subjes_L1SC111-CJ15: eventCount: 0 +HLT_j460_a10_lcw_subjes_L1SC111-CjJ15: + eventCount: 0 +HLT_j460_a10_lcw_subjes_L1jJ100: + eventCount: 0 HLT_j460_a10r_L1J100: eventCount: 0 HLT_j460_a10r_L1J20: eventCount: 0 HLT_j460_a10r_L1SC111-CJ15: eventCount: 0 +HLT_j460_a10r_L1SC111-CjJ15: + eventCount: 0 +HLT_j460_a10r_L1jJ100: + eventCount: 0 HLT_j460_a10sd_cssk_pf_jes_ftf_preselj140_L1J100: eventCount: 0 HLT_j460_a10sd_cssk_pf_jes_ftf_preselj140_L1SC111-CJ15: @@ -2583,6 +2930,10 @@ HLT_j460_a10sd_cssk_pf_jes_ftf_preselj225_L1J100: eventCount: 0 HLT_j460_a10sd_cssk_pf_jes_ftf_preselj225_L1SC111-CJ15: eventCount: 0 +HLT_j460_a10sd_cssk_pf_jes_ftf_preselj225_L1SC111-CjJ15: + eventCount: 0 +HLT_j460_a10sd_cssk_pf_jes_ftf_preselj225_L1jJ100: + eventCount: 0 HLT_j460_a10sd_cssk_pf_nojcalib_ftf_35smcINF_L1J100: eventCount: 0 HLT_j460_a10sd_cssk_pf_nojcalib_ftf_L1J100: @@ -2595,34 +2946,60 @@ HLT_j460_a10t_lcw_jes_L1J100: eventCount: 0 HLT_j460_a10t_lcw_jes_L1SC111-CJ15: eventCount: 0 +HLT_j460_a10t_lcw_jes_L1SC111-CjJ15: + eventCount: 0 +HLT_j460_a10t_lcw_jes_L1jJ100: + eventCount: 0 HLT_j460_a10t_lcw_nojcalib_35smcINF_L1J100: eventCount: 0 HLT_j460_a10t_lcw_nojcalib_L1J100: eventCount: 0 HLT_j460_pf_ftf_preselj225_L1J100: eventCount: 0 +HLT_j460_pf_ftf_preselj225_L1jJ100: + eventCount: 0 HLT_j480_a10sd_cssk_pf_jes_ftf_preselj225_L1J100: eventCount: 0 HLT_j480_a10sd_cssk_pf_jes_ftf_preselj225_L1SC111-CJ15: eventCount: 0 +HLT_j480_a10sd_cssk_pf_jes_ftf_preselj225_L1SC111-CjJ15: + eventCount: 0 +HLT_j480_a10sd_cssk_pf_jes_ftf_preselj225_L1jJ100: + eventCount: 0 HLT_j480_a10t_lcw_jes_L1J100: eventCount: 0 HLT_j480_a10t_lcw_jes_L1SC111-CJ15: eventCount: 0 +HLT_j480_a10t_lcw_jes_L1SC111-CjJ15: + eventCount: 0 +HLT_j480_a10t_lcw_jes_L1jJ100: + eventCount: 0 HLT_j480_pf_ftf_preselj225_L1J100: eventCount: 0 +HLT_j480_pf_ftf_preselj225_L1jJ100: + eventCount: 0 HLT_j500_pf_ftf_preselj225_L1J100: eventCount: 0 +HLT_j500_pf_ftf_preselj225_L1jJ100: + eventCount: 0 HLT_j520_pf_ftf_preselj225_L1J100: eventCount: 0 +HLT_j520_pf_ftf_preselj225_L1jJ100: + eventCount: 0 HLT_j55_0eta240_xe50_cell_L1J30_EMPTY: eventCount: 0 HLT_j55_0eta240_xe50_cell_L1J30_FIRSTEMPTY: eventCount: 0 +HLT_j55_0eta240_xe50_cell_L1jJ30_EMPTY: + eventCount: 0 +HLT_j55_0eta240_xe50_cell_L1jJ30_FIRSTEMPTY: + eventCount: 0 HLT_j55_pf_ftf_0eta320_bdl1r70_2j45_pf_ftf_320eta490_L1J25p0ETA23_2J15p31ETA49: eventCount: 0 HLT_j55_pf_ftf_0eta320_bdl1r70_2j45_pf_ftf_320eta490_preselj45XX2f40_L1J25p0ETA23_2J15p31ETA49: eventCount: 0 +HLT_j55_pf_ftf_0eta320_bdl1r70_2j45_pf_ftf_320eta490_preselj45XX2f40_L1jJ25p0ETA23_2jJ15p31ETA49: + eventCount: 0 HLT_j60_0eta290_020jvt_pf_ftf_boffperf_L1J50: eventCount: 4 stepCounts: @@ -2633,12 +3010,24 @@ HLT_j60_0eta290_020jvt_pf_ftf_boffperf_L1J50: 0: 4 1: 5 2: 5 +HLT_j60_0eta290_020jvt_pf_ftf_boffperf_L1jJ50: + eventCount: 7 + stepCounts: + 0: 16 + 1: 7 + 2: 7 + stepFeatures: + 0: 16 + 1: 8 + 2: 8 HLT_j60_320eta490_L1J20p31ETA49: eventCount: 1 stepCounts: 0: 1 stepFeatures: 0: 1 +HLT_j60_320eta490_L1jJ20p31ETA49: + eventCount: 0 HLT_j60_j0_FBDJSHARED_L1J20: eventCount: 1 stepCounts: @@ -2655,10 +3044,22 @@ HLT_j60_pf_ftf_preselj50_L1J20: stepFeatures: 0: 14 1: 10 +HLT_j60_pf_ftf_preselj50_L1jJ20: + eventCount: 8 + stepCounts: + 0: 15 + 1: 8 + stepFeatures: + 0: 15 + 1: 10 HLT_j70_0eta320_j50_0eta490_j0_DJMASS1000j50dphi200x400deta_L1MJJ-500-NFF: eventCount: 0 +HLT_j70_0eta320_j50_0eta490_j0_DJMASS1000j50dphi200x400deta_L1jMJJ-500-NFF: + eventCount: 0 HLT_j70_0eta320_j50_0eta490_j0_DJMASS1000j50dphi240_xe90_tcpufit_xe50_cell_L1MJJ-500-NFF: eventCount: 0 +HLT_j70_0eta320_j50_0eta490_j0_DJMASS1000j50dphi240_xe90_tcpufit_xe50_cell_L1jMJJ-500-NFF: + eventCount: 0 ? HLT_j70_pf_ftf_0eta490_j50_pf_ftf_0eta490_2j35_pf_ftf_0eta490_SHARED_2j35_pf_ftf_0eta290_bdl1r70_j0_pf_ftf_DJMASS1000j50_L1MJJ-500-NFF : eventCount: 0 stepCounts: @@ -2667,10 +3068,14 @@ HLT_j70_0eta320_j50_0eta490_j0_DJMASS1000j50dphi240_xe90_tcpufit_xe50_cell_L1MJJ 0: 5 ? HLT_j70_pf_ftf_0eta490_j50_pf_ftf_0eta490_2j35_pf_ftf_0eta490_SHARED_2j35_pf_ftf_0eta290_bdl1r70_j0_pf_ftf_presela60XXa40XX2a25_DJMASS1000j50_L1MJJ-500-NFF : eventCount: 0 +? HLT_j70_pf_ftf_0eta490_j50_pf_ftf_0eta490_2j35_pf_ftf_0eta490_SHARED_2j35_pf_ftf_0eta290_bdl1r70_j0_pf_ftf_presela60XXa40XX2a25_DJMASS1000j50_L1jMJJ-500-NFF +: eventCount: 0 HLT_j75_0eta290_020jvt_pf_ftf_bdl1r60_3j75_pf_ftf_L14J20: eventCount: 0 HLT_j75_0eta290_020jvt_pf_ftf_bdl1r60_3j75_pf_ftf_presel4j50_L14J20: eventCount: 0 +HLT_j75_0eta290_020jvt_pf_ftf_bdl1r60_3j75_pf_ftf_presel4j50_L14jJ20: + eventCount: 0 HLT_j75_320eta490_LArPEBHLT_L1J30p31ETA49: eventCount: 0 ? HLT_j75_pf_ftf_0eta240_020jvt_j50_pf_ftf_0eta240_020jvt_j35_pf_ftf_0eta240_020jvt_j25_pf_ftf_0eta240_020jvt_L1J45p0ETA21_3J15p0ETA25 @@ -2683,6 +3088,12 @@ HLT_j75_320eta490_LArPEBHLT_L1J30p31ETA49: : eventCount: 0 ? HLT_j75_pf_ftf_0eta240_020jvt_j50_pf_ftf_0eta240_020jvt_j35_pf_ftf_0eta240_020jvt_j25_pf_ftf_0eta240_020jvt_SHARED_2j25_pf_ftf_0eta240_020jvt_bdl1r77_preselc60XXc45XXc25XXc20_L1J45p0ETA21_3J15p0ETA25 : eventCount: 0 +? HLT_j75_pf_ftf_0eta240_020jvt_j50_pf_ftf_0eta240_020jvt_j35_pf_ftf_0eta240_020jvt_j25_pf_ftf_0eta240_020jvt_SHARED_2j25_pf_ftf_0eta240_020jvt_bdl1r77_preselc60XXc45XXc25XXc20_L1jJ45p0ETA21_3jJ15p0ETA25 +: eventCount: 0 + stepCounts: + 0: 1 + stepFeatures: + 0: 5 ? HLT_j75_pf_ftf_0eta240_020jvt_j50_pf_ftf_0eta240_020jvt_j35_pf_ftf_0eta240_020jvt_j25_pf_ftf_0eta240_020jvt_SHARED_2j25_pf_ftf_0eta240_020jvt_bdl1r85_L1J45p0ETA21_3J15p0ETA25 : eventCount: 0 ? HLT_j75_pf_ftf_0eta240_020jvt_j50_pf_ftf_0eta240_020jvt_j35_pf_ftf_0eta240_020jvt_j25_pf_ftf_0eta240_020jvt_SHARED_3j25_pf_ftf_0eta240_020jvt_bdl1r70_L1J45p0ETA21_3J15p0ETA25 @@ -2693,10 +3104,22 @@ HLT_j75_320eta490_LArPEBHLT_L1J30p31ETA49: : eventCount: 0 ? HLT_j75_pf_ftf_0eta240_020jvt_j50_pf_ftf_0eta240_020jvt_j35_pf_ftf_0eta240_020jvt_j25_pf_ftf_0eta240_020jvt_SHARED_3j25_pf_ftf_0eta240_020jvt_bdl1r85_preselc60XXc45XXc25XXc20_L1J45p0ETA21_3J15p0ETA25 : eventCount: 0 +? HLT_j75_pf_ftf_0eta240_020jvt_j50_pf_ftf_0eta240_020jvt_j35_pf_ftf_0eta240_020jvt_j25_pf_ftf_0eta240_020jvt_SHARED_3j25_pf_ftf_0eta240_020jvt_bdl1r85_preselc60XXc45XXc25XXc20_L1jJ45p0ETA21_3jJ15p0ETA25 +: eventCount: 0 + stepCounts: + 0: 1 + stepFeatures: + 0: 5 ? HLT_j75_pf_ftf_0eta240_020jvt_j50_pf_ftf_0eta240_020jvt_j35_pf_ftf_0eta240_020jvt_j25_pf_ftf_0eta240_020jvt_SHARED_j35_pf_ftf_0eta240_020jvt_bdl1r60_j25_pf_ftf_0eta240_020jvt_bdl1r60_L1J45p0ETA21_3J15p0ETA25 : eventCount: 0 ? HLT_j75_pf_ftf_0eta240_020jvt_j50_pf_ftf_0eta240_020jvt_j35_pf_ftf_0eta240_020jvt_j25_pf_ftf_0eta240_020jvt_SHARED_j35_pf_ftf_0eta240_020jvt_bdl1r60_j25_pf_ftf_0eta240_020jvt_bdl1r60_preselc60XXc45XXc25XXc20_L1J45p0ETA21_3J15p0ETA25 : eventCount: 0 +? HLT_j75_pf_ftf_0eta240_020jvt_j50_pf_ftf_0eta240_020jvt_j35_pf_ftf_0eta240_020jvt_j25_pf_ftf_0eta240_020jvt_SHARED_j35_pf_ftf_0eta240_020jvt_bdl1r60_j25_pf_ftf_0eta240_020jvt_bdl1r60_preselc60XXc45XXc25XXc20_L1jJ45p0ETA21_3jJ15p0ETA25 +: eventCount: 0 + stepCounts: + 0: 1 + stepFeatures: + 0: 6 ? HLT_j75_pf_ftf_0eta240_020jvt_j50_pf_ftf_0eta240_020jvt_j35_pf_ftf_0eta240_020jvt_j25_pf_ftf_0eta240_020jvt_SHARED_j35_pf_ftf_0eta240_020jvt_bdl1r70_j25_pf_ftf_0eta240_020jvt_bdl1r70_L1J45p0ETA21_3J15p0ETA25 : eventCount: 0 ? HLT_j75_pf_ftf_0eta240_020jvt_j50_pf_ftf_0eta240_020jvt_j35_pf_ftf_0eta240_020jvt_j25_pf_ftf_0eta240_020jvt_SHARED_j35_pf_ftf_0eta240_020jvt_bdl1r77_j25_pf_ftf_0eta240_020jvt_bdl1r77_L1J45p0ETA21_3J15p0ETA25 @@ -2721,6 +3144,16 @@ HLT_j80_0eta290_020jvt_pf_ftf_boffperf_L1J50: 0: 4 1: 5 2: 5 +HLT_j80_0eta290_020jvt_pf_ftf_boffperf_L1jJ50: + eventCount: 4 + stepCounts: + 0: 16 + 1: 4 + 2: 4 + stepFeatures: + 0: 16 + 1: 5 + 2: 5 HLT_j80_j60_SHARED_j40__L1J15: eventCount: 2 stepCounts: @@ -2745,6 +3178,12 @@ HLT_j80_pf_ftf_0eta240_020jvt_j55_pf_ftf_0eta240_020jvt_j28_pf_ftf_0eta240_020jv : eventCount: 0 ? HLT_j80_pf_ftf_0eta240_020jvt_j55_pf_ftf_0eta240_020jvt_j28_pf_ftf_0eta240_020jvt_j20_pf_ftf_0eta240_020jvt_SHARED_2j20_pf_ftf_0eta240_020jvt_bdl1r77_preselc60XXc45XXc25XXc20_L1J45p0ETA21_3J15p0ETA25 : eventCount: 0 +? HLT_j80_pf_ftf_0eta240_020jvt_j55_pf_ftf_0eta240_020jvt_j28_pf_ftf_0eta240_020jvt_j20_pf_ftf_0eta240_020jvt_SHARED_2j20_pf_ftf_0eta240_020jvt_bdl1r77_preselc60XXc45XXc25XXc20_L1jJ45p0ETA21_3jJ15p0ETA25 +: eventCount: 0 + stepCounts: + 0: 1 + stepFeatures: + 0: 5 ? HLT_j80_pf_ftf_0eta240_020jvt_j55_pf_ftf_0eta240_020jvt_j28_pf_ftf_0eta240_020jvt_j20_pf_ftf_0eta240_020jvt_SHARED_2j20_pf_ftf_0eta240_020jvt_bdl1r85_L1J45p0ETA21_3J15p0ETA25 : eventCount: 0 ? HLT_j80_pf_ftf_0eta240_020jvt_j55_pf_ftf_0eta240_020jvt_j28_pf_ftf_0eta240_020jvt_j20_pf_ftf_0eta240_020jvt_SHARED_3j20_pf_ftf_0eta240_020jvt_bdl1r70_L1J45p0ETA21_3J15p0ETA25 @@ -2755,10 +3194,22 @@ HLT_j80_pf_ftf_0eta240_020jvt_j55_pf_ftf_0eta240_020jvt_j28_pf_ftf_0eta240_020jv : eventCount: 0 ? HLT_j80_pf_ftf_0eta240_020jvt_j55_pf_ftf_0eta240_020jvt_j28_pf_ftf_0eta240_020jvt_j20_pf_ftf_0eta240_020jvt_SHARED_3j20_pf_ftf_0eta240_020jvt_bdl1r85_preselc60XXc45XXc25XXc20_L1J45p0ETA21_3J15p0ETA25 : eventCount: 0 +? HLT_j80_pf_ftf_0eta240_020jvt_j55_pf_ftf_0eta240_020jvt_j28_pf_ftf_0eta240_020jvt_j20_pf_ftf_0eta240_020jvt_SHARED_3j20_pf_ftf_0eta240_020jvt_bdl1r85_preselc60XXc45XXc25XXc20_L1jJ45p0ETA21_3jJ15p0ETA25 +: eventCount: 0 + stepCounts: + 0: 1 + stepFeatures: + 0: 5 ? HLT_j80_pf_ftf_0eta240_020jvt_j55_pf_ftf_0eta240_020jvt_j28_pf_ftf_0eta240_020jvt_j20_pf_ftf_0eta240_020jvt_SHARED_j28_pf_ftf_0eta240_020jvt_bdl1r60_j20_pf_ftf_0eta240_020jvt_bdl1r60_L1J45p0ETA21_3J15p0ETA25 : eventCount: 0 ? HLT_j80_pf_ftf_0eta240_020jvt_j55_pf_ftf_0eta240_020jvt_j28_pf_ftf_0eta240_020jvt_j20_pf_ftf_0eta240_020jvt_SHARED_j28_pf_ftf_0eta240_020jvt_bdl1r60_j20_pf_ftf_0eta240_020jvt_bdl1r60_preselc60XXc45XXc25XXc20_L1J45p0ETA21_3J15p0ETA25 : eventCount: 0 +? HLT_j80_pf_ftf_0eta240_020jvt_j55_pf_ftf_0eta240_020jvt_j28_pf_ftf_0eta240_020jvt_j20_pf_ftf_0eta240_020jvt_SHARED_j28_pf_ftf_0eta240_020jvt_bdl1r60_j20_pf_ftf_0eta240_020jvt_bdl1r60_preselc60XXc45XXc25XXc20_L1jJ45p0ETA21_3jJ15p0ETA25 +: eventCount: 0 + stepCounts: + 0: 1 + stepFeatures: + 0: 6 ? HLT_j80_pf_ftf_0eta240_020jvt_j55_pf_ftf_0eta240_020jvt_j28_pf_ftf_0eta240_020jvt_j20_pf_ftf_0eta240_020jvt_SHARED_j28_pf_ftf_0eta240_020jvt_bdl1r70_j20_pf_ftf_0eta240_020jvt_bdl1r70_L1J45p0ETA21_3J15p0ETA25 : eventCount: 0 ? HLT_j80_pf_ftf_0eta240_020jvt_j55_pf_ftf_0eta240_020jvt_j28_pf_ftf_0eta240_020jvt_j20_pf_ftf_0eta240_020jvt_SHARED_j28_pf_ftf_0eta240_020jvt_bdl1r70_j20_pf_ftf_0eta240_020jvt_bdl1r70_L1MU8F_2J15_J20 @@ -2789,10 +3240,14 @@ HLT_j80_pf_ftf_0eta240_j55_pf_ftf_0eta240_j28_pf_ftf_0eta240_j20_pf_ftf_0eta240_ : eventCount: 0 ? HLT_j80_pf_ftf_0eta240_j60_pf_ftf_0eta320_j45_pf_ftf_320eta490_SHARED_2j45_pf_ftf_0eta290_bdl1r60_preselc60XXj45XXf40_L1J40p0ETA25_2J25_J20p31ETA49 : eventCount: 0 +? HLT_j80_pf_ftf_0eta240_j60_pf_ftf_0eta320_j45_pf_ftf_320eta490_SHARED_2j45_pf_ftf_0eta290_bdl1r60_preselc60XXj45XXf40_L1jJ40p0ETA25_2jJ25_jJ20p31ETA49 +: eventCount: 0 HLT_j80_pf_ftf_0eta320_bdl1r70_j60_pf_ftf_0eta320_bdl1r85_j45_pf_ftf_320eta490_L1J40p0ETA25_2J25_J20p31ETA49: eventCount: 0 ? HLT_j80_pf_ftf_0eta320_bdl1r70_j60_pf_ftf_0eta320_bdl1r85_j45_pf_ftf_320eta490_preselj60XXj45XXf40_L1J40p0ETA25_2J25_J20p31ETA49 : eventCount: 0 +? HLT_j80_pf_ftf_0eta320_bdl1r70_j60_pf_ftf_0eta320_bdl1r85_j45_pf_ftf_320eta490_preselj60XXj45XXf40_L1jJ40p0ETA25_2jJ25_jJ20p31ETA49 +: eventCount: 0 HLT_j80_pf_ftf_bdl1r60_xe60_cell_L12J50_XE40: eventCount: 0 HLT_j80_pf_ftf_j55_pf_ftf_j28_pf_ftf_j20_0eta290_pf_ftf_boffperf_L1J45p0ETA21_3J15p0ETA25: @@ -2811,6 +3266,8 @@ HLT_j85_050momemfrac100_L1J20: 0: 4 HLT_j85_320eta490_L1J20p31ETA49: eventCount: 0 +HLT_j85_320eta490_L1jJ20p31ETA49: + eventCount: 0 HLT_j85_CLEANlb_L1J20: eventCount: 4 stepCounts: @@ -2861,6 +3318,14 @@ HLT_j85_a10sd_cssk_pf_jes_ftf_preselj50_L1J20: stepFeatures: 0: 13 1: 12 +HLT_j85_a10sd_cssk_pf_jes_ftf_preselj50_L1jJ20: + eventCount: 9 + stepCounts: + 0: 29 + 1: 9 + stepFeatures: + 0: 29 + 1: 12 HLT_j85_a10sd_cssk_pf_nojcalib_ftf_preselj50_L1J20: eventCount: 3 stepCounts: @@ -2869,18 +3334,38 @@ HLT_j85_a10sd_cssk_pf_nojcalib_ftf_preselj50_L1J20: stepFeatures: 0: 13 1: 4 +HLT_j85_a10sd_cssk_pf_nojcalib_ftf_preselj50_L1jJ20: + eventCount: 3 + stepCounts: + 0: 29 + 1: 3 + stepFeatures: + 0: 29 + 1: 4 HLT_j85_a10t_lcw_jes_L1J20: eventCount: 13 stepCounts: 0: 13 stepFeatures: 0: 23 +HLT_j85_a10t_lcw_jes_L1jJ20: + eventCount: 23 + stepCounts: + 0: 23 + stepFeatures: + 0: 41 HLT_j85_a10t_lcw_nojcalib_L1J20: eventCount: 11 stepCounts: 0: 11 stepFeatures: 0: 16 +HLT_j85_a10t_lcw_nojcalib_L1jJ20: + eventCount: 16 + stepCounts: + 0: 16 + stepFeatures: + 0: 24 HLT_j85_ftf_L1J20: eventCount: 5 stepCounts: @@ -2919,6 +3404,14 @@ HLT_j85_pf_ftf_preselj50_L1J20: stepFeatures: 0: 14 1: 7 +HLT_j85_pf_ftf_preselj50_L1jJ20: + eventCount: 5 + stepCounts: + 0: 15 + 1: 5 + stepFeatures: + 0: 15 + 1: 7 HLT_l1topodebug_legacy_L1All: eventCount: 0 HLT_larnoiseburst_L1All: @@ -2979,6 +3472,22 @@ HLT_mb_afprec_L1AFP_A_AND_C_TOF_T0T1_J50: eventCount: 0 HLT_mb_afprec_L1AFP_A_AND_C_TOF_T0T1_J75: eventCount: 0 +HLT_mb_afprec_L1AFP_A_AND_C_TOF_T0T1_jJ20: + eventCount: 0 +HLT_mb_afprec_L1AFP_A_AND_C_TOF_T0T1_jJ30: + eventCount: 0 +HLT_mb_afprec_L1AFP_A_AND_C_TOF_T0T1_jJ50: + eventCount: 0 +HLT_mb_afprec_L1AFP_A_AND_C_TOF_T0T1_jJ75: + eventCount: 0 +HLT_mb_afprec_L1AFP_A_AND_C_TOF_jJ20: + eventCount: 0 +HLT_mb_afprec_L1AFP_A_AND_C_TOF_jJ30: + eventCount: 0 +HLT_mb_afprec_L1AFP_A_AND_C_TOF_jJ50: + eventCount: 0 +HLT_mb_afprec_L1AFP_A_AND_C_TOF_jJ75: + eventCount: 0 HLT_mb_afprec_L1CEP-CjJ50: eventCount: 0 HLT_mb_afprec_L1CEP-CjJ60: @@ -3107,6 +3616,8 @@ HLT_mu10_bJpsimutrk_MuonTrkPEB_L1MU8F: eventCount: 0 HLT_mu10_ivarmedium_j70_0eta320_j50_0eta490_j0_DJMASS900j50_L1MJJ-500-NFF: eventCount: 0 +HLT_mu10_ivarmedium_j70_0eta320_j50_0eta490_j0_DJMASS900j50_L1jMJJ-500-NFF: + eventCount: 0 HLT_mu10_ivarmedium_mu10_10invmAB70_L12MU8F: eventCount: 0 HLT_mu10_l2mt_mu4_l2mt_bJpsimumu_L1MU10BOM: @@ -3519,12 +4030,6 @@ HLT_mu26_ivarmedium_mu6_msonly_probe_L1MU14FCH: 0: 1 stepFeatures: 0: 1 -HLT_mu26_ivarmedium_mu6_msonly_probe_L1MU14FCH: - eventCount: 0 - stepCounts: - 0: 1 - stepFeatures: - 0: 1 HLT_mu26_ivarmedium_mu6_probe_L1MU14FCH: eventCount: 0 stepCounts: @@ -3537,12 +4042,6 @@ HLT_mu26_ivarmedium_mu8_msonly_probe_L1MU14FCH: 0: 1 stepFeatures: 0: 1 -HLT_mu26_ivarmedium_mu8_msonly_probe_L1MU14FCH: - eventCount: 0 - stepCounts: - 0: 1 - stepFeatures: - 0: 1 HLT_mu26_ivarmedium_tau100_mediumRNN_tracktwoLLP_03dRAB_L1MU14FCH: eventCount: 0 stepFeatures: @@ -3681,8 +4180,28 @@ HLT_mu4_j20_0eta290_pf_ftf_boffperf_dRAB03_L1MU3V_J15: 4: 1 5: 5 6: 5 +HLT_mu4_j20_0eta290_pf_ftf_boffperf_dRAB03_L1MU3V_jJ15: + eventCount: 2 + stepCounts: + 0: 4 + 1: 3 + 2: 2 + 3: 2 + 4: 2 + 5: 2 + 6: 2 + stepFeatures: + 0: 4 + 1: 3 + 2: 2 + 3: 2 + 4: 2 + 5: 7 + 6: 7 HLT_mu4_j70_0eta320_j50_0eta490_j0_DJMASS1000j50_xe50_tcpufit_L1MJJ-500-NFF: eventCount: 0 +HLT_mu4_j70_0eta320_j50_0eta490_j0_DJMASS1000j50_xe50_tcpufit_L1jMJJ-500-NFF: + eventCount: 0 HLT_mu4_l2io_L1MU3V: eventCount: 2 stepCounts: @@ -3886,8 +4405,6 @@ HLT_mu8_L1MU5VF: 1: 2 2: 2 3: 1 -HLT_noalg_AlfaPEB_L1ALFA_ANY: - eventCount: 0 HLT_noalg_CIS_TilePEB_L1CALREQ1: eventCount: 0 HLT_noalg_CSCPEB_L1All: @@ -4030,88 +4547,12 @@ HLT_noalg_L1LAR-ZEE: eventCount: 0 HLT_noalg_L1LAR-ZEE-eEM: eventCount: 0 -HLT_noalg_L1MBTSA0: - eventCount: 0 -HLT_noalg_L1MBTSA1: - eventCount: 0 -HLT_noalg_L1MBTSA10: - eventCount: 0 -HLT_noalg_L1MBTSA11: - eventCount: 0 -HLT_noalg_L1MBTSA12: - eventCount: 0 -HLT_noalg_L1MBTSA13: - eventCount: 0 -HLT_noalg_L1MBTSA14: - eventCount: 0 -HLT_noalg_L1MBTSA15: - eventCount: 0 -HLT_noalg_L1MBTSA2: - eventCount: 0 -HLT_noalg_L1MBTSA3: - eventCount: 0 -HLT_noalg_L1MBTSA4: - eventCount: 0 -HLT_noalg_L1MBTSA5: - eventCount: 0 -HLT_noalg_L1MBTSA6: - eventCount: 0 -HLT_noalg_L1MBTSA7: - eventCount: 0 -HLT_noalg_L1MBTSA8: - eventCount: 0 -HLT_noalg_L1MBTSA9: - eventCount: 0 -HLT_noalg_L1MBTSC0: - eventCount: 0 -HLT_noalg_L1MBTSC1: - eventCount: 0 -HLT_noalg_L1MBTSC10: - eventCount: 0 -HLT_noalg_L1MBTSC11: - eventCount: 0 -HLT_noalg_L1MBTSC12: - eventCount: 0 -HLT_noalg_L1MBTSC13: - eventCount: 0 -HLT_noalg_L1MBTSC14: - eventCount: 0 -HLT_noalg_L1MBTSC15: - eventCount: 0 -HLT_noalg_L1MBTSC2: - eventCount: 0 -HLT_noalg_L1MBTSC3: - eventCount: 0 -HLT_noalg_L1MBTSC4: - eventCount: 0 -HLT_noalg_L1MBTSC5: - eventCount: 0 -HLT_noalg_L1MBTSC6: - eventCount: 0 -HLT_noalg_L1MBTSC7: - eventCount: 0 -HLT_noalg_L1MBTSC8: - eventCount: 0 -HLT_noalg_L1MBTSC9: - eventCount: 0 -HLT_noalg_L1MBTS_1: - eventCount: 0 -HLT_noalg_L1MBTS_1_1: - eventCount: 0 HLT_noalg_L1MBTS_1_1_EMPTY: eventCount: 0 -HLT_noalg_L1MBTS_1_1_UNPAIRED_ISO: - eventCount: 0 HLT_noalg_L1MBTS_1_EMPTY: eventCount: 0 -HLT_noalg_L1MBTS_1_UNPAIRED_ISO: - eventCount: 0 -HLT_noalg_L1MBTS_2: - eventCount: 0 HLT_noalg_L1MBTS_2_EMPTY: eventCount: 0 -HLT_noalg_L1MBTS_2_UNPAIRED_ISO: - eventCount: 0 HLT_noalg_L1MBTS_A: eventCount: 0 HLT_noalg_L1MBTS_C: @@ -4140,6 +4581,8 @@ HLT_noalg_L1RD0_FILLED: eventCount: 0 HLT_noalg_L1RD0_FIRSTEMPTY: eventCount: 0 +HLT_noalg_L1RD0_UNPAIRED_ISO: + eventCount: 0 HLT_noalg_L1RD1_EMPTY: eventCount: 0 HLT_noalg_L1RD2_EMPTY: @@ -4200,6 +4643,8 @@ HLT_noalg_L1cTAU25M: eventCount: 0 HLT_noalg_L1eEM10L: eventCount: 1 +HLT_noalg_L1eEM12: + eventCount: 13 HLT_noalg_L1eEM15: eventCount: 11 HLT_noalg_L1eEM15L: @@ -4208,10 +4653,10 @@ HLT_noalg_L1eEM15M: eventCount: 0 HLT_noalg_L1eEM18M: eventCount: 0 -HLT_noalg_L1eEM20: - eventCount: 7 HLT_noalg_L1eEM20L: eventCount: 0 +HLT_noalg_L1eEM20VM: + eventCount: 0 HLT_noalg_L1eEM22: eventCount: 7 HLT_noalg_L1eEM22L: @@ -4224,12 +4669,10 @@ HLT_noalg_L1eEM3: eventCount: 50 HLT_noalg_L1eEM5: eventCount: 43 -HLT_noalg_L1eEM8: - eventCount: 22 +HLT_noalg_L1eEM7: + eventCount: 24 HLT_noalg_L1eEM8L: eventCount: 1 -HLT_noalg_L1eEM8M: - eventCount: 0 HLT_noalg_L1eTAU100: eventCount: 0 HLT_noalg_L1eTAU12: @@ -4270,8 +4713,6 @@ HLT_noalg_L1jEM15: eventCount: 0 HLT_noalg_L1jEM15M: eventCount: 0 -HLT_noalg_L1jEM18M: - eventCount: 0 HLT_noalg_L1jJ100: eventCount: 4 HLT_noalg_L1jJ12: @@ -4304,6 +4745,8 @@ HLT_noalg_L1jJ40: eventCount: 24 HLT_noalg_L1jJ400: eventCount: 0 +HLT_noalg_L1jJ400_LAR: + eventCount: 0 HLT_noalg_L1jJ40p0ETA25: eventCount: 24 HLT_noalg_L1jJ45p0ETA21: @@ -4328,7 +4771,9 @@ HLT_noalg_L1jLJ80: eventCount: 0 HLT_noalg_L1jTAU12: eventCount: 0 -HLT_noalg_L1jTAU12M: +HLT_noalg_L1jTAU20: + eventCount: 0 +HLT_noalg_L1jTAU20M: eventCount: 0 HLT_noalg_L1jTE100: eventCount: 0 @@ -4715,17 +5160,19 @@ HLT_tau25_tightRNN_tracktwoLLP_L1TAU12IM: 3: 12 4: 2 HLT_tau25_tightRNN_tracktwoMVABDT_L1TAU12IM: - eventCount: 0 + eventCount: 1 stepCounts: 0: 10 1: 10 2: 10 3: 10 + 4: 1 stepFeatures: 0: 12 1: 12 2: 12 3: 12 + 4: 1 HLT_tau25_tightRNN_tracktwoMVA_L1TAU12IM: eventCount: 0 stepCounts: @@ -4824,8 +5271,32 @@ HLT_tau35_mediumRNN_tracktwoMVABDT_probe_xe65_cell_xe90_pfopufit_L1XE50: eventCount: 0 stepFeatures: 0: 1 +HLT_tau35_mediumRNN_tracktwoMVABDT_tau25_mediumRNN_tracktwoMVABDT_03dRAB30_L1DR-TAU20ITAU12I: + eventCount: 0 + stepCounts: + 0: 1 + 1: 1 + 2: 1 + 3: 1 + stepFeatures: + 0: 4 + 1: 4 + 2: 4 + 3: 4 HLT_tau35_mediumRNN_tracktwoMVABDT_tau25_mediumRNN_tracktwoMVABDT_03dRAB30_L1DR-TAU20ITAU12I-J25: eventCount: 0 +HLT_tau35_mediumRNN_tracktwoMVABDT_tau25_mediumRNN_tracktwoMVABDT_03dRAB_L1TAU20IM_2TAU12IM: + eventCount: 0 + stepCounts: + 0: 2 + 1: 2 + 2: 2 + 3: 2 + stepFeatures: + 0: 8 + 1: 8 + 2: 8 + 3: 8 HLT_tau35_mediumRNN_tracktwoMVABDT_tau25_mediumRNN_tracktwoMVABDT_03dRAB_L1TAU20IM_2TAU12IM_4J12p0ETA25: eventCount: 0 HLT_tau35_mediumRNN_tracktwoMVA_L1TAU20IM: @@ -4846,8 +5317,32 @@ HLT_tau35_mediumRNN_tracktwoMVA_probe_xe65_cell_xe90_pfopufit_L1XE50: eventCount: 0 stepFeatures: 0: 1 +HLT_tau35_mediumRNN_tracktwoMVA_tau25_mediumRNN_tracktwoMVA_03dRAB30_L1DR-TAU20ITAU12I: + eventCount: 0 + stepCounts: + 0: 1 + 1: 1 + 2: 1 + 3: 1 + stepFeatures: + 0: 4 + 1: 4 + 2: 4 + 3: 4 HLT_tau35_mediumRNN_tracktwoMVA_tau25_mediumRNN_tracktwoMVA_03dRAB30_L1DR-TAU20ITAU12I-J25: eventCount: 0 +HLT_tau35_mediumRNN_tracktwoMVA_tau25_mediumRNN_tracktwoMVA_03dRAB_L1TAU20IM_2TAU12IM: + eventCount: 0 + stepCounts: + 0: 2 + 1: 2 + 2: 2 + 3: 2 + stepFeatures: + 0: 8 + 1: 8 + 2: 8 + 3: 8 HLT_tau35_mediumRNN_tracktwoMVA_tau25_mediumRNN_tracktwoMVA_03dRAB_L1TAU20IM_2TAU12IM_4J12p0ETA25: eventCount: 0 HLT_tau35_perf_tracktwoMVABDT_L1TAU20IM: @@ -4885,17 +5380,19 @@ HLT_tau35_ptonly_L1TAU20IM: stepFeatures: 0: 9 HLT_tau35_tightRNN_tracktwoMVABDT_L1TAU20IM: - eventCount: 0 + eventCount: 1 stepCounts: 0: 7 1: 7 2: 7 3: 7 + 4: 1 stepFeatures: 0: 9 1: 9 2: 9 3: 9 + 4: 1 HLT_tau35_tightRNN_tracktwoMVA_L1TAU20IM: eventCount: 0 stepCounts: @@ -5070,8 +5567,24 @@ HLT_unconvtrk20_distrk_tight_L1XE50: 0: 1 HLT_unconvtrk260_hitdv_medium_L1J100: eventCount: 0 +HLT_unconvtrk260_hitdv_medium_L1jJ100: + eventCount: 0 + stepCounts: + 0: 4 + 1: 4 + stepFeatures: + 0: 4 + 1: 4 HLT_unconvtrk260_hitdv_tight_L1J100: eventCount: 0 +HLT_unconvtrk260_hitdv_tight_L1jJ100: + eventCount: 0 + stepCounts: + 0: 4 + 1: 4 + stepFeatures: + 0: 4 + 1: 4 HLT_unconvtrk50_isohpttrack_L1XE50: eventCount: 0 stepCounts: diff --git a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_T0MonTrf_build.py b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_T0MonTrf_build.py index 79c6189045d981256ffcb0557781915890989073..f98892a64e91dc234698222c059f314468b9a125 100755 --- a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_T0MonTrf_build.py +++ b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_T0MonTrf_build.py @@ -55,7 +55,7 @@ tzmon.executable = 'Run3DQTestingDriver.py' tzmon.input = '' tzmon.args = '--threads=1' tzmon.args += ' --dqOffByDefault' -tzmon.args += ' Input.Files="[\'AOD.pool.root\']" DQ.Steering.doHLTMon=True' +tzmon.args += ' Input.Files="[\'AOD.pool.root\']" DQ.Steering.doHLTMon=True Trigger.triggerMenuSetup=\'PhysicsP1_pp_run3_v1\'' #==================================================================================================== # Merging NTUP_TRIGRATE/COST diff --git a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_T0Mon_build.py b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_T0Mon_build.py index af91c2e03d9336ce4f1abc177ac5e6beab7f084f..a169da13fd0a8f83083088c9d0ec4ebd306a8057 100755 --- a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_T0Mon_build.py +++ b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_T0Mon_build.py @@ -56,7 +56,7 @@ tzmon.executable = 'Run3DQTestingDriver.py' tzmon.input = '' tzmon.args = '--threads=1' tzmon.args += ' --dqOffByDefault' -tzmon.args += ' Input.Files="[\'AOD.pool.root\']" DQ.Steering.doHLTMon=True' +tzmon.args += ' Input.Files="[\'AOD.pool.root\']" DQ.Steering.doHLTMon=True Trigger.triggerMenuSetup=\'PhysicsP1_pp_run3_v1\'' # The full test test = Test.Test() diff --git a/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun3.py b/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun3.py index 015ce5e9d3866b8848e8b8150f188ca91857ace6..1ce924f3d123599409ca17042b90777729905c77 100644 --- a/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun3.py +++ b/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun3.py @@ -113,6 +113,8 @@ three_output_taggers = [ 'dips20210517', 'DL1d20210519r22', # uses dipsLoose 'DL1d20210528r22', # uses IP3D track selection dips + 'dipsLoose20210729', # DIPS offline retraining in r22 + 'DL1dv00', # first 'official' offlline r22 ] BTagOutput_highLevelTaggers = [ 'MV2c10_discriminant', diff --git a/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfigFlags.py b/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfigFlags.py index 82bde93dd85cff8d3392254c0e1393a17b1896c5..c49a78d752bbaf8b915cf3d806f99a87b564ddac 100644 --- a/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfigFlags.py +++ b/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfigFlags.py @@ -151,7 +151,7 @@ def createTriggerFlags(): flags.addFlag('Trigger.writeBS', False) # Write transient BS before executing HLT algorithms (for running on MC RDO with clients which require BS inputs) - flags.addFlag('Trigger.doTransientByteStream', False) + flags.addFlag('Trigger.doTransientByteStream', lambda prevFlags: True if prevFlags.Input.Format=='POOL' and prevFlags.Trigger.doCalo else False) # list of EDM objects to be written to AOD flags.addFlag('Trigger.AODEDMSet', lambda flags: 'AODSLIM' if flags.Input.isMC else 'AODFULL') @@ -273,9 +273,6 @@ def createTriggerFlags(): # Switch on MC20 EOverP maps for the jet slice flags.addFlag("Trigger.Jet.doMC20_EOverP", True) - # Return dummy chain configurations for fast slice independence checks - flags.addFlag("Trigger.Test.doDummyChainConfig", False) - return flags diff --git a/Trigger/TriggerCommon/TriggerJobOpts/share/runHLT_standalone.py b/Trigger/TriggerCommon/TriggerJobOpts/share/runHLT_standalone.py index e776fcb2097693ec43aa126b38b3f5cc09801f96..93bc824cf1949d6aa9562435c1d75eda8e7b6944 100644 --- a/Trigger/TriggerCommon/TriggerJobOpts/share/runHLT_standalone.py +++ b/Trigger/TriggerCommon/TriggerJobOpts/share/runHLT_standalone.py @@ -344,9 +344,6 @@ if ConfigFlags.Trigger.doCalo: larCondFlags.LoadElecCalib.set_Value_and_Lock(False) from TrigT2CaloCommon.CaloDef import setMinimalCaloSetup setMinimalCaloSetup() - # Enable transient BS if TrigCaloDataAccessSvc is used with pool data - if ConfigFlags.Input.Format == 'POOL': - ConfigFlags.Trigger.doTransientByteStream = True else: DetFlags.Calo_setOff() @@ -417,9 +414,7 @@ from IOVDbSvc.IOVDbSvcConfig import IOVDbSvcCfg CAtoGlobalWrapper(IOVDbSvcCfg, ConfigFlags) if ConfigFlags.Trigger.doCalo: - from TrigT2CaloCommon.CaloDef import setMinimalCaloSetup - setMinimalCaloSetup() - if ConfigFlags.Input.Format == 'POOL': + if ConfigFlags.Trigger.doTransientByteStream: from TriggerJobOpts.TriggerTransBSConfig import triggerTransBSCfg_Calo CAtoGlobalWrapper(triggerTransBSCfg_Calo, ConfigFlags, seqName="HLTBeginSeq") diff --git a/Trigger/TriggerCommon/TriggerJobOpts/share/runHLT_standalone_newJO.py b/Trigger/TriggerCommon/TriggerJobOpts/share/runHLT_standalone_newJO.py index 7d19ccc151ccf19913ba9b09bda008c6e55f8f55..5fffc4b2a57e52605dc0dc1ce714298d56530a45 100644 --- a/Trigger/TriggerCommon/TriggerJobOpts/share/runHLT_standalone_newJO.py +++ b/Trigger/TriggerCommon/TriggerJobOpts/share/runHLT_standalone_newJO.py @@ -62,9 +62,6 @@ flags.Concurrency.NumThreads = 1 flags.InDet.useSctDCS = False flags.InDet.usePixelDCS = False -# Calo is currently the only client of Transient BS -flags.Trigger.doTransientByteStream = lambda f: f.Input.Format == 'POOL' and f.Trigger.doCalo - # command line handling # options that are defined in: AthConfigFlags are handled here # they override values from above diff --git a/Trigger/TriggerCommon/TriggerMenuMT/CMakeLists.txt b/Trigger/TriggerCommon/TriggerMenuMT/CMakeLists.txt index a81d2b35ba6d16bd1f5d91b2cf57accc36a134ba..f74e77a2ac0aeb87516322b6cbce5823c1200a35 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/CMakeLists.txt +++ b/Trigger/TriggerCommon/TriggerMenuMT/CMakeLists.txt @@ -60,7 +60,7 @@ function( atlas_test_lvl1_trigger_menu menu ) atlas_add_test( "L1_${menu}" SCRIPT ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/generateL1MenuRun3.py ${menu} PRIVATE_WORKING_DIRECTORY - POST_EXEC_SCRIPT nopost.sh ) + POST_EXEC_SCRIPT "check_log.py --errors --config checklogTriggerTest.conf ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/unitTestRun_L1_${menu}/L1_${menu}.log" ) endfunction() function( atlas_test_hlt_trigger_menu menu ) @@ -68,7 +68,7 @@ function( atlas_test_hlt_trigger_menu menu ) SCRIPT ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test_HLTmenu.sh ${menu} PROPERTIES TIMEOUT 500 PRIVATE_WORKING_DIRECTORY - POST_EXEC_SCRIPT nopost.sh ) + POST_EXEC_SCRIPT "check_log.py --errors --config checklogTriggerTest.conf ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/unitTestRun_HLT_${menu}/HLT_${menu}.log" ) endfunction() # Test all L1 menus (as this is fast): @@ -85,18 +85,6 @@ atlas_test_hlt_trigger_menu( LS2_v1 ) atlas_test_hlt_trigger_menu( Cosmic_run3_v1 ) atlas_test_hlt_trigger_menu( Dev_HI_run3_v1 ) -# Slice tests: -function( atlas_test_slice_independence slice ) - atlas_add_test( slice_independence_${slice} - SCRIPT scripts/test_slice_independence.sh ${slice} - PRIVATE_WORKING_DIRECTORY - POST_EXEC_SCRIPT nopost.sh ) -endfunction() - -foreach( slice Egamma Muon Tau MET Jet Bjet Bphysics MinBias UnconventionalTracking Calib Beamspot Cosmic Monitor Streaming EnhancedBias) - atlas_test_slice_independence( ${slice} ) -endforeach() - # New job options test: atlas_add_test( generateMenuMT_newJO SCRIPT python -m TriggerMenuMT.HLTMenuConfig.Menu.LS2_v1_newJO diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Bjet/BjetFlavourTaggingConfiguration.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Bjet/BjetFlavourTaggingConfiguration.py index 3411b514ecbd9ac0c50f0dc99424a47a9bdae931..bdbd7b95746001c47b834912a441b6c0c9f7503e 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Bjet/BjetFlavourTaggingConfiguration.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Bjet/BjetFlavourTaggingConfiguration.py @@ -69,6 +69,15 @@ def getFlavourTagging( inputJets, inputVertex, inputTracks, BTagName, 'BTagging/20210519r22/dl1d/antikt4empflow/network.json', # DL1d, uses IP3D dips above 'BTagging/20210528r22/dl1d/antikt4empflow/network.json', + + # The following were the best offline R22 taggers according to + # + # https://ftag-docs.docs.cern.ch/algorithms/available_taggers/ + # + # R22 retraining for DIPS, provides dipsLoose20210729 + 'BTagging/20210729/dipsLoose/antikt4empflow/network.json', + # R22 retraining with the above DIPS, provides DL1dv00 + 'BTagging/20210824r22/dl1dLoose/antikt4empflow/network.json', ] for jsonFile in tagger_list: acc.merge(HighLevelBTagAlgCfg(ConfigFlags, BTaggingCollection=BTagName, TrackCollection=inputTracks, NNFile=jsonFile) ) diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/ChainConfigurationBase.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/ChainConfigurationBase.py index e186e66e1710fec8c830343b44bd2b8815d7fbe0..9c3b1f4d4951d9a90eb2bd9d348f3d04582351d1 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/ChainConfigurationBase.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/ChainConfigurationBase.py @@ -1,12 +1,11 @@ -# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration from AthenaCommon.Logging import logging log = logging.getLogger(__name__) import abc -from AthenaConfiguration.AllConfigFlags import ConfigFlags -from TriggerMenuMT.HLTMenuConfig.Menu.MenuComponents import Chain, ChainStep, EmptyMenuSequence, RecoFragmentsPool +from TriggerMenuMT.HLTMenuConfig.Menu.MenuComponents import Chain, ChainStep, RecoFragmentsPool from DecisionHandling.DecisionHandlingConfig import ComboHypoCfg #---------------------------------------------------------------- @@ -96,13 +95,4 @@ class ChainConfigurationBase(metaclass=abc.ABCMeta): return def assembleChain(self): - if ConfigFlags.Trigger.Test.doDummyChainConfig: - if isinstance(self.chainPart,list): - # Jets have >1 chainSteps - agroups = list(set([cp['alignmentGroup'] for cp in self.chainPart])) - else: - agroups = [self.chainPart['alignmentGroup']] - dummyseq = RecoFragmentsPool.retrieve(lambda flags, the_name: EmptyMenuSequence(the_name), None, the_name="DummySeq_"+self.chainName) - dummystep = ChainStep("DummyChainStep_"+self.chainName, Sequences=[dummyseq], chainDicts=[self.dict]) - return Chain(self.chainName, ChainSteps = [dummystep], L1Thresholds=[self.L1Threshold], nSteps=[0], alignmentGroups=agroups) return self.assembleChainImpl() diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/ChainMerging.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/ChainMerging.py index d500371802a139e63a1634bd0951f06c4979e88b..c459c2ce64a18914aed5f553053b17f77ff413ad 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/ChainMerging.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/ChainMerging.py @@ -6,7 +6,6 @@ from TriggerMenuMT.HLTMenuConfig.Menu.MenuComponents import Chain, ChainStep, Em from AthenaCommon.Logging import logging from DecisionHandling.DecisionHandlingConfig import ComboHypoCfg from TrigCompositeUtils.TrigCompositeUtils import legName -from AthenaConfiguration.AllConfigFlags import ConfigFlags from collections import OrderedDict from copy import deepcopy @@ -192,7 +191,7 @@ def getCurrentAG(chainStep): filled_seq_ag = [] for iseq,seq in enumerate(chainStep.sequences): # In the case of dummy configs, they are all empty - if type(seq).__name__ == 'EmptyMenuSequence' and not ConfigFlags.Trigger.Test.doDummyChainConfig: + if type(seq).__name__ == 'EmptyMenuSequence': continue else: # get the alignment group of the leg that is running a non-empty sequence @@ -419,8 +418,6 @@ def makeCombinedStep(parallel_steps, stepNumber, chainDefList, allSteps = [], cu if not hasNonEmptyStep: for chain_index, step in enumerate(parallel_steps): # every step is empty but some might have empty sequences and some might not - if ConfigFlags.Trigger.Test.doDummyChainConfig and not step: - continue if len(step.sequences) == 0: new_stepDicts = deepcopy(chainDefList[chain_index].steps[-1].stepDicts) currentStepName = 'Empty' + chainDefList[chain_index].alignmentGroups[0]+'Align'+str(stepNumber)+'_'+new_stepDicts[0]['chainParts'][0]['multiplicity']+new_stepDicts[0]['signature'] diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/CheckL1HLTConsistency.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/CheckL1HLTConsistency.py index b8597a36a7a16c5c6c0a86c3495b5f4ec12240c1..bfd0e901c0383ec77f532ad6e1e73ebd31ecd373 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/CheckL1HLTConsistency.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/CheckL1HLTConsistency.py @@ -13,21 +13,27 @@ def checkL1HLTConsistency(): lvl1thtypes = lvl1access.thresholdTypes() lvl1items = lvl1access.items(includeKeys=["name"]) from TriggerMenuMT.HLTMenuConfig.Menu.TriggerConfigHLT import TriggerConfigHLT + + allUsedItems = [] + allUnusedItems = [] + for chain in TriggerConfigHLT.dictsList(): log.debug('[checkL1HLTConsistency] Checking the l1thresholds in the chain %s', chain["chainName"]) - #don't check the noalg chains (they don't do anything in the HLT anyway) - if 'HLT_noalg_' in chain["chainName"]: - continue +# #don't check the noalg chains (they don't do anything in the HLT anyway) +# if 'HLT_noalg_' in chain["chainName"]: +# continue #check that the L1item is listed in the L1Menu l1item_vec = chain['L1item'].split(',') for l1item in l1item_vec: + if l1item == "": + log.debug('[checkL1HLTConsistency] chain %s in L1Menu %s: L1item not set...', chain["chainName"], lvl1name) + continue if l1item not in lvl1items: - if l1item != "": - log.error('[checkL1HLTConsistency] chain %s: L1item: %s, not found in the items list of the L1Menu %s', chain["chainName"], chain["L1item"], lvl1name) - raise Exception("Please fix the menu or the chain.") - else: - log.info('[checkL1HLTConsistency] chain %s in L1Menu %s: L1item not set...', chain["chainName"], lvl1name) + log.error('[checkL1HLTConsistency] chain %s: L1item: %s, not found in the items list of the L1Menu %s', chain["chainName"], chain["L1item"], lvl1name) + raise Exception("Please fix the menu or the chain.") + else: + allUsedItems.append(l1item) # Find L1 Threshold information for current chain for p in chain['chainParts']: @@ -51,4 +57,12 @@ def checkL1HLTConsistency(): else: log.error('[checkL1HLTConsistency] chain %s: L1Threshold %s not found in the L1thresholds of the L1Menu %s', chain["chainName"], th, lvl1name) raise Exception("Please fix the menu or the chain.") + + for item in lvl1items: + if item not in allUsedItems: + allUnusedItems.append(item) + if len(allUnusedItems)==0: + log.info('[checkL1HLTConsistency] All items in L1 menu are used') + else: + log.info('[checkL1HLTConsistency] %i items in L1 menu are not used: %s', len(allUnusedItems), ",".join(allUnusedItems)) log.info('[checkL1HLTConsistency] checkL1HLTConsistency completed succesfully') diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/DictFromChainName.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/DictFromChainName.py index 2f36ea8e43d8d7c0473aa9409911377503937317..b8e59ec5a4ca01c5b604c3f0a58968d1feabc27f 100755 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/DictFromChainName.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/DictFromChainName.py @@ -167,13 +167,17 @@ def analyseChainName(chainName, L1thresholds, L1item): hltChainNameShort = '_'.join(cparts) # ---- identify the topo algorithm and add to genchainDict ----- - from .SignatureDicts import AllowedTopos, AllowedTopos_comb + from .SignatureDicts import AllowedTopos, AllowedTopos_comb, AllowedTopos_Bphysics_topoVariant, AllowedTopos_Bphysics_topoExtra topo = '' topos=[] extraComboHypos = [] + bphys_topoVariant=[] + bphys_topoExtra = [] + bphysTopos = False toposIndexed={} topoindex = -5 for cindex, cpart in enumerate(cparts): + #should make this if...elif...? if cpart in AllowedTopos: log.debug('" %s" is in this part of the name %s -> topo alg', AllowedTopos, cpart) topo = cpart @@ -181,17 +185,34 @@ def analyseChainName(chainName, L1thresholds, L1item): toposIndexed.update({topo : topoindex}) hltChainNameShort=hltChainNameShort.replace('_'+cpart, '') topos.append(topo) + elif cpart in AllowedTopos_Bphysics_topoVariant: + log.debug('[analyseChainName] chain part %s is a BLS topo variant, adding to bphys_topoVariant', cpart) + bphys_topoVariant.append(cpart) + toposIndexed.update({cpart : cindex}) + bphysTopos = True + elif cpart in AllowedTopos_Bphysics_topoExtra: + log.debug('[analyseChainName] chain part %s is a BLS extra topo hypo, adding to bphys_topoExtra', cpart) + bphys_topoExtra.append(cpart) + toposIndexed.update({cpart : cindex}) + bphysTopos = True + else: + log.debug('[analyseChainName] chain part %s is not a general topo, BLS extra or variant topo hypo, checking comb topos next', cpart) if cpart in AllowedTopos_comb: log.debug('[analyseChainName] chain part %s is a combined topo hypo, adding to extraComboHypo', cpart) + toposIndexed.update({cpart : cindex}) extraComboHypos.append(cpart) genchainDict['topo'] = topos genchainDict['extraComboHypos'] = extraComboHypos - # replace these lines below with cparts = chainName.split("_") + if bphysTopos is True: + genchainDict['topoVariant'] = bphys_topoVariant + genchainDict['topoExtra'] = bphys_topoExtra + + # remove the parts that have been already identified for t, i in enumerate(toposIndexed): if (t in cparts): - log.debug('topo %s with index %s', t, i) + log.debug('topo %s with index %s is going to be deleted from chain parts', t, i) del cparts[i] @@ -360,9 +381,9 @@ def analyseChainName(chainName, L1thresholds, L1item): #---- Check if topo is a bphysics topo -> change signature ---- - from .SignatureDicts import AllowedTopos_Bphysics + from .SignatureDicts import AllAllowedTopos_Bphysics for t in genchainDict['topo']: - if (t in AllowedTopos_Bphysics): + if (t in AllAllowedTopos_Bphysics): chainProperties['signature'] = 'Bphysics' if "tnpInfo" in chainProperties.keys() and chainProperties['tnpInfo'] != "": chainProperties['alignmentGroup'] = getAlignmentGroupFromPattern('Bphysics',chainProperties['tnpInfo']) diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/GenerateMenuMT.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/GenerateMenuMT.py index 59067165ab731ebb7e864167aa7bd3f8fa1fb427..6d2d4917aa26ac94634456f4462be0fb42ff6f92 100755 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/GenerateMenuMT.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/GenerateMenuMT.py @@ -1,14 +1,8 @@ # Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration import importlib -import itertools import string -# Configure the scheduler -from AthenaCommon.AlgScheduler import AlgScheduler -AlgScheduler.ShowControlFlow( True ) -AlgScheduler.ShowDataFlow( True ) - from .TriggerConfigHLT import TriggerConfigHLT from .HLTCFConfig import makeHLTTree from .DictFromChainName import dictFromChainName @@ -17,7 +11,6 @@ from .MenuPrescaleConfig import MenuPrescaleConfig, applyHLTPrescale from .ChainMerging import mergeChainDefs from .MenuAlignmentTools import MenuAlignment from ..CommonSequences import EventBuildingSequences -from AthenaConfiguration.AllConfigFlags import ConfigFlags from .ComboHypoHandling import addTopoInfo, comboConfigurator, topoLegIndices from AthenaCommon.Logging import logging @@ -52,6 +45,8 @@ class GenerateMenuMT(object, metaclass=Singleton): self.availableSignatures = [] self.signaturesToGenerate = [] self.calibCosmicMonSigs = ['Streaming','Monitor','Beamspot','Cosmic', 'Calib', 'EnhancedBias'] + self.combinedSigs = ['MinBias','Egamma','Muon','Tau','Jet', 'Bjet','MET','UnconventionalTracking'] + self.defaultSigs = ['Streaming'] # for noalg chains self.chainDefModule = {} # Generate[SIG]ChainDefs module for each SIGnature @@ -72,37 +67,57 @@ class GenerateMenuMT(object, metaclass=Singleton): def getChainDicts(self): - all_chain_dicts = [] - all_chains = itertools.chain.from_iterable(self.chainsInMenu.values()) - for chainCounter, chain in enumerate(all_chains, start=1): - log.debug("Now processing chain: %s ", chain) - chainDict = dictFromChainName(chain) - chainDict['chainCounter'] = chainCounter - - #set default chain prescale - chainDict['prescale'] = 1 - all_chain_dicts += [chainDict] - self.chainDicts = all_chain_dicts - - return + + def validSignature(currentSig, chainSig): + """Check if chain is asssigned to the correct signature""" + + # Translate Egamma signatures + if 'Electron' in chainSig or 'Photon' in chainSig: + chainSig.discard('Electron') + chainSig.discard('Photon') + chainSig.add('Egamma') + + if ( (currentSig in chainSig) or + (currentSig=='Combined' and set(chainSig).issubset(self.combinedSigs)) or + (chainSig==set(['Streaming'])) ): + return True + else: + return False + + chainCounter = 0 + for sig, chains in self.chainsInMenu.items(): + for chain in chains: + log.debug("Now processing chain: %s ", chain) + chainCounter += 1 + chainDict = dictFromChainName(chain) + chainDict['chainCounter'] = chainCounter + chainDict['prescale'] = 1 # set default chain prescale + + self.chainDicts.append(chainDict) + + if not validSignature(sig, set(chainDict['signatures'])): + log.error('Chain %s assigned to signature %s but creates %s', + chainDict['chainName'], sig, set(chainDict['signatures'])) + def importSignaturesToGenerate(self): """check if all the signature files can be imported and then import them""" - log.debug("signaturesToGenerate: %s", self.signaturesToGenerate) + # List of all non-empty signatures + self.signaturesToGenerate = [s for s,chains in self.chainsInMenu.items() + if len(chains)>0] + + log.info("Enabled signature(s): %s", self.signaturesToGenerate) # Extend the list to satisfy certain requirements - extendedSignatureToGenerate = set(self.signaturesToGenerate) - # always import the Streaming sig because noalg chains are moved to StreamingSlice - extendedSignatureToGenerate.add('Streaming') + extendedSignatureToGenerate = set(self.signaturesToGenerate + self.defaultSigs) # Combined chains themselves are created by merging # If we activate combined chains, we need all of the (legal) sub-signatures if "Combined" in extendedSignatureToGenerate: log.info("Combined chains requested -- activate other necessary signatures") extendedSignatureToGenerate.remove("Combined") - extendedSignatureToGenerate.update(["MinBias","Egamma","Muon","Tau","Jet", - "Bjet","MET","UnconventionalTracking"]) + extendedSignatureToGenerate.update(self.combinedSigs) for sig in extendedSignatureToGenerate: log.debug("[getSignaturesInMenu] sig: %s", sig) @@ -144,19 +159,8 @@ class GenerateMenuMT(object, metaclass=Singleton): alignmentGroups_to_align = set() length_of_configs = {} - previous_sig = '' for chainDict in self.chainDicts: - if len(set(chainDict['signatures'])) == 1: - current_sig = chainDict['signatures'][0] - if current_sig != previous_sig: - previous_sig = current_sig - log.info("Now starting generation of signature %s",current_sig) - elif len(set(chainDict['signatures'])) > 1 and set(chainDict['signatures'])!= set(['Bjet','Jet']): - current_sig = 'Combined' - if current_sig != previous_sig: - previous_sig = current_sig - log.info("Now starting generation of signature %s",current_sig) - log.debug("Next: getting chain configuration for chain %s ", chainDict['chainName']) + log.debug("Next: getting chain configuration for chain %s ", chainDict['chainName']) chainConfig,lengthOfChainConfigs = self.__generateChainConfig(chainDict) all_chains += [(chainDict,chainConfig,lengthOfChainConfigs)] @@ -206,11 +210,6 @@ class GenerateMenuMT(object, metaclass=Singleton): log.info("Will now generate the chain configuration for each chain") self.generateChains() - if ConfigFlags.Trigger.Test.doDummyChainConfig: - log.info("[GenerateMenuMT] Dummy chain configuration active, will not proceed with menu generation") - import sys - sys.exit(0) - log.info("Will now calculate the alignment parameters") #dict of signature: set it belongs to #e.g. {'Electron': ['Electron','Muon','Photon']} @@ -294,12 +293,6 @@ class GenerateMenuMT(object, metaclass=Singleton): self.chainsInMenu[signame] = [c for c in self.chainsInMenu[signame] if self.chainFilter(signame, c.name)] - # List of all non-empty signatures - self.signaturesToGenerate = [s for s,chains in self.chainsInMenu.items() - if len(chains)>0] - - log.info("Enabled signature(s): %s", self.signaturesToGenerate) - if not self.chainsInMenu: log.warning("There seem to be no chains in the menu - please check") elif log.isEnabledFor(logging.DEBUG): @@ -335,17 +328,9 @@ class GenerateMenuMT(object, metaclass=Singleton): chainName = chainPartDict['chainName'] log.debug('Checking chainDict for chain %s in signature %s, alignment group %s' , chainName, currentSig, currentAlignGroup) - sigFolder = '' - if currentSig == 'Electron' or currentSig == 'Photon': - sigFolder = 'Egamma' - elif currentSig in self.calibCosmicMonSigs: - sigFolder = 'CalibCosmicMon' - else: - sigFolder = currentSig - if currentSig in self.availableSignatures: try: - log.debug("[__generateChainConfigs] Trying to get chain config for %s in folder %s", currentSig, sigFolder) + log.debug("[__generateChainConfigs] Trying to get chain config for %s", currentSig) chainPartConfig = self.chainDefModule[currentSig].generateChainConfigs(chainPartDict) except Exception: log.error('[__generateChainConfigs] Problems creating ChainDef for chain %s ', chainName) @@ -389,10 +374,9 @@ class GenerateMenuMT(object, metaclass=Singleton): else: theChainConfig = listOfChainConfigs[0] - if not ConfigFlags.Trigger.Test.doDummyChainConfig: - for topoID in range(len(mainChainDict['extraComboHypos'])): - thetopo = mainChainDict['extraComboHypos'][topoID].strip(string.digits).rstrip(topoLegIndices) - theChainConfig.addTopo((comboConfigurator[thetopo],thetopo)) + for topoID in range(len(mainChainDict['extraComboHypos'])): + thetopo = mainChainDict['extraComboHypos'][topoID].strip(string.digits).rstrip(topoLegIndices) + theChainConfig.addTopo((comboConfigurator[thetopo],thetopo)) # Now we know where the topos should go, we can insert them in the right steps if len(theChainConfig.topoMap) > 0: diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/L1Seeds.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/L1Seeds.py index 1533fe300ec990788524b338d957648fdf650e33..a3357b141edc15d605c05563e5b0dd095480ef45 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/L1Seeds.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/L1Seeds.py @@ -55,6 +55,8 @@ def getL1BackgroundSeed(menul1items, menu_name): 'L1_BCM_Wide_CALIB', 'L1_J50_UNPAIRED_ISO', 'L1_J50_UNPAIRED_NONISO', 'L1_J50_ABORTGAPNOTCALIB', 'L1_J12_EMPTY', 'L1_J12_BGRP12', + 'L1_BCM_AC_UNPAIREDB1', 'L1_BCM_CA_UNPAIREDB2', + 'L1_J12_UNPAIREDB1', 'L1_J12_UNPAIREDB2', ] if menu_name == 'LS1_v1': diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py index 871c7632417eb3c74245a3e2d6cff8d9f8432dfa..1b22c4d3f1be1863d163eb660c03fa240c7e56b6 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py @@ -40,7 +40,6 @@ from TriggerMenuMT.HLTMenuConfig.Menu.Physics_pp_run3_v1 import (PhysicsStream, TauPhotonGroup, MuonMETGroup, EgammaJetGroup, - JetMETGroup, MinBiasGroup, PrimaryL1MuGroup, PrimaryLegGroup, @@ -52,7 +51,6 @@ from TriggerMenuMT.HLTMenuConfig.Menu.Physics_pp_run3_v1 import (PhysicsStream, TagAndProbeLegGroup, LowMuGroup, EOFBPhysL1MuGroup, - EOFTLALegGroup, UnconvTrkGroup, TauPhaseIStreamersGroup, EgammaPhaseIStreamersGroup, @@ -226,10 +224,10 @@ def setupMenu(): ChainProp(name='HLT_g35_loose_PhysicsTLA_L1eEM22M', stream=['TLA'], groups=PrimaryPhIGroup+SinglePhotonGroup), ChainProp(name='HLT_e25_mergedtight_g35_medium_Heg_02dRAB_L12eEM20L', l1SeedThresholds=['eEM20L','eEM20L'], groups=PrimaryPhIGroup+MultiElectronGroup), # Remove Zee and add matching 50invmAB130 copy, ATR-21117 - ChainProp(name='HLT_e26_lhtight_e15_etcut_probe_50invmAB130_L1eEM22M', l1SeedThresholds=['eEM22M','eEM8'], groups=PrimaryPhIGroup+MultiElectronGroup), - ChainProp(name='HLT_e26_lhtight_e15_etcut_idperf_probe_50invmAB130_L1eEM22M', l1SeedThresholds=['eEM22M','eEM8'], groups=PrimaryPhIGroup+MultiElectronGroup), - ChainProp(name='HLT_e26_lhtight_e15_etcut_50invmAB130_L1eEM22M', l1SeedThresholds=['eEM22M','eEM8'], groups=PrimaryPhIGroup+MultiElectronGroup), - ChainProp(name='HLT_e26_lhtight_e15_etcut_idperf_50invmAB130_L1eEM22M', l1SeedThresholds=['eEM22M','eEM8'], groups=PrimaryPhIGroup+MultiElectronGroup), + ChainProp(name='HLT_e26_lhtight_e15_etcut_probe_50invmAB130_L1eEM22M', l1SeedThresholds=['eEM22M','eEM7'], groups=PrimaryPhIGroup+MultiElectronGroup), + ChainProp(name='HLT_e26_lhtight_e15_etcut_idperf_probe_50invmAB130_L1eEM22M', l1SeedThresholds=['eEM22M','eEM7'], groups=PrimaryPhIGroup+MultiElectronGroup), + ChainProp(name='HLT_e26_lhtight_e15_etcut_50invmAB130_L1eEM22M', l1SeedThresholds=['eEM22M','eEM7'], groups=PrimaryPhIGroup+MultiElectronGroup), + ChainProp(name='HLT_e26_lhtight_e15_etcut_idperf_50invmAB130_L1eEM22M', l1SeedThresholds=['eEM22M','eEM7'], groups=PrimaryPhIGroup+MultiElectronGroup), # lrt chains @@ -713,16 +711,9 @@ def setupMenu(): ChainProp(name='HLT_2j100_L1CEP-CjJ60', l1SeedThresholds=['FSNOSEED'], groups=PrimaryPhIGroup+MultiJetGroup), # TLA test chains, ATR-20395 - ChainProp(name='HLT_j20_PhysicsTLA_L1J100', l1SeedThresholds=['FSNOSEED'], stream=['TLA'], groups=PrimaryLegGroup+SingleJetGroup), - ChainProp(name='HLT_j20_PhysicsTLA_L1J50_DETA20-J50J', l1SeedThresholds=['FSNOSEED'], stream=['TLA'], groups=EOFTLALegGroup+SingleJetGroup), - # TLA test HT chains, ATR-21594 - ChainProp(name='HLT_j20_PhysicsTLA_L1HT190-J15s5pETA21', l1SeedThresholds=['FSNOSEED'], stream=['TLA'], groups=PrimaryLegGroup+SingleJetGroup), # Piggybacking on HH4b, exact thresholds for preselections to be determined later - this is for rate and cost ChainProp(name='HLT_j60_j45_2j20_PhysicsTLA_L1J45p0ETA21_3J15p0ETA25', l1SeedThresholds=['FSNOSEED']*3, stream=['TLA'], groups=PrimaryLegGroup+MultiJetGroup), - # Jet-only VBF chain - ChainProp(name='HLT_j70_0eta320_j50_0eta490_j0_DJMASS1000j50dphi200x400deta_L1MJJ-500-NFF', l1SeedThresholds=['FSNOSEED']*3,stream=['VBFDelayed'],groups=PrimaryLegGroup+MultiJetGroup), # previously HLT_j70_j50_0eta490_invm1000j70_dphi20_deta40_L1MJJ-500-NFF - ] chains['Bjet'] += [ @@ -730,15 +721,6 @@ def setupMenu(): # leave one split chain for one validation round ChainProp(name='HLT_j45_0eta290_020jvt_pf_ftf_boffperf_split_L1J20', l1SeedThresholds=['FSNOSEED'], groups=SingleBjetGroup), - # Current primary candidates with/without preselection - ChainProp(name="HLT_j225_0eta290_pf_ftf_bdl1r70_preselj180_L1J100", l1SeedThresholds=['FSNOSEED'], groups=SingleBjetGroup + PrimaryLegGroup), - ChainProp(name="HLT_j225_0eta290_pf_ftf_bdl1r77_preselj180_L1J100", l1SeedThresholds=['FSNOSEED'], groups=SingleBjetGroup + PrimaryLegGroup), - ChainProp(name='HLT_j275_0eta290_pf_ftf_bdl1r85_preselj225_L1J100', l1SeedThresholds=['FSNOSEED'], groups=SingleBjetGroup + PrimaryLegGroup), - ChainProp(name='HLT_j300_0eta290_pf_ftf_bdl1r85_preselj225_L1J100', l1SeedThresholds=['FSNOSEED'], groups=SingleBjetGroup + PrimaryLegGroup), - - ChainProp(name="HLT_3j65_0eta290_020jvt_pf_ftf_bdl1r77_presel3j45_L13J35p0ETA23", l1SeedThresholds=['FSNOSEED'], groups=MultiBjetGroup + PrimaryLegGroup), - ChainProp(name="HLT_4j35_0eta290_020jvt_pf_ftf_bdl1r77_presel4j25_L14J15p0ETA25", l1SeedThresholds=['FSNOSEED'], groups=MultiBjetGroup + PrimaryLegGroup), - ### Copies of Primary chains without preselection (for COST studies) # leave the MV2 chain for now since we don't have a 40% DL1r working point ChainProp(name="HLT_j225_0eta290_020jvt_pf_ftf_bmv2c1040_L1J100", l1SeedThresholds=['FSNOSEED'], groups=SingleBjetGroup+DevGroup), @@ -785,33 +767,6 @@ def setupMenu(): ### IS THIS SUPPORT? ChainProp(name='HLT_j45_0eta290_020jvt_020jvt_pf_ftf_bdl1r70_L1J20', l1SeedThresholds=['FSNOSEED'], groups=SingleBjetGroup), - # Candidates for allhad ttbar delayed stream - ChainProp(name='HLT_5j35_pf_ftf_0eta240_020jvt_j25_pf_ftf_0eta240_020jvt_bdl1r60_presel6c25_L14J15', l1SeedThresholds=['FSNOSEED']*2, stream=['VBFDelayed'], groups=PrimaryLegGroup+MultiBjetGroup), - ChainProp(name='HLT_5j45_pf_ftf_0eta240_020jvt_j25_pf_ftf_0eta240_020jvt_bdl1r60_presel6c25_L14J15', l1SeedThresholds=['FSNOSEED']*2, stream=['VBFDelayed'], groups=PrimaryLegGroup+MultiBjetGroup), - - # Chris doesn't know which of these are for what signature - ChainProp(name="HLT_j150_0eta320_pf_ftf_2j55_0eta290_020jvt_pf_ftf_bdl1r70_preselj80XX2j45_L1J85_3J30", l1SeedThresholds=['FSNOSEED','FSNOSEED'], groups=PrimaryLegGroup+MultiBjetGroup), - ChainProp(name="HLT_3j35_0eta290_020jvt_pf_ftf_bdl1r70_j35_pf_ftf_0eta320_presel4j25_L14J15p0ETA25", l1SeedThresholds=['FSNOSEED','FSNOSEED'], groups=PrimaryLegGroup+MultiBjetGroup), - ChainProp(name="HLT_j175_0eta290_020jvt_pf_ftf_bdl1r60_j60_0eta290_020jvt_pf_ftf_bdl1r60_preselj140XXj45_L1J100", l1SeedThresholds=['FSNOSEED','FSNOSEED'], groups=PrimaryLegGroup+MultiBjetGroup), - ChainProp(name="HLT_2j35_0eta290_020jvt_pf_ftf_bdl1r70_2j35_0eta290_020jvt_pf_ftf_bdl1r85_presel4j25_L14J15p0ETA25", l1SeedThresholds=['FSNOSEED','FSNOSEED'], groups=PrimaryLegGroup+MultiBjetGroup), - ChainProp(name="HLT_2j55_0eta290_020jvt_pf_ftf_bdl1r60_2j55_pf_ftf_0eta320_presel4j25_L14J15p0ETA25", l1SeedThresholds=['FSNOSEED','FSNOSEED'], groups=PrimaryLegGroup+MultiBjetGroup), - ChainProp(name="HLT_2j35_0eta290_020jvt_pf_ftf_bdl1r60_3j35_pf_ftf_0eta320_presel5j25_L15J15p0ETA25", l1SeedThresholds=['FSNOSEED','FSNOSEED'], groups=PrimaryLegGroup+MultiBjetGroup), - ChainProp(name="HLT_2j45_0eta290_020jvt_pf_ftf_bdl1r60_3j45_pf_ftf_0eta320_presel5j25_L15J15p0ETA25", l1SeedThresholds=['FSNOSEED','FSNOSEED'], groups=PrimaryLegGroup+MultiBjetGroup), - ChainProp(name="HLT_j75_0eta290_020jvt_pf_ftf_bdl1r60_3j75_pf_ftf_presel4j50_L14J20", l1SeedThresholds=['FSNOSEED','FSNOSEED'], groups=PrimaryLegGroup+MultiBjetGroup), - #ChainProp(name="HLT_2j45_0eta290_020jvt_pf_ftf_bdl1r50_2j45_pf_ftf_L14J15p0ETA25", l1SeedThresholds=['FSNOSEED','FSNOSEED'], groups=PrimaryLegGroup+MultiBjetGroup), - ChainProp(name="HLT_2j45_0eta290_020jvt_pf_ftf_bdl1r60_2j45_pf_ftf_presel4j25_L14J15p0ETA25", l1SeedThresholds=['FSNOSEED','FSNOSEED'], groups=PrimaryLegGroup+MultiBjetGroup), - # Run 2 HH4b low-threshold chain - ChainProp(name="HLT_2j35_0eta240_020jvt_pf_ftf_bdl1r60_2j35_0eta240_020jvt_pf_ftf_presel4j25_L14J15p0ETA25", l1SeedThresholds=['FSNOSEED','FSNOSEED'], groups=PrimaryLegGroup+MultiBjetGroup), - - # HT-seeded - ChainProp(name='HLT_2j45_pf_ftf_bdl1r70_j0_pf_ftf_HT300_j0_pf_ftf_DJMASS700j35_L1HT150-J20s5pETA31_MJJ-400-CF', l1SeedThresholds=['FSNOSEED']*3, groups=PrimaryLegGroup+MultiBjetGroup), - - # VBF chains - ChainProp(name='HLT_j80_pf_ftf_0eta240_j60_pf_ftf_0eta320_j45_pf_ftf_320eta490_SHARED_2j45_pf_ftf_0eta290_bdl1r60_preselc60XXj45XXf40_L1J40p0ETA25_2J25_J20p31ETA49', l1SeedThresholds=['FSNOSEED']*4, groups=PrimaryLegGroup+MultiBjetGroup), - ChainProp(name="HLT_j80_pf_ftf_0eta320_bdl1r70_j60_pf_ftf_0eta320_bdl1r85_j45_pf_ftf_320eta490_preselj60XXj45XXf40_L1J40p0ETA25_2J25_J20p31ETA49", l1SeedThresholds=['FSNOSEED']*3,stream=[PhysicsStream], groups=PrimaryLegGroup+MultiBjetGroup), - ChainProp(name="HLT_j55_pf_ftf_0eta320_bdl1r70_2j45_pf_ftf_320eta490_preselj45XX2f40_L1J25p0ETA23_2J15p31ETA49",l1SeedThresholds=['FSNOSEED']*2, stream=[PhysicsStream], groups=PrimaryLegGroup+MultiBjetGroup), - ChainProp(name='HLT_j70_pf_ftf_0eta490_j50_pf_ftf_0eta490_2j35_pf_ftf_0eta490_SHARED_2j35_pf_ftf_0eta290_bdl1r70_j0_pf_ftf_presela60XXa40XX2a25_DJMASS1000j50_L1MJJ-500-NFF', l1SeedThresholds=['FSNOSEED']*5,stream=['VBFDelayed'], groups=PrimaryLegGroup+MultiBjetGroup), - #### TESTING CHAINS # ATR-22937 @@ -885,7 +840,6 @@ def setupMenu(): ChainProp(name="HLT_2j35_0eta290_020jvt_pf_ftf_bdl1r60_3j35_pf_ftf_0eta320_L15J15p0ETA25", l1SeedThresholds=['FSNOSEED','FSNOSEED'], groups=PrimaryLegGroup+MultiBjetGroup), ChainProp(name="HLT_2j45_0eta290_020jvt_pf_ftf_bdl1r60_3j45_pf_ftf_0eta320_L15J15p0ETA25", l1SeedThresholds=['FSNOSEED','FSNOSEED'], groups=PrimaryLegGroup+MultiBjetGroup), ChainProp(name="HLT_j75_0eta290_020jvt_pf_ftf_bdl1r60_3j75_pf_ftf_L14J20", l1SeedThresholds=['FSNOSEED','FSNOSEED'], groups=PrimaryLegGroup+MultiBjetGroup), - #ChainProp(name="HLT_2j45_0eta290_020jvt_pf_ftf_bdl1r50_2j45_pf_ftf_L14J15p0ETA25", l1SeedThresholds=['FSNOSEED','FSNOSEED'], groups=PrimaryLegGroup+MultiBjetGroup), ChainProp(name="HLT_2j45_0eta290_020jvt_pf_ftf_bdl1r60_2j45_pf_ftf_L14J15p0ETA25", l1SeedThresholds=['FSNOSEED','FSNOSEED'], groups=PrimaryLegGroup+MultiBjetGroup), # Run 2 HH4b low-threshold chain ChainProp(name="HLT_2j35_0eta240_020jvt_pf_ftf_bdl1r60_2j35_0eta240_020jvt_pf_ftf_L14J15p0ETA25", l1SeedThresholds=['FSNOSEED','FSNOSEED'], groups=PrimaryLegGroup+MultiBjetGroup), @@ -957,6 +911,12 @@ def setupMenu(): ChainProp(name="HLT_tau80_tightRNN_tracktwoLLP_tau60_tightRNN_tracktwoLLP_03dRAB_L1TAU60_2TAU40", l1SeedThresholds=['TAU60','TAU40'], groups=SupportLegGroup+TauJetGroup), ChainProp(name="HLT_tau100_mediumRNN_tracktwoLLP_tau80_mediumRNN_tracktwoLLP_03dRAB_L1TAU60_2TAU40", l1SeedThresholds=['TAU60','TAU40'], groups=SupportLegGroup+TauJetGroup), + ChainProp(name='HLT_tau35_mediumRNN_tracktwoMVA_tau25_mediumRNN_tracktwoMVA_03dRAB30_L1DR-TAU20ITAU12I', l1SeedThresholds=['TAU20IM','TAU12IM'], groups=SupportLegGroup+MultiTauGroup), + ChainProp(name='HLT_tau35_mediumRNN_tracktwoMVABDT_tau25_mediumRNN_tracktwoMVABDT_03dRAB30_L1DR-TAU20ITAU12I', l1SeedThresholds=['TAU20IM','TAU12IM'], groups=PrimaryLegGroup+MultiTauGroup), + ChainProp(name='HLT_tau35_mediumRNN_tracktwoMVA_tau25_mediumRNN_tracktwoMVA_03dRAB_L1TAU20IM_2TAU12IM', l1SeedThresholds=['TAU20IM','TAU12IM'], groups=SupportLegGroup+MultiTauGroup), + ChainProp(name='HLT_tau35_mediumRNN_tracktwoMVABDT_tau25_mediumRNN_tracktwoMVABDT_03dRAB_L1TAU20IM_2TAU12IM', l1SeedThresholds=['TAU20IM','TAU12IM'], groups=SupportLegGroup+MultiTauGroup), + + # Phase-I ChainProp(name="HLT_tau25_mediumRNN_tracktwoMVABDT_L1eTAU12", groups=SingleTauGroup, monGroups=['tauMon:online']), ChainProp(name="HLT_tau25_mediumRNN_tracktwoMVABDT_L1eTAU12M", groups=SingleTauGroup, monGroups=['tauMon:online']), @@ -1048,25 +1008,6 @@ def setupMenu(): # mu-tag & tau-probe triggers for LLP (ATR-23150) ChainProp(name='HLT_mu26_ivarmedium_tau100_mediumRNN_tracktwoLLP_03dRAB_L1MU14FCH', l1SeedThresholds=['MU14FCH','TAU60'], stream=[PhysicsStream], groups=TagAndProbeLegGroup+SingleMuonGroup), ChainProp(name='HLT_e26_lhtight_ivarloose_tau100_mediumRNN_tracktwoLLP_03dRAB_L1EM22VHI', l1SeedThresholds=['EM22VHI','TAU60'], stream=[PhysicsStream], groups=TagAndProbeLegGroup+SingleElectronGroup), - - # MET + tau tag and probe chains (ATR-23507) - ChainProp(name='HLT_tau20_mediumRNN_tracktwoMVA_probe_xe65_cell_xe90_pfopufit_L1XE50', l1SeedThresholds=['PROBETAU8','FSNOSEED','FSNOSEED'], groups=TagAndProbeLegGroup+TauMETGroup), - ChainProp(name='HLT_tau20_mediumRNN_tracktwoMVABDT_probe_xe65_cell_xe90_pfopufit_L1XE50', l1SeedThresholds=['PROBETAU8','FSNOSEED','FSNOSEED'], groups=TagAndProbeLegGroup+TauMETGroup), - ChainProp(name='HLT_tau25_mediumRNN_tracktwoMVA_probe_xe65_cell_xe90_pfopufit_L1XE50', l1SeedThresholds=['PROBETAU12IM','FSNOSEED','FSNOSEED'], groups=TagAndProbeLegGroup+TauMETGroup), - ChainProp(name='HLT_tau25_mediumRNN_tracktwoMVABDT_probe_xe65_cell_xe90_pfopufit_L1XE50', l1SeedThresholds=['PROBETAU12IM','FSNOSEED','FSNOSEED'], groups=TagAndProbeLegGroup+TauMETGroup), - ChainProp(name='HLT_tau35_mediumRNN_tracktwoMVA_probe_xe65_cell_xe90_pfopufit_L1XE50', l1SeedThresholds=['PROBETAU20IM','FSNOSEED','FSNOSEED'], groups=TagAndProbeLegGroup+TauMETGroup), - ChainProp(name='HLT_tau35_mediumRNN_tracktwoMVABDT_probe_xe65_cell_xe90_pfopufit_L1XE50', l1SeedThresholds=['PROBETAU20IM','FSNOSEED','FSNOSEED'], groups=TagAndProbeLegGroup+TauMETGroup), - ChainProp(name='HLT_tau40_mediumRNN_tracktwoMVA_probe_xe65_cell_xe90_pfopufit_L1XE50', l1SeedThresholds=['PROBETAU25IM','FSNOSEED','FSNOSEED'], groups=TagAndProbeLegGroup+TauMETGroup), - ChainProp(name='HLT_tau40_mediumRNN_tracktwoMVABDT_probe_xe65_cell_xe90_pfopufit_L1XE50', l1SeedThresholds=['PROBETAU25IM','FSNOSEED','FSNOSEED'], groups=TagAndProbeLegGroup+TauMETGroup), - ChainProp(name='HLT_tau60_mediumRNN_tracktwoMVA_probe_xe65_cell_xe90_pfopufit_L1XE50', l1SeedThresholds=['PROBETAU40','FSNOSEED','FSNOSEED'], groups=TagAndProbeLegGroup+TauMETGroup), - ChainProp(name='HLT_tau60_mediumRNN_tracktwoMVABDT_probe_xe65_cell_xe90_pfopufit_L1XE50', l1SeedThresholds=['PROBETAU40','FSNOSEED','FSNOSEED'], groups=TagAndProbeLegGroup+TauMETGroup), - ChainProp(name='HLT_tau80_mediumRNN_tracktwoMVA_probe_xe65_cell_xe90_pfopufit_L1XE50', l1SeedThresholds=['PROBETAU60','FSNOSEED','FSNOSEED'], groups=TagAndProbeLegGroup+TauMETGroup), - ChainProp(name='HLT_tau80_mediumRNN_tracktwoMVABDT_probe_xe65_cell_xe90_pfopufit_L1XE50', l1SeedThresholds=['PROBETAU60','FSNOSEED','FSNOSEED'], groups=TagAndProbeLegGroup+TauMETGroup), - ChainProp(name='HLT_tau160_mediumRNN_tracktwoMVA_probe_xe65_cell_xe90_pfopufit_L1XE50', l1SeedThresholds=['PROBETAU100','FSNOSEED','FSNOSEED'], groups=TagAndProbeLegGroup+TauMETGroup), - ChainProp(name='HLT_tau160_mediumRNN_tracktwoMVABDT_probe_xe65_cell_xe90_pfopufit_L1XE50', l1SeedThresholds=['PROBETAU100','FSNOSEED','FSNOSEED'], groups=TagAndProbeLegGroup+TauMETGroup), - ChainProp(name='HLT_tau60_mediumRNN_tracktwoLLP_probe_xe65_cell_xe90_pfopufit_L1XE50', l1SeedThresholds=['PROBETAU40','FSNOSEED','FSNOSEED'], groups=TagAndProbeLegGroup+TauMETGroup), - ChainProp(name='HLT_tau80_mediumRNN_tracktwoLLP_probe_xe65_cell_xe90_pfopufit_L1XE50', l1SeedThresholds=['PROBETAU60','FSNOSEED','FSNOSEED'], groups=TagAndProbeLegGroup+TauMETGroup), - ChainProp(name='HLT_tau180_mediumRNN_tracktwoLLP_probe_xe65_cell_xe90_pfopufit_L1XE50', l1SeedThresholds=['PROBETAU100','FSNOSEED','FSNOSEED'], groups=TagAndProbeLegGroup+TauMETGroup), # tau + jet and tau + photon tag and probe (ATR-24031) ChainProp(name='HLT_tau20_mediumRNN_tracktwoMVABDT_probe_j15_pf_ftf_03dRAB_L1RD0_FILLED', l1SeedThresholds=['PROBETAU8','FSNOSEED'], groups=TagAndProbeLegGroup+TauJetGroup), @@ -1074,7 +1015,6 @@ def setupMenu(): # photon + multijets (ATR-22594) ChainProp(name='HLT_g85_tight_3j50_L1EM22VHI',l1SeedThresholds=['EM22VHI','FSNOSEED'],stream=[PhysicsStream], groups=PrimaryLegGroup+EgammaJetGroup), - ChainProp(name='HLT_g45_loose_6j45_L14J15p0ETA25',l1SeedThresholds=['EM15','FSNOSEED'],stream=[PhysicsStream], groups=PrimaryLegGroup+EgammaJetGroup), # photon + MET (ATR-22594, ATR-21565) ChainProp(name='HLT_g90_loose_xe90_cell_L1EM22VHI',l1SeedThresholds=['EM22VHI','FSNOSEED'],stream=[PhysicsStream], groups=PrimaryLegGroup+EgammaMETGroup), @@ -1088,19 +1028,7 @@ def setupMenu(): # photon + VBF Hbb (ATR-23293) ChainProp(name='HLT_g25_medium_2j35_pf_ftf_0eta490_bdl1r77_2j35_pf_ftf_0eta490_L1EM22VHI',l1SeedThresholds=['EM22VHI','FSNOSEED','FSNOSEED'],stream=[PhysicsStream], groups=PrimaryLegGroup+EgammaBjetGroup), ChainProp(name='HLT_g25_medium_j35_pf_ftf_0eta490_bdl1r77_3j35_pf_ftf_0eta490_j0_pf_ftf_DJMASS700j35_L1EM22VHI',l1SeedThresholds=['EM22VHI','FSNOSEED','FSNOSEED','FSNOSEED'],stream=[PhysicsStream], groups=PrimaryLegGroup+EgammaBjetGroup), - ChainProp(name='HLT_g20_tight_icaloloose_j35_pf_ftf_bdl1r77_3j35_pf_ftf_0eta490_j0_pf_ftf_DJMASS500j35_L1EM18VHI_MJJ-300',l1SeedThresholds=['EM18VHI','FSNOSEED','FSNOSEED','FSNOSEED'],stream=[PhysicsStream], groups=PrimaryLegGroup+EgammaBjetGroup), - - - # VBF triggers (ATR-22594) - ChainProp(name='HLT_2mu6_2j50_0eta490_j0_DJMASS900j50_L1MJJ-500-NFF',l1SeedThresholds=['MU5VF','FSNOSEED','FSNOSEED'],stream=['VBFDelayed'], groups=PrimaryLegGroup+MuonJetGroup), # Formerly HLT_2mu6_2j50_0eta490_invm900j50 - ChainProp(name='HLT_e5_lhvloose_j70_0eta320_j50_0eta490_j0_DJMASS1000j50_xe50_tcpufit_L1MJJ-500-NFF',l1SeedThresholds=['EM3','FSNOSEED','FSNOSEED','FSNOSEED','FSNOSEED'],stream=['VBFDelayed'], groups=PrimaryLegGroup+EgammaJetGroup), - ChainProp(name='HLT_2e5_lhmedium_j70_0eta320_j50_0eta490_j0_DJMASS900j50_L1MJJ-500-NFF',l1SeedThresholds=['EM3','FSNOSEED','FSNOSEED','FSNOSEED'],stream=['VBFDelayed'], groups=PrimaryLegGroup+EgammaJetGroup), - ChainProp(name='HLT_g25_medium_4j35_0eta490_j0_DJMASS1000j35_L1EM22VHI',l1SeedThresholds=['EM22VHI','FSNOSEED','FSNOSEED'],stream=[PhysicsStream], groups=PrimaryLegGroup+EgammaJetGroup), - ChainProp(name='HLT_e10_lhmedium_ivarloose_j70_0eta320_j50_0eta490_j0_DJMASS900j50_L1MJJ-500-NFF',l1SeedThresholds=['EM8VH','FSNOSEED','FSNOSEED','FSNOSEED'],stream=['VBFDelayed'], groups=PrimaryLegGroup+EgammaJetGroup), - ChainProp(name='HLT_mu4_j70_0eta320_j50_0eta490_j0_DJMASS1000j50_xe50_tcpufit_L1MJJ-500-NFF',l1SeedThresholds=['MU3V','FSNOSEED','FSNOSEED','FSNOSEED','FSNOSEED'],stream=['VBFDelayed'], groups=PrimaryLegGroup+MuonJetGroup), - ChainProp(name='HLT_mu10_ivarmedium_j70_0eta320_j50_0eta490_j0_DJMASS900j50_L1MJJ-500-NFF',l1SeedThresholds=['MU8F','FSNOSEED','FSNOSEED','FSNOSEED'],stream=['VBFDelayed'], groups=PrimaryLegGroup+MuonJetGroup), - ChainProp(name='HLT_j70_0eta320_j50_0eta490_j0_DJMASS1000j50dphi240_xe90_tcpufit_xe50_cell_L1MJJ-500-NFF',l1SeedThresholds=['FSNOSEED']*5,stream=['VBFDelayed'], groups=PrimaryLegGroup+JetMETGroup), - + # meson + photon (ATR-22644, ATR-23239) ChainProp(name='HLT_g25_medium_tau25_dikaonmass_tracktwoMVA_50invmAB_L1EM22VHI', l1SeedThresholds=['EM22VHI','TAU8'], stream=[PhysicsStream], groups=SupportLegGroup+EgammaTauGroup), ChainProp(name='HLT_g25_medium_tau25_kaonpi1_tracktwoMVA_50invmAB_L1EM22VHI', l1SeedThresholds=['EM22VHI','TAU8'], stream=[PhysicsStream], groups=SupportLegGroup+EgammaTauGroup), @@ -1110,12 +1038,6 @@ def setupMenu(): ChainProp(name='HLT_g25_medium_tau25_dipion2_tracktwoMVA_50invmAB_L1EM22VHI', l1SeedThresholds=['EM22VHI','TAU8'], stream=[PhysicsStream], groups=SupportLegGroup+EgammaTauGroup), ChainProp(name='HLT_g35_medium_tau25_dipion3_tracktwoMVA_60invmAB_L1EM22VHI', l1SeedThresholds=['EM22VHI','TAU8'], stream=[PhysicsStream], groups=SupportLegGroup+EgammaTauGroup), ChainProp(name='HLT_g25_medium_tau25_dipion4_tracktwoMVA_50invmAB_L1EM22VHI', l1SeedThresholds=['EM22VHI','TAU8'], stream=[PhysicsStream], groups=SupportLegGroup+EgammaTauGroup), - #Combined BPhys - #ATR-22749; chain configuration is broken, temporarily comment them out, see ATR-23839 and ATR-23965 - #ChainProp(name='HLT_e9_lhvloose_e5_lhvloose_bBeeM6000_mu6_l2io_L1BPH-0M9-EM7-EM5_MU5VF', l1SeedThresholds=['EM7','EM3','MU5VF'], groups=BphysElectronGroup), - #ChainProp(name='HLT_e9_lhvloose_e5_lhvloose_bBeeM6000_2mu4_l2io_L1BPH-0M9-EM7-EM5_2MU3V', l1SeedThresholds=['EM7','EM3','MU3V'], groups=BphysElectronGroup), - #ChainProp(name='HLT_e5_lhvloose_bBeeM6000_mu6_l2io_L1BPH-0DR3-EM7J15_MU5VF', l1SeedThresholds=['EM7','MU5VF'], groups=BphysElectronGroup), - #ChainProp(name='HLT_e5_lhvloose_bBeeM6000_2mu4_l2io_L1BPH-0DR3-EM7J15_2MU3V', l1SeedThresholds=['EM7','MU3V'], groups=BphysElectronGroup), # Tests of potential TLA chains for cost/rate # ATR-19317 - dijet+ISR @@ -1137,16 +1059,11 @@ def setupMenu(): ChainProp(name='HLT_g15_loose_2mu10_msonly_L1MU3V_EMPTY', l1SeedThresholds=['EM8VH','MU3V'], stream=['Late'], groups=PrimaryLegGroup+EgammaMuonGroup), ChainProp(name='HLT_g15_loose_2mu10_msonly_L1MU5VF_EMPTY', l1SeedThresholds=['EM8VH','MU5VF'], stream=['Late'], groups=PrimaryLegGroup+EgammaMuonGroup), ChainProp(name='HLT_g15_loose_2mu10_msonly_L1MU3V_UNPAIRED_ISO', l1SeedThresholds=['EM8VH','MU3V'], stream=['Late'], groups=PrimaryLegGroup+EgammaMuonGroup), - # - ChainProp(name='HLT_j55_0eta240_xe50_cell_L1J30_EMPTY', l1SeedThresholds=['FSNOSEED']*2, stream=['Late'], groups=PrimaryLegGroup+JetMETGroup), - ChainProp(name='HLT_j55_0eta240_xe50_cell_L1J30_FIRSTEMPTY', l1SeedThresholds=['FSNOSEED']*2, stream=['Late'], groups=PrimaryLegGroup+JetMETGroup), # high-mu AFP ChainProp(name='HLT_2j20_mb_afprec_afpdijet_L1RD0_FILLED', l1SeedThresholds=['FSNOSEED']*2, stream=[PhysicsStream],groups=MinBiasGroup+LowMuGroup+SupportLegGroup), ChainProp(name='HLT_2j135_mb_afprec_afpdijet_L1CEP-CjJ60', l1SeedThresholds=['FSNOSEED']*2, stream=[PhysicsStream],groups=MinBiasGroup+LowMuGroup+SupportLegGroup), ChainProp(name='HLT_2j120_mb_afprec_afpdijet_L1CEP-CjJ50', l1SeedThresholds=['FSNOSEED']*2, stream=[PhysicsStream],groups=MinBiasGroup+LowMuGroup+SupportLegGroup), - ChainProp(name='HLT_2j120_mb_afprec_afpdijet_L1AFP_A_AND_C_TOF_J50', l1SeedThresholds=['FSNOSEED']*2, stream=[PhysicsStream],groups=MinBiasGroup+LowMuGroup+SupportLegGroup), - ChainProp(name='HLT_2j175_mb_afprec_afpdijet_L1AFP_A_AND_C_TOF_J75', l1SeedThresholds=['FSNOSEED']*2, stream=[PhysicsStream],groups=MinBiasGroup+LowMuGroup+SupportLegGroup), # bjet+met+met ChainProp(name="HLT_j100_pf_ftf_bdl1r60_xe50_cell_xe85_tcpufit_L1XE55", l1SeedThresholds=['FSNOSEED','FSNOSEED','FSNOSEED'], stream=[PhysicsStream], groups=PrimaryLegGroup+BjetMETGroup), @@ -1170,7 +1087,6 @@ def setupMenu(): ChainProp(name='HLT_xe80_tcpufit_unconvtrk50_dedx_medium_L1XE50', groups=PrimaryLegGroup+UnconvTrkGroup, l1SeedThresholds=['FSNOSEED']*2), #ATR-23156 - ChainProp(name='HLT_mu4_j20_0eta290_pf_ftf_boffperf_dRAB03_L1MU3V_J15', l1SeedThresholds=['MU3V','FSNOSEED'], groups=SingleBjetGroup), ChainProp(name='HLT_mu4_j20_0eta290_pf_ftf_boffperf_dRAB03_L1MU3V', l1SeedThresholds=['MU3V','FSNOSEED'], groups=SingleBjetGroup), #ATR-23394 @@ -1211,66 +1127,51 @@ def setupMenu(): chains['MinBias'] += [ - ChainProp(name='HLT_mb_sp400_trk40_hmt_L1RD0_FILLED', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=MinBiasGroup+['PS:Online']+LowMuGroup), - ChainProp(name='HLT_mb_sp600_trk45_hmt_L1RD0_FILLED', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=MinBiasGroup+['PS:Online']+LowMuGroup), - ChainProp(name='HLT_mb_sp700_trk55_hmt_L1RD0_FILLED', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=MinBiasGroup+['PS:Online']+LowMuGroup), - ChainProp(name='HLT_mb_sp900_trk60_hmt_L1RD0_FILLED', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=MinBiasGroup+['PS:Online']+LowMuGroup), - ChainProp(name='HLT_mb_sp900_trk65_hmt_L1RD0_FILLED', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=MinBiasGroup+['PS:Online']+LowMuGroup), - ChainProp(name='HLT_mb_sp1000_trk70_hmt_L1RD0_FILLED', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=MinBiasGroup+['PS:Online']+LowMuGroup), - ChainProp(name='HLT_mb_sp1200_trk75_hmt_L1RD0_FILLED', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=MinBiasGroup+['PS:Online']+LowMuGroup), - ChainProp(name='HLT_mb_sp1400_trk80_hmt_L1RD0_FILLED', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=MinBiasGroup+['PS:Online']+LowMuGroup), - ChainProp(name='HLT_mb_sp1400_trk90_hmt_L1RD0_FILLED', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=MinBiasGroup+['PS:Online']+LowMuGroup), - ChainProp(name='HLT_mb_sp1600_trk100_hmt_L1RD0_FILLED', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=MinBiasGroup+['PS:Online']+LowMuGroup), - ChainProp(name='HLT_mb_sp1800_trk110_hmt_L1RD0_FILLED', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=MinBiasGroup+['PS:Online']+LowMuGroup), - ChainProp(name='HLT_mb_sp600_pusup300_trk40_hmt_L1RD0_FILLED', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=MinBiasGroup+['PS:Online']+LowMuGroup), - ChainProp(name='HLT_mb_sp900_pusup350_trk50_hmt_L1RD0_FILLED', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=MinBiasGroup+['PS:Online']+LowMuGroup), - ChainProp(name='HLT_mb_sp900_pusup400_trk60_hmt_L1RD0_FILLED', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=MinBiasGroup+['PS:Online']+LowMuGroup), - ChainProp(name='HLT_mb_sp1000_pusup450_trk70_hmt_L1RD0_FILLED', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=MinBiasGroup+['PS:Online']+LowMuGroup), - ChainProp(name='HLT_mb_sp1100_pusup450_trk70_hmt_L1RD0_FILLED', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=MinBiasGroup+['PS:Online']+LowMuGroup), - ChainProp(name='HLT_mb_sp1200_pusup500_trk80_hmt_L1RD0_FILLED', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=MinBiasGroup+['PS:Online']+LowMuGroup), - ChainProp(name='HLT_mb_sp1400_pusup550_trk90_hmt_L1RD0_FILLED', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=MinBiasGroup+['PS:Online']+LowMuGroup), - ChainProp(name='HLT_mb_sp1600_pusup600_trk100_hmt_L1RD0_FILLED', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=MinBiasGroup+['PS:Online']+LowMuGroup), - ChainProp(name='HLT_mb_sp1800_pusup600_trk110_hmt_L1RD0_FILLED', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=MinBiasGroup+['PS:Online']+LowMuGroup), - ChainProp(name='HLT_mb_sp2100_pusup700_trk120_hmt_L1RD0_FILLED', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=MinBiasGroup+['PS:Online']+LowMuGroup), - ChainProp(name='HLT_mb_sp2300_pusup1000_trk130_hmt_L1RD0_FILLED', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=MinBiasGroup+['PS:Online']+LowMuGroup), - #noalg chains - #ChainProp(name='HLT_noalg_L1AFP_A_AND_C_TOF_J50', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=['PS:Online']+MinBiasGroup+LowMuGroup), - # ChainProp(name='HLT_mb_noalg_L1AFP_A_AND_C_TOF_TOT1_J50', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=['PS:Online']+MinBiasGroup+LowMuGroup), - # ChainProp(name='HLT_mb_noalg_L1AFP_A_AND_C_TOF_J75', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=['PS:Online']+MinBiasGroup+LowMuGroup), - # ChainProp(name='HLT_mb_noalg_L1AFP_A_AND_C_TOF_TOT1_J75', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=['PS:Online']+MinBiasGroup+LowMuGroup), + ChainProp(name='HLT_mb_sp400_trk40_hmt_L1RD0_FILLED', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=MinBiasGroup+['PS:Online']+LowMuGroup), + ChainProp(name='HLT_mb_sp600_trk45_hmt_L1RD0_FILLED', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=MinBiasGroup+['PS:Online']+LowMuGroup), + ChainProp(name='HLT_mb_sp700_trk55_hmt_L1RD0_FILLED', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=MinBiasGroup+['PS:Online']+LowMuGroup), + ChainProp(name='HLT_mb_sp900_trk60_hmt_L1RD0_FILLED', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=MinBiasGroup+['PS:Online']+LowMuGroup), + ChainProp(name='HLT_mb_sp900_trk65_hmt_L1RD0_FILLED', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=MinBiasGroup+['PS:Online']+LowMuGroup), + ChainProp(name='HLT_mb_sp1000_trk70_hmt_L1RD0_FILLED', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=MinBiasGroup+['PS:Online']+LowMuGroup), + ChainProp(name='HLT_mb_sp1200_trk75_hmt_L1RD0_FILLED', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=MinBiasGroup+['PS:Online']+LowMuGroup), + ChainProp(name='HLT_mb_sp1400_trk80_hmt_L1RD0_FILLED', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=MinBiasGroup+['PS:Online']+LowMuGroup), + ChainProp(name='HLT_mb_sp1400_trk90_hmt_L1RD0_FILLED', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=MinBiasGroup+['PS:Online']+LowMuGroup), + ChainProp(name='HLT_mb_sp1600_trk100_hmt_L1RD0_FILLED', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=MinBiasGroup+['PS:Online']+LowMuGroup), + ChainProp(name='HLT_mb_sp1800_trk110_hmt_L1RD0_FILLED', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=MinBiasGroup+['PS:Online']+LowMuGroup), + ChainProp(name='HLT_mb_sp600_pusup300_trk40_hmt_L1RD0_FILLED', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=MinBiasGroup+['PS:Online']+LowMuGroup), + ChainProp(name='HLT_mb_sp900_pusup350_trk50_hmt_L1RD0_FILLED', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=MinBiasGroup+['PS:Online']+LowMuGroup), + ChainProp(name='HLT_mb_sp900_pusup400_trk60_hmt_L1RD0_FILLED', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=MinBiasGroup+['PS:Online']+LowMuGroup), + ChainProp(name='HLT_mb_sp1000_pusup450_trk70_hmt_L1RD0_FILLED', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=MinBiasGroup+['PS:Online']+LowMuGroup), + ChainProp(name='HLT_mb_sp1100_pusup450_trk70_hmt_L1RD0_FILLED', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=MinBiasGroup+['PS:Online']+LowMuGroup), + ChainProp(name='HLT_mb_sp1200_pusup500_trk80_hmt_L1RD0_FILLED', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=MinBiasGroup+['PS:Online']+LowMuGroup), + ChainProp(name='HLT_mb_sp1400_pusup550_trk90_hmt_L1RD0_FILLED', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=MinBiasGroup+['PS:Online']+LowMuGroup), + ChainProp(name='HLT_mb_sp1600_pusup600_trk100_hmt_L1RD0_FILLED', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=MinBiasGroup+['PS:Online']+LowMuGroup), + ChainProp(name='HLT_mb_sp1800_pusup600_trk110_hmt_L1RD0_FILLED', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=MinBiasGroup+['PS:Online']+LowMuGroup), + ChainProp(name='HLT_mb_sp2100_pusup700_trk120_hmt_L1RD0_FILLED', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=MinBiasGroup+['PS:Online']+LowMuGroup), + ChainProp(name='HLT_mb_sp2300_pusup1000_trk130_hmt_L1RD0_FILLED', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=MinBiasGroup+['PS:Online']+LowMuGroup), # afprec chains - ChainProp(name='HLT_mb_afprec_L1RD0_FILLED', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=['PS:Online']+MinBiasGroup+LowMuGroup), - ChainProp(name='HLT_mb_afprec_L1CEP-CjJ60', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=['PS:Online']+MinBiasGroup+LowMuGroup), - ChainProp(name='HLT_mb_afprec_L1CEP-CjJ50', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=['PS:Online']+MinBiasGroup+LowMuGroup), - ChainProp(name='HLT_mb_afprec_L1AFP_A_AND_C_TOF_J20', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=['PS:Online']+MinBiasGroup+LowMuGroup), - ChainProp(name='HLT_mb_afprec_L1AFP_A_AND_C_TOF_T0T1_J20', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=['PS:Online']+MinBiasGroup+LowMuGroup), - ChainProp(name='HLT_mb_afprec_L1AFP_A_AND_C_TOF_J30', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=['PS:Online']+MinBiasGroup+LowMuGroup), - ChainProp(name='HLT_mb_afprec_L1AFP_A_AND_C_TOF_T0T1_J30', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=['PS:Online']+MinBiasGroup+LowMuGroup), - ChainProp(name='HLT_mb_afprec_L1AFP_A_AND_C_TOF_J50', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=['PS:Online']+MinBiasGroup+LowMuGroup), - ChainProp(name='HLT_mb_afprec_L1AFP_A_AND_C_TOF_T0T1_J50', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=['PS:Online']+MinBiasGroup+LowMuGroup), - ChainProp(name='HLT_mb_afprec_L1AFP_A_AND_C_TOF_J75', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=['PS:Online']+MinBiasGroup+LowMuGroup), - ChainProp(name='HLT_mb_afprec_L1AFP_A_AND_C_TOF_T0T1_J75', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=['PS:Online']+MinBiasGroup+LowMuGroup), - ChainProp(name='HLT_mb_sptrk_vetombts2in_L1RD0_FILLED', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=['PS:Online']+MinBiasGroup+LowMuGroup), + ChainProp(name='HLT_mb_afprec_L1RD0_FILLED', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup+LowMuGroup), + ChainProp(name='HLT_mb_afprec_L1CEP-CjJ60', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup+LowMuGroup), + ChainProp(name='HLT_mb_afprec_L1CEP-CjJ50', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup+LowMuGroup), + ChainProp(name='HLT_mb_sptrk_vetombts2in_L1RD0_FILLED', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup+LowMuGroup), ] chains['Calib'] += [ - ChainProp(name='HLT_noalg_AlfaPEB_L1ALFA_ANY', l1SeedThresholds=['FSNOSEED'], stream=['ALFACalib'], groups=['RATE:ALFACalibration','BW:Detector']+LowMuGroup), + #ChainProp(name='HLT_noalg_AlfaPEB_L1ALFA_ANY', l1SeedThresholds=['FSNOSEED'], stream=['ALFACalib'], groups=['RATE:ALFACalibration','BW:Detector']+LowMuGroup), # Calib Chains ChainProp(name='HLT_larpsallem_L1EM3', groups=SingleElectronGroup), - ChainProp(name='HLT_larpsall_L1J15', l1SeedThresholds=['J15'], stream=['CosmicCalo'],groups=['RATE:Calibration','BW:Detector']), ] chains['Streaming'] += [ - #ChainProp(name='HLT_noalg_1RD2_EMPTY', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=MinBiasGroup), - #ChainProp(name='HLT_noalg_L1ZB', l1SeedThresholds=['FSNOSEED'], stream=['ZeroBias'], groups=ZeroBiasGroup), ChainProp(name='HLT_noalg_L1All', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=['Primary:CostAndRate', 'RATE:SeededStreamers', 'BW:Other']), # ATR-22072, for rates in MC. To move to MC menu once good nightly in LS2_v1. #Phase-I ChainProp(name='HLT_noalg_L1eTAU8', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=TauPhaseIStreamersGroup), ChainProp(name='HLT_noalg_L1eTAU12', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=TauPhaseIStreamersGroup), ChainProp(name='HLT_noalg_L1jTAU12', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=TauPhaseIStreamersGroup), - ChainProp(name='HLT_noalg_L1jTAU12M', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=TauPhaseIStreamersGroup), + ChainProp(name='HLT_noalg_L1jTAU20', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=TauPhaseIStreamersGroup), + ChainProp(name='HLT_noalg_L1jTAU20M', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=TauPhaseIStreamersGroup), ChainProp(name='HLT_noalg_L1cTAU12M', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=TauPhaseIStreamersGroup), ChainProp(name='HLT_noalg_L1eTAU12L', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=TauPhaseIStreamersGroup), ChainProp(name='HLT_noalg_L1eTAU12M', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=TauPhaseIStreamersGroup), @@ -1285,16 +1186,16 @@ def setupMenu(): ChainProp(name='HLT_noalg_L1eEM3', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=EgammaPhaseIStreamersGroup), ChainProp(name='HLT_noalg_L1eEM5', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=EgammaPhaseIStreamersGroup), - ChainProp(name='HLT_noalg_L1eEM8', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=EgammaPhaseIStreamersGroup), + ChainProp(name='HLT_noalg_L1eEM7', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=EgammaPhaseIStreamersGroup), ChainProp(name='HLT_noalg_L1eEM8L', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=EgammaPhaseIStreamersGroup), - ChainProp(name='HLT_noalg_L1eEM8M', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=EgammaPhaseIStreamersGroup), ChainProp(name='HLT_noalg_L1eEM10L', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=EgammaPhaseIStreamersGroup), + ChainProp(name='HLT_noalg_L1eEM12', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=EgammaPhaseIStreamersGroup), ChainProp(name='HLT_noalg_L1eEM15', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=EgammaPhaseIStreamersGroup), ChainProp(name='HLT_noalg_L1eEM15L', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=EgammaPhaseIStreamersGroup), ChainProp(name='HLT_noalg_L1eEM15M', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=EgammaPhaseIStreamersGroup), ChainProp(name='HLT_noalg_L1eEM18M', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=EgammaPhaseIStreamersGroup), - ChainProp(name='HLT_noalg_L1eEM20', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=EgammaPhaseIStreamersGroup), ChainProp(name='HLT_noalg_L1eEM20L', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=EgammaPhaseIStreamersGroup), + ChainProp(name='HLT_noalg_L1eEM20VM', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=EgammaPhaseIStreamersGroup), ChainProp(name='HLT_noalg_L1eEM22', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=EgammaPhaseIStreamersGroup), ChainProp(name='HLT_noalg_L1eEM22L', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=EgammaPhaseIStreamersGroup), ChainProp(name='HLT_noalg_L1eEM22M', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=EgammaPhaseIStreamersGroup), @@ -1302,7 +1203,6 @@ def setupMenu(): ChainProp(name='HLT_noalg_L1jEM15', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=EgammaPhaseIStreamersGroup), ChainProp(name='HLT_noalg_L1jEM15M', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=EgammaPhaseIStreamersGroup), - ChainProp(name='HLT_noalg_L1jEM18M', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=EgammaPhaseIStreamersGroup), ChainProp(name='HLT_noalg_L1jJ12', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=JetPhaseIStreamersGroup), ChainProp(name='HLT_noalg_L1jJ12p0ETA25', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=JetPhaseIStreamersGroup), @@ -1326,7 +1226,6 @@ def setupMenu(): ChainProp(name='HLT_noalg_L1jJ85', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=JetPhaseIStreamersGroup), ChainProp(name='HLT_noalg_L1jJ100', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=JetPhaseIStreamersGroup), ChainProp(name='HLT_noalg_L1jJ120', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=JetPhaseIStreamersGroup), - ChainProp(name='HLT_noalg_L1jJ400', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=JetPhaseIStreamersGroup+PrimaryPhIGroup), ChainProp(name='HLT_noalg_L1jLJ80', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=JetPhaseIStreamersGroup), ChainProp(name='HLT_noalg_L1jLJ100', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=JetPhaseIStreamersGroup), @@ -1391,10 +1290,6 @@ def setupMenu(): ChainProp(name='HLT_unconvtrk0_fslrt_L14J15', groups=MultiJetGroup, l1SeedThresholds=['FSNOSEED']), ChainProp(name='HLT_unconvtrk0_fslrt_L1XE50', groups=SingleMETGroup, l1SeedThresholds=['FSNOSEED']), - # hit-based DV - ChainProp(name='HLT_unconvtrk260_hitdv_tight_L1J100', groups=PrimaryLegGroup+UnconvTrkGroup, l1SeedThresholds=['FSNOSEED']), - ChainProp(name='HLT_unconvtrk260_hitdv_medium_L1J100', groups=PrimaryLegGroup+UnconvTrkGroup, l1SeedThresholds=['FSNOSEED']), - # disappearing track trigger ChainProp(name='HLT_unconvtrk20_distrk_tight_L1XE50', groups=SupportLegGroup+UnconvTrkGroup, l1SeedThresholds=['FSNOSEED']), ChainProp(name='HLT_unconvtrk20_distrk_medium_L1XE50', groups=SupportLegGroup+UnconvTrkGroup, l1SeedThresholds=['FSNOSEED']), diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1_newJO.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1_newJO.py index b35da9b7449e83feca54738d304ff7f3831d7294..5b52f921dacee0a56c8407aa6ec2f46193814786 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1_newJO.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1_newJO.py @@ -102,6 +102,7 @@ if __name__ == "__main__": Configurable.configurableRun3Behavior=True from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator + from AthenaConfiguration.AccumulatorCache import AccumulatorDecorator from AthenaCommon.Logging import logging log = logging.getLogger(__name__) @@ -125,6 +126,7 @@ if __name__ == "__main__": acc.merge(menu) acc.printConfig() + AccumulatorDecorator.printStats() # print all hypo algs and their hypo tools for debugging from AthenaCommon.CFElements import flatAlgorithmSequences diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/PhysicsP1_pp_run3_v1.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/PhysicsP1_pp_run3_v1.py index d9760ed7a37e62874f068ca16147d0b307d773a1..3033cb445c70cf37bafef7cd4c5cda3c4366b420 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/PhysicsP1_pp_run3_v1.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/PhysicsP1_pp_run3_v1.py @@ -26,6 +26,7 @@ from TriggerMenuMT.HLTMenuConfig.Menu.Physics_pp_run3_v1 import ( ZeroBiasGroup, SupportLegGroup, LowMuGroup, + PrimaryPhIGroup, ) @@ -122,6 +123,7 @@ def addP1Signatures(chains): chains['Streaming'] += [ ChainProp(name='HLT_noalg_L1RD0_EMPTY', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=['PS:Online']+MinBiasGroup), ChainProp(name='HLT_noalg_L1RD0_FILLED', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=['PS:Online']+MinBiasGroup), + ChainProp(name='HLT_noalg_L1RD0_UNPAIRED_ISO', l1SeedThresholds=['FSNOSEED'], stream=['Background'], groups=['PS:Online']), ChainProp(name='HLT_noalg_mb_L1RD0_EMPTY', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup), ChainProp(name='HLT_noalg_mb_L1RD0_FILLED', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup), @@ -215,46 +217,46 @@ def addP1Signatures(chains): ChainProp(name='HLT_noalg_L1MBTS_2_EMPTY', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup), #ATR-21999 ChainProp(name='HLT_noalg_L1MBTS_1_1_EMPTY', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup), #ATR-21999 - ChainProp(name='HLT_noalg_L1MBTSA0', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup), #ATR-23216 - ChainProp(name='HLT_noalg_L1MBTSA1', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup), #ATR-23216 - ChainProp(name='HLT_noalg_L1MBTSA2', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup), #ATR-23216 - ChainProp(name='HLT_noalg_L1MBTSA3', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup), #ATR-23216 - ChainProp(name='HLT_noalg_L1MBTSA4', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup), #ATR-23216 - ChainProp(name='HLT_noalg_L1MBTSA5', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup), #ATR-23216 - ChainProp(name='HLT_noalg_L1MBTSA6', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup), #ATR-23216 - ChainProp(name='HLT_noalg_L1MBTSA7', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup), #ATR-23216 - ChainProp(name='HLT_noalg_L1MBTSA8', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup), #ATR-23216 - ChainProp(name='HLT_noalg_L1MBTSA9', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup), #ATR-23216 - ChainProp(name='HLT_noalg_L1MBTSA10', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup), #ATR-23216 - ChainProp(name='HLT_noalg_L1MBTSA11', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup), #ATR-23216 - ChainProp(name='HLT_noalg_L1MBTSA12', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup), #ATR-23216 - ChainProp(name='HLT_noalg_L1MBTSA13', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup), #ATR-23216 - ChainProp(name='HLT_noalg_L1MBTSA14', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup), #ATR-23216 - ChainProp(name='HLT_noalg_L1MBTSA15', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup), #ATR-23216 - - ChainProp(name='HLT_noalg_L1MBTSC0', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup), #ATR-23216 - ChainProp(name='HLT_noalg_L1MBTSC1', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup), #ATR-23216 - ChainProp(name='HLT_noalg_L1MBTSC2', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup), #ATR-23216 - ChainProp(name='HLT_noalg_L1MBTSC3', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup), #ATR-23216 - ChainProp(name='HLT_noalg_L1MBTSC4', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup), #ATR-23216 - ChainProp(name='HLT_noalg_L1MBTSC5', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup), #ATR-23216 - ChainProp(name='HLT_noalg_L1MBTSC6', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup), #ATR-23216 - ChainProp(name='HLT_noalg_L1MBTSC7', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup), #ATR-23216 - ChainProp(name='HLT_noalg_L1MBTSC8', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup), #ATR-23216 - ChainProp(name='HLT_noalg_L1MBTSC9', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup), #ATR-23216 - ChainProp(name='HLT_noalg_L1MBTSC10', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup), #ATR-23216 - ChainProp(name='HLT_noalg_L1MBTSC11', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup), #ATR-23216 - ChainProp(name='HLT_noalg_L1MBTSC12', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup), #ATR-23216 - ChainProp(name='HLT_noalg_L1MBTSC13', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup), #ATR-23216 - ChainProp(name='HLT_noalg_L1MBTSC14', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup), #ATR-23216 - ChainProp(name='HLT_noalg_L1MBTSC15', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup), #ATR-23216 - - ChainProp(name='HLT_noalg_L1MBTS_1', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=MinBiasGroup+['PS:Online']+LowMuGroup+SupportLegGroup), - ChainProp(name='HLT_noalg_L1MBTS_2', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=MinBiasGroup+['PS:Online']+LowMuGroup+SupportLegGroup), - ChainProp(name='HLT_noalg_L1MBTS_1_1', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=MinBiasGroup+['PS:Online']+LowMuGroup+SupportLegGroup), - ChainProp(name='HLT_noalg_L1MBTS_1_UNPAIRED_ISO', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=MinBiasGroup+['PS:Online']+LowMuGroup+SupportLegGroup), - ChainProp(name='HLT_noalg_L1MBTS_2_UNPAIRED_ISO', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=MinBiasGroup+['PS:Online']+LowMuGroup+SupportLegGroup), - ChainProp(name='HLT_noalg_L1MBTS_1_1_UNPAIRED_ISO', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=MinBiasGroup+['PS:Online']+LowMuGroup+SupportLegGroup), +# ChainProp(name='HLT_noalg_L1MBTSA0', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup), #ATR-23216 +# ChainProp(name='HLT_noalg_L1MBTSA1', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup), #ATR-23216 +# ChainProp(name='HLT_noalg_L1MBTSA2', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup), #ATR-23216 +# ChainProp(name='HLT_noalg_L1MBTSA3', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup), #ATR-23216 +# ChainProp(name='HLT_noalg_L1MBTSA4', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup), #ATR-23216 +# ChainProp(name='HLT_noalg_L1MBTSA5', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup), #ATR-23216 +# ChainProp(name='HLT_noalg_L1MBTSA6', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup), #ATR-23216 +# ChainProp(name='HLT_noalg_L1MBTSA7', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup), #ATR-23216 +# ChainProp(name='HLT_noalg_L1MBTSA8', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup), #ATR-23216 +# ChainProp(name='HLT_noalg_L1MBTSA9', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup), #ATR-23216 +# ChainProp(name='HLT_noalg_L1MBTSA10', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup), #ATR-23216 +# ChainProp(name='HLT_noalg_L1MBTSA11', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup), #ATR-23216 +# ChainProp(name='HLT_noalg_L1MBTSA12', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup), #ATR-23216 +# ChainProp(name='HLT_noalg_L1MBTSA13', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup), #ATR-23216 +# ChainProp(name='HLT_noalg_L1MBTSA14', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup), #ATR-23216 +# ChainProp(name='HLT_noalg_L1MBTSA15', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup), #ATR-23216 +# +# ChainProp(name='HLT_noalg_L1MBTSC0', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup), #ATR-23216 +# ChainProp(name='HLT_noalg_L1MBTSC1', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup), #ATR-23216 +# ChainProp(name='HLT_noalg_L1MBTSC2', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup), #ATR-23216 +# ChainProp(name='HLT_noalg_L1MBTSC3', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup), #ATR-23216 +# ChainProp(name='HLT_noalg_L1MBTSC4', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup), #ATR-23216 +# ChainProp(name='HLT_noalg_L1MBTSC5', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup), #ATR-23216 +# ChainProp(name='HLT_noalg_L1MBTSC6', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup), #ATR-23216 +# ChainProp(name='HLT_noalg_L1MBTSC7', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup), #ATR-23216 +# ChainProp(name='HLT_noalg_L1MBTSC8', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup), #ATR-23216 +# ChainProp(name='HLT_noalg_L1MBTSC9', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup), #ATR-23216 +# ChainProp(name='HLT_noalg_L1MBTSC10', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup), #ATR-23216 +# ChainProp(name='HLT_noalg_L1MBTSC11', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup), #ATR-23216 +# ChainProp(name='HLT_noalg_L1MBTSC12', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup), #ATR-23216 +# ChainProp(name='HLT_noalg_L1MBTSC13', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup), #ATR-23216 +# ChainProp(name='HLT_noalg_L1MBTSC14', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup), #ATR-23216 +# ChainProp(name='HLT_noalg_L1MBTSC15', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup), #ATR-23216 + +# ChainProp(name='HLT_noalg_L1MBTS_1', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=MinBiasGroup+['PS:Online']+LowMuGroup+SupportLegGroup), +# ChainProp(name='HLT_noalg_L1MBTS_2', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=MinBiasGroup+['PS:Online']+LowMuGroup+SupportLegGroup), +# ChainProp(name='HLT_noalg_L1MBTS_1_1', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=MinBiasGroup+['PS:Online']+LowMuGroup+SupportLegGroup), +# ChainProp(name='HLT_noalg_L1MBTS_1_UNPAIRED_ISO', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=MinBiasGroup+['PS:Online']+LowMuGroup+SupportLegGroup), +# ChainProp(name='HLT_noalg_L1MBTS_2_UNPAIRED_ISO', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=MinBiasGroup+['PS:Online']+LowMuGroup+SupportLegGroup), +# ChainProp(name='HLT_noalg_L1MBTS_1_1_UNPAIRED_ISO', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=MinBiasGroup+['PS:Online']+LowMuGroup+SupportLegGroup), ChainProp(name='HLT_noalg_L1CEP-CjJ60', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=MinBiasGroup+['PS:Online']+SupportLegGroup), ChainProp(name='HLT_noalg_L1CEP-CjJ50', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=MinBiasGroup+['PS:Online']+SupportLegGroup), @@ -294,6 +296,8 @@ def addP1Signatures(chains): ChainProp(name='HLT_noalg_L1ZDC_A', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=MinBiasGroup+['PS:Online']+SupportLegGroup), ChainProp(name='HLT_noalg_L1ZDC_C', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=MinBiasGroup+['PS:Online']+SupportLegGroup), ChainProp(name='HLT_noalg_L1ZDC_AND', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=MinBiasGroup+['PS:Online']+SupportLegGroup), + + ChainProp(name='HLT_noalg_L1jJ400_LAR', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=PrimaryPhIGroup+JetStreamersGroup+['BW:Other']), ] diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/Physics_pp_run3_v1.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/Physics_pp_run3_v1.py index 2d421f63812418df86e9be80180728b54aa528d1..7ed451d8ebfa8e65c766a2d25bd84c6dedb4eebf 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/Physics_pp_run3_v1.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/Physics_pp_run3_v1.py @@ -61,7 +61,7 @@ PrimaryPhIGroup = ['Primary:PhaseI'] SupportGroup = ['Support'] SupportLegGroup = ['Support:Legacy'] SupportPhIGroup = ['Support:PhaseI'] -# For the chains with the TAgAndProbe labels, wewe flag the rate group as being that of the tag leg and NOT the full chain selection +# For the chains with the TAgAndProbe labels, we flag the rate group as being that of the tag leg and NOT the full chain selection TagAndProbeGroup = ['Support:TagAndProbe'] TagAndProbeLegGroup = ['Support:LegacyTagAndProbe'] TagAndProbePhIGroup = ['Support:PhaseITagAndProbe'] @@ -69,6 +69,7 @@ TagAndProbePhIGroup = ['Support:PhaseITagAndProbe'] LowMuGroup = ['Primary:LowMu'] EOFBPhysL1MuGroup = ['EOF:BPhysL1Muon'] EOFTLALegGroup = ['EOF:TLALegacy'] +EOFTLAPhIGroup = ['EOF:TLAPhaseI'] # For unconventional tracking chains (ATR-23797) UnconvTrkGroup = ['RATE:UnconvTrk', 'BW:UnconvTrk'] # For development chains, not for physics @@ -367,6 +368,131 @@ def setupMenu(): ChainProp(name='HLT_6j35_pf_ftf_0eta240_020jvt_presel6c25_L14J15', l1SeedThresholds=['FSNOSEED'], stream=['VBFDelayed'], groups=PrimaryLegGroup+MultiJetGroup), ChainProp(name='HLT_6j45_pf_ftf_0eta240_020jvt_presel6c25_L14J15', l1SeedThresholds=['FSNOSEED'], stream=['VBFDelayed'], groups=PrimaryLegGroup+MultiJetGroup), + # TLA chains + ChainProp(name='HLT_j20_PhysicsTLA_L1J100', l1SeedThresholds=['FSNOSEED'], stream=['TLA'], groups=PrimaryLegGroup+SingleJetGroup), + ChainProp(name='HLT_j20_PhysicsTLA_L1J50_DETA20-J50J', l1SeedThresholds=['FSNOSEED'], stream=['TLA'], groups=EOFTLALegGroup+SingleJetGroup), + ChainProp(name='HLT_j20_PhysicsTLA_L1HT190-J15s5pETA21', l1SeedThresholds=['FSNOSEED'], stream=['TLA'], groups=PrimaryLegGroup+SingleJetGroup), + ChainProp(name='HLT_j70_0eta320_j50_0eta490_j0_DJMASS1000j50dphi200x400deta_L1MJJ-500-NFF', l1SeedThresholds=['FSNOSEED']*3,stream=['VBFDelayed'],groups=PrimaryLegGroup+MultiJetGroup), # previously HLT_j70_j50_0eta490_invm1000j70_dphi20_deta40_L1MJJ-500-NFF + + #ATR-24411 Phase I inputs + # Single jet support + ChainProp(name='HLT_j45_pf_ftf_preselj20_L1jJ15', l1SeedThresholds=['FSNOSEED'], groups=SingleJetGroup+SupportPhIGroup), + ChainProp(name='HLT_j60_pf_ftf_preselj50_L1jJ20', l1SeedThresholds=['FSNOSEED'], groups=SingleJetGroup+SupportPhIGroup), + ChainProp(name='HLT_j85_pf_ftf_preselj50_L1jJ20', l1SeedThresholds=['FSNOSEED'], groups=SingleJetGroup+SupportPhIGroup), + ChainProp(name='HLT_j110_pf_ftf_preselj80_L1jJ30', l1SeedThresholds=['FSNOSEED'], groups=SingleJetGroup+SupportPhIGroup), + ChainProp(name='HLT_j175_pf_ftf_preselj140_L1jJ50', l1SeedThresholds=['FSNOSEED'], groups=SingleJetGroup+SupportPhIGroup), + ChainProp(name='HLT_j260_pf_ftf_preselj200_L1jJ75', l1SeedThresholds=['FSNOSEED'], groups=SingleJetGroup+SupportPhIGroup), + ChainProp(name='HLT_j360_pf_ftf_preselj225_L1jJ100', l1SeedThresholds=['FSNOSEED'], groups=SingleJetGroup+SupportPhIGroup+['RATE:CPS_jJ100']), + ChainProp(name='HLT_j380_pf_ftf_preselj225_L1jJ100', l1SeedThresholds=['FSNOSEED'], groups=SingleJetGroup+SupportPhIGroup+['RATE:CPS_jJ100']), + ChainProp(name='HLT_j400_pf_ftf_preselj225_L1jJ100', l1SeedThresholds=['FSNOSEED'], groups=SingleJetGroup+SupportPhIGroup+['RATE:CPS_jJ100']), + ChainProp(name='HLT_j420_pf_ftf_preselj225_L1jJ100', l1SeedThresholds=['FSNOSEED'], groups=SingleJetGroup+PrimaryPhIGroup), + ChainProp(name='HLT_j440_pf_ftf_preselj225_L1jJ100', l1SeedThresholds=['FSNOSEED'], groups=SingleJetGroup+PrimaryPhIGroup), + ChainProp(name='HLT_j450_pf_ftf_preselj225_L1jJ100', l1SeedThresholds=['FSNOSEED'], groups=SingleJetGroup+PrimaryPhIGroup), + ChainProp(name='HLT_j460_pf_ftf_preselj225_L1jJ100', l1SeedThresholds=['FSNOSEED'], groups=SingleJetGroup+PrimaryPhIGroup), + ChainProp(name='HLT_j480_pf_ftf_preselj225_L1jJ100', l1SeedThresholds=['FSNOSEED'], groups=SingleJetGroup+PrimaryPhIGroup), + ChainProp(name='HLT_j500_pf_ftf_preselj225_L1jJ100', l1SeedThresholds=['FSNOSEED'], groups=SingleJetGroup+PrimaryPhIGroup), + ChainProp(name='HLT_j520_pf_ftf_preselj225_L1jJ100', l1SeedThresholds=['FSNOSEED'], groups=SingleJetGroup+PrimaryPhIGroup), + + # Central single large-R jets + ChainProp(name='HLT_j110_a10sd_cssk_pf_jes_ftf_preselj80_L1jJ30', l1SeedThresholds=['FSNOSEED'], groups=SingleJetGroup+SupportPhIGroup), + ChainProp(name='HLT_j110_a10t_lcw_jes_L1jJ30', l1SeedThresholds=['FSNOSEED'], groups=SingleJetGroup+SupportPhIGroup), + ChainProp(name='HLT_j175_a10sd_cssk_pf_jes_ftf_preselj140_L1jJ50', l1SeedThresholds=['FSNOSEED'], groups=SingleJetGroup+SupportPhIGroup), + ChainProp(name='HLT_j175_a10t_lcw_jes_L1jJ50', l1SeedThresholds=['FSNOSEED'], groups=SingleJetGroup+SupportPhIGroup), + ChainProp(name='HLT_j260_a10sd_cssk_pf_jes_ftf_preselj200_L1jJ75', l1SeedThresholds=['FSNOSEED'], groups=SingleJetGroup+SupportPhIGroup), + ChainProp(name='HLT_j260_a10t_lcw_jes_L1jJ75', l1SeedThresholds=['FSNOSEED'], groups=SingleJetGroup+SupportPhIGroup), + ChainProp(name='HLT_j360_a10sd_cssk_pf_jes_ftf_preselj225_L1jJ100', l1SeedThresholds=['FSNOSEED'], groups=SingleJetGroup+SupportPhIGroup+['RATE:CPS_jJ100']), + ChainProp(name='HLT_j360_a10sd_cssk_pf_jes_ftf_preselj225_L1SC111-CjJ15', l1SeedThresholds=['FSNOSEED'], groups=SingleJetGroup+SupportPhIGroup), + ChainProp(name='HLT_j360_a10t_lcw_jes_preselj225_L1jJ100', l1SeedThresholds=['FSNOSEED'], groups=SingleJetGroup+SupportPhIGroup+['RATE:CPS_jJ100']), + ChainProp(name='HLT_j360_a10t_lcw_jes_L1SC111-CjJ15', l1SeedThresholds=['FSNOSEED'], groups=SingleJetGroup+SupportPhIGroup), + ChainProp(name='HLT_j400_a10sd_cssk_pf_jes_ftf_preselj225_L1jJ100', l1SeedThresholds=['FSNOSEED'], groups=SingleJetGroup+SupportPhIGroup+['RATE:CPS_jJ100']), + ChainProp(name='HLT_j400_a10sd_cssk_pf_jes_ftf_preselj225_L1SC111-CjJ15', l1SeedThresholds=['FSNOSEED'], groups=SingleJetGroup+SupportPhIGroup), + ChainProp(name='HLT_j400_a10t_lcw_jes_preselj225_L1jJ100', l1SeedThresholds=['FSNOSEED'], groups=SingleJetGroup+SupportPhIGroup+['RATE:CPS_jJ100']), + ChainProp(name='HLT_j400_a10t_lcw_jes_L1SC111-CjJ15', l1SeedThresholds=['FSNOSEED'], groups=SingleJetGroup+SupportPhIGroup), + ChainProp(name='HLT_j420_a10sd_cssk_pf_jes_ftf_preselj225_L1jJ100', l1SeedThresholds=['FSNOSEED'], groups=SingleJetGroup+SupportPhIGroup+['RATE:CPS_jJ100']), + ChainProp(name='HLT_j420_a10sd_cssk_pf_jes_ftf_preselj225_L1SC111-CjJ15', l1SeedThresholds=['FSNOSEED'], groups=SingleJetGroup+SupportPhIGroup), + ChainProp(name='HLT_j420_a10t_lcw_jes_L1jJ100', l1SeedThresholds=['FSNOSEED'], groups=SingleJetGroup+SupportPhIGroup+['RATE:CPS_jJ100']), + ChainProp(name='HLT_j420_a10t_lcw_jes_L1SC111-CjJ15', l1SeedThresholds=['FSNOSEED'], groups=SingleJetGroup+SupportPhIGroup), + ChainProp(name='HLT_j460_a10sd_cssk_pf_jes_ftf_preselj225_L1jJ100', l1SeedThresholds=['FSNOSEED'], groups=SingleJetGroup+PrimaryPhIGroup), + ChainProp(name='HLT_j460_a10sd_cssk_pf_jes_ftf_preselj225_L1SC111-CjJ15', l1SeedThresholds=['FSNOSEED'], groups=SingleJetGroup+PrimaryPhIGroup), + ChainProp(name='HLT_j460_a10t_lcw_jes_L1jJ100', l1SeedThresholds=['FSNOSEED'], groups=SingleJetGroup+PrimaryPhIGroup), + ChainProp(name='HLT_j460_a10t_lcw_jes_L1SC111-CjJ15', l1SeedThresholds=['FSNOSEED'], groups=SingleJetGroup+PrimaryPhIGroup), + ChainProp(name='HLT_j480_a10sd_cssk_pf_jes_ftf_preselj225_L1jJ100', l1SeedThresholds=['FSNOSEED'], groups=SingleJetGroup+PrimaryPhIGroup), + ChainProp(name='HLT_j480_a10sd_cssk_pf_jes_ftf_preselj225_L1SC111-CjJ15', l1SeedThresholds=['FSNOSEED'], groups=SingleJetGroup+PrimaryPhIGroup), + ChainProp(name='HLT_j480_a10t_lcw_jes_L1jJ100', l1SeedThresholds=['FSNOSEED'], groups=SingleJetGroup+PrimaryPhIGroup), + ChainProp(name='HLT_j480_a10t_lcw_jes_L1SC111-CjJ15', l1SeedThresholds=['FSNOSEED'], groups=SingleJetGroup+PrimaryPhIGroup), + # Low threshold large-R chains (for calibration purposes) + ChainProp(name='HLT_j85_a10sd_cssk_pf_nojcalib_ftf_preselj50_L1jJ20', l1SeedThresholds=['FSNOSEED'], groups=SingleJetGroup+SupportPhIGroup), + ChainProp(name='HLT_j85_a10sd_cssk_pf_jes_ftf_preselj50_L1jJ20', l1SeedThresholds=['FSNOSEED'], groups=SingleJetGroup+SupportPhIGroup), + ChainProp(name='HLT_j85_a10t_lcw_nojcalib_L1jJ20', l1SeedThresholds=['FSNOSEED'], groups=SingleJetGroup+SupportPhIGroup), + ChainProp(name='HLT_j85_a10t_lcw_jes_L1jJ20', l1SeedThresholds=['FSNOSEED'], groups=SingleJetGroup+SupportPhIGroup), + + #Forward small-R EMTopo chains + ChainProp(name='HLT_j45_320eta490_L1jJ15p31ETA49', l1SeedThresholds=['FSNOSEED'], groups=SingleJetGroup+SupportPhIGroup), + ChainProp(name='HLT_j60_320eta490_L1jJ20p31ETA49', l1SeedThresholds=['FSNOSEED'], groups=SingleJetGroup+SupportPhIGroup), + ChainProp(name='HLT_j85_320eta490_L1jJ20p31ETA49', l1SeedThresholds=['FSNOSEED'], groups=SingleJetGroup+SupportPhIGroup), + ChainProp(name='HLT_j110_320eta490_L1jJ30p31ETA49', l1SeedThresholds=['FSNOSEED'], groups=SingleJetGroup+SupportPhIGroup), + ChainProp(name='HLT_j175_320eta490_L1jJ50p31ETA49', l1SeedThresholds=['FSNOSEED'], groups=SingleJetGroup+SupportPhIGroup), + ChainProp(name='HLT_j280_320eta490_L1jJ75p31ETA49', l1SeedThresholds=['FSNOSEED'], groups=SingleJetGroup+PrimaryPhIGroup), + ChainProp(name='HLT_j300_320eta490_L1jJ75p31ETA49', l1SeedThresholds=['FSNOSEED'], groups=SingleJetGroup+PrimaryPhIGroup), + + # ATR-20049 + ChainProp(name='HLT_j420_L1jJ100', l1SeedThresholds=['FSNOSEED'], groups=PrimaryPhIGroup+SingleJetGroup+BCIDmonGroup), + ChainProp(name='HLT_j260_320eta490_L1jJ75p31ETA49', l1SeedThresholds=['FSNOSEED'], groups=PrimaryPhIGroup+SingleJetGroup), + ChainProp(name='HLT_j460_a10_lcw_subjes_L1SC111-CjJ15', l1SeedThresholds=['FSNOSEED'], groups=PrimaryPhIGroup+SingleJetGroup), + ChainProp(name='HLT_j460_a10r_L1jJ100', l1SeedThresholds=['FSNOSEED'], groups=PrimaryPhIGroup+SingleJetGroup), + ChainProp(name='HLT_j460_a10r_L1SC111-CjJ15', l1SeedThresholds=['FSNOSEED'], groups=PrimaryPhIGroup+SingleJetGroup), + ChainProp(name='HLT_j460_a10_lcw_subjes_L1jJ100', l1SeedThresholds=['FSNOSEED'], groups=PrimaryPhIGroup+SingleJetGroup), + ChainProp(name='HLT_j420_a10t_lcw_jes_35smcINF_L1jJ100', l1SeedThresholds=['FSNOSEED'], groups=PrimaryPhIGroup+SingleJetGroup), + ChainProp(name='HLT_2j330_a10t_lcw_jes_35smcINF_L1jJ100', l1SeedThresholds=['FSNOSEED'], groups=PrimaryPhIGroup+SingleJetGroup), + ChainProp(name='HLT_j420_a10sd_cssk_pf_jes_ftf_35smcINF_preselj225_L1jJ100', l1SeedThresholds=['FSNOSEED'], groups=SingleJetGroup+PrimaryPhIGroup), + ChainProp(name='HLT_2j330_a10sd_cssk_pf_jes_ftf_35smcINF_presel2j225_L1jJ100', l1SeedThresholds=['FSNOSEED'], groups=SingleJetGroup+PrimaryPhIGroup), + + ChainProp(name='HLT_j420_a10t_lcw_jes_35smcINF_L1SC111-CjJ15', l1SeedThresholds=['FSNOSEED'], groups=PrimaryPhIGroup+SingleJetGroup), + ChainProp(name='HLT_2j330_a10t_lcw_jes_35smcINF_L1SC111-CjJ15', l1SeedThresholds=['FSNOSEED'], groups=PrimaryPhIGroup+SingleJetGroup), + ChainProp(name='HLT_j420_a10sd_cssk_pf_jes_ftf_35smcINF_preselj225_L1SC111-CjJ15', l1SeedThresholds=['FSNOSEED'], groups=SingleJetGroup+PrimaryPhIGroup), + ChainProp(name='HLT_2j330_a10sd_cssk_pf_jes_ftf_35smcINF_presel2j225_L1SC111-CjJ15', l1SeedThresholds=['FSNOSEED'], groups=SingleJetGroup+PrimaryPhIGroup), + ChainProp(name='HLT_j360_a10t_lcw_jes_60smcINF_j360_a10t_lcw_jes_L1SC111-CjJ15', l1SeedThresholds=['FSNOSEED']*2, groups=PrimaryPhIGroup+MultiJetGroup), + ChainProp(name='HLT_j370_a10t_lcw_jes_35smcINF_j370_a10t_lcw_jes_L1SC111-CjJ15', l1SeedThresholds=['FSNOSEED']*2, groups=PrimaryPhIGroup+MultiJetGroup), + ChainProp(name='HLT_j360_a10sd_cssk_pf_jes_ftf_60smcINF_j360_a10sd_cssk_pf_jes_ftf_presel2j225_L1SC111-CjJ15', l1SeedThresholds=['FSNOSEED']*2, groups=PrimaryPhIGroup+MultiJetGroup), + ChainProp(name='HLT_j370_a10sd_cssk_pf_jes_ftf_35smcINF_j370_a10sd_cssk_pf_jes_ftf_presel2j225_L1SC111-CjJ15', l1SeedThresholds=['FSNOSEED']*2, groups=PrimaryPhIGroup+MultiJetGroup), + + # Small-R multijet chains + # PFlow primaries + ChainProp(name='HLT_2j250_pf_ftf_0eta240_j120_pf_ftf_0eta240_presel2j180XXj80_L1jJ100', l1SeedThresholds=['FSNOSEED']*2, groups=MultiJetGroup + PrimaryPhIGroup), + ChainProp(name='HLT_3j200_pf_ftf_presel3j150_L1jJ100', l1SeedThresholds=['FSNOSEED'], groups=MultiJetGroup + PrimaryPhIGroup), + ChainProp(name='HLT_4j115_pf_ftf_presel4j85_L13jJ50', l1SeedThresholds=['FSNOSEED'], groups=MultiJetGroup + PrimaryPhIGroup), + ChainProp(name='HLT_5j70_pf_ftf_0eta240_presel5j50_L14jJ15', l1SeedThresholds=['FSNOSEED'], groups=MultiJetGroup + PrimaryPhIGroup), + ChainProp(name='HLT_5j85_pf_ftf_presel5j50_L14jJ15', l1SeedThresholds=['FSNOSEED'], groups=MultiJetGroup + PrimaryPhIGroup), + ChainProp(name='HLT_6j55_pf_ftf_0eta240_presel6j40_L14jJ15', l1SeedThresholds=['FSNOSEED'], groups=MultiJetGroup + PrimaryPhIGroup), + ChainProp(name='HLT_6j70_pf_ftf_presel6j40_L14jJ15', l1SeedThresholds=['FSNOSEED'], groups=MultiJetGroup + PrimaryPhIGroup), + ChainProp(name='HLT_7j45_pf_ftf_presel7j30_L14jJ15', l1SeedThresholds=['FSNOSEED'], groups=MultiJetGroup + PrimaryPhIGroup), + ChainProp(name='HLT_10j40_pf_ftf_presel7j30_L14jJ15', l1SeedThresholds=['FSNOSEED'], groups=MultiJetGroup + PrimaryPhIGroup), + # EMTopo backups + ChainProp(name='HLT_3j200_L1jJ100', l1SeedThresholds=['FSNOSEED'], groups=MultiJetGroup + PrimaryPhIGroup), + ChainProp(name='HLT_4j120_L13jJ50', l1SeedThresholds=['FSNOSEED'], groups=MultiJetGroup + PrimaryPhIGroup), + ChainProp(name='HLT_5j70_0eta240_L14jJ15', l1SeedThresholds=['FSNOSEED'], groups=MultiJetGroup + PrimaryPhIGroup), + ChainProp(name='HLT_5j85_L14jJ15', l1SeedThresholds=['FSNOSEED'], groups=MultiJetGroup + PrimaryPhIGroup), + ChainProp(name='HLT_6j55_0eta240_L14jJ15', l1SeedThresholds=['FSNOSEED'], groups=MultiJetGroup + PrimaryPhIGroup), + ChainProp(name='HLT_6j70_L14jJ15', l1SeedThresholds=['FSNOSEED'], groups=MultiJetGroup + PrimaryPhIGroup), + ChainProp(name='HLT_7j45_L14jJ15', l1SeedThresholds=['FSNOSEED'], groups=MultiJetGroup + PrimaryPhIGroup), + ChainProp(name='HLT_10j40_L14jJ15', l1SeedThresholds=['FSNOSEED'], groups=MultiJetGroup + PrimaryPhIGroup), + + #HT chains + ChainProp(name='HLT_j0_HT1000_L1jJ100', l1SeedThresholds=['FSNOSEED'], groups=PrimaryPhIGroup+SingleJetGroup), + ChainProp(name='HLT_j0_HT1000_L1HT190-jJ15s5pETA21', l1SeedThresholds=['FSNOSEED'], groups=SupportPhIGroup+SingleJetGroup), + ChainProp(name='HLT_j0_HT1000_pf_ftf_preselj180_L1jJ100', l1SeedThresholds=['FSNOSEED'], groups=PrimaryPhIGroup+SingleJetGroup), + ChainProp(name='HLT_j0_HT1000_pf_ftf_preselj180_L1HT190-jJ15s5pETA21', l1SeedThresholds=['FSNOSEED'], groups=PrimaryPhIGroup+SingleJetGroup), + + # Multijet delayed stream + ChainProp(name='HLT_6j35_pf_ftf_0eta240_020jvt_presel6c25_L14jJ15', l1SeedThresholds=['FSNOSEED'], stream=['VBFDelayed'], groups=PrimaryPhIGroup+MultiJetGroup), + ChainProp(name='HLT_6j45_pf_ftf_0eta240_020jvt_presel6c25_L14jJ15', l1SeedThresholds=['FSNOSEED'], stream=['VBFDelayed'], groups=PrimaryPhIGroup+MultiJetGroup), + + # TLA chains + ChainProp(name='HLT_j20_PhysicsTLA_L1jJ100', l1SeedThresholds=['FSNOSEED'], stream=['TLA'], groups=PrimaryPhIGroup+SingleJetGroup), + ChainProp(name='HLT_j20_PhysicsTLA_L1jJ50_DETA20-jJ50J', l1SeedThresholds=['FSNOSEED'], stream=['TLA'], groups=EOFTLAPhIGroup+SingleJetGroup), + ChainProp(name='HLT_j20_PhysicsTLA_L1HT190-jJ15s5pETA21', l1SeedThresholds=['FSNOSEED'], stream=['TLA'], groups=PrimaryPhIGroup+SingleJetGroup), + ChainProp(name='HLT_j70_0eta320_j50_0eta490_j0_DJMASS1000j50dphi200x400deta_L1jMJJ-500-NFF', l1SeedThresholds=['FSNOSEED']*3,stream=['VBFDelayed'],groups=PrimaryPhIGroup+MultiJetGroup), + ] chains['Bjet'] = [ @@ -377,7 +503,34 @@ def setupMenu(): ChainProp(name="HLT_j275_0eta290_020jvt_pf_ftf_bdl1r60_preselj225_L1J100", l1SeedThresholds=['FSNOSEED'], groups=PrimaryLegGroup+SingleBjetGroup), ChainProp(name="HLT_j300_0eta290_020jvt_pf_ftf_bdl1r70_preselj225_L1J100", l1SeedThresholds=['FSNOSEED'], groups=PrimaryLegGroup+SingleBjetGroup), ChainProp(name="HLT_j360_0eta290_020jvt_pf_ftf_bdl1r77_preselj225_L1J100", l1SeedThresholds=['FSNOSEED'], groups=PrimaryLegGroup+SingleBjetGroup), - + + ChainProp(name="HLT_j225_0eta290_pf_ftf_bdl1r70_preselj180_L1J100", l1SeedThresholds=['FSNOSEED'], groups=SingleBjetGroup + PrimaryLegGroup), + ChainProp(name="HLT_j225_0eta290_pf_ftf_bdl1r77_preselj180_L1J100", l1SeedThresholds=['FSNOSEED'], groups=SingleBjetGroup + PrimaryLegGroup), + ChainProp(name='HLT_j275_0eta290_pf_ftf_bdl1r85_preselj225_L1J100', l1SeedThresholds=['FSNOSEED'], groups=SingleBjetGroup + PrimaryLegGroup), + ChainProp(name='HLT_j300_0eta290_pf_ftf_bdl1r85_preselj225_L1J100', l1SeedThresholds=['FSNOSEED'], groups=SingleBjetGroup + PrimaryLegGroup), + + ChainProp(name="HLT_3j65_0eta290_020jvt_pf_ftf_bdl1r77_presel3j45_L13J35p0ETA23", l1SeedThresholds=['FSNOSEED'], groups=MultiBjetGroup + PrimaryLegGroup), + ChainProp(name="HLT_4j35_0eta290_020jvt_pf_ftf_bdl1r77_presel4j25_L14J15p0ETA25", l1SeedThresholds=['FSNOSEED'], groups=MultiBjetGroup + PrimaryLegGroup), + ChainProp(name="HLT_j150_0eta320_pf_ftf_2j55_0eta290_020jvt_pf_ftf_bdl1r70_preselj80XX2j45_L1J85_3J30", l1SeedThresholds=['FSNOSEED','FSNOSEED'], groups=PrimaryLegGroup+MultiBjetGroup), + ChainProp(name="HLT_3j35_0eta290_020jvt_pf_ftf_bdl1r70_j35_pf_ftf_0eta320_presel4j25_L14J15p0ETA25", l1SeedThresholds=['FSNOSEED','FSNOSEED'], groups=PrimaryLegGroup+MultiBjetGroup), + ChainProp(name="HLT_j175_0eta290_020jvt_pf_ftf_bdl1r60_j60_0eta290_020jvt_pf_ftf_bdl1r60_preselj140XXj45_L1J100", l1SeedThresholds=['FSNOSEED','FSNOSEED'], groups=PrimaryLegGroup+MultiBjetGroup), + ChainProp(name="HLT_2j35_0eta290_020jvt_pf_ftf_bdl1r70_2j35_0eta290_020jvt_pf_ftf_bdl1r85_presel4j25_L14J15p0ETA25", l1SeedThresholds=['FSNOSEED','FSNOSEED'], groups=PrimaryLegGroup+MultiBjetGroup), + ChainProp(name="HLT_2j55_0eta290_020jvt_pf_ftf_bdl1r60_2j55_pf_ftf_0eta320_presel4j25_L14J15p0ETA25", l1SeedThresholds=['FSNOSEED','FSNOSEED'], groups=PrimaryLegGroup+MultiBjetGroup), + ChainProp(name="HLT_2j35_0eta290_020jvt_pf_ftf_bdl1r60_3j35_pf_ftf_0eta320_presel5j25_L15J15p0ETA25", l1SeedThresholds=['FSNOSEED','FSNOSEED'], groups=PrimaryLegGroup+MultiBjetGroup), + ChainProp(name="HLT_2j45_0eta290_020jvt_pf_ftf_bdl1r60_3j45_pf_ftf_0eta320_presel5j25_L15J15p0ETA25", l1SeedThresholds=['FSNOSEED','FSNOSEED'], groups=PrimaryLegGroup+MultiBjetGroup), + ChainProp(name="HLT_j75_0eta290_020jvt_pf_ftf_bdl1r60_3j75_pf_ftf_presel4j50_L14J20", l1SeedThresholds=['FSNOSEED','FSNOSEED'], groups=PrimaryLegGroup+MultiBjetGroup), + ChainProp(name="HLT_2j45_0eta290_020jvt_pf_ftf_bdl1r60_2j45_pf_ftf_presel4j25_L14J15p0ETA25", l1SeedThresholds=['FSNOSEED','FSNOSEED'], groups=PrimaryLegGroup+MultiBjetGroup), + # Run 2 HH4b low-threshold chain + ChainProp(name="HLT_2j35_0eta240_020jvt_pf_ftf_bdl1r60_2j35_0eta240_020jvt_pf_ftf_presel4j25_L14J15p0ETA25", l1SeedThresholds=['FSNOSEED','FSNOSEED'], groups=PrimaryLegGroup+MultiBjetGroup), + + # HT-seeded + ChainProp(name='HLT_2j45_pf_ftf_bdl1r70_j0_pf_ftf_HT300_j0_pf_ftf_DJMASS700j35_L1HT150-J20s5pETA31_MJJ-400-CF', l1SeedThresholds=['FSNOSEED']*3, groups=PrimaryLegGroup+MultiBjetGroup), + + # VBF chains + ChainProp(name='HLT_j80_pf_ftf_0eta240_j60_pf_ftf_0eta320_j45_pf_ftf_320eta490_SHARED_2j45_pf_ftf_0eta290_bdl1r60_preselc60XXj45XXf40_L1J40p0ETA25_2J25_J20p31ETA49', l1SeedThresholds=['FSNOSEED']*4, groups=PrimaryLegGroup+MultiBjetGroup), + ChainProp(name="HLT_j80_pf_ftf_0eta320_bdl1r70_j60_pf_ftf_0eta320_bdl1r85_j45_pf_ftf_320eta490_preselj60XXj45XXf40_L1J40p0ETA25_2J25_J20p31ETA49", l1SeedThresholds=['FSNOSEED']*3,stream=[PhysicsStream], groups=PrimaryLegGroup+MultiBjetGroup), + ChainProp(name="HLT_j55_pf_ftf_0eta320_bdl1r70_2j45_pf_ftf_320eta490_preselj45XX2f40_L1J25p0ETA23_2J15p31ETA49",l1SeedThresholds=['FSNOSEED']*2, stream=[PhysicsStream], groups=PrimaryLegGroup+MultiBjetGroup), + ChainProp(name='HLT_j70_pf_ftf_0eta490_j50_pf_ftf_0eta490_2j35_pf_ftf_0eta490_SHARED_2j35_pf_ftf_0eta290_bdl1r70_j0_pf_ftf_presela60XXa40XX2a25_DJMASS1000j50_L1MJJ-500-NFF', l1SeedThresholds=['FSNOSEED']*5,stream=['VBFDelayed'], groups=PrimaryLegGroup+MultiBjetGroup), ChainProp(name='HLT_j30_0eta290_020jvt_pf_ftf_boffperf_L1J20', l1SeedThresholds=['FSNOSEED'], groups=SupportLegGroup+SingleBjetGroup), ChainProp(name='HLT_j45_0eta290_020jvt_pf_ftf_boffperf_L1J20', l1SeedThresholds=['FSNOSEED'], groups=SupportLegGroup+SingleBjetGroup), @@ -399,6 +552,71 @@ def setupMenu(): ChainProp(name='HLT_j80_pf_ftf_0eta240_020jvt_j55_pf_ftf_0eta240_020jvt_j28_pf_ftf_0eta240_020jvt_j20_pf_ftf_0eta240_020jvt_SHARED_2j20_pf_ftf_0eta240_020jvt_bdl1r77_preselc60XXc45XXc25XXc20_L1J45p0ETA21_3J15p0ETA25', l1SeedThresholds=['FSNOSEED']*5, stream=['VBFDelayed'], groups=PrimaryLegGroup+MultiBjetGroup), ChainProp(name='HLT_j75_pf_ftf_0eta240_020jvt_j50_pf_ftf_0eta240_020jvt_j35_pf_ftf_0eta240_020jvt_j25_pf_ftf_0eta240_020jvt_SHARED_2j25_pf_ftf_0eta240_020jvt_bdl1r77_preselc60XXc45XXc25XXc20_L1J45p0ETA21_3J15p0ETA25', l1SeedThresholds=['FSNOSEED']*5, stream=['VBFDelayed'], groups=SupportLegGroup+MultiBjetGroup), + # Candidates for allhad ttbar delayed stream + ChainProp(name='HLT_5j35_pf_ftf_0eta240_020jvt_j25_pf_ftf_0eta240_020jvt_bdl1r60_presel6c25_L14J15', l1SeedThresholds=['FSNOSEED']*2, stream=['VBFDelayed'], groups=PrimaryLegGroup+MultiBjetGroup), + ChainProp(name='HLT_5j45_pf_ftf_0eta240_020jvt_j25_pf_ftf_0eta240_020jvt_bdl1r60_presel6c25_L14J15', l1SeedThresholds=['FSNOSEED']*2, stream=['VBFDelayed'], groups=PrimaryLegGroup+MultiBjetGroup), + + # ATR-24411 Phase I inputs + # Primary single-jet + ChainProp(name="HLT_j275_0eta290_020jvt_pf_ftf_bdl1r60_preselj225_L1jJ100", l1SeedThresholds=['FSNOSEED'], groups=PrimaryPhIGroup+SingleBjetGroup), + ChainProp(name="HLT_j300_0eta290_020jvt_pf_ftf_bdl1r70_preselj225_L1jJ100", l1SeedThresholds=['FSNOSEED'], groups=PrimaryPhIGroup+SingleBjetGroup), + ChainProp(name="HLT_j360_0eta290_020jvt_pf_ftf_bdl1r77_preselj225_L1jJ100", l1SeedThresholds=['FSNOSEED'], groups=PrimaryPhIGroup+SingleBjetGroup), + + # More primary + ChainProp(name="HLT_j225_0eta290_pf_ftf_bdl1r70_preselj180_L1jJ100", l1SeedThresholds=['FSNOSEED'], groups=SingleBjetGroup + PrimaryPhIGroup), + ChainProp(name="HLT_j225_0eta290_pf_ftf_bdl1r77_preselj180_L1jJ100", l1SeedThresholds=['FSNOSEED'], groups=SingleBjetGroup + PrimaryPhIGroup), + ChainProp(name='HLT_j275_0eta290_pf_ftf_bdl1r85_preselj225_L1jJ100', l1SeedThresholds=['FSNOSEED'], groups=SingleBjetGroup + PrimaryPhIGroup), + ChainProp(name='HLT_j300_0eta290_pf_ftf_bdl1r85_preselj225_L1jJ100', l1SeedThresholds=['FSNOSEED'], groups=SingleBjetGroup + PrimaryPhIGroup), + + # Multi-b + ChainProp(name="HLT_3j65_0eta290_020jvt_pf_ftf_bdl1r77_presel3j45_L13jJ35p0ETA23", l1SeedThresholds=['FSNOSEED'], groups=MultiBjetGroup + PrimaryPhIGroup), + ChainProp(name="HLT_4j35_0eta290_020jvt_pf_ftf_bdl1r77_presel4j25_L14jJ15p0ETA25", l1SeedThresholds=['FSNOSEED'], groups=MultiBjetGroup + PrimaryPhIGroup), + ChainProp(name="HLT_j150_0eta320_pf_ftf_2j55_0eta290_020jvt_pf_ftf_bdl1r70_preselj80XX2j45_L1jJ85_3jJ30", l1SeedThresholds=['FSNOSEED','FSNOSEED'], groups=PrimaryPhIGroup+MultiBjetGroup), + ChainProp(name="HLT_3j35_0eta290_020jvt_pf_ftf_bdl1r70_j35_pf_ftf_0eta320_presel4j25_L14jJ15p0ETA25", l1SeedThresholds=['FSNOSEED','FSNOSEED'], groups=PrimaryPhIGroup+MultiBjetGroup), + ChainProp(name="HLT_j175_0eta290_020jvt_pf_ftf_bdl1r60_j60_0eta290_020jvt_pf_ftf_bdl1r60_preselj140XXj45_L1jJ100", l1SeedThresholds=['FSNOSEED','FSNOSEED'], groups=PrimaryPhIGroup+MultiBjetGroup), + ChainProp(name="HLT_2j35_0eta290_020jvt_pf_ftf_bdl1r70_2j35_0eta290_020jvt_pf_ftf_bdl1r85_presel4j25_L14jJ15p0ETA25", l1SeedThresholds=['FSNOSEED','FSNOSEED'], groups=PrimaryPhIGroup+MultiBjetGroup), + ChainProp(name="HLT_2j55_0eta290_020jvt_pf_ftf_bdl1r60_2j55_pf_ftf_0eta320_presel4j25_L14jJ15p0ETA25", l1SeedThresholds=['FSNOSEED','FSNOSEED'], groups=PrimaryPhIGroup+MultiBjetGroup), + ChainProp(name="HLT_2j35_0eta290_020jvt_pf_ftf_bdl1r60_3j35_pf_ftf_0eta320_presel5j25_L15jJ15p0ETA25", l1SeedThresholds=['FSNOSEED','FSNOSEED'], groups=PrimaryPhIGroup+MultiBjetGroup), + ChainProp(name="HLT_2j45_0eta290_020jvt_pf_ftf_bdl1r60_3j45_pf_ftf_0eta320_presel5j25_L15jJ15p0ETA25", l1SeedThresholds=['FSNOSEED','FSNOSEED'], groups=PrimaryPhIGroup+MultiBjetGroup), + ChainProp(name="HLT_j75_0eta290_020jvt_pf_ftf_bdl1r60_3j75_pf_ftf_presel4j50_L14jJ20", l1SeedThresholds=['FSNOSEED','FSNOSEED'], groups=PrimaryPhIGroup+MultiBjetGroup), + ChainProp(name="HLT_2j45_0eta290_020jvt_pf_ftf_bdl1r60_2j45_pf_ftf_presel4j25_L14jJ15p0ETA25", l1SeedThresholds=['FSNOSEED','FSNOSEED'], groups=PrimaryPhIGroup+MultiBjetGroup), + ChainProp(name="HLT_2j35_0eta240_020jvt_pf_ftf_bdl1r60_2j35_0eta240_020jvt_pf_ftf_presel4j25_L14jJ15p0ETA25", l1SeedThresholds=['FSNOSEED','FSNOSEED'], groups=PrimaryPhIGroup+MultiBjetGroup), + + + # HT-seeded + ChainProp(name='HLT_2j45_pf_ftf_bdl1r70_j0_pf_ftf_HT300_j0_pf_ftf_DJMASS700j35_L1jHT150-jJ20s5pETA31_jMJJ-400-CF', l1SeedThresholds=['FSNOSEED']*3, groups=PrimaryPhIGroup+MultiBjetGroup), + + # VBF chains + ChainProp(name='HLT_j80_pf_ftf_0eta240_j60_pf_ftf_0eta320_j45_pf_ftf_320eta490_SHARED_2j45_pf_ftf_0eta290_bdl1r60_preselc60XXj45XXf40_L1jJ40p0ETA25_2jJ25_jJ20p31ETA49', l1SeedThresholds=['FSNOSEED']*4, groups=PrimaryPhIGroup+MultiBjetGroup), + ChainProp(name="HLT_j80_pf_ftf_0eta320_bdl1r70_j60_pf_ftf_0eta320_bdl1r85_j45_pf_ftf_320eta490_preselj60XXj45XXf40_L1jJ40p0ETA25_2jJ25_jJ20p31ETA49", l1SeedThresholds=['FSNOSEED']*3,stream=[PhysicsStream], groups=PrimaryPhIGroup+MultiBjetGroup), + ChainProp(name="HLT_j55_pf_ftf_0eta320_bdl1r70_2j45_pf_ftf_320eta490_preselj45XX2f40_L1jJ25p0ETA23_2jJ15p31ETA49",l1SeedThresholds=['FSNOSEED']*2, stream=[PhysicsStream], groups=PrimaryPhIGroup+MultiBjetGroup), + ChainProp(name='HLT_j70_pf_ftf_0eta490_j50_pf_ftf_0eta490_2j35_pf_ftf_0eta490_SHARED_2j35_pf_ftf_0eta290_bdl1r70_j0_pf_ftf_presela60XXa40XX2a25_DJMASS1000j50_L1jMJJ-500-NFF', l1SeedThresholds=['FSNOSEED']*5,stream=['VBFDelayed'], groups=PrimaryPhIGroup+MultiBjetGroup), + + ChainProp(name='HLT_j30_0eta290_020jvt_pf_ftf_boffperf_L1jJ20', l1SeedThresholds=['FSNOSEED'], groups=SupportPhIGroup+SingleBjetGroup), + ChainProp(name='HLT_j45_0eta290_020jvt_pf_ftf_boffperf_L1jJ20', l1SeedThresholds=['FSNOSEED'], groups=SupportPhIGroup+SingleBjetGroup), + ChainProp(name='HLT_j60_0eta290_020jvt_pf_ftf_boffperf_L1jJ50', l1SeedThresholds=['FSNOSEED'], groups=SupportPhIGroup+SingleBjetGroup), + ChainProp(name='HLT_j80_0eta290_020jvt_pf_ftf_boffperf_L1jJ50', l1SeedThresholds=['FSNOSEED'], groups=SupportPhIGroup+SingleBjetGroup), + ChainProp(name='HLT_j100_0eta290_020jvt_pf_ftf_boffperf_preselj80_L1jJ50', l1SeedThresholds=['FSNOSEED'], groups=SupportPhIGroup+SingleBjetGroup), + ChainProp(name='HLT_j150_0eta290_020jvt_pf_ftf_boffperf_preselj120_L1jJ100', l1SeedThresholds=['FSNOSEED'], groups=SupportPhIGroup+SingleBjetGroup), + ChainProp(name='HLT_j200_0eta290_020jvt_pf_ftf_boffperf_preselj140_L1jJ100', l1SeedThresholds=['FSNOSEED'], groups=SupportPhIGroup+SingleBjetGroup), + ChainProp(name='HLT_j300_0eta290_020jvt_pf_ftf_boffperf_preselj225_L1jJ100', l1SeedThresholds=['FSNOSEED'], groups=SupportPhIGroup+SingleBjetGroup), + + # HH4b primary candidates with 2 sets of potential jet thresholds + # 3b85 symmetric b-jet pt for Physics_Main + ChainProp(name='HLT_j80_pf_ftf_0eta240_020jvt_j55_pf_ftf_0eta240_020jvt_j28_pf_ftf_0eta240_020jvt_j20_pf_ftf_0eta240_020jvt_SHARED_3j20_pf_ftf_0eta240_020jvt_bdl1r85_preselc60XXc45XXc25XXc20_L1jJ45p0ETA21_3jJ15p0ETA25', l1SeedThresholds=['FSNOSEED']*5, stream=[PhysicsStream], groups=PrimaryPhIGroup+MultiBjetGroup), + ChainProp(name='HLT_j75_pf_ftf_0eta240_020jvt_j50_pf_ftf_0eta240_020jvt_j35_pf_ftf_0eta240_020jvt_j25_pf_ftf_0eta240_020jvt_SHARED_3j25_pf_ftf_0eta240_020jvt_bdl1r85_preselc60XXc45XXc25XXc20_L1jJ45p0ETA21_3jJ15p0ETA25', l1SeedThresholds=['FSNOSEED']*5, stream=[PhysicsStream], groups=SupportPhIGroup+MultiBjetGroup), + # 2b60 asymmetric b-jet pt alternative for Physics_Main + ChainProp(name='HLT_j80_pf_ftf_0eta240_020jvt_j55_pf_ftf_0eta240_020jvt_j28_pf_ftf_0eta240_020jvt_j20_pf_ftf_0eta240_020jvt_SHARED_j28_pf_ftf_0eta240_020jvt_bdl1r60_j20_pf_ftf_0eta240_020jvt_bdl1r60_preselc60XXc45XXc25XXc20_L1jJ45p0ETA21_3jJ15p0ETA25', l1SeedThresholds=['FSNOSEED']*6, stream=['VBFDelayed'], groups=SupportPhIGroup+MultiBjetGroup), + ChainProp(name='HLT_j75_pf_ftf_0eta240_020jvt_j50_pf_ftf_0eta240_020jvt_j35_pf_ftf_0eta240_020jvt_j25_pf_ftf_0eta240_020jvt_SHARED_j35_pf_ftf_0eta240_020jvt_bdl1r60_j25_pf_ftf_0eta240_020jvt_bdl1r60_preselc60XXc45XXc25XXc20_L1jJ45p0ETA21_3jJ15p0ETA25', l1SeedThresholds=['FSNOSEED']*6, stream=['VBFDelayed'], groups=SupportPhIGroup+MultiBjetGroup), + # 2b77 symmetric b-jet pt for VBFDelayed + ChainProp(name='HLT_j80_pf_ftf_0eta240_020jvt_j55_pf_ftf_0eta240_020jvt_j28_pf_ftf_0eta240_020jvt_j20_pf_ftf_0eta240_020jvt_SHARED_2j20_pf_ftf_0eta240_020jvt_bdl1r77_preselc60XXc45XXc25XXc20_L1jJ45p0ETA21_3jJ15p0ETA25', l1SeedThresholds=['FSNOSEED']*5, stream=['VBFDelayed'], groups=PrimaryPhIGroup+MultiBjetGroup), + ChainProp(name='HLT_j75_pf_ftf_0eta240_020jvt_j50_pf_ftf_0eta240_020jvt_j35_pf_ftf_0eta240_020jvt_j25_pf_ftf_0eta240_020jvt_SHARED_2j25_pf_ftf_0eta240_020jvt_bdl1r77_preselc60XXc45XXc25XXc20_L1jJ45p0ETA21_3jJ15p0ETA25', l1SeedThresholds=['FSNOSEED']*5, stream=['VBFDelayed'], groups=SupportPhIGroup+MultiBjetGroup), + + # Candidates for allhad ttbar delayed stream + ChainProp(name='HLT_5j35_pf_ftf_0eta240_020jvt_j25_pf_ftf_0eta240_020jvt_bdl1r60_presel6c25_L14jJ15', l1SeedThresholds=['FSNOSEED']*2, stream=['VBFDelayed'], groups=PrimaryPhIGroup+MultiBjetGroup), + ChainProp(name='HLT_5j45_pf_ftf_0eta240_020jvt_j25_pf_ftf_0eta240_020jvt_bdl1r60_presel6c25_L14jJ15', l1SeedThresholds=['FSNOSEED']*2, stream=['VBFDelayed'], groups=PrimaryPhIGroup+MultiBjetGroup), + + ] chains['Tau'] = [ @@ -612,6 +830,24 @@ def setupMenu(): ChainProp(name='HLT_e26_lhtight_ivarloose_tau80_mediumRNN_tracktwoLLP_03dRAB_L1EM22VHI', l1SeedThresholds=['EM22VHI','TAU60'], stream=[PhysicsStream], groups=TagAndProbeLegGroup+SingleElectronGroup), ChainProp(name='HLT_e26_lhtight_ivarloose_tau180_mediumRNN_tracktwoLLP_03dRAB_L1EM22VHI', l1SeedThresholds=['EM22VHI','TAU100'], stream=[PhysicsStream], groups=TagAndProbeLegGroup+SingleElectronGroup), + # MET + tau tag and probe chains (ATR-23507) + ChainProp(name='HLT_tau20_mediumRNN_tracktwoMVA_probe_xe65_cell_xe90_pfopufit_L1XE50', l1SeedThresholds=['PROBETAU8','FSNOSEED','FSNOSEED'], groups=TagAndProbeLegGroup+TauMETGroup), + ChainProp(name='HLT_tau20_mediumRNN_tracktwoMVABDT_probe_xe65_cell_xe90_pfopufit_L1XE50', l1SeedThresholds=['PROBETAU8','FSNOSEED','FSNOSEED'], groups=TagAndProbeLegGroup+TauMETGroup), + ChainProp(name='HLT_tau25_mediumRNN_tracktwoMVA_probe_xe65_cell_xe90_pfopufit_L1XE50', l1SeedThresholds=['PROBETAU12IM','FSNOSEED','FSNOSEED'], groups=TagAndProbeLegGroup+TauMETGroup), + ChainProp(name='HLT_tau25_mediumRNN_tracktwoMVABDT_probe_xe65_cell_xe90_pfopufit_L1XE50', l1SeedThresholds=['PROBETAU12IM','FSNOSEED','FSNOSEED'], groups=TagAndProbeLegGroup+TauMETGroup), + ChainProp(name='HLT_tau35_mediumRNN_tracktwoMVA_probe_xe65_cell_xe90_pfopufit_L1XE50', l1SeedThresholds=['PROBETAU20IM','FSNOSEED','FSNOSEED'], groups=TagAndProbeLegGroup+TauMETGroup), + ChainProp(name='HLT_tau35_mediumRNN_tracktwoMVABDT_probe_xe65_cell_xe90_pfopufit_L1XE50', l1SeedThresholds=['PROBETAU20IM','FSNOSEED','FSNOSEED'], groups=TagAndProbeLegGroup+TauMETGroup), + ChainProp(name='HLT_tau40_mediumRNN_tracktwoMVA_probe_xe65_cell_xe90_pfopufit_L1XE50', l1SeedThresholds=['PROBETAU25IM','FSNOSEED','FSNOSEED'], groups=TagAndProbeLegGroup+TauMETGroup), + ChainProp(name='HLT_tau40_mediumRNN_tracktwoMVABDT_probe_xe65_cell_xe90_pfopufit_L1XE50', l1SeedThresholds=['PROBETAU25IM','FSNOSEED','FSNOSEED'], groups=TagAndProbeLegGroup+TauMETGroup), + ChainProp(name='HLT_tau60_mediumRNN_tracktwoMVA_probe_xe65_cell_xe90_pfopufit_L1XE50', l1SeedThresholds=['PROBETAU40','FSNOSEED','FSNOSEED'], groups=TagAndProbeLegGroup+TauMETGroup), + ChainProp(name='HLT_tau60_mediumRNN_tracktwoMVABDT_probe_xe65_cell_xe90_pfopufit_L1XE50', l1SeedThresholds=['PROBETAU40','FSNOSEED','FSNOSEED'], groups=TagAndProbeLegGroup+TauMETGroup), + ChainProp(name='HLT_tau80_mediumRNN_tracktwoMVA_probe_xe65_cell_xe90_pfopufit_L1XE50', l1SeedThresholds=['PROBETAU60','FSNOSEED','FSNOSEED'], groups=TagAndProbeLegGroup+TauMETGroup), + ChainProp(name='HLT_tau80_mediumRNN_tracktwoMVABDT_probe_xe65_cell_xe90_pfopufit_L1XE50', l1SeedThresholds=['PROBETAU60','FSNOSEED','FSNOSEED'], groups=TagAndProbeLegGroup+TauMETGroup), + ChainProp(name='HLT_tau160_mediumRNN_tracktwoMVA_probe_xe65_cell_xe90_pfopufit_L1XE50', l1SeedThresholds=['PROBETAU100','FSNOSEED','FSNOSEED'], groups=TagAndProbeLegGroup+TauMETGroup), + ChainProp(name='HLT_tau160_mediumRNN_tracktwoMVABDT_probe_xe65_cell_xe90_pfopufit_L1XE50', l1SeedThresholds=['PROBETAU100','FSNOSEED','FSNOSEED'], groups=TagAndProbeLegGroup+TauMETGroup), + ChainProp(name='HLT_tau60_mediumRNN_tracktwoLLP_probe_xe65_cell_xe90_pfopufit_L1XE50', l1SeedThresholds=['PROBETAU40','FSNOSEED','FSNOSEED'], groups=TagAndProbeLegGroup+TauMETGroup), + ChainProp(name='HLT_tau80_mediumRNN_tracktwoLLP_probe_xe65_cell_xe90_pfopufit_L1XE50', l1SeedThresholds=['PROBETAU60','FSNOSEED','FSNOSEED'], groups=TagAndProbeLegGroup+TauMETGroup), + ChainProp(name='HLT_tau180_mediumRNN_tracktwoLLP_probe_xe65_cell_xe90_pfopufit_L1XE50', l1SeedThresholds=['PROBETAU100','FSNOSEED','FSNOSEED'], groups=TagAndProbeLegGroup+TauMETGroup), # b-jet trigger calibration chains ChainProp(name='HLT_e26_lhtight_ivarloose_2j20_0eta290_020jvt_pf_ftf_boffperf_L1EM22VHI', l1SeedThresholds=['EM22VHI','FSNOSEED'], groups=TagAndProbeLegGroup+SingleElectronGroup), @@ -627,42 +863,142 @@ def setupMenu(): #Support ChainProp(name='HLT_xe80_tcpufit_unconvtrk100_isohpttrack_medium_iaggrmedium_L1XE50', l1SeedThresholds=['FSNOSEED']*2, stream=[PhysicsStream], groups=UnconvTrkGroup+SupportLegGroup), ChainProp(name='HLT_xe80_tcpufit_unconvtrk120_isohpttrack_medium_iaggrloose_L1XE50', l1SeedThresholds=['FSNOSEED']*2, stream=[PhysicsStream], groups=UnconvTrkGroup+SupportLegGroup), + + # SUSY + ChainProp(name='HLT_g45_loose_6j45_L14J15p0ETA25',l1SeedThresholds=['EM15','FSNOSEED'],stream=[PhysicsStream], groups=PrimaryLegGroup+EgammaJetGroup), + + # VBF triggers (ATR-22594) + ChainProp(name='HLT_2mu6_2j50_0eta490_j0_DJMASS900j50_L1MJJ-500-NFF',l1SeedThresholds=['MU5VF','FSNOSEED','FSNOSEED'],stream=['VBFDelayed'], groups=PrimaryLegGroup+MuonJetGroup), # Formerly HLT_2mu6_2j50_0eta490_invm900j50 + ChainProp(name='HLT_e5_lhvloose_j70_0eta320_j50_0eta490_j0_DJMASS1000j50_xe50_tcpufit_L1MJJ-500-NFF',l1SeedThresholds=['EM3','FSNOSEED','FSNOSEED','FSNOSEED','FSNOSEED'],stream=['VBFDelayed'], groups=PrimaryLegGroup+EgammaJetGroup), + ChainProp(name='HLT_2e5_lhmedium_j70_0eta320_j50_0eta490_j0_DJMASS900j50_L1MJJ-500-NFF',l1SeedThresholds=['EM3','FSNOSEED','FSNOSEED','FSNOSEED'],stream=['VBFDelayed'], groups=PrimaryLegGroup+EgammaJetGroup), + ChainProp(name='HLT_g25_medium_4j35_0eta490_j0_DJMASS1000j35_L1EM22VHI',l1SeedThresholds=['EM22VHI','FSNOSEED','FSNOSEED'],stream=[PhysicsStream], groups=PrimaryLegGroup+EgammaJetGroup), + ChainProp(name='HLT_e10_lhmedium_ivarloose_j70_0eta320_j50_0eta490_j0_DJMASS900j50_L1MJJ-500-NFF',l1SeedThresholds=['EM8VH','FSNOSEED','FSNOSEED','FSNOSEED'],stream=['VBFDelayed'], groups=PrimaryLegGroup+EgammaJetGroup), + ChainProp(name='HLT_mu4_j70_0eta320_j50_0eta490_j0_DJMASS1000j50_xe50_tcpufit_L1MJJ-500-NFF',l1SeedThresholds=['MU3V','FSNOSEED','FSNOSEED','FSNOSEED','FSNOSEED'],stream=['VBFDelayed'], groups=PrimaryLegGroup+MuonJetGroup), + ChainProp(name='HLT_mu10_ivarmedium_j70_0eta320_j50_0eta490_j0_DJMASS900j50_L1MJJ-500-NFF',l1SeedThresholds=['MU8F','FSNOSEED','FSNOSEED','FSNOSEED'],stream=['VBFDelayed'], groups=PrimaryLegGroup+MuonJetGroup), + ChainProp(name='HLT_j70_0eta320_j50_0eta490_j0_DJMASS1000j50dphi240_xe90_tcpufit_xe50_cell_L1MJJ-500-NFF',l1SeedThresholds=['FSNOSEED']*5,stream=['VBFDelayed'], groups=PrimaryLegGroup+JetMETGroup), + + # Photon+VBF + ChainProp(name='HLT_g20_tight_icaloloose_j35_pf_ftf_bdl1r77_3j35_pf_ftf_0eta490_j0_pf_ftf_DJMASS500j35_L1EM18VHI_MJJ-300',l1SeedThresholds=['EM18VHI','FSNOSEED','FSNOSEED','FSNOSEED'],stream=[PhysicsStream], groups=PrimaryLegGroup+EgammaBjetGroup), + + # LLP late stream + ChainProp(name='HLT_j55_0eta240_xe50_cell_L1J30_EMPTY', l1SeedThresholds=['FSNOSEED']*2, stream=['Late'], groups=PrimaryLegGroup+JetMETGroup), + ChainProp(name='HLT_j55_0eta240_xe50_cell_L1J30_FIRSTEMPTY', l1SeedThresholds=['FSNOSEED']*2, stream=['Late'], groups=PrimaryLegGroup+JetMETGroup), + + # AFP + dijet + ChainProp(name='HLT_2j120_mb_afprec_afpdijet_L1AFP_A_AND_C_TOF_J50', l1SeedThresholds=['FSNOSEED']*2, stream=[PhysicsStream],groups=MinBiasGroup+LowMuGroup+SupportLegGroup), + ChainProp(name='HLT_2j175_mb_afprec_afpdijet_L1AFP_A_AND_C_TOF_J75', l1SeedThresholds=['FSNOSEED']*2, stream=[PhysicsStream],groups=MinBiasGroup+LowMuGroup+SupportLegGroup), + + # Muon-in-jet + ChainProp(name='HLT_mu4_j20_0eta290_pf_ftf_boffperf_dRAB03_L1MU3V_J15', l1SeedThresholds=['MU3V','FSNOSEED'], groups=SingleBjetGroup), + + # Phase I inputs ATR-24411 + # SUSY + ChainProp(name='HLT_g45_loose_6j45_L14jJ15p0ETA25',l1SeedThresholds=['EM15','FSNOSEED'],stream=[PhysicsStream], groups=PrimaryPhIGroup+EgammaJetGroup), + + # VBF triggers (ATR-22594) + ChainProp(name='HLT_2mu6_2j50_0eta490_j0_DJMASS900j50_L1jMJJ-500-NFF',l1SeedThresholds=['MU5VF','FSNOSEED','FSNOSEED'],stream=['VBFDelayed'], groups=PrimaryPhIGroup+MuonJetGroup), # Formerly HLT_2mu6_2j50_0eta490_invm900j50 + ChainProp(name='HLT_e5_lhvloose_j70_0eta320_j50_0eta490_j0_DJMASS1000j50_xe50_tcpufit_L1jMJJ-500-NFF',l1SeedThresholds=['eEM3','FSNOSEED','FSNOSEED','FSNOSEED','FSNOSEED'],stream=['VBFDelayed'], groups=PrimaryPhIGroup+EgammaJetGroup), + ChainProp(name='HLT_2e5_lhmedium_j70_0eta320_j50_0eta490_j0_DJMASS900j50_L1jMJJ-500-NFF',l1SeedThresholds=['eEM3','FSNOSEED','FSNOSEED','FSNOSEED'],stream=['VBFDelayed'], groups=PrimaryPhIGroup+EgammaJetGroup), + ChainProp(name='HLT_g25_medium_4j35_0eta490_j0_DJMASS1000j35_L1eEM22M',l1SeedThresholds=['eEM22M','FSNOSEED','FSNOSEED'],stream=[PhysicsStream], groups=PrimaryPhIGroup+EgammaJetGroup), + ChainProp(name='HLT_e10_lhmedium_ivarloose_j70_0eta320_j50_0eta490_j0_DJMASS900j50_L1jMJJ-500-NFF',l1SeedThresholds=['EM8VH','FSNOSEED','FSNOSEED','FSNOSEED'],stream=['VBFDelayed'], groups=PrimaryPhIGroup+EgammaJetGroup), + ChainProp(name='HLT_mu4_j70_0eta320_j50_0eta490_j0_DJMASS1000j50_xe50_tcpufit_L1jMJJ-500-NFF',l1SeedThresholds=['MU3V','FSNOSEED','FSNOSEED','FSNOSEED','FSNOSEED'],stream=['VBFDelayed'], groups=PrimaryPhIGroup+MuonJetGroup), + ChainProp(name='HLT_mu10_ivarmedium_j70_0eta320_j50_0eta490_j0_DJMASS900j50_L1jMJJ-500-NFF',l1SeedThresholds=['MU8F','FSNOSEED','FSNOSEED','FSNOSEED'],stream=['VBFDelayed'], groups=PrimaryPhIGroup+MuonJetGroup), + ChainProp(name='HLT_j70_0eta320_j50_0eta490_j0_DJMASS1000j50dphi240_xe90_tcpufit_xe50_cell_L1jMJJ-500-NFF',l1SeedThresholds=['FSNOSEED']*5,stream=['VBFDelayed'], groups=PrimaryPhIGroup+JetMETGroup), + + # Photon+VBF + ChainProp(name='HLT_g20_tight_icaloloose_j35_pf_ftf_bdl1r77_3j35_pf_ftf_0eta490_j0_pf_ftf_DJMASS500j35_L1eEM18M_jMJJ-300-NFF',l1SeedThresholds=['eEM18M','FSNOSEED','FSNOSEED','FSNOSEED'],stream=[PhysicsStream], groups=PrimaryPhIGroup+EgammaBjetGroup), + + # LLP late stream + ChainProp(name='HLT_j55_0eta240_xe50_cell_L1jJ30_EMPTY', l1SeedThresholds=['FSNOSEED']*2, stream=['Late'], groups=PrimaryPhIGroup+JetMETGroup), + ChainProp(name='HLT_j55_0eta240_xe50_cell_L1jJ30_FIRSTEMPTY', l1SeedThresholds=['FSNOSEED']*2, stream=['Late'], groups=PrimaryPhIGroup+JetMETGroup), + + # AFP + dijet + ChainProp(name='HLT_2j120_mb_afprec_afpdijet_L1AFP_A_AND_C_TOF_jJ50', l1SeedThresholds=['FSNOSEED']*2, stream=[PhysicsStream],groups=MinBiasGroup+LowMuGroup+SupportPhIGroup), + ChainProp(name='HLT_2j175_mb_afprec_afpdijet_L1AFP_A_AND_C_TOF_jJ75', l1SeedThresholds=['FSNOSEED']*2, stream=[PhysicsStream],groups=MinBiasGroup+LowMuGroup+SupportPhIGroup), + + # Muon-in-jet + ChainProp(name='HLT_mu4_j20_0eta290_pf_ftf_boffperf_dRAB03_L1MU3V_jJ15', l1SeedThresholds=['MU3V','FSNOSEED'], groups=SingleBjetGroup+SupportPhIGroup), + ] chains['MinBias'] = [ - ChainProp(name='HLT_mb_sptrk_L1RD0_FILLED', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=LowMuGroup+MinBiasGroup), - ChainProp(name='HLT_mb_sptrk_L1MBTS_1', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=['PS:Online']+MinBiasGroup+LowMuGroup), - ChainProp(name='HLT_mb_sp_L1RD0_FILLED', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=LowMuGroup+MinBiasGroup), - ChainProp(name='HLT_mb_sp15_pusup0_trk5_hmt_L1RD0_FILLED', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=['PS:Online']+MinBiasGroup+LowMuGroup), - ChainProp(name='HLT_mb_sptrk_pt2_L1RD0_FILLED', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=['PS:Online']+MinBiasGroup+LowMuGroup), - ChainProp(name='HLT_mb_sptrk_pt2_L1MBTS_2', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=['PS:Online']+MinBiasGroup+LowMuGroup), - ChainProp(name='HLT_mb_sptrk_pt4_L1RD0_FILLED', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=['PS:Online']+MinBiasGroup+LowMuGroup), - ChainProp(name='HLT_mb_sptrk_pt4_L1MBTS_2', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=['PS:Online']+MinBiasGroup+LowMuGroup), - ChainProp(name='HLT_mb_sptrk_pt6_L1RD0_FILLED', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=['PS:Online']+MinBiasGroup+LowMuGroup), - ChainProp(name='HLT_mb_sptrk_pt6_L1MBTS_2', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=['PS:Online']+MinBiasGroup+LowMuGroup), - ChainProp(name='HLT_mb_sptrk_pt8_L1RD0_FILLED', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=['PS:Online']+MinBiasGroup+LowMuGroup), - ChainProp(name='HLT_mb_sptrk_pt8_L1MBTS_2', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=['PS:Online']+MinBiasGroup+LowMuGroup), - ChainProp(name='HLT_mb_sptrk_pt2_L1AFP_A_OR_C', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=['PS:Online']+MinBiasGroup+LowMuGroup), - ChainProp(name='HLT_mb_sptrk_pt4_L1AFP_A_OR_C', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=['PS:Online']+MinBiasGroup+LowMuGroup), - ChainProp(name='HLT_mb_sptrk_pt6_L1AFP_A_OR_C', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=['PS:Online']+MinBiasGroup+LowMuGroup), - ChainProp(name='HLT_mb_sptrk_pt8_L1AFP_A_OR_C', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=['PS:Online']+MinBiasGroup+LowMuGroup), - ChainProp(name='HLT_mb_sptrk_pt2_L1AFP_A_AND_C', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=['PS:Online']+MinBiasGroup+LowMuGroup), - ChainProp(name='HLT_mb_sptrk_pt4_L1AFP_A_AND_C', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=['PS:Online']+MinBiasGroup+LowMuGroup), - ChainProp(name='HLT_mb_sptrk_pt6_L1AFP_A_AND_C', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=['PS:Online']+MinBiasGroup+LowMuGroup), - ChainProp(name='HLT_mb_sptrk_pt8_L1AFP_A_AND_C', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=['PS:Online']+MinBiasGroup+LowMuGroup), + ChainProp(name='HLT_mb_sptrk_L1RD0_FILLED', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=LowMuGroup+MinBiasGroup), + ChainProp(name='HLT_mb_sptrk_L1MBTS_1', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup+LowMuGroup), + ChainProp(name='HLT_mb_sp_L1RD0_FILLED', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=LowMuGroup+MinBiasGroup), + ChainProp(name='HLT_mb_sp15_pusup0_trk5_hmt_L1RD0_FILLED', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup+LowMuGroup), + ChainProp(name='HLT_mb_sptrk_pt2_L1RD0_FILLED', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup+LowMuGroup), + ChainProp(name='HLT_mb_sptrk_pt2_L1MBTS_2', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup+LowMuGroup), + ChainProp(name='HLT_mb_sptrk_pt4_L1RD0_FILLED', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup+LowMuGroup), + ChainProp(name='HLT_mb_sptrk_pt4_L1MBTS_2', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup+LowMuGroup), + ChainProp(name='HLT_mb_sptrk_pt6_L1RD0_FILLED', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup+LowMuGroup), + ChainProp(name='HLT_mb_sptrk_pt6_L1MBTS_2', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup+LowMuGroup), + ChainProp(name='HLT_mb_sptrk_pt8_L1RD0_FILLED', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup+LowMuGroup), + ChainProp(name='HLT_mb_sptrk_pt8_L1MBTS_2', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup+LowMuGroup), + ChainProp(name='HLT_mb_sptrk_pt2_L1AFP_A_OR_C', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup+LowMuGroup), + ChainProp(name='HLT_mb_sptrk_pt4_L1AFP_A_OR_C', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup+LowMuGroup), + ChainProp(name='HLT_mb_sptrk_pt6_L1AFP_A_OR_C', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup+LowMuGroup), + ChainProp(name='HLT_mb_sptrk_pt8_L1AFP_A_OR_C', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup+LowMuGroup), + ChainProp(name='HLT_mb_sptrk_pt2_L1AFP_A_AND_C', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup+LowMuGroup), + ChainProp(name='HLT_mb_sptrk_pt4_L1AFP_A_AND_C', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup+LowMuGroup), + ChainProp(name='HLT_mb_sptrk_pt6_L1AFP_A_AND_C', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup+LowMuGroup), + ChainProp(name='HLT_mb_sptrk_pt8_L1AFP_A_AND_C', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=['PS:Online']+MinBiasGroup+LowMuGroup), ChainProp(name='HLT_mb_alfaperf_L1RD0_FILLED', l1SeedThresholds=['FSNOSEED'], stream=['DISCARD'], groups=['PS:Online']+LowMuGroup+MinBiasGroup), ChainProp(name='HLT_mb_alfaperf_L1RD0_EMPTY', l1SeedThresholds=['FSNOSEED'], stream=['DISCARD'], groups=['PS:Online']+LowMuGroup+MinBiasGroup), - ChainProp(name="HLT_mb_mbts_L1MBTS_1_EMPTY", l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=MinBiasGroup+LowMuGroup), - ChainProp(name="HLT_mb_mbts_L1MBTS_1", l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=MinBiasGroup+LowMuGroup), - ChainProp(name="HLT_mb_mbts_L1MBTS_1_1", l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=MinBiasGroup+LowMuGroup), - ChainProp(name="HLT_mb_mbts_L1MBTS_2", l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=MinBiasGroup+LowMuGroup), - ChainProp(name="HLT_mb_mbts_L1RD0_FILLED", l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=MinBiasGroup+LowMuGroup), - ChainProp(name="HLT_mb_mbts_L1RD0_EMPTY", l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=MinBiasGroup+LowMuGroup), + ChainProp(name="HLT_mb_mbts_L1MBTS_1_EMPTY", l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=MinBiasGroup+LowMuGroup), + ChainProp(name="HLT_mb_mbts_L1MBTS_1", l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=MinBiasGroup+LowMuGroup), + ChainProp(name="HLT_mb_mbts_L1MBTS_1_1", l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=MinBiasGroup+LowMuGroup), + ChainProp(name="HLT_mb_mbts_L1MBTS_2", l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=MinBiasGroup+LowMuGroup), + ChainProp(name="HLT_mb_mbts_L1RD0_FILLED", l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=MinBiasGroup+LowMuGroup), + ChainProp(name="HLT_mb_mbts_L1RD0_EMPTY", l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=MinBiasGroup+LowMuGroup), + + # AFP + ChainProp(name='HLT_mb_afprec_L1AFP_A_AND_C_TOF_J20', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=['PS:Online']+MinBiasGroup+LowMuGroup), + ChainProp(name='HLT_mb_afprec_L1AFP_A_AND_C_TOF_T0T1_J20', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=['PS:Online']+MinBiasGroup+LowMuGroup), + ChainProp(name='HLT_mb_afprec_L1AFP_A_AND_C_TOF_J30', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=['PS:Online']+MinBiasGroup+LowMuGroup), + ChainProp(name='HLT_mb_afprec_L1AFP_A_AND_C_TOF_T0T1_J30', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=['PS:Online']+MinBiasGroup+LowMuGroup), + ChainProp(name='HLT_mb_afprec_L1AFP_A_AND_C_TOF_J50', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=['PS:Online']+MinBiasGroup+LowMuGroup), + ChainProp(name='HLT_mb_afprec_L1AFP_A_AND_C_TOF_T0T1_J50', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=['PS:Online']+MinBiasGroup+LowMuGroup), + ChainProp(name='HLT_mb_afprec_L1AFP_A_AND_C_TOF_J75', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=['PS:Online']+MinBiasGroup+LowMuGroup), + ChainProp(name='HLT_mb_afprec_L1AFP_A_AND_C_TOF_T0T1_J75', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=['PS:Online']+MinBiasGroup+LowMuGroup), + + # Phase I jet inputs ATR-24411 + # AFP + ChainProp(name='HLT_mb_afprec_L1AFP_A_AND_C_TOF_jJ20', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=['PS:Online']+MinBiasGroup+LowMuGroup), + ChainProp(name='HLT_mb_afprec_L1AFP_A_AND_C_TOF_T0T1_jJ20', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=['PS:Online']+MinBiasGroup+LowMuGroup), + ChainProp(name='HLT_mb_afprec_L1AFP_A_AND_C_TOF_jJ30', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=['PS:Online']+MinBiasGroup+LowMuGroup), + ChainProp(name='HLT_mb_afprec_L1AFP_A_AND_C_TOF_T0T1_jJ30', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=['PS:Online']+MinBiasGroup+LowMuGroup), + ChainProp(name='HLT_mb_afprec_L1AFP_A_AND_C_TOF_jJ50', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=['PS:Online']+MinBiasGroup+LowMuGroup), + ChainProp(name='HLT_mb_afprec_L1AFP_A_AND_C_TOF_T0T1_jJ50', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=['PS:Online']+MinBiasGroup+LowMuGroup), + ChainProp(name='HLT_mb_afprec_L1AFP_A_AND_C_TOF_jJ75', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=['PS:Online']+MinBiasGroup+LowMuGroup), + ChainProp(name='HLT_mb_afprec_L1AFP_A_AND_C_TOF_T0T1_jJ75', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=['PS:Online']+MinBiasGroup+LowMuGroup), + ] chains['Monitor'] = [ ChainProp(name='HLT_noalg_CostMonDS_L1All', l1SeedThresholds=['FSNOSEED'], stream=['CostMonitoring'], groups=['Primary:CostAndRate', 'RATE:Monitoring', 'BW:Other']), # HLT_costmonitor ] + chains['Calib'] += [ + + ChainProp(name='HLT_larpsall_L1J15', l1SeedThresholds=['J15'], stream=['CosmicCalo'],groups=['RATE:Calibration','BW:Detector']), + + # Phase I jet inputs ATR-24411, seed needs to be checked + #ChainProp(name='HLT_larpsall_L1jJ15', l1SeedThresholds=['jJ15'], stream=['CosmicCalo'],groups=['RATE:Calibration','BW:Detector']), + + ] + + chains['UnconventionalTracking'] += [ + + # hit-based DV + ChainProp(name='HLT_unconvtrk260_hitdv_tight_L1J100', groups=PrimaryLegGroup+UnconvTrkGroup, l1SeedThresholds=['FSNOSEED']), + ChainProp(name='HLT_unconvtrk260_hitdv_medium_L1J100', groups=PrimaryLegGroup+UnconvTrkGroup, l1SeedThresholds=['FSNOSEED']), + + # Phase I jet inputs ATR-24411 + # hit-based DV + ChainProp(name='HLT_unconvtrk260_hitdv_tight_L1jJ100', groups=PrimaryPhIGroup+UnconvTrkGroup, l1SeedThresholds=['FSNOSEED']), + ChainProp(name='HLT_unconvtrk260_hitdv_medium_L1jJ100', groups=PrimaryPhIGroup+UnconvTrkGroup, l1SeedThresholds=['FSNOSEED']), + + ] + chains['Streaming'] += [ ChainProp(name='HLT_noalg_L1J400', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=PrimaryLegGroup+JetStreamersGroup+['BW:Other']), # catch all high-Et ChainProp(name='HLT_noalg_L1XE300', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=PrimaryLegGroup+METStreamersGroup), @@ -671,6 +1007,10 @@ def setupMenu(): ChainProp(name='HLT_noalg_L1XE40', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=SupportLegGroup+METStreamersGroup), ChainProp(name='HLT_noalg_L1XE45', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=SupportLegGroup+METStreamersGroup), ChainProp(name='HLT_noalg_L1XE50', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=SupportLegGroup+METStreamersGroup), + + # Phase I jet inputs ATR-24411 + ChainProp(name='HLT_noalg_L1jJ400', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=PrimaryPhIGroup+JetStreamersGroup+['BW:Other']), # catch all high-Et + ] return chains diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/SignatureDicts.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/SignatureDicts.py index 63e5ae3bd77b619a1430d51e95cfba606bbd008a..0bd6f87d800498b23c4ea74c8444624a83ea92ae 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/SignatureDicts.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/SignatureDicts.py @@ -381,10 +381,19 @@ MuonChainParts_Default = { #========================================================== AllowedTopos_Bphysics = [ 'bJpsimumu','bJpsi','bJpsimutrk','bUpsimumu','bUpsi','bBmumu','bDimu','bDimu2700','bDimu6000','bPhi','bTau','b3mu', - 'Lxy0','noos','nocut', - 'bBmumux','BpmumuKp','BcmumuPi','BsmumuPhi','BdmumuKst','LbPqKm', 'BcmumuDsloose', 'BcmumuDploose', - 'b0dRAB12vtx20' + 'bBmumux','b0dRAB12vtx20', + + ##### TO BE REMOVED ONCE IMPLEMENTED IN SIGNATURE CODE + # topoVariants + 'BsmumuPhi', 'BpmumuKp','BcmumuPi','BdmumuKst','LbPqKm', 'BcmumuDsloose', 'BcmumuDploose', + # topoExtras + 'Lxy0', 'noos','nocut' + #########Remove until here############ + ] +AllowedTopos_Bphysics_topoVariant=['BsmumuPhi', 'BpmumuKp','BcmumuPi','BdmumuKst','LbPqKm', 'BcmumuDsloose', 'BcmumuDploose'] +AllowedTopos_Bphysics_topoExtra=['Lxy0', 'noos','nocut'] +AllAllowedTopos_Bphysics = AllowedTopos_Bphysics_topoVariant+AllowedTopos_Bphysics_topoExtra+AllowedTopos_Bphysics # ---- Bphysics Dictionary of all allowed Values ---- BphysicsChainParts = deepcopy(MuonChainParts) diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonChainConfiguration.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonChainConfiguration.py index 04cd94e5560a911edb34d2199f02a388523a2282..3353f2fa817f42086075cd0c27f42052c23d2cd6 100755 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonChainConfiguration.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonChainConfiguration.py @@ -70,9 +70,9 @@ def muEFLateRoISequenceCfg(flags,is_probe_leg=False): def muEFLateSequenceCfg(flags,is_probe_leg=False): return efLateMuSequence() -def TLAMuonMenuSequenceCfg(flags, is_probe_leg=False): +def TLAMuonMenuSequenceCfg(flags): muonsIn = "HLT_Muons_RoI" - return TLAMuonMenuSequence(flags, muonsIn, is_probe_leg=is_probe_leg) + return TLAMuonMenuSequence(flags, muonsIn) ############################################# ### Class/function to configure muon chains @@ -105,7 +105,7 @@ class MuonChainConfiguration(ChainConfigurationBase): if self.dict["eventBuildType"] == "PhysicsTLA" : log.debug('Adding muon trigger step getTLAMu') step='getTLAMu' - TLAStep = getattr(self, step)(is_probe_leg=is_probe_leg) + TLAStep = getattr(self, step)() chainSteps+= [TLAStep] myChain = self.buildChain(chainSteps) @@ -253,7 +253,7 @@ class MuonChainConfiguration(ChainConfigurationBase): #-------------------- - def getTLAMu(self,is_probe_leg=False): # No T&P support, add if needed - return self.getStep(5,'muonTLA',[TLAMuonMenuSequenceCfg], is_probe_leg=is_probe_leg) + def getTLAMu(self): # No T&P support, add if needed + return self.getStep(5,'muonTLA',[TLAMuonMenuSequenceCfg]) diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/TLAMuonSequence.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/TLAMuonSequence.py index 49e9c1c604cc6586479d7f02a9ed3fe511567e46..c1a5b9f448a09ac434eaf745fd40cdd165e7dbf3 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/TLAMuonSequence.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/TLAMuonSequence.py @@ -10,24 +10,24 @@ def TLAMuonSequence (flags, muons): ## add the InputMaker (event context) tlaMuonInputMakerAlg = CompFactory.InputMakerForRoI("IMTLAMuons", RoIsLink="initialRoI") tlaMuonInputMakerAlg.mergeUsingFeature = True + tlaMuonInputMakerAlg.RoITool = CompFactory.ViewCreatorPreviousROITool() tlaMuonAthSequence = seqAND( "TLAMuonAthSequence", [tlaMuonInputMakerAlg] ) sequenceOut = muons+"_TLA" return (tlaMuonAthSequence, tlaMuonInputMakerAlg, sequenceOut) -def TLAMuonMenuSequence( flags, muonsIn, is_probe_leg): +def TLAMuonMenuSequence( flags, muonsIn): # retrieve the sequence via RecoFragmentsPool (tlaMuonAthSequence, tlaMuonInputMakerAlg, sequenceOut) = RecoFragmentsPool.retrieve(TLAMuonSequence, flags, muons=muonsIn) # add the hypo from TrigMuonHypo.TrigMuonHypoConf import TrigMuonTLAHypoAlg from TrigMuonHypo.TrigMuonHypoConfig import TrigMuonEFMSonlyHypoToolFromDict hypo = TrigMuonTLAHypoAlg("TrigMuonTLAHypoAlg") #+muonsIn) - + hypo.TLAMuons=sequenceOut return MenuSequence( Sequence = tlaMuonAthSequence, Maker = tlaMuonInputMakerAlg, Hypo = hypo, - HypoToolGen = TrigMuonEFMSonlyHypoToolFromDict, - IsProbe = is_probe_leg + HypoToolGen = TrigMuonEFMSonlyHypoToolFromDict ) diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Base/CTP.py b/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Base/CTP.py index c9a9a49acc850287dd696426566c59025cc8cbeb..dec1d2257f65aab560bba96b734e4a8907b6238e 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Base/CTP.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Base/CTP.py @@ -25,7 +25,7 @@ class CTP(object): def addBunchGroup(self, name, internalNumber, bunches): self.bunchGroupSet.addBunchGroup(name, internalNumber, bunches) - def setupMonitoring(self, menuItems, menuThresholds, connectors): + def setupMonitoring(self, menuName, menuItems, menuThresholds, connectors): ## # add the CTPIN counters ## for counter in MonitorDef.ctpinCounters( menuThresholds ): ## self.counters.addCounter( counter ) @@ -39,7 +39,7 @@ class CTP(object): self.counters.addCounter( counter ) # mark the L1 Items that they should be monitored - MonitorDef.applyItemCounter( menuItems ) + MonitorDef.applyItemCounter( menuName, menuItems ) pass def checkConnectorAvailability(self, availableConnectors, menuToLoad): diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Base/L1Menu.py b/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Base/L1Menu.py index 01f01c8cb829e462e38222496b498f6598eb5266..71db315a4466c3b7f0c50a9be0e91b8dead8597c 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Base/L1Menu.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Base/L1Menu.py @@ -5,7 +5,7 @@ from .Items import MenuItemsCollection from .Thresholds import MenuThresholdsCollection from .TopoAlgorithms import MenuTopoAlgorithmsCollection from .Boards import MenuBoardsCollection -from .Connectors import MenuConnectorsCollection +from .Connectors import MenuConnectorsCollection, CType from .MenuUtils import get_smk_psk_Name from .Limits import Limits from .L1MenuFlags import L1MenuFlags @@ -82,7 +82,7 @@ class L1Menu(object): def setupCTPMonitoring(self): - self.ctp.setupMonitoring(self.items, self.thresholds, self.connectors) + self.ctp.setupMonitoring(self.menuName, self.items, self.thresholds, self.connectors) def check(self): log.info("Doing L1 Menu checks") @@ -104,15 +104,15 @@ class L1Menu(object): if len(allThresholds)-len(allUsedThresholds)>0: unusedThresholds = allThresholds.difference(allUsedThresholds) - log.info("The following thresholds are unused") - log.info("MU: %s", ", ".join([thr for thr in unusedThresholds if thr.startswith("MU")])) - log.info("EM: %s", ", ".join([thr for thr in unusedThresholds if thr.startswith("EM")])) - log.info("HA: %s", ", ".join([thr for thr in unusedThresholds if thr.startswith("HA")])) - log.info("J: %s", ", ".join([thr for thr in unusedThresholds if thr.startswith("J")])) - log.info("eFEX: %s", ", ".join([thr for thr in unusedThresholds if thr.startswith("e")])) - log.info("jFEX: %s", ", ".join([thr for thr in unusedThresholds if thr.startswith("j")])) - log.info("cTAU: %s", ", ".join([thr for thr in unusedThresholds if thr.startswith("cTAU")])) - log.info("gFEX: %s", ", ".join([thr for thr in unusedThresholds if thr.startswith("g")])) + log.debug("The following thresholds are unused") + log.debug("MU: %s", ", ".join([thr for thr in unusedThresholds if thr.startswith("MU")])) + log.debug("EM: %s", ", ".join([thr for thr in unusedThresholds if thr.startswith("EM")])) + log.debug("HA: %s", ", ".join([thr for thr in unusedThresholds if thr.startswith("HA")])) + log.debug("J: %s", ", ".join([thr for thr in unusedThresholds if thr.startswith("J")])) + log.debug("eFEX: %s", ", ".join([thr for thr in unusedThresholds if thr.startswith("e")])) + log.debug("jFEX: %s", ", ".join([thr for thr in unusedThresholds if thr.startswith("j")])) + log.debug("cTAU: %s", ", ".join([thr for thr in unusedThresholds if thr.startswith("cTAU")])) + log.debug("gFEX: %s", ", ".join([thr for thr in unusedThresholds if thr.startswith("g")])) def checkLegacyThresholds(self): from collections import defaultdict as dd @@ -120,7 +120,9 @@ class L1Menu(object): extraThresholds = dd(list) for item in self.items: for thrName in item.thresholdNames(): - if thrName[0] not in ('e','j','g', 'c') and not any(x in thrName for x in ["TOPO", "MU", "MBTS", "ZB", "ALFA", "ZDC", "AFP", "BCM"]): + if thrName[:3]=='ZB_': + thrName = thrName[3:] + if thrName[0] not in ('e','j','g', 'c') and thrName[:2] not in ["MU"] and "TOPO" not in thrName[:4]: if thrName not in legacyThresholds: extraThresholds[thrName].append(item.name) @@ -166,3 +168,88 @@ class L1Menu(object): raise RuntimeError("Algorithm %s in board %s with input %s not allowed" % (algo.name, boardName, algoInput )) + def checkCountCTPInputsOutput(self): + from collections import namedtuple + ctpInput = namedtuple('ctpInput',"name, conn, nbit") + ctpInputs = [] + ctpOutputs = [] + thrNames = [] + ctpInputBitSets = dict() + ctpInputNameSets = dict() + for item in self.items: + ctpOutputs.append(item.name) + for thrName in item.thresholdNames(): + if thrName[:3]=='ZB_': + thrName = thrName[3:] + if thrName not in thrNames: + thrNames.append(thrName) + for key,clist in self.ctp.counters.counters.items(): + if key == 'ctpin': + continue + for c in clist: + thrName = c.name[1:] + if thrName[:3]=='ZB_': + thrName = thrName[3:] + if thrName not in thrNames: + thrNames.append(thrName) + for thrName in thrNames: + for conn in self.connectors: + if conn.ctype != CType.ELEC: + for tl in conn.triggerLines: + if thrName == tl.name: + ctpInputs.append(ctpInput(name=thrName,conn=conn.name,nbit=tl.nbits)) + else: + for fpga in conn.triggerLines: + for clock in conn.triggerLines[fpga]: + for tl in conn.triggerLines[fpga][clock]: + if thrName == tl.name: + ctpInputs.append(ctpInput(name=thrName,conn=conn.name,nbit=tl.nbits)) + + if len(thrNames) != len(ctpInputs): + raise RuntimeError("Not all input thresholds found!") + + for ctpIn in ctpInputs: + thrset = None + thrName = ctpIn.name + if thrName[:2] in ['EM','HA','XE','TE','XS']: + thrset = 'legacyCalo' + elif thrName[:1]=='J': + thrset = 'legacyCalo' + elif thrName[:2]=='MU': + thrset = 'muon' + elif thrName[:3] in ['ALF', 'MBT','AFP','BCM','CAL','NIM','ZDC','BPT','LUC']: + thrset = 'detector' + elif thrName[:6]=='R2TOPO': + thrset = 'legacyTopo' + elif thrName[:1] in ['e','j','c','g']: + thrset = 'topo1' + elif thrName[:4]=='TOPO': + if 'Topo2' in ctpIn.conn: + thrset = 'topo2' + elif 'Topo3' in ctpIn.conn: + thrset = 'topo3' + + if thrset not in ctpInputBitSets: + ctpInputBitSets[thrset] = 0 + ctpInputNameSets[thrset] = [] + if thrName not in ctpInputNameSets[thrset]: + ctpInputNameSets[thrset].append(thrName) + ctpInputBitSets[thrset] += ctpIn.nbit + + totalInputs = 0 + log.info("Check total number of CTP input and output bits:") + log.info("Number of output bits: %i", len(ctpOutputs) ) + for thrset in ctpInputBitSets: + log.info("%s: %i thresholds and %i bits", thrset, len(ctpInputNameSets[thrset]), ctpInputBitSets[thrset] ) + if thrset is not None: + log.debug("Threshold set %s: %s", thrset, ",".join(ctpInputNameSets[thrset]) ) + else: + log.info("Unrecognised CTP input bits: %s", ",".join(ctpInputNameSets[thrset]) ) + totalInputs += ctpInputBitSets[thrset] + log.info("Number of inputs bits: %i" , totalInputs ) + + # Fail menu generation for menus going to P1: + if ( totalInputs > 512 or len(ctpOutputs) > 512 ): + if L1MenuFlags.ApplyCTPLimits(): + raise RuntimeError("Both the numbers of inputs and outputs need to be not greater than 512 in a physics menu!") + diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Base/L1MenuFlags.py b/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Base/L1MenuFlags.py index 981ed530f425013ac5362702410771ccd1b62246..429b3c1f00a4a0772b028b4d5699d98d8a8ae72e 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Base/L1MenuFlags.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Base/L1MenuFlags.py @@ -49,6 +49,7 @@ class L1MenuFlagsCont(object): "CtpIdMap" : FlagArgs( dict, dict() ), "ThresholdMap" : FlagArgs( dict, dict() ), "ItemMap" : FlagArgs( dict, dict() ), + "ApplyCTPLimits" : FlagArgs( bool, True ), } def __setattr__(self, attr, value): diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Base/Thresholds.py b/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Base/Thresholds.py index 965aafa955ca7be20e5dd0191c4cc07665972431..8b44fa19b49e5509838032d9b83e2aeedb3aa9d5 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Base/Thresholds.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Base/Thresholds.py @@ -336,7 +336,8 @@ class eEMThreshold (Threshold): thrv = ThresholdValue(self.ttype, value, etamin = p['etamin'], etamax=p['etamax'], phimin=p['phimin'], phimax=p['phimax'], priority = p['priority'], name = self.name+'full') - + if len(self.thresholdValues): + raise RuntimeError("Threshold %s of type %s cannot have multiple Et cuts" % ( self.name, self.ttype ) ) self.thresholdValues.append(thrv) return self @@ -356,6 +357,74 @@ class eEMThreshold (Threshold): confObj["thrValues"].append( tvco ) return confObj +class eEMVarThreshold (Threshold): + + def __init__(self, name, ttype = 'eEM', mapping = -1): + super(eEMVarThreshold,self).__init__(name = name, ttype = ttype, mapping = mapping, run = 3 if ttype=='eEM' else 2) + mres = re.match("(?P<type>[A-z]*)[0-9]*(?P<suffix>[VHILMT]*)",name).groupdict() + self.suffix = mres["suffix"] + self.rhad = "None" + self.reta = "None" + self.wstot = "None" + + def isV(self): + return 'V' in self.suffix + + def isI(self): + return 'I' in self.suffix + + def isL(self): + return 'L' in self.suffix + + def isM(self): + return 'M' in self.suffix + + def setIsolation(self, rhad = "None", reta = "None", wstot = "None"): + allowed = [ "None", "Loose", "Medium", "Tight" ] + if rhad not in allowed: + raise RuntimeError("Threshold %s of type %s: isolation wp %s not allowed for rhad, must be one of %s", self.name, self.ttype, rhad, ', '.join(allowed) ) + if reta not in allowed: + raise RuntimeError("Threshold %s of type %s: isolation wp %s not allowed for reta, must be one of %s", self.name, self.ttype, reta, ', '.join(allowed) ) + if wstot not in allowed: + raise RuntimeError("Threshold %s of type %s: isolation wp %s not allowed for wstot, must be one of %s", self.name, self.ttype, wstot, ', '.join(allowed) ) + self.rhad = rhad + self.reta = reta + self.wstot = wstot + return self + + def addThrValue(self, value, *args, **kwargs): + # supporting both EM and TAU + defargs = ThresholdValue.getDefaults(self.ttype.name) + posargs = dict(zip(['etamin', 'etamax', 'phimin', 'phimax', 'priority'], args)) + + # then we evaluate the arguments: first defaults, then positional arguments, then named arguments + p = deepcopy(defargs) + p.update(posargs) + p.update(kwargs) + + thrv = ThresholdValue(self.ttype, value, + etamin = p['etamin'], etamax=p['etamax'], phimin=p['phimin'], phimax=p['phimax'], + priority = p['priority'], name = self.name+'full') + + self.thresholdValues.append(thrv) + return self + + def json(self): + confObj = odict() + confObj["mapping"] = self.mapping + confObj["rhad"] = self.rhad + confObj["reta"] = self.reta + confObj["wstot"] = self.wstot + confObj["thrValues"] = [] + for thrV in self.thresholdValues: + tvco = odict() + tvco["value"] = thrV.value + tvco["etamin"] = thrV.etamin + tvco["etamax"] = thrV.etamax + tvco["priority"] = thrV.priority + confObj["thrValues"].append( tvco ) + return confObj + class jEMThreshold (Threshold): @@ -405,7 +474,8 @@ class jEMThreshold (Threshold): thrv = ThresholdValue(self.ttype, value, etamin = p['etamin'], etamax=p['etamax'], phimin=p['phimin'], phimax=p['phimax'], priority = p['priority'], name = self.name+'full') - + if len(self.thresholdValues): + raise RuntimeError("Threshold %s of type %s cannot have multiple Et cuts" % ( self.name, self.ttype ) ) self.thresholdValues.append(thrv) return self @@ -576,7 +646,8 @@ class eTauThreshold( Threshold ): thrv = ThresholdValue(self.ttype, value, etamin = p['etamin'], etamax=p['etamax'], phimin=p['phimin'], phimax=p['phimax'], priority = p['priority'], name = self.name+'full') - + if len(self.thresholdValues): + raise RuntimeError("Threshold %s of type %s cannot have multiple Et cuts" % ( self.name, self.ttype ) ) self.thresholdValues.append(thrv) return self @@ -644,7 +715,8 @@ class jTauThreshold( Threshold ): thrv = ThresholdValue(self.ttype, value, etamin = p['etamin'], etamax=p['etamax'], phimin=p['phimin'], phimax=p['phimax'], priority = p['priority'], name = self.name+'full') - + if len(self.thresholdValues): + raise RuntimeError("Threshold %s of type %s cannot have multiple Et cuts" % ( self.name, self.ttype ) ) self.thresholdValues.append(thrv) return self @@ -707,7 +779,8 @@ class cTauThreshold( Threshold ): thrv = ThresholdValue(self.ttype, value, etamin = p['etamin'], etamax=p['etamax'], phimin=p['phimin'], phimax=p['phimax'], priority = p['priority'], name = self.name+'full') - + if len(self.thresholdValues): + raise RuntimeError("Threshold %s of type %s cannot have multiple Et cuts" % ( self.name, self.ttype ) ) self.thresholdValues.append(thrv) return self diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Config/ItemDef.py b/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Config/ItemDef.py index 05a5a993e37f9a2d37f0687d64d37f138f7438c4..a75c9036cb7bd108f76f0ff8ece66cd1b183d4a4 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Config/ItemDef.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Config/ItemDef.py @@ -68,7 +68,6 @@ class ItemDef: unpaired_isocond = d.BGRP0 & d.BGRP4 # unpaired isolated (satellite bunches) unpaired_nonisocond = d.BGRP0 & d.BGRP5 # unpaired non-isolated (parasitic bunches) firstempty = d.BGRP0 & d.BGRP6 - unpairedRcond = d.BGRP0 & d.BGRP7 # unpaired beams 1 or beam 2 bgrp7cond = d.BGRP0 & d.BGRP7 # No unpaired anymore bgrp9cond = d.BGRP0 & d.BGRP9 bgrp11cond = d.BGRP0 & d.BGRP11 @@ -117,20 +116,23 @@ class ItemDef: # Phase-I MenuItem('L1_eEM3' ).setLogic( d.eEM3 & physcond).setTriggerType( TT.calo ) MenuItem('L1_eEM5' ).setLogic( d.eEM5 & physcond).setTriggerType( TT.calo ) - MenuItem('L1_eEM8' ).setLogic( d.eEM8 & physcond).setTriggerType( TT.calo ) + MenuItem('L1_eEM7' ).setLogic( d.eEM7 & physcond).setTriggerType( TT.calo ) MenuItem('L1_eEM8L' ).setLogic( d.eEM8L & physcond).setTriggerType( TT.calo ) - MenuItem('L1_eEM8M' ).setLogic( d.eEM8M & physcond).setTriggerType( TT.calo ) MenuItem('L1_eEM10L' ).setLogic( d.eEM10L & physcond).setTriggerType( TT.calo ) + MenuItem('L1_eEM12' ).setLogic( d.eEM12 & physcond).setTriggerType( TT.calo ) MenuItem('L1_eEM15' ).setLogic( d.eEM15 & physcond).setTriggerType( TT.calo ) MenuItem('L1_eEM15L' ).setLogic( d.eEM15L & physcond).setTriggerType( TT.calo ) MenuItem('L1_eEM15M' ).setLogic( d.eEM15M & physcond).setTriggerType( TT.calo ) MenuItem('L1_eEM18M' ).setLogic( d.eEM18M & physcond).setTriggerType( TT.calo ) - MenuItem('L1_eEM20' ).setLogic( d.eEM20 & physcond).setTriggerType( TT.calo ) MenuItem('L1_eEM20L' ).setLogic( d.eEM20L & physcond).setTriggerType( TT.calo ) + MenuItem('L1_eEM20VM' ).setLogic( d.eEM20VM & physcond).setTriggerType( TT.calo ) MenuItem('L1_eEM22' ).setLogic( d.eEM22 & physcond).setTriggerType( TT.calo ) MenuItem('L1_eEM22L' ).setLogic( d.eEM22L & physcond).setTriggerType( TT.calo ) MenuItem('L1_eEM22M' ).setLogic( d.eEM22M & physcond).setTriggerType( TT.calo ) MenuItem('L1_eEM22T' ).setLogic( d.eEM22T & physcond).setTriggerType( TT.calo ) + MenuItem('L1_eEM24M' ).setLogic( d.eEM24M & physcond).setTriggerType( TT.calo ) + MenuItem('L1_eEM7_EMPTY' ).setLogic(d.eEM7 & cosmiccond ).setTriggerType( TT.calo ) + MenuItem('L1_eEM7_UNPAIRED_ISO' ).setLogic(d.eEM7 & unpaired_isocond).setTriggerType( TT.calo ) # 2xEM, 3xEM MenuItem('L1_2EM3' ).setLogic( d.EM3.x(2) & physcond).setTriggerType( TT.calo ) @@ -151,6 +153,7 @@ class ItemDef: MenuItem('L1_EM20VH_2EM10VH_3EM8VH' ).setLogic( d.EM20VH & d.EM10VH.x(2) & d.EM8VH.x(3) & physcond).setTriggerType( TT.calo ) # PhaseI 2xEM and 3xEM + MenuItem('L1_2eEM15L').setLogic(d.eEM15L.x(2) & physcond).setTriggerType(TT.calo) MenuItem('L1_2eEM15M').setLogic(d.eEM15M.x(2) & physcond).setTriggerType(TT.calo) MenuItem('L1_2eEM20L').setLogic(d.eEM20L.x(2) & physcond).setTriggerType(TT.calo) MenuItem('L1_3eEM10L').setLogic(d.eEM10L.x(3) & physcond).setTriggerType(TT.calo) @@ -257,7 +260,7 @@ class ItemDef: MenuItem('L1_MU15VFCH' ).setLogic( d.MU15VFCH & physcond).setTriggerType(TT.muon) # MenuItem('L1_MU10BOM' ).setLogic( d.MU10BOM & physcond).setTriggerType(TT.muon) # Barrel-only close-by muons - MenuItem('L1_MU20FC' ).setLogic( d.MU20FC & physcond).setTriggerType(TT.muon) # alignment with toroid off + MenuItem('L1_MU20VFC' ).setLogic( d.MU20VFC & physcond).setTriggerType(TT.muon) # alignment with toroid off MenuItem('L1_MU10BO' ).setLogic( d.MU10BO & physcond).setTriggerType(TT.muon) MenuItem('L1_MU4BOM' ).setLogic( d.MU4BOM & physcond).setTriggerType(TT.muon) # Barrel-only close-by muons @@ -331,6 +334,8 @@ class ItemDef: MenuItem('L1_EM3_MU14FCH' ).setLogic( d.EM3 & d.MU14FCH & physcond).setTriggerType(TT.muon) MenuItem('L1_2EM8VH_MU8F' ).setLogic( d.EM8VH.x(2) & d.MU8F & physcond).setTriggerType(TT.muon) MenuItem('L1_EM15VH_2EM8VH_MU5VF').setLogic( d.EM15VH & d.EM8VH.x(2) & d.MU5VF & physcond).setTriggerType(TT.muon) + MenuItem('L1_2eEM8L_MU8F' ).setLogic( d.eEM8L.x(2) & d.MU8F & physcond).setTriggerType(TT.muon) + MenuItem('L1_eEM15L_MU8F' ).setLogic( d.eEM15L & d.MU8F & physcond).setTriggerType(TT.muon) # TAU ctpid=[0x40:0x4f] MenuItem('L1_TAU2' ).setLogic( d.HA2 & physcond).setTriggerType( TT.calo ) @@ -387,7 +392,8 @@ class ItemDef: MenuItem('L1_eTAU12L' ).setLogic( d.eTAU12L & physcond).setTriggerType( TT.calo ) MenuItem('L1_eTAU12M' ).setLogic( d.eTAU12M & physcond).setTriggerType( TT.calo ) MenuItem('L1_jTAU12' ).setLogic( d.jTAU12 & physcond).setTriggerType( TT.calo ) - MenuItem('L1_jTAU12M' ).setLogic( d.jTAU12M & physcond).setTriggerType( TT.calo ) + MenuItem('L1_jTAU20' ).setLogic( d.jTAU20 & physcond).setTriggerType( TT.calo ) + MenuItem('L1_jTAU20M' ).setLogic( d.jTAU20M & physcond).setTriggerType( TT.calo ) MenuItem('L1_cTAU12M' ).setLogic( d.cTAU12M & physcond).setTriggerType( TT.calo ) MenuItem('L1_eTAU20' ).setLogic( d.eTAU20 & physcond).setTriggerType( TT.calo ) MenuItem('L1_cTAU20M' ).setLogic( d.cTAU20M & physcond).setTriggerType( TT.calo ) @@ -554,6 +560,7 @@ class ItemDef: MenuItem('L1_4jJ15' ).setLogic( d.jJ15.x(4) & physcond).setTriggerType(TT.calo) MenuItem('L1_4jJ15p0ETA25' ).setLogic( d.jJ150ETA25.x(4) & physcond).setTriggerType(TT.calo) + MenuItem('L1_5jJ15p0ETA25' ).setLogic( d.jJ150ETA25.x(5) & physcond).setTriggerType(TT.calo) MenuItem('L1_4jJ20' ).setLogic( d.jJ20.x(4) & physcond).setTriggerType(TT.calo) MenuItem('L1_3jJ50' ).setLogic( d.jJ50.x(3) & physcond).setTriggerType(TT.calo) MenuItem('L1_3jJ35p0ETA23' ).setLogic( d.jJ350ETA23.x(3) & physcond).setTriggerType(TT.calo) @@ -574,7 +581,6 @@ class ItemDef: MenuItem('L1_jEM15' ).setLogic( d.jEM15 & physcond).setTriggerType(TT.calo) MenuItem('L1_jEM15M' ).setLogic( d.jEM15M & physcond).setTriggerType(TT.calo) - MenuItem('L1_jEM18M' ).setLogic( d.jEM18M & physcond).setTriggerType(TT.calo) MenuItem('L1_J10p31ETA49').setLogic( d.J1031ETA49 & physcond).setTriggerType(TT.calo) MenuItem('L1_J75p31ETA49').setLogic( d.J7531ETA49 & physcond).setTriggerType(TT.calo) @@ -601,7 +607,6 @@ class ItemDef: MenuItem('L1_J30p31ETA49_BGRP12').setLogic( d.J3031ETA49 & bgrp12cond ).setTriggerType(TT.calo) MenuItem('L1_J30_EMPTY' ).setLogic( d.J30 & cosmiccond ).setTriggerType(TT.calo) - MenuItem('L1_J30_UNPAIRED' ).setLogic( d.J30 & unpairedRcond ).setTriggerType(TT.calo) MenuItem('L1_J30_FIRSTEMPTY').setLogic( d.J30 & firstempty ).setTriggerType(TT.calo) MenuItem('L1_J10p31ETA49_EMPTY').setLogic( d.J1031ETA49 & cosmiccond ).setTriggerType(TT.calo) @@ -1309,6 +1314,8 @@ class ItemDef: MenuItem('L1_MU5VF_AFP_A_AND_C').setLogic( AFP_A & AFP_C & d.MU5VF & physcond ) MenuItem('L1_EM7_AFP_A_OR_C').setLogic( (AFP_A | AFP_C) & d.EM7 & physcond ) MenuItem('L1_EM7_AFP_A_AND_C').setLogic( AFP_A & AFP_C & d.EM7 & physcond ) + MenuItem('L1_eEM7_AFP_A_OR_C').setLogic( (AFP_A | AFP_C) & d.eEM7 & physcond ) + MenuItem('L1_eEM7_AFP_A_AND_C').setLogic( AFP_A & AFP_C & d.eEM7 & physcond ) MenuItem('L1_AFP_A_AND_C_MBTS_2').setLogic( AFP_A & AFP_C & MBTS_2 & physcond ) MenuItem('L1_AFP_A_OR_C_MBTS_2').setLogic( (AFP_A | AFP_C) & MBTS_2 & physcond ) @@ -1616,7 +1623,7 @@ class ItemDef: MenuItem('L1_DPHI-2eEM3_VTE5p24ETA49').setLogic( d.TOPO_27DPHI32_eEMs1_eEMs6 & Not(d.TE524ETA49) & physcond).setTriggerType(TT.calo) MenuItem('L1_DPHI-2eEM3_VTE5p24ETA49_ALFA_EINE').setLogic( d.TOPO_27DPHI32_eEMs1_eEMs6 & Not(d.TE524ETA49) & ALFA_EINE & physcond).setTriggerType(TT.alfa) MenuItem('L1_DPHI-2eEM3_VTE10').setLogic( d.TOPO_27DPHI32_eEMs1_eEMs6 & Not(d.TE10) & physcond).setTriggerType(TT.calo) - MenuItem('L1_DPHI-2eEM8_VTE50').setLogic( d.eEM8.x(2) & d.TOPO_27DPHI32_eEMs1_eEMs6 & Not(d.TE50) & physcond).setTriggerType(TT.calo) + MenuItem('L1_DPHI-2eEM7_VTE50').setLogic( d.eEM7.x(2) & d.TOPO_27DPHI32_eEMs1_eEMs6 & Not(d.TE50) & physcond).setTriggerType(TT.calo) MenuItem('L1_BTAG-MU3VjJ15').setLogic( d.TOPO_0DR04_MU3Vab_CjJ15ab & physcond) MenuItem('L1_BTAG-MU5VFjJ20').setLogic( d.TOPO_0DR04_MU5VFab_CjJ20ab & physcond) MenuItem('L1_BPH-8M15-2MU3V-BO' ).setLogic( d.TOPO_8INVM15_2CMU3Vab & physcond) # 96% for Upsi diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Config/MonitorDef.py b/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Config/MonitorDef.py index 37953fa65361bfb0008525e90706932204798b5d..a64f44dd0c212ae86bd6bf7cef5c7c230abe568c 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Config/MonitorDef.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Config/MonitorDef.py @@ -75,11 +75,13 @@ class MonitorDef: cThr = {} cThr[1] = [ 'AFP_NSA', 'AFP_NSC', 'AFP_FSA', 'AFP_FSC', 'AFP_FSA_TOF_T0', 'AFP_FSC_TOF_T0', 'AFP_FSA_TOF_T1', 'AFP_FSC_TOF_T1', 'AFP_FSA_TOF_T2', 'AFP_FSC_TOF_T2', 'AFP_FSA_TOF_T3', 'AFP_FSC_TOF_T3', - 'BPTX0', 'BPTX1', 'LUCID_C', 'J20', 'MU3V', 'TE50', 'XE35', 'XE60', - 'MBTS_A0', 'MBTS_A1', 'MBTS_A2', 'MBTS_A3', 'MBTS_A4', 'MBTS_A5', 'MBTS_A6', 'MBTS_A7', - 'MBTS_A8', 'MBTS_A9', 'MBTS_A10', 'MBTS_A11', 'MBTS_A12', 'MBTS_A13', 'MBTS_A14', 'MBTS_A15', - 'MBTS_C0', 'MBTS_C1', 'MBTS_C2', 'MBTS_C3', 'MBTS_C4', 'MBTS_C5', 'MBTS_C6', 'MBTS_C7', - 'MBTS_C8', 'MBTS_C9', 'MBTS_C10', 'MBTS_C11', 'MBTS_C12', 'MBTS_C13', 'MBTS_C14', 'MBTS_C15' ] + 'BPTX0', 'BPTX1', 'LUCID_C', 'J20', 'MU3V', 'TE50', 'XE35', 'XE50', + 'MBTS_A', 'MBTS_C', + #'MBTS_A0', 'MBTS_A1', 'MBTS_A2', 'MBTS_A3', 'MBTS_A4', 'MBTS_A5', 'MBTS_A6', 'MBTS_A7', + #'MBTS_A8', 'MBTS_A9', 'MBTS_A10', 'MBTS_A11', 'MBTS_A12', 'MBTS_A13', 'MBTS_A14', 'MBTS_A15', + #'MBTS_C0', 'MBTS_C1', 'MBTS_C2', 'MBTS_C3', 'MBTS_C4', 'MBTS_C5', 'MBTS_C6', 'MBTS_C7', + #'MBTS_C8', 'MBTS_C9', 'MBTS_C10', 'MBTS_C11', 'MBTS_C12', 'MBTS_C13', 'MBTS_C14', 'MBTS_C15' + ] for mult in cThr: for thrName in cThr[mult]: @@ -90,7 +92,7 @@ class MonitorDef: @staticmethod - def applyItemCounter( items ): + def applyItemCounter( menuName, items ): """ this functions marks the items that should be monitored by setting the corresponding monitoring flags e.g. to "LF:000|HF:111" for high frequency monitoring of TBP, TAP, and TAV. @@ -104,27 +106,43 @@ class MonitorDef: monItemsHF = { 1 :[], 2: [], 3: [], 4: [], 5: [], 6: [], 7: [] } # definitions hardcoded at the moment - monItems[TBP] = [ - "L1_ALFA_B7L1U", "L1_ALFA_B7L1L", "L1_ALFA_A7L1U", "L1_ALFA_A7L1L", "L1_ALFA_A7R1U", "L1_ALFA_A7R1L", "L1_ALFA_B7R1U", "L1_ALFA_B7R1L" - ] - - - monItems[TBP|TAP|TAV] = [ - "L1_EM3","L1_EM20VH","L1_EM22VHI", "L1_EM24VHI", - "L1_MU8F","L1_MU8VF","L1_MU14FCH", "L1_MU14FCHR", - "L1_TAU12IM", "L1_TAU20IM", "L1_TAU40", "L1_TAU100", - "L1_J100", "L1_J75p31ETA49", "L1_4J15p0ETA25", "L1_J30p31ETA49", - "L1_XE35", "L1_XE60", - "L1_MBTS_4_A", "L1_MBTS_4_C", "L1_MBTS_1_A", "L1_MBTS_1_C", "L1_MBTS_1", "L1_MBTS_2", "L1_MBTS_1_1", - "L1_ALFA_ANY", "L1_ALFA_B7L1U", "L1_ALFA_B7L1L", "L1_ALFA_A7L1U", "L1_ALFA_A7L1L", "L1_ALFA_A7R1U", "L1_ALFA_A7R1L", "L1_ALFA_B7R1U", "L1_ALFA_B7R1L", - "L1_ZDC_A", "L1_ZDC_C", "L1_ZDC_AND", - "L1_BPTX0_BGRP0","L1_BPTX1_BGRP0", - "L1_CALREQ2", - "L1_TGC_BURST", - "L1_EM20VH_3J20", "L1_EM15VH_MU8F", "L1_EM15VHI_2TAU12IM", "L1_EM15VHI_2TAU12IM_J25_3J12", "L1_EM15VHI_2TAU12IM_XE35", - "L1_MU8VF_2MU5VF", "L1_MU8F_TAU12IM", "L1_MU8F_TAU12IM_J25_2J12", "L1_MU8F_TAU12IM_XE35", - "L1_MU8F_2J15_J20", "L1_MU14FCH_XE30", "L1_J40_XE50", "L1_J25p0ETA23_2J15p31ETA49", "L1_J45p0ETA21_3J15p0ETA25", "L1_MU14FCH_J40", - ] +# monItems[TBP] = [ +# "L1_ALFA_B7L1U", "L1_ALFA_B7L1L", "L1_ALFA_A7L1U", "L1_ALFA_A7L1L", "L1_ALFA_A7R1U", "L1_ALFA_A7R1L", "L1_ALFA_B7R1U", "L1_ALFA_B7R1L" +# ] + + if 'HI' not in menuName: + monItems[TBP|TAP|TAV] = [ + "L1_EM3","L1_EM20VH","L1_EM22VHI", "L1_EM24VHI", + "L1_MU8F","L1_MU8VF","L1_MU14FCH", "L1_MU14FCHR", + "L1_TAU12IM", "L1_TAU20IM", "L1_TAU40", "L1_TAU100", + "L1_J100", "L1_J75p31ETA49", "L1_4J15p0ETA25", "L1_J30p31ETA49", + "L1_XE35", "L1_XE50", + #"L1_MBTS_4_A", "L1_MBTS_4_C", "L1_MBTS_1_A", "L1_MBTS_1_C", "L1_MBTS_1", "L1_MBTS_2", "L1_MBTS_1_1", + #"L1_ALFA_ANY", "L1_ALFA_B7L1U", "L1_ALFA_B7L1L", "L1_ALFA_A7L1U", "L1_ALFA_A7L1L", "L1_ALFA_A7R1U", "L1_ALFA_A7R1L", "L1_ALFA_B7R1U", "L1_ALFA_B7R1L", + "L1_ZDC_A", "L1_ZDC_C", "L1_ZDC_AND", + #"L1_BPTX0_BGRP0","L1_BPTX1_BGRP0", + "L1_CALREQ2", + "L1_TGC_BURST", + "L1_EM20VH_3J20", "L1_EM15VH_MU8F", "L1_EM15VHI_2TAU12IM", "L1_EM15VHI_2TAU12IM_J25_3J12", "L1_EM15VHI_2TAU12IM_XE35", + "L1_MU8VF_2MU5VF", "L1_MU8F_TAU12IM", "L1_MU8F_TAU12IM_J25_2J12", "L1_MU8F_TAU12IM_XE35", + "L1_MU8F_2J15_J20", "L1_MU14FCH_XE30", "L1_J40_XE50", "L1_J25p0ETA23_2J15p31ETA49", "L1_J45p0ETA21_3J15p0ETA25", "L1_MU14FCH_J40", + ] + else: + monItems[TBP|TAP|TAV] = [ + "L1_EM3","L1_EM20VH","L1_EM22VHI", "L1_EM24VHI", + "L1_MU8F","L1_MU8VF","L1_MU14FCH", "L1_MU14FCHR", + "L1_J100", "L1_J75p31ETA49", "L1_4J15p0ETA25", "L1_J30p31ETA49", + "L1_XE35", "L1_XE50", + #"L1_MBTS_4_A", "L1_MBTS_4_C", "L1_MBTS_1_A", "L1_MBTS_1_C", "L1_MBTS_1", "L1_MBTS_2", "L1_MBTS_1_1", + #"L1_ALFA_ANY", "L1_ALFA_B7L1U", "L1_ALFA_B7L1L", "L1_ALFA_A7L1U", "L1_ALFA_A7L1L", "L1_ALFA_A7R1U", "L1_ALFA_A7R1L", "L1_ALFA_B7R1U", "L1_ALFA_B7R1L", + #"L1_ZDC_A", "L1_ZDC_C", "L1_ZDC_AND", + #"L1_BPTX0_BGRP0","L1_BPTX1_BGRP0", + "L1_CALREQ2", + "L1_TGC_BURST", + "L1_EM20VH_3J20", "L1_EM15VH_MU8F", + "L1_MU8VF_2MU5VF", + "L1_MU8F_2J15_J20", "L1_MU14FCH_XE30", "L1_J40_XE50", "L1_J25p0ETA23_2J15p31ETA49", "L1_J45p0ETA21_3J15p0ETA25", "L1_MU14FCH_J40", + ] monItemsHF[TBP|TAP|TAV] = [ "L1_BCM_Wide_BGRP0", @@ -173,10 +191,8 @@ class MonitorDef: log.warning(" TAV: %i",counts_HF[TAV]) log.warning(" required LUTs: %i",lutsHF) log.warning(" this menu requires %i monitoring LUTs while only 8 are available", (lutsLF + lutsHF)) - - - #MonitorDef.checkForNonExistingMonItems(items, monItems) + MonitorDef.checkForNonExistingMonItems(items, monItems) # for each item set the monitor flags for item in items: @@ -216,4 +232,4 @@ class MonitorDef: nonExistiginMonItems += [monItem] if len(nonExistiginMonItems)>0: - raise RuntimeError("These monitoring items are part of the menu: %s" % ','.join(nonExistiginMonItems)) + raise RuntimeError("These monitoring items are not part of the menu: %s" % ','.join(nonExistiginMonItems)) diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Config/ThresholdDef.py b/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Config/ThresholdDef.py index 572fd709fa351c7ca62212fffba90fc9ac801c09..57f3dcb003d0254c82fa332436deea8fc5b615db 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Config/ThresholdDef.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Config/ThresholdDef.py @@ -1,6 +1,6 @@ # Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration -from ..Base.Thresholds import MuonThreshold, eEMThreshold, jEMThreshold, eTauThreshold, jTauThreshold, cTauThreshold, jJetThreshold, jLJetThreshold, gJetThreshold, gLJetThreshold, XEThreshold, TEThreshold, MBTSThreshold, MBTSSIThreshold, NimThreshold +from ..Base.Thresholds import MuonThreshold, eEMThreshold, eEMVarThreshold, jEMThreshold, eTauThreshold, jTauThreshold, cTauThreshold, jJetThreshold, jLJetThreshold, gJetThreshold, gLJetThreshold, XEThreshold, TEThreshold, MBTSThreshold, MBTSSIThreshold, NimThreshold class ThresholdDef: @@ -97,7 +97,7 @@ class ThresholdDef: # Late muon: MuonThreshold( "MU8FH" ).setThrValue( thr=8 ).setTGCFlags("F & H") # for late muon # Alignment: - MuonThreshold( "MU20FC" ).setThrValue( thr=20, ba=14 ).setTGCFlags("F & C") # alignment with toroid off + MuonThreshold( "MU20VFC" ).setThrValue( thr=20, ba=14 ).setTGCFlags("F & C") # alignment with toroid off # Commissioning: MuonThreshold( "MU12FCH" ).setThrValue( thr=12 ).setTGCFlags("F & C & H") # commissioning MuonThreshold( "MU4BOM" ).setThrValue( thr=4 ).setRPCFlags("M").setRegion("BA") # multiple close-by muons, barrel-only, commissioning @@ -108,9 +108,8 @@ class ThresholdDef: MuonThreshold( "MU3EOF" ).setThrValue( thr=3, ba=4 ).setTGCFlags("F").setRegion("EC,FW") # forward muon, commissioning # eEM - for thrV in [3, 5, 8, 15, 20, 22]: + for thrV in [3, 5, 7, 12, 15, 22]: eEMThreshold('eEM%i' % thrV, 'eEM').addThrValue(thrV) - #ThresholdDef.addVaryingThrValues( eEMThreshold( 'eEM%i'% thrV, 'eEM'), pt = thrV, shift_set = 1 ) # eEM SPARES for thrV in range(1,9): @@ -119,24 +118,29 @@ class ThresholdDef: # L section (used to be VH in Run2) for thrV in [8,10,15,20,22]: eEMThreshold('eEM%iL' % thrV, 'eEM').addThrValue(thrV).setIsolation( reta = "Loose", wstot = "Loose", rhad = "Loose" ) - #ThresholdDef.addVaryingThrValues( eEMThreshold( 'eEM%iL' % thrV, 'eEM').setIsolation( reta = "Loose", wstot = "Loose", rhad = "Loose" ), pt = thrV, shift_set = 1 ) # M section (used to be VHI in Run2) - for thrV in [8,15,18,22]: + for thrV in [8,15,18,22,24]: eEMThreshold('eEM%iM' % thrV, 'eEM').addThrValue(thrV).setIsolation( reta = "Medium", wstot = "Medium", rhad = "Medium" ) - #ThresholdDef.addVaryingThrValues( eEMThreshold( 'eEM%iM' % thrV, 'eEM').setIsolation( reta = "Medium", wstot = "Medium", rhad = "Medium" ), pt = thrV, shift_set = 1 ) # T section (used to be VHIM in Run2) for thrV in [22]: eEMThreshold('eEM%iT' % thrV, 'eEM').addThrValue(thrV).setIsolation( reta = "Tight", wstot = "Tight", rhad = "Tight" ) #ThresholdDef.addVaryingThrValues( eEMThreshold( 'eEM%iT' % thrV, 'eEM').setIsolation( reta = "Tight", wstot = "Tight", rhad = "Tight" ), pt= thrV, shift_set = 1 ) + # eEM with eta-dependent Et cuts + for thrV in [20]: + ThresholdDef.addVaryingThrValues( eEMVarThreshold( 'eEM%iVM' % thrV, 'eEM').setIsolation( reta = "Medium", wstot = "Medium", rhad = "Medium" ), pt= thrV, shift_set = 1 ) + # jEM for thrV in [15]: jEMThreshold('jEM%i' % thrV, 'jEM').addThrValue(thrV) - for thrV in [15,18]: + for thrV in [15]: jEMThreshold('jEM%iM' % thrV, 'jEM').addThrValue(thrV).setIsolation( iso = "Medium", frac = "Medium", frac2 = "Medium" ) + # jEM SPARES + for thrV in range(1,2): + jEMThreshold('jEMSPARE%i' % thrV, 'jEM').addThrValue(8191) # eTAU for et in [8, 12, 20, 25, 40, 60, 100]: @@ -162,9 +166,9 @@ class ThresholdDef: cTauThreshold('cTAUSPARE%i' % thrV, 'cTAU').setEt(8191) # jTAU - for et in [12, 20, 25]: + for et in [12, 20]: jTauThreshold('jTAU%i' % et, 'jTAU').setEt(et) - for et in [12]: + for et in [20]: jTauThreshold('jTAU%iM' % et, 'jTAU').setEt(et).setIsolation( isolation = "Medium" ) # jTAU SPARES @@ -187,7 +191,7 @@ class ThresholdDef: ThresholdDef.addJetVaryingThrValues( jJetThreshold('jJ%ip31ETA49' % thrV, 'jJ'), pt=thrV, shift_set=0, rangemin=31, rangemax=49 ) # jJET SPARES - for thrV in range(1,6): + for thrV in range(1,7): jJetThreshold('jJSPARE%i' % thrV, 'jJ').addThrValue(8191) # jLJET (default range) diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Config/TopoAlgoDefMultiplicity.py b/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Config/TopoAlgoDefMultiplicity.py index f223c3c3b5d32c477578ced8511c44c9fe29f487..ff11cff340157e240cc5ba9dcfdd0fd2de52b4c8 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Config/TopoAlgoDefMultiplicity.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Config/TopoAlgoDefMultiplicity.py @@ -15,14 +15,18 @@ class TopoAlgoDefMultiplicity(object): def registerTopoAlgos(tm): emThresholds_3bits = [ - 'eEM3', 'eEM5', 'eEM8', 'eEM8L', + 'eEM3', 'eEM5', 'eEM7', 'eEM8L', ] emThresholds_2bits = [ - 'eEM8M', 'eEM10L', 'eEM15', 'eEM15L', 'eEM15M', - 'eEM18M', 'eEM20', 'eEM20L', 'eEM22', 'eEM22L', 'eEM22M', 'eEM22T', - + 'eEM10L', 'eEM12', 'eEM15', 'eEM15L', 'eEM15M', 'eEM18M', + 'eEM20L', + # spares + 'eEMSPARE1', 'eEMSPARE2', 'eEMSPARE3', + ] + emVarThresholds_2bits = [ + 'eEM20VM', 'eEM22', 'eEM22L', 'eEM22M', 'eEM22T', 'eEM24M', # spares - 'eEMSPARE1', 'eEMSPARE2', 'eEMSPARE3', 'eEMSPARE4', 'eEMSPARE5', 'eEMSPARE6', 'eEMSPARE7', 'eEMSPARE8', + 'eEMSPARE4', 'eEMSPARE5', 'eEMSPARE6', 'eEMSPARE7', ] for em in emThresholds_3bits: @@ -37,14 +41,18 @@ class TopoAlgoDefMultiplicity(object): nbits = 2, classtype='eEmMultiplicity') tm.registerTopoAlgo(alg) - emThresholds_3bits = [ 'jEM15',] - emThresholds_2bits = [ 'jEM15M', 'jEM18M', ] - for em in emThresholds_3bits: + for em in emVarThresholds_2bits: alg = EMMultiplicityAlgo( name = em, threshold = em, - nbits = 3, classtype='jEmMultiplicity') + nbits = 2, classtype='eEmVarMultiplicity') tm.registerTopoAlgo(alg) + emThresholds_2bits = [ + 'jEM15', 'jEM15M', + + #spares + 'jEMSPARE1', + ] for em in emThresholds_2bits: alg = EMMultiplicityAlgo( name = em, threshold = em, @@ -55,9 +63,11 @@ class TopoAlgoDefMultiplicity(object): 'eTAU8', 'eTAU12', # spares - 'eTAUSPARE1', 'eTAUSPARE2', + 'eTAUSPARE1', ] - jtauThresholds_3bits = [ 'jTAU12', 'jTAU12M',] + jtauThresholds_3bits = [ + 'jTAU12' + ] ctauThresholds_3bits = [ 'cTAU12M', @@ -68,10 +78,10 @@ class TopoAlgoDefMultiplicity(object): 'eTAU12L', 'eTAU12M', 'eTAU20', 'eTAU25', 'eTAU30HM', 'eTAU40', 'eTAU60', 'eTAU100', #spares - 'eTAUSPARE3', 'eTAUSPARE4', 'eTAUSPARE5', 'eTAUSPARE6', 'eTAUSPARE7', 'eTAUSPARE8', 'eTAUSPARE9', 'eTAUSPARE10', + 'eTAUSPARE2', 'eTAUSPARE3', 'eTAUSPARE4', 'eTAUSPARE5', 'eTAUSPARE6', 'eTAUSPARE7', ] jtauThresholds_2bits = [ - 'jTAU20', 'jTAU25', + 'jTAU20', 'jTAU20M', #spares 'jTAUSPARE1', @@ -126,12 +136,14 @@ class TopoAlgoDefMultiplicity(object): 'jJSPARE1', 'jJSPARE2', ] jJThresholds_2bits = [ - 'jJ15p31ETA49', 'jJ20p31ETA49', 'jJ30p31ETA49', 'jJ35p0ETA23', 'jJ40', 'jJ40p0ETA25', 'jJ45p0ETA21', - 'jJ50', 'jJ50p31ETA49', 'jJ75', 'jJ75p31ETA49', + 'jJ35p0ETA23', 'jJ40', 'jJ40p0ETA25', 'jJ45p0ETA21', + 'jJ50', 'jJ75', 'jJ85', 'jJ100', 'jJ120', 'jJ400', + 'jJ15p31ETA49', 'jJ20p31ETA49', 'jJ30p31ETA49', 'jJ50p31ETA49', 'jJ75p31ETA49', + # spares - 'jJSPARE3', 'jJSPARE4', 'jJSPARE5', + 'jJSPARE3', 'jJSPARE4', 'jJSPARE5', 'jJSPARE6', ] for jJet in jJThresholds_3bits: @@ -160,8 +172,7 @@ class TopoAlgoDefMultiplicity(object): tm.registerTopoAlgo(alg) gJThresholds_3bits = [ 'gJ15', 'gJ25', 'gJ35',] - gJThresholds_2bits = [ 'gJ50', 'gJ100',] - gJThresholds_1bits = [ 'gJ160',] + gJThresholds_2bits = [ 'gJ50', 'gJ100', 'gJ160'] for gJet in gJThresholds_3bits: alg = JetMultiplicityAlgo( name = gJet, @@ -175,12 +186,6 @@ class TopoAlgoDefMultiplicity(object): nbits = 2, classtype='gJetMultiplicity') tm.registerTopoAlgo(alg) - for gJet in gJThresholds_1bits: - alg = JetMultiplicityAlgo( name = gJet, - threshold = gJet, - nbits = 1, classtype='gJetMultiplicity') - tm.registerTopoAlgo(alg) - gLJThresholds_2bits = [ 'gLJ80', 'gLJ100', 'gLJ140', 'gLJ160', @@ -209,10 +214,11 @@ class TopoAlgoDefMultiplicity(object): #spares (for any energy thresholds) 'jXESPARE1', 'jXESPARE2', 'jXESPARE3', 'jXESPARE4', 'jXESPARE5', 'jXESPARE6', 'jXESPARE7', 'jXESPARE8', 'jXESPARE9', - 'jXESPARE10', 'jXESPARE11', 'jXESPARE12', 'jXESPARE13', 'jXESPARE14', - 'jXESPARE15', 'jXESPARE16', 'jXESPARE17', 'jXESPARE18', 'jXESPARE19', - 'jXESPARE20', 'jXESPARE21', 'jXESPARE22', 'jXESPARE23', 'jXESPARE24', - 'jXESPARE25', 'jXESPARE26', 'jXESPARE27', 'jXESPARE28', 'jXESPARE29', + 'jXESPARE10', 'jXESPARE11', 'jXESPARE12', 'jXESPARE13', + #'jXESPARE14', + #'jXESPARE15', 'jXESPARE16', 'jXESPARE17', 'jXESPARE18', 'jXESPARE19', + #'jXESPARE20', 'jXESPARE21', 'jXESPARE22', 'jXESPARE23', 'jXESPARE24', + #'jXESPARE25', 'jXESPARE26', 'jXESPARE27', 'jXESPARE28', 'jXESPARE29', ] @@ -233,24 +239,23 @@ class TopoAlgoDefMultiplicity(object): multLimits = namedtuple('ML', "thrtype, conn, nbit, startbit, endbit") multiplicities = [ multLimits( thrtype='eEM', conn='Topo1Opt0', nbit=3, startbit=0, endbit=11), - multLimits( thrtype='eEM', conn='Topo1Opt0', nbit=2, startbit=12, endbit=51), - multLimits( thrtype='eTAU', conn='Topo1Opt1', nbit=3, startbit=0, endbit=11), - multLimits( thrtype='eTAU', conn='Topo1Opt1', nbit=2, startbit=12, endbit=43), + multLimits( thrtype='eEM', conn='Topo1Opt0', nbit=2, startbit=24, endbit=43), + multLimits( thrtype='eEMV', conn='Topo1Opt0', nbit=2, startbit=44, endbit=63), + multLimits( thrtype='eTAU', conn='Topo1Opt1', nbit=3, startbit=0, endbit=8 ), + multLimits( thrtype='eTAU', conn='Topo1Opt1', nbit=2, startbit=12, endbit=39), multLimits( thrtype='gLJ', conn='Topo1Opt1', nbit=2, startbit=44, endbit=59), - multLimits( thrtype='gJ', conn='Topo1Opt1', nbit=3, startbit=60, endbit=68), - multLimits( thrtype='gJ', conn='Topo1Opt1', nbit=2, startbit=69, endbit=72), - multLimits( thrtype='gJ', conn='Topo1Opt1', nbit=1, startbit=73, endbit=73), + multLimits( thrtype='gJ', conn='Topo1Opt1', nbit=3, startbit=62, endbit=70), + multLimits( thrtype='gJ', conn='Topo1Opt1', nbit=2, startbit=74, endbit=79), multLimits( thrtype='jJ', conn='Topo1Opt2', nbit=3, startbit=0, endbit=32), - multLimits( thrtype='jJ', conn='Topo1Opt2', nbit=2, startbit=33, endbit=68), - multLimits( thrtype='jLJ', conn='Topo1Opt2', nbit=2, startbit=69, endbit=84), - multLimits( thrtype='jTAU', conn='Topo1Opt3', nbit=3, startbit=0, endbit=5 ), + multLimits( thrtype='jJ', conn='Topo1Opt2', nbit=2, startbit=36, endbit=73), + multLimits( thrtype='jLJ', conn='Topo1Opt2', nbit=2, startbit=78, endbit=93), + multLimits( thrtype='jTAU', conn='Topo1Opt3', nbit=3, startbit=0, endbit=2 ), multLimits( thrtype='jTAU', conn='Topo1Opt3', nbit=2, startbit=6, endbit=11), - multLimits( thrtype='cTAU', conn='Topo1Opt3', nbit=3, startbit=12, endbit=17), - multLimits( thrtype='cTAU', conn='Topo1Opt3', nbit=2, startbit=18, endbit=23), - multLimits( thrtype='jEM', conn='Topo1Opt3', nbit=3, startbit=24, endbit=26), - multLimits( thrtype='jEM', conn='Topo1Opt3', nbit=2, startbit=27, endbit=30), - multLimits( thrtype='EN', conn='Topo1Opt3', nbit=1, startbit=31, endbit=78), + multLimits( thrtype='cTAU', conn='Topo1Opt3', nbit=3, startbit=14, endbit=19), + multLimits( thrtype='cTAU', conn='Topo1Opt3', nbit=2, startbit=23, endbit=28), + multLimits( thrtype='jEM', conn='Topo1Opt3', nbit=2, startbit=31, endbit=36), + multLimits( thrtype='EN', conn='Topo1Opt3', nbit=1, startbit=39, endbit=70), ] for conn in l1menu.connectors: @@ -266,9 +271,11 @@ class TopoAlgoDefMultiplicity(object): thrtype = algo.input if 'XE' in algo.input or 'TE' in algo.input or 'MHT' in algo.input: thrtype = 'EN' + if 'eEmVar' in algo.classtype: + thrtype = 'eEMV' if conn.name==ml.conn and thrtype==ml.thrtype and algo.nbits==ml.nbit and tl.startbit>=ml.startbit and (tl.startbit+tl.nbits-1)<=ml.endbit: goodAlgo = True if not goodAlgo: - raise RuntimeError("The multiplicity algoprithm %s does not fit with Topo1 and CTP FW. If this is intended, please correct the multiplicity constraints and communicate the new menu to the L1TOPO and CTP groups." % algo.name) + raise RuntimeError("The multiplicity algoprithm %s with startbit %i does not fit with Topo1 and CTP FW. If this is intended, please correct the multiplicity constraints and communicate the new menu to the L1TOPO and CTP groups." % (algo.name, tl.startbit) ) diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/L1/L1MenuConfig.py b/Trigger/TriggerCommon/TriggerMenuMT/python/L1/L1MenuConfig.py index 3d2bdae2e57781885d53d55dc7425d202098a90f..ee96ef0d5c0df07d5d09c6eadf19c64f815e3b45 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/L1/L1MenuConfig.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/L1/L1MenuConfig.py @@ -126,7 +126,7 @@ class L1MenuConfig(object): if algo.name in self._registeredTopoAlgos[self.currentAlgoDef]: raise RuntimeError('%s algo %s is already registered as such' % (self.currentAlgoDef.desc, algo.name)) self._registeredTopoAlgos[self.currentAlgoDef][algo.name] = algo - log.debug("Added in the %s type the algo: %s ID:%s", self.currentAlgoDef.desc, algo.name) + log.debug("Added in the %s type the algo: %s", self.currentAlgoDef.desc, algo.name) return algo @@ -685,8 +685,12 @@ class L1MenuConfig(object): self.l1menu.checkLegacyThresholds() # check for the topo multiplicity algorithms and CTP inputs + # TOPO1 TopoAlgoDefMultiplicity.checkMultAlgoFWconstraints(self.l1menu) + # check #number of CTP inputs and outputs <=512 + self.l1menu.checkCountCTPInputsOutput() + # check that performance thresholds are not used in the physics L1 menu self.l1menu.checkPerfThresholds() diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Menu/LegacyMenuThresholds.py b/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Menu/LegacyMenuThresholds.py index 06bf24f15d96f4943fd393025f644c67a7a7a317..7b7156652266477ad63e509fefa986646f0fd7ea 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Menu/LegacyMenuThresholds.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Menu/LegacyMenuThresholds.py @@ -7,6 +7,7 @@ This list defines the set of legacy L1Calo thresholds to be used at the beginnin legacyThresholds = [ + # multiplicities "EM3", "EM7", "EM8VH", "EM10VH", "EM12", "EM15", "EM15VH", "EM15VHI", "EM18VHI", "EM20VH", "EM20VHI", "EM22VH", "EM22VHI", "EM24VHI", "HA8", "HA12IM", "HA20IM", "HA25IM", "HA40", "HA60", "HA100", @@ -18,7 +19,35 @@ legacyThresholds = [ "XE30", "XE35", "XE40", "XE45", "XE50", "XE55", "XE60", "XE300", + # R2 TOPO + "R2TOPO_0DETA20-J50s1-Js2", + "R2TOPO_0DR03-EM7ab-CJ15ab", + "R2TOPO_0DR28-TAU20abi-TAU12abi", + "R2TOPO_0INVM9-EM7ab-EMab", + "R2TOPO_100RATIO-0MATCH-TAU30si2-EMall", + "R2TOPO_1DISAMB-J25ab-0DR28-TAU20abi-TAU12abi", + "R2TOPO_1INVM5-EM12s1-EMs6", + "R2TOPO_1INVM5-EM7s1-EMs6", + "R2TOPO_27DPHI32-EMs1-EMs6", + "R2TOPO_300INVM9999-AJ30s6-AJ20s6", + "R2TOPO_400INVM9999-AJ30s6pETA31-AJ20s6p31ETA49", + "R2TOPO_500INVM9999-J30s6-AJ20s6", + "R2TOPO_700INVM9999-AJ30s6-AJ20s6", + "R2TOPO_HT150-J20s5pETA31", + "R2TOPO_HT190-J15s5pETA21", + "R2TOPO_NOT-0MATCH-TAU30si1-EMall", + "R2TOPO_SC111-CJ15abpETA26", + "R2TOPO_ZEE-EM20shi2", + # detector thresholds - "NIMTGC", "NIMTRT", "MBTS_A", "MBTS_C", "CAL1", "CAL2", "BCM_AtoC", "BCM_CtoA", + "NIMLHCF", "NIMTGC", "NIMTRT", + "MBTS_A", "MBTS_C", + "CAL1", "CAL2", + "BCM_AtoC", "BCM_CtoA", "BCM_Wide", "BCM_Comb", + "BPTX0", "BPTX1", + "LUCID_A", "LUCID_C", + "ZDC_A", "ZDC_C", "ZDC_AND", + "AFP_NSA", "AFP_FSA", "AFP_FSA_TOF_T0", "AFP_FSA_TOF_T1", "AFP_FSA_TOF_T2", "AFP_FSA_TOF_T3", + "AFP_NSC", "AFP_FSC", "AFP_FSC_TOF_T0", "AFP_FSC_TOF_T1", "AFP_FSC_TOF_T2", "AFP_FSC_TOF_T3", ] diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Menu/Menu_MC_HI_v1.py b/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Menu/Menu_MC_HI_v1.py index ff561d4505839d0826e6fb25548748fdd9effdfa..e7a09dd6028ed8932e9dd95c44c204199c7538b7 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Menu/Menu_MC_HI_v1.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Menu/Menu_MC_HI_v1.py @@ -42,7 +42,7 @@ def defineMenu(): 'L1_EM3_EMPTY', 'L1_EM7_EMPTY', 'L1_EM7_UNPAIRED_ISO', 'L1_EM7_FIRSTEMPTY', 'L1_EM20VH_FIRSTEMPTY', # new calo - 'L1_eEM3', 'L1_eEM8', 'L1_eEM15', 'L1_eEM20', + 'L1_eEM3', 'L1_eEM7', 'L1_eEM15', 'L1_eEM12', 'L1_eEM22', 'L1_eEM22M', ## @@ -150,11 +150,13 @@ def defineMenu(): # BPTX # BCM - 'L1_BCM_AC_CA_BGRP0', 'L1_BCM_Wide_EMPTY','L1_BCM_Wide_UNPAIRED_ISO','L1_BCM_Wide_UNPAIRED_NONISO', - 'L1_BCM_AC_UNPAIRED_ISO','L1_BCM_CA_UNPAIRED_ISO', - 'L1_BCM_AC_UNPAIRED_NONISO','L1_BCM_CA_UNPAIRED_NONISO', - 'L1_BCM_AC_ABORTGAPNOTCALIB', 'L1_BCM_CA_ABORTGAPNOTCALIB','L1_BCM_Wide_ABORTGAPNOTCALIB', + 'L1_BCM_AC_CA_BGRP0', 'L1_BCM_Wide_EMPTY', 'L1_BCM_Wide_UNPAIRED_ISO', 'L1_BCM_Wide_UNPAIRED_NONISO', + 'L1_BCM_AC_UNPAIRED_ISO', 'L1_BCM_CA_UNPAIRED_ISO', + 'L1_BCM_AC_UNPAIRED_NONISO', 'L1_BCM_CA_UNPAIRED_NONISO', + 'L1_BCM_AC_ABORTGAPNOTCALIB', 'L1_BCM_CA_ABORTGAPNOTCALIB', 'L1_BCM_Wide_ABORTGAPNOTCALIB', 'L1_BCM_AC_CALIB', 'L1_BCM_CA_CALIB','L1_BCM_Wide_CALIB', + 'L1_BCM_AC_UNPAIREDB1', 'L1_BCM_CA_UNPAIREDB2', + 'L1_J12_UNPAIREDB1', 'L1_J12_UNPAIREDB2', # AFP diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Menu/Menu_MC_pp_v8.py b/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Menu/Menu_MC_pp_v8.py index 9e2e2d66afb0a2f50d67927efa6e80a97f7bdc56..9e8a85919f6828cf2623006dc8dc93ee54b03340 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Menu/Menu_MC_pp_v8.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Menu/Menu_MC_pp_v8.py @@ -30,7 +30,7 @@ def defineMenu(): L1MenuFlags.MenuPartitioning = [0, 472, 492] # partition 1: ctpid 0-471, partition 2: ctpid 472-491, partition 3: ctpid 492-511 - + L1MenuFlags.ApplyCTPLimits = False # allow to have more than 512 CTP inputs or outputs, NOT FOR P1! Only for simulation L1MenuFlags.items = [ @@ -42,10 +42,11 @@ def defineMenu(): 'L1_EM3_EMPTY', 'L1_EM7_EMPTY', 'L1_EM7_UNPAIRED_ISO', 'L1_EM7_FIRSTEMPTY', 'L1_EM20VH_FIRSTEMPTY', # new calo - 'L1_eEM3', 'L1_eEM5', 'L1_eEM8', 'L1_eEM8L', 'L1_eEM8M', - 'L1_eEM10L', 'L1_eEM15', 'L1_eEM15L', 'L1_eEM15M', - 'L1_eEM18M', 'L1_eEM20', 'L1_eEM20L', - 'L1_eEM22', 'L1_eEM22L', 'L1_eEM22M', 'L1_eEM22T', + 'L1_eEM3', 'L1_eEM5', 'L1_eEM7', 'L1_eEM8L', + 'L1_eEM10L', 'L1_eEM12', 'L1_eEM15', 'L1_eEM15L', 'L1_eEM15M', + 'L1_eEM18M', 'L1_eEM20L', 'L1_eEM20VM', + 'L1_eEM7_EMPTY', 'L1_eEM7_UNPAIRED_ISO', + 'L1_eEM22', 'L1_eEM22L', 'L1_eEM22M', 'L1_eEM22T', 'L1_eEM24M', ## # MU @@ -69,14 +70,15 @@ def defineMenu(): 'L1_2EM8VH_MU8F', 'L1_EM15VH_MU8F', 'L1_EM7_MU8F', # Combined lepton, new calo (for ATR-24182) - 'L1_2eEM15M', 'L1_2eEM20L', 'L1_3eEM10L', 'L1_eEM20L_3eEM10L', + 'L1_2eEM15L', 'L1_2eEM15M', 'L1_2eEM20L', 'L1_3eEM10L', 'L1_eEM20L_3eEM10L', + 'L1_eEM15L_MU8F', 'L1_2eEM8L_MU8F', # single tau 'L1_TAU8', 'L1_TAU12IM', 'L1_TAU20IM', 'L1_TAU40', 'L1_TAU60', 'L1_TAU100', 'L1_TAU8_EMPTY', 'L1_TAU8_FIRSTEMPTY', 'L1_TAU8_UNPAIRED_ISO', 'L1_TAU40_EMPTY', 'L1_TAU40_UNPAIRED_ISO', # new calo 'L1_eTAU8', - 'L1_eTAU12', 'L1_jTAU12', 'L1_jTAU12M', 'L1_cTAU12M', + 'L1_eTAU12', 'L1_jTAU12', 'L1_jTAU20', 'L1_jTAU20M', 'L1_cTAU12M', 'L1_eTAU12L', 'L1_eTAU12M', 'L1_eTAU20', 'L1_cTAU20M', 'L1_eTAU25', 'L1_cTAU25M', @@ -136,13 +138,14 @@ def defineMenu(): 'L1_J12_BGRP12', # jJ - 'L1_jJ12', 'L1_jJ12p0ETA25', 'L1_jJ15', 'L1_jJ15p0ETA25', 'L1_jJ15p31ETA49', 'L1_jJ20', 'L1_jJ20p31ETA49', 'L1_jJ25', 'L1_jJ25p0ETA23', - 'L1_jJ30', 'L1_jJ30p31ETA49', 'L1_jJ35p0ETA23', 'L1_jJ40', 'L1_jJ40p0ETA25', 'L1_jJ45p0ETA21', 'L1_jJ50', 'L1_jJ50p31ETA49', - 'L1_jJ75', 'L1_jJ75p31ETA49', 'L1_jJ85', - 'L1_jJ100', 'L1_jJ120', 'L1_jJ400', + 'L1_jJ12', 'L1_jJ12p0ETA25', 'L1_jJ15', 'L1_jJ15p0ETA25', 'L1_jJ20', 'L1_jJ25', 'L1_jJ25p0ETA23', + 'L1_jJ30', 'L1_jJ30_EMPTY', 'L1_jJ30_FIRSTEMPTY', 'L1_jJ35p0ETA23', 'L1_jJ40', 'L1_jJ40p0ETA25', 'L1_jJ45p0ETA21', 'L1_jJ50', + 'L1_jJ75', 'L1_jJ85', 'L1_jJ100', 'L1_jJ120', 'L1_jJ400', 'L1_jJ400_LAR', - 'L1_4jJ15', 'L1_3jJ50', 'L1_4jJ20', 'L1_4jJ15p0ETA25', + 'L1_jJ15p31ETA49', 'L1_jJ20p31ETA49', 'L1_jJ30p31ETA49', 'L1_jJ50p31ETA49', 'L1_jJ75p31ETA49', + + 'L1_4jJ15', 'L1_3jJ50', 'L1_4jJ20', 'L1_4jJ15p0ETA25', 'L1_5jJ15p0ETA25', 'L1_3jJ35p0ETA23', 'L1_jJ85_3jJ30', 'L1_jJ40p0ETA25_2jJ25_jJ20p31ETA49', 'L1_jJ25p0ETA23_2jJ15p31ETA49', 'L1_jJ45p0ETA21_3jJ15p0ETA25', 'L1_MU3V_jJ15', @@ -152,7 +155,7 @@ def defineMenu(): 'L1_jLJ80', 'L1_jLJ100', 'L1_jLJ140', 'L1_jLJ160', # jEM - 'L1_jEM15', 'L1_jEM15M', 'L1_jEM18M', + 'L1_jEM15', 'L1_jEM15M', # multi jet 'L1_J45p0ETA21_3J15p0ETA25', @@ -226,11 +229,13 @@ def defineMenu(): #'L1_BPTX0_BGRP0','L1_BPTX1_BGRP0', # BCM - 'L1_BCM_Wide_BGRP0', 'L1_BCM_AC_CA_BGRP0', 'L1_BCM_Wide_EMPTY','L1_BCM_Wide_UNPAIRED_ISO','L1_BCM_Wide_UNPAIRED_NONISO', + 'L1_BCM_Wide_BGRP0', 'L1_BCM_AC_CA_BGRP0', 'L1_BCM_Wide_EMPTY', 'L1_BCM_Wide_UNPAIRED_ISO', 'L1_BCM_Wide_UNPAIRED_NONISO', 'L1_BCM_AC_UNPAIRED_ISO','L1_BCM_CA_UNPAIRED_ISO', 'L1_BCM_AC_UNPAIRED_NONISO','L1_BCM_CA_UNPAIRED_NONISO', 'L1_BCM_AC_ABORTGAPNOTCALIB', 'L1_BCM_CA_ABORTGAPNOTCALIB','L1_BCM_Wide_ABORTGAPNOTCALIB', 'L1_BCM_AC_CALIB', 'L1_BCM_CA_CALIB','L1_BCM_Wide_CALIB', + 'L1_BCM_AC_UNPAIREDB1', 'L1_BCM_CA_UNPAIREDB2', + 'L1_J12_UNPAIREDB1', 'L1_J12_UNPAIREDB2', # AFP # high-priority (all mu) @@ -251,8 +256,10 @@ def defineMenu(): #'L1_AFP_A_OR_C_J5','L1_AFP_A_AND_C_J5', # J5 not available in legacy menu. Need to update to jJ threshold for low-mu 'L1_AFP_A_OR_C_J12','L1_AFP_A_AND_C_J12', 'L1_MU5VF_AFP_A_OR_C','L1_MU5VF_AFP_A_AND_C','L1_EM7_AFP_A_OR_C','L1_EM7_AFP_A_AND_C', + 'L1_eEM7_AFP_A_OR_C','L1_eEM7_AFP_A_AND_C', # med-priority (low mu) 'L1_AFP_A_OR_C','L1_AFP_A_OR_C_MBTS_2', 'L1_AFP_A_AND_C_MBTS_2', + # MBTS 'L1_MBTS_A', 'L1_MBTS_C', @@ -265,18 +272,17 @@ def defineMenu(): # extra MBTS # TODO: to be removed for high-mu pp - 'L1_MBTSA0', 'L1_MBTSA1', 'L1_MBTSA2', 'L1_MBTSA3', 'L1_MBTSA4', 'L1_MBTSA5', 'L1_MBTSA6', 'L1_MBTSA7', 'L1_MBTSA8', 'L1_MBTSA9', 'L1_MBTSA10', 'L1_MBTSA11', 'L1_MBTSA12', 'L1_MBTSA13', 'L1_MBTSA14', 'L1_MBTSA15', 'L1_MBTSC0', 'L1_MBTSC1', 'L1_MBTSC2', 'L1_MBTSC3', 'L1_MBTSC4', 'L1_MBTSC5', 'L1_MBTSC6', 'L1_MBTSC7', 'L1_MBTSC8', 'L1_MBTSC9', 'L1_MBTSC10', 'L1_MBTSC11', 'L1_MBTSC12', 'L1_MBTSC13', 'L1_MBTSC14', 'L1_MBTSC15', + #'L1_MBTSA0', 'L1_MBTSA1', 'L1_MBTSA2', 'L1_MBTSA3', 'L1_MBTSA4', 'L1_MBTSA5', 'L1_MBTSA6', 'L1_MBTSA7', 'L1_MBTSA8', 'L1_MBTSA9', 'L1_MBTSA10', 'L1_MBTSA11', 'L1_MBTSA12', 'L1_MBTSA13', 'L1_MBTSA14', 'L1_MBTSA15', 'L1_MBTSC0', 'L1_MBTSC1', 'L1_MBTSC2', 'L1_MBTSC3', 'L1_MBTSC4', 'L1_MBTSC5', 'L1_MBTSC6', 'L1_MBTSC7', 'L1_MBTSC8', 'L1_MBTSC9', 'L1_MBTSC10', 'L1_MBTSC11', 'L1_MBTSC12', 'L1_MBTSC13', 'L1_MBTSC14', 'L1_MBTSC15', - # ZB - # TODO: to be removed for high-mu pp + # ZB 'L1_ZB', #ATR-21371 # TODO: to be removed for high-mu pp - 'L1_ALFA_ANY', - 'L1_ALFA_ELAST15', 'L1_ALFA_ELAST18', - 'L1_ALFA_B7L1U','L1_ALFA_B7L1L','L1_ALFA_A7L1U','L1_ALFA_A7L1L','L1_ALFA_A7R1U','L1_ALFA_A7R1L','L1_ALFA_B7R1U','L1_ALFA_B7R1L', - 'L1_ALFA_SYST9', 'L1_ALFA_SYST10', 'L1_ALFA_SYST11', 'L1_ALFA_SYST12', 'L1_ALFA_SYST17', 'L1_ALFA_SYST18', + #'L1_ALFA_ANY', + #'L1_ALFA_ELAST15', 'L1_ALFA_ELAST18', + #'L1_ALFA_B7L1U','L1_ALFA_B7L1L','L1_ALFA_A7L1U','L1_ALFA_A7L1L','L1_ALFA_A7R1U','L1_ALFA_A7R1L','L1_ALFA_B7R1U','L1_ALFA_B7R1L', + #'L1_ALFA_SYST9', 'L1_ALFA_SYST10', 'L1_ALFA_SYST11', 'L1_ALFA_SYST12', 'L1_ALFA_SYST17', 'L1_ALFA_SYST18', diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Menu/Menu_MC_pp_v8_inputs.py b/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Menu/Menu_MC_pp_v8_inputs.py index 1e7248136d5e235449118404c20e49c18f5df6ea..d460484a1a060d62d6ab659b6cbc8918eaa01646 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Menu/Menu_MC_pp_v8_inputs.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Menu/Menu_MC_pp_v8_inputs.py @@ -84,13 +84,19 @@ def defineInputsMenu(): "legacy" : False, "thresholds" : [ # Topo1A: eFex EM, eFex TAU, gJ, gLJ # eEM thresholds for commissioning - ('eEM3',3), ('eEM5',3), ('eEM8',3), ('eEM8L',3), - 'eEM8M', 'eEM10L', 'eEM15', 'eEM15L', 'eEM15M', - 'eEM18M', 'eEM20', 'eEM20L', - 'eEM22', 'eEM22L', 'eEM22M', 'eEM22T', + ('eEM3',3), ('eEM5',3), ('eEM7',3), ('eEM8L',3), + + (None,3), (None,3), (None,3), (None,3), + + 'eEM10L', 'eEM12', 'eEM15', 'eEM15L', 'eEM15M', + 'eEM18M', 'eEM20L', + 'eEMSPARE1', 'eEMSPARE2', 'eEMSPARE3', + + # variable eEM thresholds + 'eEM20VM', 'eEM22', 'eEM22L', 'eEM22M', 'eEM22T', 'eEM24M', # eEM thresholds for production - 'eEMSPARE1', 'eEMSPARE2', 'eEMSPARE3', 'eEMSPARE4', 'eEMSPARE5', 'eEMSPARE6', 'eEMSPARE7', 'eEMSPARE8', + 'eEMSPARE4', 'eEMSPARE5', 'eEMSPARE6', 'eEMSPARE7', ] }) @@ -103,13 +109,18 @@ def defineInputsMenu(): "legacy" : False, "thresholds" : [ # Topo1A: eFex EM, eFex TAU, gJ, gLJ # eTAU thresholds for commissioning - ('eTAU8',3), ('eTAU12',3), ('eTAUSPARE1',3), ('eTAUSPARE2',3), + ('eTAU8',3), ('eTAU12',3), ('eTAUSPARE1',3), + + (None,3), + 'eTAU12L', 'eTAU12M', 'eTAU20', 'eTAU25', 'eTAU40', 'eTAU60', 'eTAU100', 'eTAU30HM', # eTAU thresholds for production - 'eTAUSPARE3', 'eTAUSPARE4', 'eTAUSPARE5', 'eTAUSPARE6', 'eTAUSPARE7', 'eTAUSPARE8', 'eTAUSPARE9', 'eTAUSPARE10', + 'eTAUSPARE2', 'eTAUSPARE3', 'eTAUSPARE4', 'eTAUSPARE5', 'eTAUSPARE6', 'eTAUSPARE7', + + None, None, # gLJ thresholds for commissioning 'gLJ80', 'gLJ100', 'gLJ140', 'gLJ160', @@ -117,10 +128,15 @@ def defineInputsMenu(): # gLJ thresholds for production 'gLJSPARE1', 'gLJSPARE2', 'gLJSPARE3', 'gLJSPARE4', + None, + # gJ thresholds for commissioning ('gJ15',3), ('gJ25',3), ('gJ35',3), + + (None,3), + 'gJ50', 'gJ100', - ('gJ160',1) + 'gJ160', ] }) @@ -137,12 +153,18 @@ def defineInputsMenu(): ('jJ5',3), ('jJ12',3), ('jJ12p0ETA25',3), ('jJ15',3), ('jJ15p0ETA25',3), ('jJ20',3), ('jJ25',3), ('jJ25p0ETA23',3), ('jJ30',3), ('jJSPARE1',3), ('jJSPARE2',3), - 'jJ15p31ETA49', 'jJ20p31ETA49', 'jJ30p31ETA49', - 'jJ35p0ETA23', 'jJ40', 'jJ40p0ETA25', 'jJ45p0ETA21', 'jJ50', 'jJ50p31ETA49', 'jJ75', - 'jJ75p31ETA49', 'jJ85', 'jJ100', 'jJ120', 'jJ400', + + (None,3), + + 'jJ35p0ETA23', 'jJ40', 'jJ40p0ETA25', 'jJ45p0ETA21', 'jJ50', 'jJ75', + 'jJ85', 'jJ100', 'jJ120', 'jJ400', + + 'jJ15p31ETA49', 'jJ20p31ETA49', 'jJ30p31ETA49', 'jJ50p31ETA49', 'jJ75p31ETA49', # jJ thresholds for production - 'jJSPARE3', 'jJSPARE4', 'jJSPARE5', + 'jJSPARE3', 'jJSPARE4', 'jJSPARE5', 'jJSPARE6', + + None,None, # jLJ thresholds for commissioning 'jLJ80', 'jLJ100', 'jLJ140', 'jLJ160', @@ -162,19 +184,33 @@ def defineInputsMenu(): "legacy" : False, "thresholds" : [ # Topo1B: jFex small-R jet, jFex large-R jet, combined eFex/jFex TAU, gFex+jFex EX, gFex+jFex SumET, jFex TAU # jTAU thresholds for commissioning - ('jTAU12',3), ('jTAU12M',3), - 'jTAU20', 'jTAU25', + ('jTAU12',3), + + (None,3), + + 'jTAU20', 'jTAU20M', # jTAU thresholds for production 'jTAUSPARE1', + None, + # cTAU thresholds for commissioning ('cTAU12M',3), ('cTAUSPARE1',3), + + (None,3), + 'cTAU20M', 'cTAU25M', # cTAU thresholds for production 'cTAUSPARE2', + None, + # jEM thresholds for commissioning - ('jEM15',3), 'jEM15M', 'jEM18M', + 'jEM15', 'jEM15M', + # jEM thresholds for production + 'jEMSPARE1', + + None, # energy thresholds # commissioning @@ -195,10 +231,11 @@ def defineInputsMenu(): ('jXESPARE1',1), ('jXESPARE2',1), ('jXESPARE3',1), ('jXESPARE4',1), ('jXESPARE5',1), ('jXESPARE6',1), ('jXESPARE7',1), ('jXESPARE8',1), ('jXESPARE9',1), # production - ('jXESPARE10',1), ('jXESPARE11',1), ('jXESPARE12',1), ('jXESPARE13',1), ('jXESPARE14',1), - ('jXESPARE15',1), ('jXESPARE16',1), ('jXESPARE17',1), ('jXESPARE18',1), ('jXESPARE19',1), - ('jXESPARE20',1), ('jXESPARE21',1), ('jXESPARE22',1), ('jXESPARE23',1), ('jXESPARE24',1), - ('jXESPARE25',1), ('jXESPARE26',1), ('jXESPARE27',1), ('jXESPARE28',1), ('jXESPARE29',1), + ('jXESPARE10',1), ('jXESPARE11',1), ('jXESPARE12',1), ('jXESPARE13',1), + #('jXESPARE14',1), + #('jXESPARE15',1), ('jXESPARE16',1), ('jXESPARE17',1), ('jXESPARE18',1), ('jXESPARE19',1), + #('jXESPARE20',1), ('jXESPARE21',1), ('jXESPARE22',1), ('jXESPARE23',1), ('jXESPARE24',1), + #('jXESPARE25',1), ('jXESPARE26',1), ('jXESPARE27',1), ('jXESPARE28',1), ('jXESPARE29',1), # Performance thresholds, should not go in physics menu! ('jXEPerf50',1), @@ -363,10 +400,11 @@ def defineInputsMenu(): "type" : "optical", "legacy" : False, "thresholds" : [ - # exactly the first 4 thresholds must be defined with 3 bits, all others use 2 bits automatically - ('MU3V',3), ('MU5VF',3), ('MU8F',3), ('MU8VF',3), 'MU14FCH', 'MU14FCHR', - # Run3 test/backup - ('MU3VF',3), ('MU4BOM',3), ('MU8FC',3), 'MU8VFC', 'MU15VFCH', 'MU10BOM', 'MU10BO', 'MU12BOM', 'MU20FC', + ('MU3V',3), ('MU3VF',3), ('MU3VC',3), ('MU3EOF',3), ('MU5VF',3), + 'MU8F', 'MU8VF', 'MU8FC', 'MU8FH', 'MU8VFC', 'MU9VF', 'MU9VFC', 'MU12FCH', + 'MU14FCH', 'MU14FCHR', 'MU15VFCH', 'MU15VFCHR', 'MU18VFCH', 'MU20VFC', + 'MU4BO', 'MU4BOM', 'MU10BO', 'MU10BOM', 'MU12BOM', + 'MU8EOF', 'MU14EOF', ] }) diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Menu/Menu_MC_pp_v8_inputs_legacy.py b/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Menu/Menu_MC_pp_v8_inputs_legacy.py index a90fe60fe860244e229d40dc13478d6a20a71e60..d9cfa0fd40f4973325616618b0f83f5597690de0 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Menu/Menu_MC_pp_v8_inputs_legacy.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Menu/Menu_MC_pp_v8_inputs_legacy.py @@ -84,8 +84,8 @@ def defineLegacyInputsMenu(): "type" : "ctpin", "legacy" : True, "thresholds" : [ - 'J30p0ETA49', 'J35p0ETA23', 'J40p0ETA25', # 3 x central Jet - 'J40', 'J50', 'J75', 'J85', 'J100', 'J45p0ETA21', 'J400', # 6 jets + 1 central jet + 'J35p0ETA23', 'J40p0ETA25', # 3 x central Jet + 'J40', 'J50', 'J75', 'J85', 'J100', 'J120', 'J45p0ETA21', 'J400', # 6 jets + 1 central jet 'J15p31ETA49', 'J20p31ETA49', 'J30p31ETA49', 'J50p31ETA49', 'J75p31ETA49', # 6 x FJ ] }, diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Menu/Menu_Physics_pp_v8.py b/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Menu/Menu_Physics_pp_v8.py index ca4a61a0d64daca7a5340f079be238760a2627ca..3f3dc6daac7b742fa6443685a8d1eea4bfa458e9 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Menu/Menu_Physics_pp_v8.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Menu/Menu_Physics_pp_v8.py @@ -7,6 +7,8 @@ def defineMenu(): mc_menu.defineMenu() + L1MenuFlags.ApplyCTPLimits = True + L1MenuFlags.ThresholdMap = { # Do not use for L1Topo decision threshold! 'jXEPerf50' :'', diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/TriggerAPI/TriggerDataAccess.py b/Trigger/TriggerCommon/TriggerMenuMT/python/TriggerAPI/TriggerDataAccess.py index 40b3873c4d43e25ee356cbc8146f5b131fbd3479..c12384a4e8add4737ebfe4b75ad2bad65ee15f77 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/TriggerAPI/TriggerDataAccess.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/TriggerAPI/TriggerDataAccess.py @@ -165,9 +165,6 @@ def queryHLTPrescaleTableRun2(connection,psk): def fillHLTmap( info, hltMap_prev , lbCount, run, grlblocks): from TrigConfigSvc.TrigConfigSvcUtils import getL1Items, getL1Prescales - mutelog = logging.getLogger(__name__) - mutelog.setLevel(logging.ERROR) #avoid the spam from TrigConfigSvcUtils - items = getL1Items('TRIGGERDB', info['smk']) # returs map item name => CTP ID chainsHLT = getChainsWithL1seed('TRIGGERDB', info['smk']) # returns map HLT ID => (HLT name, L1 seed) chainsHLT = {k:v for (k,v) in six.iteritems (chainsHLT) if "L1" in v[1]} @@ -300,15 +297,6 @@ def getHLTmap_fromTM(period, release): The format is the same as for TriggerDBAccess for compatibility but rerun is always false ''' - from AthenaConfiguration.AllConfigFlags import ConfigFlags - - mutelog = logging.getLogger(__name__) - mutelog.setLevel(logging.WARNING) #avoid spam from Menu.L1.L1MenuConfig - - from TrigConfigSvc.TrigConfigSvcCfg import generateL1Menu, createL1PrescalesFileFromMenu - generateL1Menu(ConfigFlags) - createL1PrescalesFileFromMenu(ConfigFlags) - from TriggerMenuMT.HLTMenuConfig.Menu.GenerateMenuMT import GenerateMenuMT menu = GenerateMenuMT() menu.getChainsFromMenu() diff --git a/Trigger/TriggerCommon/TriggerMenuMT/scripts/generateL1MenuRun3.py b/Trigger/TriggerCommon/TriggerMenuMT/scripts/generateL1MenuRun3.py index 945566c821c3d634ccac047063ad3dfd3cb8d4ca..ce8ec0737dc24243ebc91402a4836a4b25913393 100755 --- a/Trigger/TriggerCommon/TriggerMenuMT/scripts/generateL1MenuRun3.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/scripts/generateL1MenuRun3.py @@ -1,93 +1,42 @@ -#!/bin/env python - +#!/usr/bin/env python # Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration import sys - -def parseCmdLine(possibleMenus): +def main(): import argparse - parser = argparse.ArgumentParser() - # mandatory argument is the menu - parser.add_argument("menu", help="the menu to generate (possible menus: %s)" % ', '.join(possibleMenus), nargs='?', default="phyp1r3v1") - parser.add_argument("-v", "--verbose", help="increase output verbosity", action="count", default=0) - parser.add_argument("--destdir", dest="dest", help="directory for output files", default = "./") - return parser.parse_args() - - -def generateL1Menu(menu, cmdline): - # logging - from AthenaCommon.Logging import logging - log = logging.getLogger(sys.argv[0].split('/')[-1]) - log.setLevel(logging.INFO) - logging.getLogger("Menu.L1.L1MenuConfig").setLevel(logging.INFO) - if cmdline.verbose: - log.setLevel(logging.DEBUG) - logging.getLogger("Menu.L1.L1MenuConfig").setLevel(logging.DEBUG) - - # setup - - # L1 menu generation - from TriggerMenuMT.L1.L1MenuConfig import L1MenuConfig - l1cfg = L1MenuConfig( menu ) - - from TrigConfigSvc.TrigConfigSvcCfg import getL1MenuFileName, getBunchGroupSetFileName from AthenaConfiguration.AllConfigFlags import ConfigFlags - ConfigFlags.Trigger.triggerMenuSetup = menu - l1cfg.writeJSON(outputFile=getL1MenuFileName(ConfigFlags), - bgsOutputFile=getBunchGroupSetFileName(ConfigFlags), - destdir=cmdline.dest) - - return l1cfg.l1menu - -def generateDefaultMCBunchgroupSet(cmdline): - from TriggerMenuMT.L1.Base.Limits import Limits - from TriggerMenuMT.L1.Base.BunchGroupSet import createDefaultBunchGroupSet - Limits.setLimits(CTPVersion=4) - bgs = createDefaultBunchGroupSet() - bgs.writeJSON( outputFile = "L1BunchGroupSet.json", destdir = cmdline.dest) - - - -def main(): - - - availableMenus = dict([ - ("phy8" , "Physics_pp_v8"), - ("phy" , "Physics_pp_v8"), - ("mc8" , "MC_pp_v8" ), - ("mc" , "MC_pp_v8" ), - ("mcp" , ["MC_pp_v8_no_prescale", "MC_pp_v8_loose_mc_prescale", "MC_pp_v8_tight_mc_prescale"]), - ("ls" , "LS2_v1" ), - ("phyr3v1" , "Physics_pp_run3_v1" ), - ("phyp1r3v1" , "PhysicsP1_pp_run3_v1" ), - ("mcr3v1" , "MC_pp_run3_v1" ), - ("cosmic", "Cosmic_run3_v1"), - ("hip1r3v1", "PhysicsP1_HI_run3_v1" ), - ("devhir3v1", "Dev_HI_run3_v1" ), - ("hiphy4","Physics_HI_v4"), - ("hiphy", "Physics_HI_v4"), - ("himc4", "MC_HI_v4" ), - ("himc", "MC_HI_v4" ), - ]) - - cmdline = parseCmdLine(possibleMenus = availableMenus.keys()) - - # Make sure output directory exists - from pathlib import Path - Path(cmdline.dest).mkdir(parents=True, exist_ok=True) - - if cmdline.menu.lower() in availableMenus: - menu = availableMenus[cmdline.menu.lower()] - if not isinstance(menu,list): - menu = [menu] - for m in menu: - generateL1Menu(menu=m, cmdline=cmdline) - elif cmdline.menu.lower() == "bgrp": - generateDefaultMCBunchgroupSet(cmdline=cmdline) + parser = argparse.ArgumentParser() + parser.add_argument("menu", nargs="?", default=ConfigFlags.Trigger.triggerMenuSetup, + help="the menu to generate [%(default)s]") + parser.add_argument("--bgrp", action="store_true", + help="generate default MC bunchgroup") + parser.add_argument("-v", "--verbose", action="store_true", + help="increase output verbosity") + + args = parser.parse_args() + + # set menu + ConfigFlags.Trigger.triggerMenuSetup = args.menu + ConfigFlags.lock() + + # set verbosity + if args.verbose: + from AthenaCommon.Logging import logging + logging.getLogger("TriggerMenuMT").setLevel(logging.DEBUG) + + # Bunchgroup generation + if args.bgrp: + from TriggerMenuMT.L1.Base.Limits import Limits + from TriggerMenuMT.L1.Base.BunchGroupSet import createDefaultBunchGroupSet + Limits.setLimits(CTPVersion=4) + bgs = createDefaultBunchGroupSet() + bgs.writeJSON(outputFile = "L1BunchGroupSet.json") else: - generateL1Menu(menu=cmdline.menu, cmdline=cmdline) + # L1 menu generation + from TrigConfigSvc.TrigConfigSvcCfg import generateL1Menu + generateL1Menu(ConfigFlags) return 0 diff --git a/Trigger/TriggerCommon/TriggerMenuMT/scripts/test_slice_independence.sh b/Trigger/TriggerCommon/TriggerMenuMT/scripts/test_slice_independence.sh deleted file mode 100755 index f15eda9acf20242daf537ab5d4bfed4253c69420..0000000000000000000000000000000000000000 --- a/Trigger/TriggerCommon/TriggerMenuMT/scripts/test_slice_independence.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh - -# This is not an ART test, but a unit test - -# This is a unit test checking that chains are assigned to -# the correct slice. Configuration will fail if e.g. -# an egamma chain is placed in the muon slice. -# -# Combined slice is not handled because it has to import -# all the others anyway -# -# The configuration will exit early, just after attempting to -# generate a dummy config for each chain in the tested slice - -# Fail if any command fails: -set -e - -athena.py -c "setMenu='LS2_v1';doWriteBS=False;doWriteRDOTrigger=True;fpeAuditor=True; doEmptyMenu=True; do${1}Slice=True; from AthenaConfiguration.AllConfigFlags import ConfigFlags; ConfigFlags.Trigger.Test.doDummyChainConfig=True" --filesInput=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TriggerTest/valid1.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.merge.RDO.e4993_s3214_r11315/RDO.17533168._000001.pool.root.1 --threads=1 TriggerJobOpts/runHLT_standalone.py --config-only=config.pkl